Package boofcv.alg.filter.binary
Class ContourTracer
- java.lang.Object
-
- boofcv.alg.filter.binary.ContourTracer
-
public class ContourTracer extends java.lang.ObjectUsed to trace the external and internal contours around objects forLinearContourLabelChang2004. 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
Constructors Constructor Description ContourTracer(boofcv.struct.ConnectRule rule)Specifies connectivity rule
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boofcv.struct.ConnectRulegetConnectRule()voidsetInputs(boofcv.struct.image.GrayU8 binary, boofcv.struct.image.GrayS32 labeled, boofcv.struct.PackedSetsPoint2D_I32 storagePoints)voidsetMaxContourSize(int maxContourSize)voidtrace(int label, int initialX, int initialY, boolean external)
-
-
-
Method Detail
-
setInputs
public void setInputs(boofcv.struct.image.GrayU8 binary, boofcv.struct.image.GrayS32 labeled, boofcv.struct.PackedSetsPoint2D_I32 storagePoints)- 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.storagePoints-
-
trace
public void trace(int label, int initialX, int initialY, boolean external)- Parameters:
label-initialX-initialY-external- True for tracing an external contour or false for internal.
-
setMaxContourSize
public void setMaxContourSize(int maxContourSize)
-
getConnectRule
public boofcv.struct.ConnectRule getConnectRule()
-
-