![]() |
Lens distortion correction division model 1p
|
Class to store multiChannel images and basic methods. More...
#include <image.h>
Public Types | |
typedef std::vector< T >::iterator | iterator |
Public Member Functions | |
image () | |
basic destructor More... | |
image (const int width, const int height) | |
image constructor taking memory More... | |
image (const T *vector, const int width, const int height, const int channels) | |
image from T vector More... | |
image (const int width, const int height, const int nChannels, const T &a) | |
image constructor taking memory and initialiting with a value More... | |
image (const int width, const int height, const T &a, const T &b, const T &c) | |
image constructor taking memory and initialiting the channels: R with a value, G with b value and B with c value More... | |
image (const int width, const int height, const int nChannels) | |
image constructor taking memory and initialiting with a value More... | |
image (std::string name) | |
Constructor from an image file. More... | |
image (const image< bool > &img_in, bool isbool) | |
image (const image< T > &img_in) | |
image copy constructor More... | |
~image () | |
basic constructor More... | |
std::vector< T > * | get_image () |
int | width () const |
int | height () const |
int | nChannels () const |
int | size () const |
T & | operator[] (const int &i) |
operator [] to acces image value More... | |
T & | operator() (const int &x, const int &y, const int &channel) |
operator () to acces image value More... | |
const T & | operator[] (const int &i) const |
operator [] to acces image value More... | |
int | write (std::string name) |
Function to write an image to disk. More... | |
int | write_bool (std::string name) |
function to write to disk a 8/16 bit tif image from boolean image More... | |
int | read (std::string name) |
Read an image selecting the library depend on the image format, returns 0 when it can't load the image. More... | |
image & | operator= (const image &image2) |
operator = (equality of images of different size is not allowed ) More... | |
void | clear () |
Function to put the image to 0 and clear its vectors. More... | |
void | init (const int width, const int height, const int nChannels) |
initializes the image taking memory More... | |
void | set_nchannels (int nchannel1) |
Change number of channels. More... | |
void | set_size (int width, int height) |
Change the image dimensions. More... | |
void | imageMirrored () |
mirrored the image More... | |
image< T > const | resize (const int width, const int height) const |
image< T > const | resize_no_omp (const int width, const int height) const |
image< T > const | linear_transform (const double H[3][3]) const |
function to apply a linear transform given by an homography H to the image. H goes to the output image to the input image More... | |
image< T > const | sampling () const |
method to downsample the image by a factor of 2. We filter the image before downsampling | |
std::vector< int > | get_roi () const |
void | roi_clear () |
void | set_roi (const int x0, const int x1, const int y0, const int y1) |
function to set a subwindow border More... | |
void | set_roi (const int x0, const int x1, const int y0, const int y1, const int c0, const int c1) |
function to set a subwindow border More... | |
void | set_roi (const std::vector< int > roi) |
function to set a subwindow border More... | |
template<class U > | |
void | get_roi_image (image< U > &image2) const |
image< T > const | get_roi_image (const std::vector< int > &roi2) const |
template<class U > | |
void | set_roi_image (const image< U > &image2) |
iterator | begin () |
iterator | end () |
void | rgb_to_hsv (image< unsigned char > &H, image< unsigned char > &S, image< unsigned char > &V) |
function to get colour model HSV from RGB (unsigned char version) More... | |
template<class U > | |
void | hsv_to_rgb (image< U > &image) |
T | get_value (const int x) |
get value to x position of vector More... | |
void | set_value (const int x, T value) |
set value to x position of vector More... | |
template<class U > | |
void | get_histogram (std::vector< U > &histograma, int channel) |
Class to store multiChannel images and basic methods.
ami::image< T >::image | ( | ) |
basic destructor
ami::image< T >::image | ( | const int | width, |
const int | height | ||
) |
image constructor taking memory
ami::image< T >::image | ( | const T * | vector, |
const int | width, | ||
const int | height, | ||
const int | channels | ||
) |
image from T vector
ami::image< T >::image | ( | const int | width, |
const int | height, | ||
const int | nChannels, | ||
const T & | a | ||
) |
image constructor taking memory and initialiting with a value
ami::image< T >::image | ( | const int | width, |
const int | height, | ||
const T & | a, | ||
const T & | b, | ||
const T & | c | ||
) |
image constructor taking memory and initialiting the channels: R with a value, G with b value and B with c value
ami::image< T >::image | ( | const int | width, |
const int | height, | ||
const int | nChannels | ||
) |
image constructor taking memory and initialiting with a value
ami::image< T >::image | ( | std::string | name | ) |
Constructor from an image file.
[in] | name | Input file name. |
name | INPUT FILE NAME |
ami::image< T >::image | ( | const image< T > & | img_in | ) |
image copy constructor
ami::image< T >::~image | ( | ) |
basic constructor
void ami::image< T >::clear | ( | ) |
Function to put the image to 0 and clear its vectors.
void ami::image< T >::get_histogram | ( | std::vector< U > & | histograma, |
int | channel | ||
) |
histograma | histograma de dimension 256 |
channel | channel to obtain the histogram |
T ami::image< T >::get_value | ( | const int | x | ) |
get value to x position of vector
void ami::image< T >::imageMirrored | ( | ) |
mirrored the image
void ami::image< T >::init | ( | const int | width, |
const int | height, | ||
const int | nChannels | ||
) |
initializes the image taking memory
image< T > const ami::image< T >::linear_transform | ( | const double | H[3][3] | ) | const |
function to apply a linear transform given by an homography H to the image. H goes to the output image to the input image
|
inline |
operator () to acces image value
image< T > & ami::image< T >::operator= | ( | const image< T > & | image2 | ) |
operator = (equality of images of different size is not allowed )
|
inline |
operator [] to acces image value
|
inline |
operator [] to acces image value
int ami::image< T >::read | ( | std::string | name | ) |
Read an image selecting the library depend on the image format, returns 0 when it can't load the image.
image< T > const ami::image< T >::resize | ( | const int | width, |
const int | height | ||
) | const |
width | new image width |
height | new image height |
void ami::image< T >::rgb_to_hsv | ( | image< unsigned char > & | H, |
image< unsigned char > & | S, | ||
image< unsigned char > & | V | ||
) |
function to get colour model HSV from RGB (unsigned char version)
void ami::image< T >::set_nchannels | ( | int | nchannel1 | ) |
Change number of channels.
[in] | nchannel1 | New number of channels. |
void ami::image< T >::set_roi | ( | const int | x0, |
const int | x1, | ||
const int | y0, | ||
const int | y1 | ||
) |
function to set a subwindow border
void ami::image< T >::set_roi | ( | const int | x0, |
const int | x1, | ||
const int | y0, | ||
const int | y1, | ||
const int | c0, | ||
const int | c1 | ||
) |
function to set a subwindow border
void ami::image< T >::set_roi | ( | const std::vector< int > | roi | ) |
function to set a subwindow border
void ami::image< T >::set_size | ( | int | width, |
int | height | ||
) |
Change the image dimensions.
[in] | width,height | New image dimensions. |
void ami::image< T >::set_value | ( | const int | x, |
T | value | ||
) |
set value to x position of vector
int ami::image< T >::write | ( | std::string | name | ) |
Function to write an image to disk.
[in] | name | Filename of the image. |
name | image file name |
int ami::image< T >::write_bool | ( | std::string | name | ) |
function to write to disk a 8/16 bit tif image from boolean image
name | image file name |