Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   Related Pages   Examples  

Point operations


Functions

ByteImageoperator &= (const ByteImage &img)
ByteImageoperator|= (const ByteImage &img)
ByteImageoperator^= (const ByteImage &img)
ByteImageoperator! (void)
void Contrast (Image< T > &input, float min, float max, Image< T > &output)
void Contrast (Image< T > &input, float min, float max)
void Contrast (Image< T > &input, float min, float max, float lo, float hi, Image< T > &output)
void Contrast (Image< T > &input, float min, float max, float lo, float hi)
T* operator[] (int i)
T& operator() (int i)
Image< T >& operator= (const Image< T > &img)
int operator== (const Image< T > &img)
int operator!= (const Image< T > &img)
Image< T >& operator= (const T val)
void clearImage (const T val)
Image< T >& operator+= (const T val)
Image< T >& operator-= (const T val)
Image< T >& operator *= (const T val)
Image< T >& operator+= (const Image< T > &img)
Image< T >& operator-= (const Image< T > &img)
Image< T >& operator *= (const Image< T > &img)
IntImageoperator &= (const IntImage &img)
IntImageoperator|= (const IntImage &img)
void Threshold (Image< T > &input, float th_level, ByteImage &output)

Detailed Description

This group contains methods and stand-alone functions implementing point operations.

Function Documentation

void Contrast ( Image< T > & input,
float min,
float max,
float lo,
float hi )
 

Performs the contrast stretching of the input image in place. The contrast stretching is done according to the following formulas:

if ,

if , and

if .

where and are the gray levels in a given point in the input and output image, respectively.

Definition at line 54 of file Contrast.cpp.

void Contrast ( Image< T > & input,
float min,
float max,
float lo,
float hi,
Image< T > & output )
 

Performs the contrast stretching of the input image and stores the result in the output image. The contrast stretching is done according to the following formulas:

if ,

if , and

if .

where and are the gray levels in a given point in the input and output image, respectively.

Definition at line 37 of file Contrast.cpp.

void Contrast ( Image< T > & input,
float min,
float max )
 

Performs the contrast stretching of the input image in place. The contrast stretching is done according to the following formula:

where and are the gray levels in a given point in the input and output image, respectively, and are the minimum and maximum gray values in the input image.

Definition at line 32 of file Contrast.cpp.

void Contrast ( Image< T > & input,
float min,
float max,
Image< T > & output )
 

Performs the contrast stretching of the input image and stores the result in the output image. The contrast stretching is done according to the following formula:

where and are the gray levels in a given point in the input and output image, respectively, and are the minimum and maximum gray values in the input image.

Examples:
test_contrast.cpp.

Definition at line 18 of file Contrast.cpp.

void Threshold ( Image< T > & input,
float th_level,
ByteImage & output )
 

Performs the thresholding of the input image using the given threshold level. This means that all those pixels in the output image corresponding to pixels in the input image whose values are smaller than th_level are set to 0, while the other pixels in the output image are set to 255.

Examples:
test_thresh.cpp.

Definition at line 9 of file Threshold.cpp.

template<class T>
void Image< T >::clearImage<T> ( const T val )
 

Sets all the pixels in the current image to the specified value.

See also:
operator=(const T val)

Definition at line 182 of file Image.cpp.

Referenced by FourierTransform::FourierTransform(), Magnitude(), TemplateMatch(), and Watershed().

IntImage & IntImage::operator &= ( const IntImage & img )
 

Performs pixelwise logical AND between the current image and another image. The operation is performed only if the two images have the same size.

Definition at line 5 of file IntImage.cpp.

ByteImage & ByteImage::operator &= ( const ByteImage & img )
 

Performs pixelwise logical AND between the current image and another image. The operation is performed only if the two images have the same size.

Definition at line 5 of file ByteImage.cpp.

template<class T>
Image< T > & Image< T >::operator *= ( const Image< T > & img )
 

Multiplies pixelwise the current image by another image. The operation is performed only if the two images have the same size.

Definition at line 251 of file Image.cpp.

template<class T>
Image< T > & Image< T >::operator *= ( const T val )
 

Multiplies by a constant the value of each pixel in the current image.

Definition at line 202 of file Image.cpp.

ByteImage & ByteImage::operator! ( void )
 

Performs pixelwise logical negation of the current image.

Definition at line 67 of file ByteImage.cpp.

template<class T>
int Image< T >::operator!= ( const Image< T > & img )
 

Tests if two images are different in size or content.

Definition at line 167 of file Image.cpp.

template<class T>
T & Image<T>::operator() ( int i ) [inline]
 

Overloaded access operator. Allows the syntax Image(k) for accessing linearly the image buffer. If k = i * width + j, then Image(k) is the pixel in the i-th row and j-th column.

Definition at line 107 of file Image.h.

template<class T>
Image< T > & Image< T >::operator+= ( const Image< T > & img )
 

Adds pixelwise an image to the current one. The operation is performed only if the two images have the same size.

Definition at line 209 of file Image.cpp.

template<class T>
Image< T > & Image< T >::operator+= ( const T val )
 

Adds a constant to the value of each pixel in the current image.

Definition at line 188 of file Image.cpp.

template<class T>
Image< T > & Image< T >::operator-= ( const Image< T > & img )
 

Subtracts pixelwise an image from the current one. The operation is performed only if the two images have the same size.

Definition at line 221 of file Image.cpp.

template<class T>
Image< T > & Image< T >::operator-= ( const T val )
 

Subtracts a constant from the value of each pixel in the current image.

Definition at line 195 of file Image.cpp.

template<class T>
Image< T > & Image< T >::operator= ( const T val )
 

Sets all the pixels in the current image to the specified value. For some "mysterious" reasons this operator doesn't work in the classes derived from the class Image. To compensate for this, another function (clearImage()) was provided to do the same job.

Definition at line 175 of file Image.cpp.

template<class T>
Image< T > & Image< T >::operator= ( const Image< T > & img )
 

Copy operator.

Definition at line 145 of file Image.cpp.

template<class T>
int Image< T >::operator== ( const Image< T > & img )
 

Tests if two images have the same size and the same content.

Definition at line 159 of file Image.cpp.

template<class T>
T * Image<T>::operator[] ( int i ) [inline]
 

Overloaded access operator. Allows the syntax Image[i][j] for accessing the pixel in the i-th row and j-th column.

Definition at line 97 of file Image.h.

ByteImage & ByteImage::operator^= ( const ByteImage & img )
 

Performs pixelwise logical XOR between the current image and another image. The operation is performed only if the two images have the same size.

Definition at line 45 of file ByteImage.cpp.

IntImage & IntImage::operator|= ( const IntImage & img )
 

Performs pixelwise logical OR between the current image and another image. The operation is performed only if the two images have the same size.

Definition at line 22 of file IntImage.cpp.

ByteImage & ByteImage::operator|= ( const ByteImage & img )
 

Performs pixelwise logical OR between the current image and another image. The operation is performed only if the two images have the same size.

Definition at line 25 of file ByteImage.cpp.