public class HoughTransformLineFootOfNorm
extends java.lang.Object
Hough transform based line detector. Lines are parameterized based upon the (x,y) coordinate of the closest point to the origin. This parametrization is more convenient since it corresponds directly with the image space. See [1] for more details.
The line's direction is estimated using the gradient at each point flagged as belonging to a line. To minimize error the image center is used as the coordinate system's center. However lines which lie too close to the center can't have their orientation accurately estimated.
[1] Section 9.3 of E.R. Davies, "Machine Vision Theory Algorithms Practicalities," 3rd Ed. 2005
| Constructor and Description |
|---|
HoughTransformLineFootOfNorm(NonMaxSuppression extractor,
int minDistanceFromOrigin)
Specifies parameters of transform.
|
| Modifier and Type | Method and Description |
|---|---|
org.ddogleg.struct.FastQueue<georegression.struct.line.LineParametric2D_F32> |
extractLines()
Searches for local maximas and converts into lines.
|
float[] |
getFoundIntensity()
Returns the intensity/edge count for each returned line.
|
boofcv.struct.image.GrayF32 |
getTransform()
Returns the Hough transform image.
|
void |
parameterize(int x,
int y,
float derivX,
float derivY)
Takes the detected point along the line and its gradient and converts it into transform space.
|
<D extends boofcv.struct.image.ImageGray> |
transform(D derivX,
D derivY,
boofcv.struct.image.GrayU8 binary)
Computes the Hough transform using the image gradient and a binary image which flags pixels as being edges or not.
|
public HoughTransformLineFootOfNorm(NonMaxSuppression extractor, int minDistanceFromOrigin)
extractor - Extracts local maxima from transform space. A set of candidates is provided, but can be ignored.minDistanceFromOrigin - Distance from the origin in which lines will not be estimated. In transform space. Try 5.public <D extends boofcv.struct.image.ImageGray> void transform(D derivX,
D derivY,
boofcv.struct.image.GrayU8 binary)
derivX - Image derivative along x-axis.derivY - Image derivative along y-axis.binary - Non-zero pixels are considered to be line pixels.public org.ddogleg.struct.FastQueue<georegression.struct.line.LineParametric2D_F32> extractLines()
public void parameterize(int x,
int y,
float derivX,
float derivY)
x - point in image.y - point in image.derivX - gradient of point.derivY - gradient of point.public boofcv.struct.image.GrayF32 getTransform()
public float[] getFoundIntensity()