Class SiftDetector
- java.lang.Object
-
- boofcv.alg.feature.detect.interest.SiftDetector
-
- Direct Known Subclasses:
- CompleteSift
public class SiftDetector extends java.lang.ObjectImplementation of SIFT [1] feature detector. Feature detection is first done by creating the first octave in a
scale space. Then the Difference-of-Gaussian (DoG) is computed from sequential scales inside the scale-space. From the DoG images, pixels which are maximums and minimums spatially and with in scale are found. Edges of objects can cause false positives so those are suppressed. The remaining features are interpolated spatially and across scale.This class is designed so that it can operate as a stand alone feature detector or so that it can be extended to compute feature descriptors too. The advantage of the former is that the scale-space only needs to be constructed once.
Processing Steps
- Construct first octave of DoG images using
SiftScaleSpace - For DoG images 1 to N+1, detect features
- Use
NonMaxLimiterto detect features spatially. - Check to see if detected features are minimums or maximums in DoG scale space by checking the equivalent 3x3
regions in the DoG images above and below it.
isScaleSpaceExtremum(int, int, float, float) - Detect false positive edges using trace and determinant from Hessian of DoG image
- Interpolate feature's (x,y,sigma) coordinate using the peak of a 2nd order polynomial (quadratic).
processFeatureCandidate(int, int, float, boolean)
Where N is the number of scale parameters. There are N+3 scale images and N+2 DoG images in an octave.
Edge Detection
Edges can also cause local extremes (false positives) in the DoG image. To remove those false positives an edge detector is proposed by Lowe. The edge detector is turned with the parameter 'r' and a point is considered an edge if the following is true:
Tr2/Det < (r+1)2/r
where Tr and Det are the trace an determinant of a 2x2 hessian matrix computed from the DoG hessian at that point, [dXX,dXY;dYX,dYY]Deviations from standard SIFT
- Spatial maximums are not limited to a 3x3 region like they are in the paper. User configurable.
- Quadratic interpolation is used independently on x,y, and scale axis.
- What the scale of a DoG image is isn't specified in the paper. Assumed to be the same as the lower indexed scale image it was computed from.
[1] Lowe, D. "Distinctive image features from scale-invariant keypoints". International Journal of Computer Vision, 60, 2 (2004), pp.91--110.
-
-
Constructor Summary
Constructors Constructor and Description SiftDetector(SiftScaleSpace scaleSpace, double edgeR, NonMaxLimiter extractor)Configures SIFT detector
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description FastQueue<ScalePoint>getDetections()voidprocess(GrayF32 input)Detects SIFT features inside the input image
-
-
-
Constructor Detail
-
SiftDetector
public SiftDetector(SiftScaleSpace scaleSpace, double edgeR, NonMaxLimiter extractor)
Configures SIFT detector- Parameters:
scaleSpace- Provides the scale spaceedgeR- Threshold used to remove edge responses. Larger values means its less strict. Try 10extractor- Spatial feature detector that can be configured to limit the number of detected features in each scale.
-
-
Method Detail
-
process
public void process(GrayF32 input)
Detects SIFT features inside the input image- Parameters:
input- Input image. Not modified.
-
getDetections
public FastQueue<ScalePoint> getDetections()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG