Package boofcv.abst.filter.binary
Class BinaryLabelContourFinderChang2004
- java.lang.Object
-
- boofcv.abst.filter.binary.BinaryLabelContourFinderChang2004
-
- All Implemented Interfaces:
BinaryContourInterface,BinaryLabelContourFinder
public class BinaryLabelContourFinderChang2004 extends java.lang.Object implements BinaryLabelContourFinder
Wrapper aroundLinearContourLabelChang2004forBinaryLabelContourFinder
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface boofcv.abst.filter.binary.BinaryContourInterface
BinaryContourInterface.Padded
-
-
Constructor Summary
Constructors Constructor Description BinaryLabelContourFinderChang2004()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boofcv.struct.ConnectRulegetConnectRule()java.util.List<ContourPacked>getContours()Returns a list of contours/blobs found.intgetMaxContour()intgetMinContour()booleanisSaveInternalContours()voidloadContour(int contourID, org.ddogleg.struct.FastQueue<georegression.struct.point.Point2D_I32> storage)Used to load the pixels associated with a contour.voidprocess(boofcv.struct.image.GrayU8 binary, boofcv.struct.image.GrayS32 labeled)Processes the binary image to find the contour of and label blobs.voidsetConnectRule(boofcv.struct.ConnectRule rule)voidsetMaxContour(int length)voidsetMinContour(int length)voidsetSaveInnerContour(boolean enabled)Used to toggle on and off the saving of inner contours.voidwriteContour(int contourID, java.util.List<georegression.struct.point.Point2D_I32> list)Overwrites the coordinates of the saved contour.
-
-
-
Method Detail
-
process
public void process(boofcv.struct.image.GrayU8 binary, boofcv.struct.image.GrayS32 labeled)Description copied from interface:BinaryLabelContourFinderProcesses the binary image to find the contour of and label blobs.- Specified by:
processin interfaceBinaryLabelContourFinder- Parameters:
binary- Input binary image. Not modified.labeled- Output. Labeled image. Modified.
-
getContours
public java.util.List<ContourPacked> getContours()
Description copied from interface:BinaryContourInterfaceReturns a list of contours/blobs found. WARNING: List is recycled on the next call to process().- Specified by:
getContoursin interfaceBinaryContourInterface- Returns:
- List of contours.
-
loadContour
public void loadContour(int contourID, org.ddogleg.struct.FastQueue<georegression.struct.point.Point2D_I32> storage)Description copied from interface:BinaryContourInterfaceUsed to load the pixels associated with a contour.- Specified by:
loadContourin interfaceBinaryContourInterface- Parameters:
contourID- ID of the contour you wish to loadstorage- Storage for the contour points. Must be set to declare new elements.
-
writeContour
public void writeContour(int contourID, java.util.List<georegression.struct.point.Point2D_I32> list)Description copied from interface:BinaryContourInterfaceOverwrites the coordinates of the saved contour. Useful when points have been undistorted and you're trying to minimize memory by not saving another copy- Specified by:
writeContourin interfaceBinaryContourInterface- Parameters:
contourID- ID of the contour you wish to loadlist- Storage for the contour points. Must be set to declare new elements.
-
setSaveInnerContour
public void setSaveInnerContour(boolean enabled)
Description copied from interface:BinaryContourInterfaceUsed to toggle on and off the saving of inner contours.- Specified by:
setSaveInnerContourin interfaceBinaryContourInterface- Parameters:
enabled- true to enable or false to disable
-
isSaveInternalContours
public boolean isSaveInternalContours()
- Specified by:
isSaveInternalContoursin interfaceBinaryContourInterface
-
setMinContour
public void setMinContour(int length)
- Specified by:
setMinContourin interfaceBinaryContourInterface
-
getMinContour
public int getMinContour()
- Specified by:
getMinContourin interfaceBinaryContourInterface
-
setMaxContour
public void setMaxContour(int length)
- Specified by:
setMaxContourin interfaceBinaryContourInterface
-
getMaxContour
public int getMaxContour()
- Specified by:
getMaxContourin interfaceBinaryContourInterface
-
setConnectRule
public void setConnectRule(boofcv.struct.ConnectRule rule)
- Specified by:
setConnectRulein interfaceBinaryContourInterface
-
getConnectRule
public boofcv.struct.ConnectRule getConnectRule()
- Specified by:
getConnectRulein interfaceBinaryContourInterface
-
-