public class ContourTracer
extends java.lang.Object
LinearContourLabelChang2004. As it
is tracing an object it will modify the binary image by labeling. The input binary image is assumed to have
a 1-pixel border that needs to be compensated for.| Constructor and Description |
|---|
ContourTracer(ConnectRule rule)
Specifies connectivity rule
|
| Modifier and Type | Method and Description |
|---|---|
void |
setInputs(ImageUInt8 binary,
ImageSInt32 labeled,
org.ddogleg.struct.FastQueue<georegression.struct.point.Point2D_I32> storagePoints) |
void |
trace(int label,
int initialX,
int initialY,
boolean external,
java.util.List<georegression.struct.point.Point2D_I32> contour) |
public ContourTracer(ConnectRule rule)
rule - Specifies 4 or 8 as connectivity rulepublic void setInputs(ImageUInt8 binary, ImageSInt32 labeled, org.ddogleg.struct.FastQueue<georegression.struct.point.Point2D_I32> storagePoints)
binary - Binary image with a border of zeros added to the outside.labeled - Labeled image. Size is the same as the original binary image without border.storagePoints - public void trace(int label,
int initialX,
int initialY,
boolean external,
java.util.List<georegression.struct.point.Point2D_I32> contour)
label - initialX - initialY - external - True for tracing an external contour or false for internal..contour -