public class ConnectLinesGrid
extends java.lang.Object
Given a grid of detected line segments connect line segments together if they appear to be apart of the same line. First lines inside the same segment are considered and connected together then lines in neighboring segments are linked together. Connectivity rules are inspired by [1] with a couple of departures and optimizations.
Two lines are considered to belong to the same line if:
[1] M. Hirzer, "Marker Detection for Augmented Reality Applications" Seminar/Project Image Analysis Graz, October 27, 2008.
| Constructor and Description |
|---|
ConnectLinesGrid(double lineSlopeAngleTol,
double tangentTol,
double parallelTol)
Specify line connecting parameters.
|
| Modifier and Type | Method and Description |
|---|---|
void |
process(MatrixOfList<georegression.struct.line.LineSegment2D_F32> grid) |
public ConnectLinesGrid(double lineSlopeAngleTol,
double tangentTol,
double parallelTol)
lineSlopeAngleTol - How similar the slope two lines need to be in radians. Try 0.062.tangentTol - Tolerance along tangential axis. Try 1.parallelTol - Tolerance along longitudinal axis. Try 8.public void process(MatrixOfList<georegression.struct.line.LineSegment2D_F32> grid)