Documentation of 'boofcv.alg.fiducial.calib.chess.ChessboardPolygonHelper' Java class
ChessboardPolygonHelper
boofcv.alg.fiducial.calib.chess

Class ChessboardPolygonHelper<T extends ImageGray>

  • All Implemented Interfaces:
    PolygonHelper


    public class ChessboardPolygonHelper<T extends ImageGray>
    extends java.lang.Object
    implements PolygonHelper
    Helper which expands polygons prior to optimization. This is done to counter act the erosion step which shrunk the polygon
    • Method Detail

      • setImageShape

        public void setImageShape(int width,
                                  int height)
        Description copied from interface: PolygonHelper
        Specifies width and height of the image being processed
        Specified by:
        setImageShape in interface PolygonHelper
        Parameters:
        width - Image width in pixels
        height - Image height in pixels
      • adjustBeforeOptimize

        public void adjustBeforeOptimize(Polygon2D_F64 polygon)
        Description copied from interface: PolygonHelper
        This function is invoked just before a polygon's edge is optimized. It's pixel precise at this point.
        Specified by:
        adjustBeforeOptimize in interface PolygonHelper
      • filterContour

        public boolean filterContour(java.util.List<Point2D_I32> contour,
                                     boolean touchesBorder,
                                     boolean distorted)
        Description copied from interface: PolygonHelper
        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.
        Specified by:
        filterContour in interface PolygonHelper
        Parameters:
        contour - External contour around a shape. Can be modified
        touchesBorder - true if the contour touches the image border or false if it doesnt
        distorted - 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

        public boolean filterPixelPolygon(java.util.List<Point2D_I32> externalUndist,
                                          java.util.List<Point2D_I32> externalDist,
                                          GrowQueue_I32 splits,
                                          boolean touchesBorder)
        If not touching the border then the number of corners must be 4. If touching the border there must be at least 3 corners not touching the border. 7 corners at most. If there were 8 then all sides of a square would be touching the border. No more than 3 corners since that's the most number of non-border corners a square can have.
        Specified by:
        filterPixelPolygon in interface PolygonHelper
        Parameters:
        externalUndist - External contour around a shape in undistorted pixel coordinates. Can be modified
        externalDist - External contour around a shape in distorted pixel coordinates. Modifications ignored.
        splits - Indexes in the contour where the polygon has a vertex
        touchesBorder - 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

Ads help maintain this website.