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 and Description ContourTracer(ConnectRule rule)Specifies connectivity rule
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidsetInputs(GrayU8 binary, GrayS32 labeled, FastQueue<Point2D_I32> storagePoints)voidtrace(int label, int initialX, int initialY, boolean external, java.util.List<Point2D_I32> contour)
-
-
-
Constructor Detail
-
ContourTracer
public ContourTracer(ConnectRule rule)
Specifies connectivity rule- Parameters:
rule- Specifies 4 or 8 as connectivity rule
-
-
Method Detail
-
setInputs
public void setInputs(GrayU8 binary, GrayS32 labeled, FastQueue<Point2D_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, java.util.List<Point2D_I32> contour)- Parameters:
label-initialX-initialY-external- True for tracing an external contour or false for internal..contour-
-
-
DataMelt 3.0 © DataMelt by jWork.ORG