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

Class ScoreLineSegmentEdge<T extends ImageGray>



  • public class ScoreLineSegmentEdge<T extends ImageGray>
    extends BaseIntegralEdge<T>
    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

      • ScoreLineSegmentEdge

        public ScoreLineSegmentEdge(int numSamples,
                                    java.lang.Class<T> imageType)
        Constructor which configures scoring.
        Parameters:
        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.
        Overrides:
        setTransform in class BaseIntegralEdge<T extends ImageGray>
        Parameters:
        undistToDist - Pixel transformation from undistorted pixels into the actual distorted input image..
      • computeAverageDerivative

        public double computeAverageDerivative(Point2D_F64 a,
                                               Point2D_F64 b,
                                               double tanX,
                                               double tanY)
        Returns average tangential derivative along the line segment. Derivative is computed in direction of tangent. A positive step in the tangent direction will have a positive value. If all samples go outside the image then zero is returned.
        Parameters:
        a - start point
        b - end point
        tanX - unit tangent x-axis. determines length of line integral
        tanY - unit tangent y-axis determines length of line integral
        Returns:
        average derivative
      • getSamplesInside

        public int getSamplesInside()
      • getNumSamples

        public int getNumSamples()
      • setNumSamples

        public void setNumSamples(int numSamples)
      • getAverageUp

        public double getAverageUp()
      • getAverageDown

        public double getAverageDown()

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.