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 double |
minimumSideLengthFraction |
protected int |
minimumSideLengthPixel |
protected georegression.struct.point.Point2D_F64 |
point2D |
protected org.ddogleg.struct.GrowQueue_I32 |
splits |
protected double |
toleranceFractionSq |
protected org.ddogleg.struct.GrowQueue_I32 |
work |
| Constructor and Description |
|---|
SplitMergeLineFit(double splitFraction,
double minimumSideLengthFraction,
int maxIterations)
Configures algorithm
|
| Modifier and Type | Method and Description |
|---|---|
int |
getAbortSplits() |
double |
getMinimumSideLengthFraction() |
org.ddogleg.struct.GrowQueue_I32 |
getSplits()
List of point indexes in the contour.
|
abstract boolean |
process(java.util.List<georegression.struct.point.Point2D_I32> list)
Approximates the input list with a set of line segments
|
void |
setAbortSplits(int abortSplits) |
void |
setMaxIterations(int maxIterations) |
void |
setMinimumSideLengthFraction(double minimumSideLengthFraction) |
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 double minimumSideLengthFraction
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_I32 work
protected org.ddogleg.struct.GrowQueue_B changed
protected int abortSplits
public SplitMergeLineFit(double splitFraction,
double minimumSideLengthFraction,
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.05minimumSideLengthFraction - 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 abstract boolean process(java.util.List<georegression.struct.point.Point2D_I32> list)
list - Ordered list of connected points.protected double splitThresholdSq(georegression.struct.point.Point2D_I32 a,
georegression.struct.point.Point2D_I32 b)
public org.ddogleg.struct.GrowQueue_I32 getSplits()
public void setMaxIterations(int maxIterations)
public void setSplitFraction(double toleranceSplit)
public int getAbortSplits()
public void setAbortSplits(int abortSplits)
public double getMinimumSideLengthFraction()
public void setMinimumSideLengthFraction(double minimumSideLengthFraction)