Documentation of 'boofcv.alg.shapes.edge.PolygonEdgeIntensity' Java class
PolygonEdgeIntensity
boofcv.alg.shapes.edge

Class PolygonEdgeIntensity<T extends ImageGray>



  • public class PolygonEdgeIntensity<T extends ImageGray>
    extends java.lang.Object
    Looks at the difference in pixel values along the edge of a polygon and decides if its a false positive or not. The average difference along the polygons edge is the score. Note that the abs is only taken after the sum is finished, so objects which are entirely dark/light along the edge will have an advantage.
    • Constructor Detail

      • PolygonEdgeIntensity

        public PolygonEdgeIntensity(double cornerOffset,
                                    double tangentDistance,
                                    int numSamples,
                                    java.lang.Class<T> imageType)
        Constructor which configures scoring.
        Parameters:
        cornerOffset - Number of pixels away from corner it will start sampling
        tangentDistance - How far from the line it will sample tangentially
        numSamples - Number of points it will sample along an edge
        imageType - Type of image it will process
    • Method Detail

      • setTransform

        public void setTransform(PixelTransform_F32 undistToDist)
        Used to specify a transform that is applied to pixel coordinates to bring them back into original input image coordinates. For example if the input image has lens distortion but the edge were found in undistorted coordinates this code needs to know how to go from undistorted back into distorted image coordinates in order to read the pixel's value.
        Parameters:
        undistToDist - Pixel transformation from undistorted pixels into the actual distorted input image..
      • setImage

        public void setImage(T image)
        Sets the image which is going to be processed.
      • computeEdge

        public boolean computeEdge(Polygon2D_F64 polygon,
                                   boolean ccw)
        Checks to see if its a valid polygon or a false positive by looking at edge intensity
        Parameters:
        polygon - The polygon being tested
        ccw - True if the polygon is counter clockwise
        Returns:
        true if it could compute the edge intensity, otherwise false
      • checkIntensity

        public boolean checkIntensity(boolean insideDark,
                                      double threshold)
        Checks the edge intensity against a threshold. dark: outside-inside ≥ threshold light: inside-outside ≥ threshold
        Parameters:
        insideDark - is the inside of the polygon supposed to be dark or light?
        threshold - threshold for average difference
        Returns:
        true if the edge intensity is significant enough
      • getCornerOffset

        public double getCornerOffset()
      • setCornerOffset

        public void setCornerOffset(double cornerOffset)
      • getTangentDistance

        public double getTangentDistance()
      • setTangentDistance

        public void setTangentDistance(double tangentDistance)
      • getAverageInside

        public double getAverageInside()
      • getAverageOutside

        public double getAverageOutside()

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.