public class ColourGradientFeatureExtractor extends Object implements ScaleSpaceFeatureExtractor<OrientedFeatureVector,MBFImage>
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 MBFImage |
image |
protected float |
magnification
The magnification factor determining the size of the sampling region
relative to the scale of the interest point.
|
protected FImage[] |
magnitudes |
protected FImage[] |
orientations |
Constructor and Description |
---|
ColourGradientFeatureExtractor(AbstractDominantOrientationExtractor dominantOrientationExtractor,
GradientFeatureProviderFactory factory)
Construct with the given orientation extractor and gradient feature
provider.
|
ColourGradientFeatureExtractor(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<MBFImage> properties)
Extract FeatureVector(s), possibly using the information given in the
properties.
|
GradientScaleSpaceImageExtractorProperties<FImage> |
getCurrentGradientProps(ScaleSpaceImageExtractorProperties<MBFImage> properties)
Get the GradientScaleSpaceImageExtractorProperties for the given
properties.
|
protected FImage[] magnitudes
protected FImage[] orientations
protected float magnification
public ColourGradientFeatureExtractor(AbstractDominantOrientationExtractor dominantOrientationExtractor, GradientFeatureProviderFactory factory)
dominantOrientationExtractor
- the orientation extractorfactory
- the gradient feature providerpublic ColourGradientFeatureExtractor(AbstractDominantOrientationExtractor dominantOrientationExtractor, GradientFeatureProviderFactory factory, float magnification)
dominantOrientationExtractor
- the orientation extractorfactory
- the gradient feature providermagnification
- the magnification factor.public OrientedFeatureVector[] extractFeature(ScaleSpaceImageExtractorProperties<MBFImage> properties)
FeatureVectorExtractor
extractFeature
in interface FeatureVectorExtractor<OrientedFeatureVector,ScaleSpaceImageExtractorProperties<MBFImage>>
properties
- Properties describing how the features should be extracted.public GradientScaleSpaceImageExtractorProperties<FImage> getCurrentGradientProps(ScaleSpaceImageExtractorProperties<MBFImage> properties)
properties
- input propertiesprotected OrientedFeatureVector createFeature(float orientation)