boofcv.alg.shapes.polyline
Class FitLinesToContour
- java.lang.Object
-
- boofcv.alg.shapes.polyline.FitLinesToContour
-
public class FitLinesToContour extends java.lang.ObjectRefines 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.
-
-
Constructor Summary
Constructors Constructor and Description FitLinesToContour()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanfitAnchored(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.voidsetContour(java.util.List<Point2D_I32> contour)
-
-
-
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 pointanchor1- corner index of the second end point.corners- Initial location of the cornersoutput- Optimized location of the corners
-
-
DataMelt 3.0 © DataMelt by jWork.ORG