mkHisto
[ XITE Reference Manual | XITE home ]
Name
mkHisto, mkIhistogram, mkDhistogram - make a histogram
Syntax
#include <xite/histo.h>
BiffStatus mkHisto( IBAND band,
histogram histo );
BiffStatus mkIhistogram( IBAND band,
int histo[], int limits[], int n );
BiffStatus mkDhistogram( IBAND band,
int histo[], double limits[], int n );
Description
Generate the histogram of a band.
band : input band
histo : output histogram
limits : input limits for the accumulator cells in histo
n : input number of limits (n >= 1)
limits should be indexable on 0..n-1, and (NOTE!) histo
should be indexable on 0..n. At return, histo contains:
histo[0] = #pixels in < -inf .. limits[0] ]
histo[i] = #pixels in < limits[i-1] .. limits[i] ]
histo[n] = #pixels in < limits[n-1] .. inf. >
Choose mkIhistogram or mkDhistogram, depending on whether
your limits are integers or real numbers.
Restrictions
mkHisto accepts only unsigned byte pixels, mkIhistogram
and mkDhistogram accept all pixel types but complex and
double complex.
limits should be sorted in ascending order.
Return value
status, see diagnostics
Diagnostics
Status 0 => ok
Status 2 => Error: Bad pixel type
Status 3 => Error: Bad 'n' argument (mkHistogram only)
See also
histo(3), scale(3)
Author
Tor Lønnestad, BLAB, Ifi, UiO
Id
$Id: mkHisto.c,v 1.23 1997/01/29 10:42:48 svein Exp $