public class HistogramAnalyser extends Object implements ImageAnalyser<FImage>
ImageAnalyser
that processes an image and generates a
Histogram
.
You can get the histogram for an image like so:
FImage img = new FImage( ... );
HistogramProcessor hp = new HistogramProcessor( 64 );
img.analyse( hp );
Histogram h = hp.getHistogram();
Image.process(ImageProcessor)
Constructor and Description |
---|
HistogramAnalyser(int nbins)
Default constructor that builds a histogram processor that will create
histograms with the given number of bins.
|
Modifier and Type | Method and Description |
---|---|
void |
analyseImage(FImage image)
Computes the Histogram for this image.
|
Histogram |
getHistogram()
Returns the histogram that was built having run the processing function.
|
static Histogram |
getHistogram(FImage image,
int nbins)
Quickly create a histogram from an image.
|
public HistogramAnalyser(int nbins)
nbins
- The number of bins.public void analyseImage(FImage image)
analyseImage
in interface ImageAnalyser<FImage>
image
- The image from which to extract histogrampublic Histogram getHistogram()
Histogram
that was built.public static Histogram getHistogram(FImage image, int nbins)
image
- the imagenbins
- the number of bins per band