Package boofcv.abst.filter.binary
Interface BinaryContourInterface
-
- All Known Subinterfaces:
BinaryContourFinder,BinaryLabelContourFinder
- All Known Implementing Classes:
BinaryContourFinderLinearExternal,BinaryLabelContourFinderChang2004
public interface BinaryContourInterfaceCommon interface for binary contour finders
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceBinaryContourInterface.PaddedMany contour algorithms require that the binary image has an outside border of all zeros.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static java.util.List<georegression.struct.point.Point2D_I32>copyContour(BinaryContourInterface finder, int contourID)Convenience function which loads a contour and creates copy of all the points and returns a new listboofcv.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.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> storage)Overwrites the coordinates of the saved contour.
-
-
-
Method Detail
-
getContours
java.util.List<ContourPacked> getContours()
Returns a list of contours/blobs found. WARNING: List is recycled on the next call to process().- Returns:
- List of contours.
-
loadContour
void loadContour(int contourID, org.ddogleg.struct.FastQueue<georegression.struct.point.Point2D_I32> storage)Used to load the pixels associated with a contour.- Parameters:
contourID- ID of the contour you wish to loadstorage- Storage for the contour points. Must be set to declare new elements.
-
writeContour
void writeContour(int contourID, java.util.List<georegression.struct.point.Point2D_I32> storage)Overwrites the coordinates of the saved contour. Useful when points have been undistorted and you're trying to minimize memory by not saving another copy- Parameters:
contourID- ID of the contour you wish to loadstorage- Storage for the contour points. Must be set to declare new elements.
-
setSaveInnerContour
void setSaveInnerContour(boolean enabled)
Used to toggle on and off the saving of inner contours.- Parameters:
enabled- true to enable or false to disable
-
isSaveInternalContours
boolean isSaveInternalContours()
-
setMinContour
void setMinContour(int length)
-
getMinContour
int getMinContour()
-
setMaxContour
void setMaxContour(int length)
-
getMaxContour
int getMaxContour()
-
setConnectRule
void setConnectRule(boofcv.struct.ConnectRule rule)
-
getConnectRule
boofcv.struct.ConnectRule getConnectRule()
-
copyContour
static java.util.List<georegression.struct.point.Point2D_I32> copyContour(BinaryContourInterface finder, int contourID)
Convenience function which loads a contour and creates copy of all the points and returns a new list- Returns:
- New copy of contour
-
-