Class GridRansacLineDetector<D extends ImageGray>
- java.lang.Object
-
- boofcv.alg.feature.detect.line.GridRansacLineDetector<D>
-
- Direct Known Subclasses:
- ImplGridRansacLineDetector_F32, ImplGridRansacLineDetector_S16
public abstract class GridRansacLineDetector<D extends ImageGray> extends java.lang.ObjectLine segment feature detector. The image is broken up into several regions of constant size. Inside each region pixels that have been flaged as belonging to edges are connected into lines using RANSAC or another
ModelMatcher. The output is a list of detected lines in a grid of lists. This algorithm is inspired by [1], but has several differences in how the image is processed and how the output is produced.The image is segmented into square regions of homogeneous size. Inside each region pixels which have been flagged as belonging to an edge are identified. Flagged edge pixels are referred to as "edgels" and have the image gradient at that point stored in their data structure. Gradient information is used to prune incompatible points from each other. RANSAC or similar algorithms are used to estimate and detect lines inside each region. Ones a line has been identified it is removed from the list of candidate points and more lines are searched for.
[1] J.C. Clarke, S. Carlsson, and A. Zisserman. "Detecting and tracking linear features efficiently" In. BMVC. British Machine Vision Association, 1996. 4,5,7.
-
-
Constructor Summary
Constructors Constructor and Description GridRansacLineDetector(int regionSize, int maxDetectLines, ModelMatcher<LinePolar2D_F32,Edgel> robustMatcher)Specifies major configuration parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description MatrixOfList<LineSegment2D_F32>getFoundLines()Returns all the found line segments contained in a grid.voidprocess(D derivX, D derivY, GrayU8 binaryEdges)Detects line segments through the image inside of grids.
-
-
-
Constructor Detail
-
GridRansacLineDetector
public GridRansacLineDetector(int regionSize, int maxDetectLines, ModelMatcher<LinePolar2D_F32,Edgel> robustMatcher)Specifies major configuration parameters.- Parameters:
regionSize- Length of each side in a square region. Try 40.maxDetectLines- Maximum number of lines which can be detected in a region. Try 10.robustMatcher- Robust model matcher for line detection.
-
-
Method Detail
-
process
public void process(D derivX, D derivY, GrayU8 binaryEdges)
Detects line segments through the image inside of grids.- Parameters:
derivX- Image derivative along x-axis. Not modified.derivY- Image derivative along x-axis. Not modified.binaryEdges- True values indicate that a pixel is an edge pixel. Not modified.
-
getFoundLines
public MatrixOfList<LineSegment2D_F32> getFoundLines()
Returns all the found line segments contained in a grid.- Returns:
- Grid of detected lines.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG