BRL-CAD
Collaboration diagram for Image Statistics:

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)
 

Detailed Description

Image statistics and histogram routines.

Function Documentation

◆ icv_hist()

size_t ** icv_hist ( icv_image_t img,
size_t  n_bins 
)

This function calculates the histogram of different channels separately.

Parameters
imgImage of which histogram is to found.
n_binsnumber of bins required.
Returns
Histogram of size_t type array. This 2-dimension array is of size c X n_bins where c is the channels in the image.

◆ icv_min()

double * icv_min ( icv_image_t img)

Finds the minimum value in each channel of the image.

Returns
a double array of size channels. Each element contains min value of the channel.

e.g. min = icv_min(bif); min[0] gives the minimum value of all the pixels in first bin. and so on.

◆ icv_mean()

double * icv_mean ( icv_image_t img)

Finds the average value in each channel of the image.

Returns
a double array of size channels. Each elements contains average value of the channel.

e.g. mean = icv_mean(bif); mean[0] gives the average value of all the pixels in first channel and so on.

◆ icv_sum()

double * icv_sum ( icv_image_t img)

Finds the sum of all the pixel values for each channel of the image

Returns
a double array of size channels. Each element contains sum value of the channel.

e.g. sum = icv_sum(bif); sum[0] gives the sum of all the pixels in first channel and so on.

◆ icv_max()

double * icv_max ( icv_image_t img)

Finds the max value in each channel of the image.

Returns
a double array of size channels. Each element contains max value of the channel.

e.g. max = icv_max(bif); max[0] gives the maximum value of all the pixels in first bin. and so on.

◆ icv_mode()

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.

◆ icv_median()

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.

◆ icv_skew()

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);

Returns
c length double array where c is the number of channels in the img

◆ icv_var()

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);

Returns
c length double array where c is the number of channels in the img