Package boofcv.alg.filter.binary
Class ContourTracer
java.lang.Object
boofcv.alg.filter.binary.ContourTracer
Used to trace the external and internal contours around objects for
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setInputs
(GrayU8 binary, GrayS32 labeled, PackedSetsPoint2D_I32 storagePoints) Specifies the input images.void
setMaxContourSize
(int maxContourSize) void
trace
(int label, int initialX, int initialY, boolean external) Traces the contour starting at the specified seed.
-
Constructor Details
-
ContourTracer
Specifies connectivity rule- Parameters:
rule
- Specifies 4 or 8 as connectivity rule
-
-
Method Details
-
setInputs
Specifies the input images.- Parameters:
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.
-
trace
public void trace(int label, int initialX, int initialY, boolean external) Traces the contour starting at the specified seed.- Parameters:
external
- True for tracing an external contour or false for internal.
-
setMaxContourSize
public void setMaxContourSize(int maxContourSize) -
getConnectRule
-