ColorContrast
Public Member Functions | Public Attributes | List of all members
Image Class Reference

Public Member Functions

 Image ()
 Functions for creating emty objects of the class Image. More...
 
 Image (int row, int col)
 Constructor of the class Image that allocate memory for the selected dimensions. More...
 
 Image (int row, int col, double val)
 Constructor of the class Image that sets all values to 'val'. More...
 
 Image (Image &im2)
 Image copy constructor. Construct a new image and copy the existing data. More...
 
 ~Image ()
 Functions for destroying images. More...
 
void initialize (int rows, int col)
 Function to allocate memrory for an existing image. More...
 
void operator*= (double dt)
 Operators of the class Image that modify its values 'point by point' multiplying each for a constant. More...
 
void operator*= (Image &im2)
 Operators of the class Image that modify its values 'point by point' multiplying each value between images. More...
 
void operator= (Image &im2)
 Copy operator, which copy each image value. More...
 
void operator+= (Image &im2)
 Addition operation between images. More...
 
void operator+= (double dt)
 Addition operation between image and constant, which add the constar to each value of the image. More...
 
int rows ()
 
int cols ()
 
double & operator() (int i, int j)
 
double maxval ()
 Finding the max value of the image. More...
 
double maxabsval ()
 Finding the max absolut value of the image. More...
 
double minval ()
 Finding the min value of the image. More...
 
double meanvalue ()
 Calculation the mean value of the image. More...
 
void threshold (double m, double M)
 
void rescale (double minv, double maxv)
 Rescale the image to obtain an image in the selected range. More...
 
void fftshift ()
 This function shifts the image swaping oposite image quarters.
 
double Dist (Image &Im2)
 Computes the squared distance between (*this) and Im2. More...
 
void gaussian_kernel (int row, int col, double sigma)
 It generates a gaussian kernel. More...
 
void linear_kernel (double alpha)
 It generates a linear kernel. More...
 

Public Attributes

int dim [2]
 
double * data
 

Constructor & Destructor Documentation

Image::Image ( )

Functions for creating emty objects of the class Image.

Contructors of the class Image

Image::Image ( int  row,
int  col 
)

Constructor of the class Image that allocate memory for the selected dimensions.

Contructors of the class Image

Parameters
row,colsize of the image
Image::Image ( int  row,
int  col,
double  val 
)

Constructor of the class Image that sets all values to 'val'.

Contructors of the class Image

Parameters
row,colsize of the image
valall elements in the image are set to this value
Image::Image ( Image im2)

Image copy constructor. Construct a new image and copy the existing data.

Contructors of the class Image

Parameters
im2image to be copied
Image::~Image ( )

Functions for destroying images.

Destuctor of the class Image

Member Function Documentation

double Image::Dist ( Image Im2)

Computes the squared distance between (*this) and Im2.

Parameters
Im2Image to be compared with the original one.
Returns
Squared distance between images
void Image::gaussian_kernel ( int  row,
int  col,
double  sigma 
)

It generates a gaussian kernel.

Parameters
row,colkernel dimensions
sigmastd of the gaussian function
void Image::initialize ( int  row,
int  col 
)

Function to allocate memrory for an existing image.

Parameters
row,colsize of the image
void Image::linear_kernel ( double  alpha)

It generates a linear kernel.

Parameters
alphadecresing velocity in the way 1/(alpha + distance)
double Image::maxabsval ( )

Finding the max absolut value of the image.

Returns
max absolut value of the image
double Image::maxval ( )

Finding the max value of the image.

Returns
max value of the image
double Image::meanvalue ( )

Calculation the mean value of the image.

Returns
mean value of the image
double Image::minval ( )

Finding the min value of the image.

Returns
min value of the image
void Image::operator*= ( double  dt)

Operators of the class Image that modify its values 'point by point' multiplying each for a constant.

Operators of the class Image

Parameters
dtconstant to multiply over all image values
void Image::operator*= ( Image im2)

Operators of the class Image that modify its values 'point by point' multiplying each value between images.

Operators of the class Image

Parameters
im2image to multiply with the original one
void Image::operator+= ( Image im2)

Addition operation between images.

Operators of the class Image

Parameters
im2image to be added to the original one
void Image::operator+= ( double  dt)

Addition operation between image and constant, which add the constar to each value of the image.

Operators of the class Image

Parameters
dtconstant to be added to each image point
void Image::operator= ( Image im2)

Copy operator, which copy each image value.

Operators of the class Image

Parameters
im2image to be copied into the original one
void Image::rescale ( double  minv,
double  maxv 
)

Rescale the image to obtain an image in the selected range.

Parameters
minv,maxvminimal and maximal references values to rescale the image

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