public class GradientOrientationHistogramExtractor extends SATWindowedExtractor implements ImageAnalyser<FImage>
WindowedHistogramExtractor
for efficiently
extracting gradient orientation histograms. This implementation is built on
top of a SATWindowedExtractor
. The analyseImage(FImage)
method can be used to precompute the underlying data required for efficient
histogram extraction using any of the computeHistogram
methods.
Computed histograms are simply the sum of magnitudes for each orientation bin
over the given window. If you need to generate more complex features (for
example, aggregated spatially binned histograms) then use this class in
combination with a SpatialBinningStrategy
.
The analyseImage(FImage, FImage)
method can be used to construct
histograms with moderated magnitudes (for example, suppressing all magnitudes
except those at edges).
nbins, sats
Constructor and Description |
---|
GradientOrientationHistogramExtractor(int nbins,
boolean histogramInterpolation,
FImageGradients.Mode orientationMode)
Construct a new
GradientOrientationHistogramExtractor with the
given number of bins. |
Modifier and Type | Method and Description |
---|---|
void |
analyseImage(FImage image)
Analyse an image.
|
void |
analyseImage(FImage image,
FImage edges)
Analyse the given image, but construct the internal data such that the
gradient magnitudes are multiplied by the given edge map before being
accumulated.
|
computeHistogram, computeHistogram, computeHistogram, computeHistogram, computeSATs, getNumBins
public GradientOrientationHistogramExtractor(int nbins, boolean histogramInterpolation, FImageGradients.Mode orientationMode)
GradientOrientationHistogramExtractor
with the
given number of bins. Optionally perform linear interpolation across
orientation bins. Histograms can also use either signed or unsigned
gradients.nbins
- number of binshistogramInterpolation
- if true cyclic linear interpolation is used to share the
magnitude across the two closest bins; if false only the
closest bin will be filled.orientationMode
- the range of orientations to extractpublic void analyseImage(FImage image)
ImageAnalyser
analyseImage
in interface ImageAnalyser<FImage>
image
- The image to process in place.public void analyseImage(FImage image, FImage edges)
image
- the image to analyseedges
- the edge image