public class CircleDetector extends java.lang.Object implements ShapeDetector<Circle>
Constructor and Description |
---|
CircleDetector(float angleSamplesPerRadius,
int radiusMin,
int radiusMax,
int radiusInc) |
Modifier and Type | Method and Description |
---|---|
Circle |
buildShape(int x,
int y,
int scaleIndex,
int votes) |
int[] |
getHoughSpaceSizeAndGenerateLUT(int imageWidth,
int imageHeight)
The parametric equation for a circle centered at (a,b) with
radius r is:
a = x - r*cos(theta)
b = y - r*sin(theta)
In order to speed calculations, we first construct a lookup
table (lut) containing the rcos(theta) and rsin(theta) values, for
theta varying from 0 to 2*PI with increments equal to: 1/pointsOfReference*radiusMax.
|
int |
getMaximumScaleIndex() |
int |
getMaximumVotesPerScale(int scaleIndex) |
int |
getMinimumScaleIndex() |
int |
getSamplesPerScaleIndex(int scaleIndex) |
int |
getScaleCount() |
int |
getScaleIncrement() |
int[] |
getSignificantPointOfShape(int x,
int y,
int sample,
int scale) |
public CircleDetector(float angleSamplesPerRadius, int radiusMin, int radiusMax, int radiusInc)
public int[] getHoughSpaceSizeAndGenerateLUT(int imageWidth, int imageHeight)
getHoughSpaceSizeAndGenerateLUT
in interface ShapeDetector<Circle>
public int getScaleCount()
getScaleCount
in interface ShapeDetector<Circle>
public int getMinimumScaleIndex()
getMinimumScaleIndex
in interface ShapeDetector<Circle>
public int getMaximumScaleIndex()
getMaximumScaleIndex
in interface ShapeDetector<Circle>
public int getScaleIncrement()
getScaleIncrement
in interface ShapeDetector<Circle>
public int getSamplesPerScaleIndex(int scaleIndex)
getSamplesPerScaleIndex
in interface ShapeDetector<Circle>
public int getMaximumVotesPerScale(int scaleIndex)
getMaximumVotesPerScale
in interface ShapeDetector<Circle>
public int[] getSignificantPointOfShape(int x, int y, int sample, int scale)
getSignificantPointOfShape
in interface ShapeDetector<Circle>
public Circle buildShape(int x, int y, int scaleIndex, int votes)
buildShape
in interface ShapeDetector<Circle>