public class HoughTransformLinePolar
extends java.lang.Object
Hough transform which uses a polar line representation. Each pixel that is identified as a potential line in the image is transformed into parameter space as a line. Local maximals are considered to be true lines in the image. Parameter space is discretized into a set of bins. The range can vary from +- the maximum range inside the image and the angle from 0 to PI radians. How finely discretized an image is effects line detection accuracy. If too fine lines might not be detected or it will be too noisy.
USAGE NOTE: Duplicate/very similar lines are possible due to angles being cyclical. What happens is that if a line's orientation lies along a boundary point its angles will be split up between top and bottom of the transform. When lines are extracted using non-maximum it will detects peaks at the top and bottom.
| Constructor and Description |
|---|
HoughTransformLinePolar(NonMaxSuppression extractor,
int numBinsRange,
int numBinsAngle)
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.
|
int |
getNumBinsAngle() |
int |
getNumBinsRange() |
boofcv.struct.image.ImageFloat32 |
getTransform()
Returns the Hough transform image.
|
void |
parameterize(int x,
int y)
Converts the pixel coordinate into a line in parameter space
|
void |
transform(boofcv.struct.image.ImageUInt8 binary)
Computes the Hough transform of the image.
|
public HoughTransformLinePolar(NonMaxSuppression extractor, int numBinsRange, int numBinsAngle)
extractor - Extracts local maxima from transform space.numBinsRange - How many bins are be used for line range.numBinsAngle - How many bins are used for angle.public int getNumBinsRange()
public int getNumBinsAngle()
public void transform(boofcv.struct.image.ImageUInt8 binary)
binary - Binary image that indicates which pixels lie on edges.public org.ddogleg.struct.FastQueue<georegression.struct.line.LineParametric2D_F32> extractLines()
public void parameterize(int x,
int y)
public boofcv.struct.image.ImageFloat32 getTransform()
public float[] getFoundIntensity()