ColorContrast
|
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 |
Image::Image | ( | ) |
Image::Image | ( | int | row, |
int | col | ||
) |
Image::Image | ( | int | row, |
int | col, | ||
double | val | ||
) |
Image::Image | ( | Image & | im2 | ) |
Image::~Image | ( | ) |
Functions for destroying images.
Destuctor of the class Image
double Image::Dist | ( | Image & | Im2 | ) |
Computes the squared distance between (*this) and Im2.
Im2 | Image to be compared with the original one. |
void Image::gaussian_kernel | ( | int | row, |
int | col, | ||
double | sigma | ||
) |
It generates a gaussian kernel.
row,col | kernel dimensions |
sigma | std of the gaussian function |
void Image::initialize | ( | int | row, |
int | col | ||
) |
Function to allocate memrory for an existing image.
row,col | size of the image |
void Image::linear_kernel | ( | double | alpha | ) |
It generates a linear kernel.
alpha | decresing velocity in the way 1/(alpha + distance) |
double Image::maxabsval | ( | ) |
Finding the max absolut value of the image.
double Image::maxval | ( | ) |
Finding the max value of the image.
double Image::meanvalue | ( | ) |
Calculation the mean value of the image.
double Image::minval | ( | ) |
Finding the min value of the image.
void Image::operator*= | ( | double | dt | ) |
void Image::operator*= | ( | Image & | im2 | ) |
void Image::operator+= | ( | Image & | im2 | ) |
Addition operation between images.
Operators of the class Image
im2 | image 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
dt | constant to be added to each image point |
void Image::operator= | ( | Image & | im2 | ) |
Copy operator, which copy each image value.
Operators of the class Image
im2 | image 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.
minv,maxv | minimal and maximal references values to rescale the image |