BRL-CAD
|
Files | |
file | stat.h |
Functions | |
size_t ** | icv_hist (icv_image_t *img, size_t n_bins) |
double * | icv_min (icv_image_t *img) |
double * | icv_mean (icv_image_t *img) |
double * | icv_sum (icv_image_t *img) |
double * | icv_max (icv_image_t *img) |
int * | icv_mode (icv_image_t *img, size_t **bins, size_t n_bins) |
int * | icv_median (icv_image_t *img, size_t **bins, size_t n_bins) |
double * | icv_skew (icv_image_t *img, size_t **bins, size_t n_bins) |
double * | icv_var (icv_image_t *img, size_t **bins, size_t n_bins) |
Image statistics and histogram routines.
size_t ** icv_hist | ( | icv_image_t * | img, |
size_t | n_bins | ||
) |
This function calculates the histogram of different channels separately.
img | Image of which histogram is to found. |
n_bins | number of bins required. |
double * icv_min | ( | icv_image_t * | img | ) |
Finds the minimum value in each channel of the image.
e.g. min = icv_min(bif); min[0] gives the minimum value of all the pixels in first bin. and so on.
double * icv_mean | ( | icv_image_t * | img | ) |
Finds the average value in each channel of the image.
e.g. mean = icv_mean(bif); mean[0] gives the average value of all the pixels in first channel and so on.
double * icv_sum | ( | icv_image_t * | img | ) |
Finds the sum of all the pixel values for each channel of the image
e.g. sum = icv_sum(bif); sum[0] gives the sum of all the pixels in first channel and so on.
double * icv_max | ( | icv_image_t * | img | ) |
Finds the max value in each channel of the image.
e.g. max = icv_max(bif); max[0] gives the maximum value of all the pixels in first bin. and so on.
int * icv_mode | ( | icv_image_t * | img, |
size_t ** | bins, | ||
size_t | n_bins | ||
) |
Calculates mode of the values of each channel. Mode value are calculated for quantified data which is sent as bins(histogram Information). For any image mode is a 'c' length array where c is the number of channels.
To calculate the mode of an icv_image, a default call is as follows icv_mode(img, icv_hist(img, n_bins), n_bins);
This call first calculates the histogram of the image. then finds the mode values from histogram of each channel.
int * icv_median | ( | icv_image_t * | img, |
size_t ** | bins, | ||
size_t | n_bins | ||
) |
Calculates median of the values of each channel. Median value are calculated for quantified data which is sent as bins(histogram information). For any image mode is a 'c' length array, where c is the number of channels.
To calculate the median of an icv_image, a default call is as follows : icv_median(img, icv_hist(img, n_bins), n_bins);
This call first calculates the histogram of the image. then finds the mode values from histogram of each channel.
double * icv_skew | ( | icv_image_t * | img, |
size_t ** | bins, | ||
size_t | n_bins | ||
) |
Calculates the skewness in data.
To calculate the skewness in an icv_image, a default call is as follows : icv_skew(img, icv_hist(img, n_bins), n_bins);
double * icv_var | ( | icv_image_t * | img, |
size_t ** | bins, | ||
size_t | n_bins | ||
) |
Calculates the variance in data.
To calculate the variance in an icv_image, a default call is as follows : icv_variance(img, icv_hist(img, n_bins), n_bins);