@Reference(type=Inproceedings, author={"Dalal, Navneet","Triggs, Bill"}, title="Histograms of Oriented Gradients for Human Detection", year="2005", booktitle="Proceedings of the 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR\'05) - Volume 1 - Volume 01", pages={"886","","893"}, url="http://dx.doi.org/10.1109/CVPR.2005.177", publisher="IEEE Computer Society", series="CVPR \'05", customData={"isbn","0-7695-2372-2","numpages","8","doi","10.1109/CVPR.2005.177","acmid","1069007","address","Washington, DC, USA"}) public class HOG extends Object implements ImageAnalyser<FImage>
SpatialBinningStrategy
s. HOG features can be efficiently extracted
for many windows of the image.
The actual work of computing and normalising the descriptor is performed by
the SpatialBinningStrategy
(i.e. a FixedHOGStrategy
or
FlexibleHOGStrategy
); this class just provides the objects required
for efficient histogram computation (namely a
GradientOrientationHistogramExtractor
) for the image being analysed.
Normally, HOG features are computed using all gradients in the image, but
this class makes it possible to only consider gradients along "edges" using
the analyseImage(FImage, FImage)
method.
Modifier and Type | Field and Description |
---|---|
protected SpatialBinningStrategy |
strategy |
Constructor and Description |
---|
HOG(int nbins,
boolean histogramInterpolation,
FImageGradients.Mode orientationMode,
SpatialBinningStrategy strategy)
Construct a new
HOG with the given number of bins. |
HOG(SpatialBinningStrategy strategy)
Construct a new
HOG with the 9 bins, using histogram
interpolation and unsigned gradients. |
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.
|
Histogram |
getFeatureVector(Rectangle rectangle)
Compute the HOG feature for the given window.
|
protected SpatialBinningStrategy strategy
public HOG(SpatialBinningStrategy strategy)
HOG
with the 9 bins, using histogram
interpolation and unsigned gradients. Use the given strategy to extract
the actual features.strategy
- the SpatialBinningStrategy
to use to produce the
featurespublic HOG(int nbins, boolean histogramInterpolation, FImageGradients.Mode orientationMode, SpatialBinningStrategy strategy)
HOG
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 extractstrategy
- the SpatialBinningStrategy
to use to produce the
featurespublic 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 imagepublic Histogram getFeatureVector(Rectangle rectangle)
rectangle
- the window