CDImageStatistic<TPixel>

Class Description

The class contains a number of statistical functions. CDImageStatistic is a templated class derived from CDVisIPL and The template takes a single argument specifying the pixel type (TPixel).

Constructors/Destructor

CImageStatistic (void)

Default constructor. The image parameters are uninitialized and the instance is unusable until an image array is assigned.
CImageStatistic
    (int width, int height,
     int nbands = 1,
     int imopts = evisimoptDefault,
     BYTE *pbData = 0)

CImageStatistic
    (SIZE size,
     int nbands = 1,
     int imopts = evisimoptDefault,
     BYTE *pbData = 0)

CImageStatistic
    (const RECT& rect,
     int nbands = 1,
     int imopts = evisimoptDefault,
     BYTE *pbData = 0)

CImageStatistic
    (const CVisShape& shape,
     int imopts = evisimoptDefault,
     BYTE *pbData = 0)

Construct an image with the specified dimensions, number of bands, and options.

If pbData is zero, allocate the memory needed. If pbData is not zero, use the memory it points to.
CImageStatistic
    (CVisMemBlock& memblock,
     int width, int height,
     int nbands = 1,
     int imopts = evisimoptDefault)

CImageStatistic
    (CVisMemBlock& memblock,
     SIZE size,
     int nbands = 1,
     int imopts = evisimoptDefault)

CImageStatistic
    (CVisMemBlock& memblock,
     const RECT& rect,
     int nbands = 1,
     int imopts = evisimoptDefault)

CImageStatistic
    (CVisMemBlock& memblock,
     const CVisShape& shape,
     int imopts = evisimoptDefault)

Construct an image with the specified dimensions, number of bands, and options.

No new memory is allocated. The image points to the memblock supplied.
CImageStatistic
    (const CImageStatistic<TPixel>& imageSrc)

Construct an image from another image.
 
Argument Description
width width of image
height height of image
rect reference to a RECT structure
shape reference to a CVisShape instance specifying image properties
memblock reference to a MemBlock instance
imageSrc reference to an Image instance
nbands number of bands in image
imopts EVisImOpt image options. Options can be OR'ed.

Top

Methods

CDImageStatistics<TPixel>::CentralMomentPixel

void CentralMomentPixel(double& dMoment, int nOrder)

Compute the central (non-spatial) nOrder moment of the pixels.Only Gray images.

 
Argument Description
dMoment moment
nOrder order of the moment
 
CDImageStatistics<TPixel>::Max
TPixel Max()
Returns the maximum pixel value in a gray scale image.

Top
 

CDImageStatistics<TPixel>::Mean
void Mean(double& dMean);
void Mean(CVisRGBADoublePixel& rgbMean);

Calculate the mean of pixels in the image.
 
Argument Description
dMean Mean for gray scale images
rgbMean Mean for rgb images

Top

CDImageStatistics<TPixel>::Min

TPixel Min()
Returns the minimum pixel value in a gray scale image.

CDImageStatistics<TPixel>::Std

void Std(double& dStd)
Compute standard deviation of the pixels (only gray scale).
 
Argument Description
dStd Standard deviation of the pixels

Top

CDImageStatistics<TPixel>::Var

void var(double& dVar)
Compute variance of the pixels (only gray scale).
 
Argument Description
dVar Variance of the pixels

Top


Copyright, 1999
Section for Image Analysis
Department of Mathematical Modelling
Technical University of Denmark
DK-2800 Lyngby

Authors: Rune Fisker

Last updated: 01-05-1999