public class FastCornerDetector<T extends boofcv.struct.image.ImageGray<T>> extends java.lang.Object implements FeatureIntensity<T>
Generic interface for fast corner detection algorithms. The general idea is that at the points in a circle around the center point (see below) should either be above or below the center pixel's intensity value value. With this information candidates corners can be quickly eliminated, see [1].
This implementation works by trying to minimize the number of reads per pixel. Code is auto generated and samples each point in a series of if statements such that the number of possible candidate corners around a pixel are eliminated. A different auto generated implementation is provided for Fast 9 to Fast 12. The number indicates how many continuous pixels are needed for it to be considered a corner.
After a pixel is flagged as a corner then the the intensity the difference between the average exterior pixel value which is part of the corner and the center pixel value. See code for details.
Circle of radius 2 pixels is searched around the center point 'x':
| 12 | 13 | 14 | ||||
| 11 | 15 | |||||
| 10 | 16 | |||||
| 09 | 01 | |||||
| 08 | 02 | |||||
| 07 | 03 | |||||
| 06 | 05 | 04 |
| Modifier and Type | Field and Description |
|---|---|
protected FastCornerInterface<T> |
helper |
protected T |
image |
protected double |
maxFeaturesFraction
Maximum number of pixels that can be considered corners.
|
protected int[] |
offsets |
protected static int |
radius |
| Constructor and Description |
|---|
FastCornerDetector(FastCornerInterface<T> helper)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
boofcv.struct.QueueCorner |
getCornersHigh() |
boofcv.struct.QueueCorner |
getCornersLow() |
int |
getIgnoreBorder()
Size of the region surrounding the image's border in which pixels are not processed.
|
double |
getMaxFeaturesFraction() |
int |
getRadius()
Returns the radius of the feature being computed.
|
void |
process(T image)
Computes fast corner features
|
void |
process(T image,
boofcv.struct.image.GrayF32 intensity)
Computes fast corner features and their intensity.
|
void |
setMaxFeaturesFraction(double maxFeaturesFraction) |
protected static final int radius
protected int[] offsets
protected FastCornerInterface<T extends boofcv.struct.image.ImageGray<T>> helper
protected double maxFeaturesFraction
public FastCornerDetector(FastCornerInterface<T> helper)
helper - Provide the image type specific helper.public boofcv.struct.QueueCorner getCornersLow()
public boofcv.struct.QueueCorner getCornersHigh()
public int getRadius()
FeatureIntensitygetRadius in interface FeatureIntensity<T extends boofcv.struct.image.ImageGray<T>>public int getIgnoreBorder()
FeatureIntensitygetIgnoreBorder in interface FeatureIntensity<T extends boofcv.struct.image.ImageGray<T>>public void process(T image, boofcv.struct.image.GrayF32 intensity)
public void process(T image)
public double getMaxFeaturesFraction()
public void setMaxFeaturesFraction(double maxFeaturesFraction)