boofcv.alg.shapes.polygon
Interface PolygonHelper
-
- All Known Implementing Classes:
- ChessboardPolygonHelper
public interface PolygonHelperInterface which allows low level customization ofBinaryPolygonDetector
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidadjustBeforeOptimize(Polygon2D_F64 polygon)This function is invoked just before a polygon's edge is optimized.booleanfilterContour(java.util.List<Point2D_I32> contour, boolean touchesBorder, boolean distorted)User defined filter to accept/reject or modify the contour of a shape.booleanfilterPixelPolygon(java.util.List<Point2D_I32> externalUndist, java.util.List<Point2D_I32> externalDist, GrowQueue_I32 splits, boolean touchesBorder)Function which allows a custom filter function to be used on the pixel level precise polygonvoidsetImageShape(int width, int height)Specifies width and height of the image being processed
-
-
-
Method Detail
-
setImageShape
void setImageShape(int width, int height)Specifies width and height of the image being processed- Parameters:
width- Image width in pixelsheight- Image height in pixels
-
adjustBeforeOptimize
void adjustBeforeOptimize(Polygon2D_F64 polygon)
This function is invoked just before a polygon's edge is optimized. It's pixel precise at this point.
-
filterContour
boolean filterContour(java.util.List<Point2D_I32> contour, boolean touchesBorder, boolean distorted)
User defined filter to accept/reject or modify the contour of a shape. Called at most twice. First with distorted pixels and after distortion has been removed.- Parameters:
contour- External contour around a shape. Can be modifiedtouchesBorder- true if the contour touches the image border or false if it doesntdistorted- True if pixels are distorted or false for undistorted pixel coordinates- Returns:
- true to keep the contour for further processing or false to reject it
-
filterPixelPolygon
boolean filterPixelPolygon(java.util.List<Point2D_I32> externalUndist, java.util.List<Point2D_I32> externalDist, GrowQueue_I32 splits, boolean touchesBorder)
Function which allows a custom filter function to be used on the pixel level precise polygon- Parameters:
externalUndist- External contour around a shape in undistorted pixel coordinates. Can be modifiedexternalDist- External contour around a shape in distorted pixel coordinates. Modifications ignored.splits- Indexes in the contour where the polygon has a vertextouchesBorder- true if the contour touches the image border or false if it doesnt- Returns:
- true to keep the contour for further processing or false to reject it
-
-
DataMelt 3.0 © DataMelt by jWork.ORG