public interface SpatialBinningStrategy
WindowedHistogramExtractor
.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. |
Histogram extract(WindowedHistogramExtractor binnedData, Rectangle region, Histogram output)
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);
binnedData
- the WindowedHistogramExtractor
to extract
sub-histograms fromregion
- the region to extract fromoutput
- the output histogram to fill (can be null)output
)