@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 FixedHOGStrategy extends Object implements SpatialBinningStrategy
SpatialBinningStrategy
that extracts normalised
HOG features in the style defined by Dalal and Triggs. In this scheme,
histograms are computed for fixed size cells (size in pixels), and are
aggregated over fixed size blocks of cells. Blocks may overlap. The
aggregated histogram for each block is then normalised before being appended
into the final output histogram.Modifier and Type | Class and Description |
---|---|
static class |
FixedHOGStrategy.BlockNormalisation
Block normalisation schemes
|
Constructor and Description |
---|
FixedHOGStrategy(int cellSize,
int cellsPerBlock,
FixedHOGStrategy.BlockNormalisation norm)
Construct with square cells of the given size (in pixels).
|
FixedHOGStrategy(int cellSize,
int cellsPerBlock,
int blockStep,
FixedHOGStrategy.BlockNormalisation norm)
Construct with square cells of the given size (in pixels).
|
FixedHOGStrategy(int cellWidth,
int cellHeight,
int cellsPerBlockX,
int cellsPerBlockY,
int blockStepX,
int blockStepY,
FixedHOGStrategy.BlockNormalisation norm)
Construct with square cells of the given size (in pixels).
|
Modifier and Type | Method and Description |
---|---|
Histogram |
extract(WindowedHistogramExtractor binnedData,
Rectangle region,
Histogram output)
Extract a histogram describing image content in the given region using
the given
WindowedHistogramExtractor to extract (sub) histograms
from which to build the output. |
public FixedHOGStrategy(int cellSize, int cellsPerBlock, FixedHOGStrategy.BlockNormalisation norm)
cellSize
- the size of the cells in pixelscellsPerBlock
- the number of cells per blocknorm
- the normalisation schemepublic FixedHOGStrategy(int cellSize, int cellsPerBlock, int blockStep, FixedHOGStrategy.BlockNormalisation norm)
cellSize
- the size of the cells in pixelscellsPerBlock
- the number of cells per blockblockStep
- the amount to shift each block in terms of cellsnorm
- the normalisation schemepublic FixedHOGStrategy(int cellWidth, int cellHeight, int cellsPerBlockX, int cellsPerBlockY, int blockStepX, int blockStepY, FixedHOGStrategy.BlockNormalisation norm)
cellWidth
- the width of the cells in pixelscellHeight
- the height of the cells in pixelscellsPerBlockX
- the number of cells per block in the x directioncellsPerBlockY
- the number of cells per block in the y directionblockStepX
- the amount to shift each block in terms of cells in the x
directionblockStepY
- the amount to shift each block in terms of cells in the y
directionnorm
- the normalisation schemepublic Histogram extract(WindowedHistogramExtractor binnedData, Rectangle region, Histogram output)
SpatialBinningStrategy
WindowedHistogramExtractor
to extract (sub) histograms
from which to build the output.
For efficiency, this method allows the output histogram to be specified
as an input. This means that implementors of this interface can attempt
to fill the output histogram rather than creating a new instance
(although care should be taken to ensure that the porivded output
histogram is the correct size and not null
).
Users of SpatialBinningStrategy
s should use the following style
for maximum efficiency:
Histogram h = null;
...
for (Rectangle region : lots_of_regions)
h = strategy.extract(binnedData, region, h);
extract
in interface SpatialBinningStrategy
binnedData
- the WindowedHistogramExtractor
to extract
sub-histograms fromregion
- the region to extract fromoutput
- the output histogram to fill (can be null)output
)