public abstract class SplitMergeLineFit
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
abortSplits |
protected org.ddogleg.struct.GrowQueue_B |
changed |
protected java.util.List<georegression.struct.point.Point2D_I32> |
contour |
protected georegression.struct.line.LineParametric2D_F64 |
line |
protected int |
maxIterations |
protected boofcv.struct.ConfigLength |
minimumSideLength |
protected int |
minimumSideLengthPixel |
protected georegression.struct.point.Point2D_F64 |
point2D |
protected org.ddogleg.struct.GrowQueue_I32 |
splits |
protected double |
toleranceFractionSq |
| Constructor and Description |
|---|
SplitMergeLineFit(double splitFraction,
boofcv.struct.ConfigLength minimumSideLength,
int maxIterations)
Configures algorithm
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract boolean |
_process(java.util.List<georegression.struct.point.Point2D_I32> list) |
int |
getAbortSplits() |
boolean |
process(java.util.List<georegression.struct.point.Point2D_I32> list,
org.ddogleg.struct.GrowQueue_I32 vertexes)
Approximates the input list with a set of line segments
|
void |
setAbortSplits(int abortSplits) |
void |
setMaxIterations(int maxIterations) |
void |
setSplitFraction(double toleranceSplit) |
protected double |
splitThresholdSq(georegression.struct.point.Point2D_I32 a,
georegression.struct.point.Point2D_I32 b)
Computes the split threshold from the end point of two lines
|
protected int maxIterations
protected double toleranceFractionSq
protected boofcv.struct.ConfigLength minimumSideLength
protected int minimumSideLengthPixel
protected java.util.List<georegression.struct.point.Point2D_I32> contour
protected georegression.struct.line.LineParametric2D_F64 line
protected georegression.struct.point.Point2D_F64 point2D
protected org.ddogleg.struct.GrowQueue_I32 splits
protected org.ddogleg.struct.GrowQueue_B changed
protected int abortSplits
public SplitMergeLineFit(double splitFraction,
boofcv.struct.ConfigLength minimumSideLength,
int maxIterations)
splitFraction - A line will be split if a point is more than this fraction of its
length away from the line. Try 0.05minimumSideLength - The minimum length of a side as a function of contour lengthmaxIterations - Maximum number of split and merge refinements. Set to zero to disable refinement. Try 20public boolean process(java.util.List<georegression.struct.point.Point2D_I32> list,
org.ddogleg.struct.GrowQueue_I32 vertexes)
list - (Input) Ordered list of connected points.vertexes - (Output) Indexes in the input list which are corners in the polylineprotected abstract boolean _process(java.util.List<georegression.struct.point.Point2D_I32> list)
protected double splitThresholdSq(georegression.struct.point.Point2D_I32 a,
georegression.struct.point.Point2D_I32 b)
public void setMaxIterations(int maxIterations)
public void setSplitFraction(double toleranceSplit)
public int getAbortSplits()
public void setAbortSplits(int abortSplits)