dmIHistograms Class Reference

Manipulate density histograms and pixel mapping. More...

#include <CCI_Histograms.h>

Inherits dmINotify.

List of all members.

Public Types

enum  Constants

Public Member Functions

bool Scan (cci_object *params, dm_uint index, dm_uint flags)
 Scan the image parameter and build the corresponding histogram.
bool Extend (cci_object *params, dm_real rmin, dm_real rmax)
 Apply an an histogram extension to the pixel values.
bool Transform (cci_object *params, dm_uint *data, dm_uint count)
 Apply an 8 bits histogram transformation to the pixels values of the image parameter.
bool Histogram (dm_uint index, dm_uint *&data, dm_uint &count)
 Get the 256 histogram values for the channel specified by the index parameter.
bool Equalize (cci_object *params)
 Apply an equalization to the pixels values of the image parameter.
bool Specify (cci_object *params, dm_uint index)
 Apply an histogram specification using a stored histogram.
bool Threshold (cci_object *params, dm_real rmin, dm_real rmax, dm_uint flags)
 Create a binary mask corresponding to the pixels values between rmin and rmax.
bool FillChannel (cci_object *params, dm_real value)
 Set the image pixels values to the value value.
bool GetRange (dm_real &rmin, dm_real &rmax)
 Return the stored range.
bool SetRange (dm_real rmin, dm_real rmax)
 Set the range of pixels values.
bool SetChannels (dm_uint channels)
 Set the number of channels (i.e histograms).
dm_uint Gamma (cci_object *params, dm_real gamma)
 Apply gamma correction to image.
dm_uint Constrast (cci_object *params, dm_real brightness, dm_real contrast)
 Apply brightness-contrast correction to image.
bool OptimalThreshold (dm_uint index, dm_real background, dm_real &value)
 Compute optimal threshold for a bimodal histogram distribution.
bool RGBThreshold (cci_object *params, dm_uint16 red, dm_uint16 green, dm_uint16 blue, dm_real rradius, dm_real gradius, dm_real bradius)
 Create a binary mask corresponding to the pixels values corresponding to the given RGB value neighborhood.


Detailed Description

Manipulate density histograms and pixel mapping.

dmIHistograms method will use the dmIColorSpace from the the dmIParameters objet to retrieve which channel to use on RGB images. Set the appropriate colorspace object to retrieve histogram informations about a particular channel or to apply transformations.


Member Enumeration Documentation

enum dmIHistograms::Constants
 

Flags Constants


Member Function Documentation

dm_uint dmIHistograms::Constrast cci_object *  params,
dm_real  brightness,
dm_real  contrast
[inline]
 

Apply brightness-contrast correction to image.

IMPORTANT: If the Image buffer of the params object is valid, it will be used as the input image. Otherwise, it will use the current image stored in params.

Parameters:
params a instance of a dmIParameter object
brightness the brightness parameter, between 0 et 1
contrast the contrast parameter, between 0 et 1

bool dmIHistograms::Extend cci_object *  params,
dm_real  rmin,
dm_real  rmax
[inline]
 

Apply an an histogram extension to the pixel values.

The extension is performed from the range set by the SetRange() method to the range specified by the min and the max parameters.

bool dmIHistograms::FillChannel cci_object *  params,
dm_real  value
[inline]
 

Set the image pixels values to the value value.

For rgb image, the modified channel is set according to the params values (see dmIParameters)

bool dmIHistograms::Histogram dm_uint  index,
dm_uint *&  data,
dm_uint &  count
[inline]
 

Get the 256 histogram values for the channel specified by the index parameter.

See also:
Scan()

bool dmIHistograms::OptimalThreshold dm_uint  index,
dm_real  background,
dm_real &  value
[inline]
 

Compute optimal threshold for a bimodal histogram distribution.

Parameters:
index index of a precomputed histogram
background an initial guess for the background value
value return value

bool dmIHistograms::RGBThreshold cci_object *  params,
dm_uint16  red,
dm_uint16  green,
dm_uint16  blue,
dm_real  rradius,
dm_real  gradius,
dm_real  bradius
[inline]
 

Create a binary mask corresponding to the pixels values corresponding to the given RGB value neighborhood.

The neighborhood is given by the 'ellipsoid' determined by the three parameters rradius gradius bradius. Distance are computed using absolute norm.

Note:
This function applies only to RGB images

bool dmIHistograms::Scan cci_object *  params,
dm_uint  index,
dm_uint  flags
[inline]
 

Scan the image parameter and build the corresponding histogram.

The histogram is build from 8 bits quantized pixel values of the original image. For scalar valued pixel image, the resulting histogram will be associated to the index channel. For multichannels images, the channel from which the histogram is to be extracted is obtained by the dmIParameter::GetChannel() method.

If flags is set to dmIHistograms::flAutoRange, the range is computed from the min and the max of the image pixel values.

See also:
SetChannels()

bool dmIHistograms::Specify cci_object *  params,
dm_uint  index
[inline]
 

Apply an histogram specification using a stored histogram.

Parameters:
index the histogram index
params the dmIParameter object containing the target image.

bool dmIHistograms::Threshold cci_object *  params,
dm_real  rmin,
dm_real  rmax,
dm_uint  flags
[inline]
 

Create a binary mask corresponding to the pixels values between rmin and rmax.

If flags is set to CCIV_Histograms_Hysteresis, then the mask is computed from an hysteresis threshold using rmin as the lower threshold and rmax as the upper threshold.


Generated on Tue May 9 12:34:57 2006 for Daim Library Module Set by  doxygen 1.4.6-NO