Existing histogram objects can be given to this operation to be reused. Give an existing {@link net.sourceforge.jiu.color.data.Histogram1D} object to this operation via {@link #setHistogram(Histogram1D)}.
The histogram can be created for any channel of an IntegerImage. The first channel (index 0) is the default channel. Use {@link #setImage(IntegerImage,int)} to specify another one.
Note: Before JIU 0.10.0 there was a single HistogramCreator class.
Histogram1DCreator hc = new Histogram1DCreator(); hc.setImage(image, 2); hc.process(); Histogram1D hist = hc.getHistogram();If you just want to learn the number of different samples in an image, there's a static convenience method count for that. Again, we use the third channel:
Integer numUsedSamples = Histogram1DCreator.count(image, 2);@author Marco Schmidt @since 0.10.0
|
|
|
|