Package boofcv.alg.shapes.polygon
Interface PolygonHelper
- All Known Implementing Classes:
ChessboardPolygonHelper
public interface PolygonHelper
Interface which allows low level customization of
DetectPolygonFromContour
-
Method Summary
Modifier and TypeMethodDescriptionvoid
configureBeforePolyline
(PointsToPolyline contourToPolyline, boolean touchesBorder) Provide an oportunity to configure the polyline fit based on what's currently knownboolean
filterContour
(List<Point2D_I32> contour, boolean touchesBorder, boolean distorted) User defined filter to accept/reject or modify the contour of a shape.boolean
filterPixelPolygon
(Polygon2D_F64 undistorted, Polygon2D_F64 distorted, DogArray_B touches, boolean touchesBorder) Function which allows a custom filter function to be used on the pixel level precise polygonvoid
setImageShape
(int width, int height) Specifies width and height of the image being processed
-
Method Details
-
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
-
filterContour
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(Polygon2D_F64 undistorted, Polygon2D_F64 distorted, DogArray_B touches, boolean touchesBorder) Function which allows a custom filter function to be used on the pixel level precise polygon- Parameters:
undistorted
- Polygon in undistorted image pixels.distorted
- Polygon in distorted/original image pixels.touches
- Array of booleans indicating which corners touch the image border. Only valid if part of it touchestouchesBorder
- 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
-
configureBeforePolyline
Provide an oportunity to configure the polyline fit based on what's currently known
-