xil_histogram(3)
NAME
xil_histogram − generate histogram data from an image
SYNOPSIS
#include <xil/xil.h>
void xil_histogram (XilImage src,
XilHistogram histogram,
unsigned int skip_x,
unsigned int skip_y);
DESCRIPTION
This routine accumulates histogram information from the source image into a histogram object that was created with the xil_histogram_create() function.
src is the source image handle. histogram is the handle for the histogram object that holds the histogram data. skip_x and skip_y indicate the frequency with which pixels will be counted. If skip_x is set to 1, xil_histogram() counts every pixel on a scanline; if it is set to 2, the function counts every other pixel; and so on. The value of skip_y has an analogous effect on how xil_histogram() counts pixels in the vertical direction. Using values greater than 1 allows a faster construction of a histogram by considering fewer pixels.
ERRORS
For a complete list of XIL error messages by number, consult Appendix B of the XIL Programmer’s Guide.
EXAMPLES
Generate the histogram of an image, only counting every third pixel:
XilImage src;
XilHistogram histogram;
xil_histogram(src, histogram, 3, 3);
NOTES
The number of bands in the histogram must match the number of bands in the source image. The data values in the histogram are not initialized to zero at the beginning of this operation, thereby allowing the generation of multi-image histograms.
SEE ALSO
SunOS — Last change: 15 June 1993