Documentation of 'boofcv.alg.shapes.polyline.FitLinesToContour' Java class
FitLinesToContour
boofcv.alg.shapes.polyline

Class FitLinesToContour



  • public class FitLinesToContour
    extends java.lang.Object
    Refines a set of corner points along a contour by fitting lines to the points between the corners using a least-squares technique. It then refines the corners estimates by interesting the lines and finding the closest point on the contour. A surprising number of things can go wrong and there are a lot of adhoc rules in this class and probably valid shapes are rejected. It's well tested but wouldn't be shocked if it contains bugs that are compensated for else where in the code.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean fitAnchored(int anchor0, int anchor1, GrowQueue_I32 corners, GrowQueue_I32 output)
      Fits line segments along the contour with the first and last corner fixed at the original corners.
      void setContour(java.util.List<Point2D_I32> contour) 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FitLinesToContour

        public FitLinesToContour()
    • Method Detail

      • setContour

        public void setContour(java.util.List<Point2D_I32> contour)
      • fitAnchored

        public boolean fitAnchored(int anchor0,
                                   int anchor1,
                                   GrowQueue_I32 corners,
                                   GrowQueue_I32 output)
        Fits line segments along the contour with the first and last corner fixed at the original corners. The output will be a new set of corner indexes. Since the corner list is circular, it is assumed that anchor1 comes after anchor0. The same index can be specified for an anchor, it will just go around the entire circle
        Parameters:
        anchor0 - corner index of the first end point
        anchor1 - corner index of the second end point.
        corners - Initial location of the corners
        output - Optimized location of the corners

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.