DLImageStats Class Reference

Image statistics object. More...

#include <DLImageStats.h>

List of all members.

Public Attributes

double mean [3]
double median [3]
double sdev [3]
double skewness [3]
double kurtosis [3]


Detailed Description

Image statistics object.

The DLImageStats object contains statistics about an image, such as the mean and standard deviation of pixel values. It is generally created by calling DLImage::dlGetStats().

All statistics are calculated for the three color channels: red, green and blue, respectively. If an image is grayscale or binary, the three entries for each statistic will be set equal to each other. All statistics are public data members, and can be accessed as illustrated in the following example:

 DLImage i("test.tif");
 DLImageStats st = i.dlGetStats();
 cout << "Mean of red channel: << st.mean[0]
      << "; mean of green channel: " << st.mean[1]
      << "; mean of blue channel: " << st.mean[2]
      << endl;

Definition at line 29 of file DLImageStats.h.


Member Data Documentation

double DLImageStats::mean[3]

Mean pixel values for each color channel. For grayscale and binary images, each entry will be equal.

\[ \bar{X} = \frac{1}{N} \sum_{i=1}^N x_i \]

where N is the number of pixels and $x_i$ are the individual pixel values.

Definition at line 39 of file DLImageStats.h.

double DLImageStats::median[3]

Median pixel values per channel.

\[ \tilde{X} = \left\{ \begin{array}{ll} Y_{(N+1)/2} & N \mbox{odd} \\ \frac{1}{2} \left( Y_{N/2} + Y_{(N/2)+1} \right) & N \mbox{even} \end{array} \right. \]

where $Y_k$ is the kth order statistic.

Definition at line 48 of file DLImageStats.h.

double DLImageStats::sdev[3]

Standard deviations of pixel values.

\[ S = \sqrt{ \frac{1}{N-1} \sum_{i=1}^N (x_i - \bar{X})^2 } \]

Definition at line 54 of file DLImageStats.h.

double DLImageStats::skewness[3]

Coefficient of skewness of pixel values. This is the third central moment divided by the cube of the sample standard deviation.

\[ \alpha_3 = \frac{ \sum_{i=1}^N (x_i - \bar{X})^3 }{ S^3 } \]

Definition at line 62 of file DLImageStats.h.

double DLImageStats::kurtosis[3]

Coefficient of kurtosis of pixel values. This is the fourth central moment divided by the fourth power of the sample standard deviation.

\[ \alpha_4 = \frac{ \sum_{i=1}^N (x_i - \bar{X})^4 }{ S^4 } \]

Definition at line 70 of file DLImageStats.h.


The documentation for this class was generated from the following file:

DOCLIB is being developed under contract by a collaboration between:
The Laboratory for Language and Media Processing
Unviersity of Maryland, College Park
and
Booz | Allen | Hamilton

All Rights Reserved, 2003-2007