Count the number of different colors in an image.
Image must be IM_BYTE, but all color spaces except IM_CMYK.
void imCalcHistogram
(
const unsigned char *
data,
int
count,
unsigned long *
histo,
int
cumulative
)
Calculates the histogram of a IM_BYTE data.
Histogram is always 256 positions long.
When cumulative is different from zero it calculates the cumulative histogram.
void imCalcUShortHistogram
(
const unsigned short *
data,
int
count,
unsigned long *
histo,
int
cumulative
)
Calculates the histogram of a IM_USHORT data.
Histogram is always 65535 positions long.
When cumulative is different from zero it calculates the cumulative histogram.
Calculates the gray histogram of an image.
Image must be IM_BYTE/(IM_RGB, IM_GRAY, IM_BINARY or IM_MAP).
If the image is IM_RGB then the histogram of the luma component is calculated.
Histogram is always 256 positions long.
When cumulative is different from zero it calculates the cumulative histogram.
Calculates the statistics about the image data.
There is one stats for each depth plane. For ex: stats[0]=red stats, stats[0]=green stats, ...
Supports all data types except IM_COMPLEX.
Calculates the statistics about the image histogram data.
There is one stats for each depth plane. For ex: stats[0]=red stats, stats[0]=green stats, ...
Only IM_BYTE images are supported.
Calculates some extra statistics about the image histogram data.
There is one stats for each depth plane.
Only IM_BYTE images are supported.
mode will be -1 if more than one max is found.