public class GradientFeatureExtractor extends Object implements ScaleSpaceFeatureExtractor<OrientedFeatureVector,FImage>
Class capable of extracting local descriptors from a circular region
in an image defined by its scale and centre. The actual feature
extracted is determined by the GradientFeatureProvider
that
is provided by the GradientFeatureProviderFactory
set during
construction.
The GradientFeatureExtractor first calculates the dominant orientation
of the image patch described by the ScaleSpaceImageExtractorProperties
and then iterates over the pixels in an oriented square, centered on the
interest point, passing the gradient and magnitude values of the respective
pixel to the GradientFeatureProvider
.
The size of the sampling square, relative to scale is set by a single parameter,
magnification. For some types of feature provider, this number
might need to be set based on the internal settings of the provider. For example,
with a SIFTFeatureProvider
this will probably be set to a constant multiplied
by the number of spatial bins of the feature. For SIFT, this constant is typically
around 3, so with a standard 4-spatial binned SIFT provider, the magnification
factor of the extractor should be about 12.
Modifier and Type | Field and Description |
---|---|
protected float |
magnification
The magnification factor determining the size of the sampling
region relative to the scale of the interest point.
|
Constructor and Description |
---|
GradientFeatureExtractor(AbstractDominantOrientationExtractor dominantOrientationExtractor,
GradientFeatureProviderFactory factory)
Construct with the given orientation extractor and gradient feature provider.
|
GradientFeatureExtractor(AbstractDominantOrientationExtractor dominantOrientationExtractor,
GradientFeatureProviderFactory factory,
float magnification)
Construct with the given orientation extractor, gradient feature provider
and magnification factor determining the size of the sampling
region relative to the scale of the interest point.
|
Modifier and Type | Method and Description |
---|---|
protected OrientedFeatureVector |
createFeature(float orientation) |
OrientedFeatureVector[] |
extractFeature(ScaleSpaceImageExtractorProperties<FImage> properties)
Extract FeatureVector(s), possibly using the information given in the
properties.
|
GradientScaleSpaceImageExtractorProperties<FImage> |
getCurrentGradientProps(ScaleSpaceImageExtractorProperties<FImage> properties)
Get the GradientScaleSpaceImageExtractorProperties for the given properties.
|
protected float magnification
public GradientFeatureExtractor(AbstractDominantOrientationExtractor dominantOrientationExtractor, GradientFeatureProviderFactory factory)
dominantOrientationExtractor
- the orientation extractorfactory
- the gradient feature providerpublic GradientFeatureExtractor(AbstractDominantOrientationExtractor dominantOrientationExtractor, GradientFeatureProviderFactory factory, float magnification)
dominantOrientationExtractor
- the orientation extractorfactory
- the gradient feature providermagnification
- the magnification factor.public OrientedFeatureVector[] extractFeature(ScaleSpaceImageExtractorProperties<FImage> properties)
FeatureVectorExtractor
extractFeature
in interface FeatureVectorExtractor<OrientedFeatureVector,ScaleSpaceImageExtractorProperties<FImage>>
properties
- Properties describing how the features should be extracted.public GradientScaleSpaceImageExtractorProperties<FImage> getCurrentGradientProps(ScaleSpaceImageExtractorProperties<FImage> properties)
properties
- input propertiesprotected OrientedFeatureVector createFeature(float orientation)