Documentation of 'boofcv.alg.shapes.polygon.PolygonHelper' Java class
PolygonHelper
boofcv.alg.shapes.polygon

Interface PolygonHelper

    • Method Detail

      • setImageShape

        void setImageShape(int width,
                           int height)
        Specifies width and height of the image being processed
        Parameters:
        width - Image width in pixels
        height - 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 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

        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 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.