code: public static List<Contour> contour(GrayU8 input, ConnectRule rule, GrayS32 output) {
  		if( output == null ) {
  			output = new GrayS32(input.width,input.height);
  		} else {
  			InputSanityCheck.checkSameShape(input,output);
  		}
  
  		BinaryLabelContourFinder alg = FactoryBinaryContourFinder.linearChang2004();
  		alg.setConnectRule(rule);
  		alg.process(input,output);
  
  		return convertContours(alg);
  	}
docs: <p>
  Given a binary image, connect together pixels to form blobs/clusters using the specified connectivity rule.
  The found blobs will be labeled in an output image and also described as a set of contours.  Pixels
  in the contours are consecutive order in a clockwise or counter-clockwise direction, depending on the
  implementation.  The labeled image will assign background pixels a label of 0 and each blob will be
  assigned a unique ID starting from 1.
  </p>
  
  <p>
  The returned contours are traces of the object.  The trace of an object can be found by marking a point
  with a pen and then marking every point on the contour without removing the pen.  It is possible to have
  the same point multiple times in the contour.
  </p>
  
  @see LinearContourLabelChang2004
  
  @param input Input binary image.  Not modified.
  @param rule Connectivity rule.  Can be 4 or 8.  8 is more commonly used.
  @param output (Optional) Output labeled image. If null, an image will be declared internally.  Modified.
  @return List of found contours for each blob.