Public Member Functions | Private Attributes
pal_vision_util::Image Class Reference

Wrapper of old C-style OpenCV IplImage with some processing functionalities. More...

#include <image_processing.h>

List of all members.

Public Member Functions

void freeImage ()
 Explicitely delete the pointed IplImage.
int getChannel () const
int getDepth () const
int getHeight () const
IplImage * getIplImg ()
unsigned char getPixelB (int col, int row, int ch) const
float getPixelF (int col, int row, int ch) const
short getPixelS (int col, int row, int ch) const
int getWidth () const
 Image ()
 Default constructor.
 Image (IplImage *img)
 constructor from a IplImage pointer. The ownership of the pointer object is taken.
 Image (const cv::Mat &mat)
 Image constructor from a cv::Mat object. The ownership is shared but no memory will be released in the destructor.
void loadImage (const std::string &fileName)
 operator IplImage * () const
IplImage * operator-> (void) const
IplImage * release ()
 release the ownership of the returned IplImage.
void resizeImage (int width, int height, int channels, int depth)
void set (IplImage *img)
 take the ownership of the given pointed object. If it already owned another pointed IplImage it is first realeased.
void setPixelB (int col, int row, int ch, unsigned char value)
void setPixelF (int col, int row, int ch, float value)
void setPixelS (int col, int row, int ch, short value)
 ~Image ()
 destructor. If the ownership of an IplImage has been taken it is released.

Private Attributes

IplImage * _img
IplImage _iplFromMat
bool _releaseOnDestroyer

Detailed Description

Wrapper of old C-style OpenCV IplImage with some processing functionalities.

Author:
Jordi

Definition at line 107 of file image_processing.h.


Constructor & Destructor Documentation

Default constructor.

Definition at line 200 of file image_processing.cpp.

pal_vision_util::Image::Image ( IplImage *  img)

constructor from a IplImage pointer. The ownership of the pointer object is taken.

Definition at line 207 of file image_processing.cpp.

pal_vision_util::Image::Image ( const cv::Mat &  mat)

Image constructor from a cv::Mat object. The ownership is shared but no memory will be released in the destructor.

Parameters:
mat

Definition at line 213 of file image_processing.cpp.

destructor. If the ownership of an IplImage has been taken it is released.

Definition at line 220 of file image_processing.cpp.


Member Function Documentation

Explicitely delete the pointed IplImage.

Definition at line 225 of file image_processing.cpp.

int pal_vision_util::Image::getChannel ( ) const [inline]

Definition at line 154 of file image_processing.h.

int pal_vision_util::Image::getDepth ( ) const [inline]

Definition at line 155 of file image_processing.h.

int pal_vision_util::Image::getHeight ( ) const [inline]

Definition at line 153 of file image_processing.h.

IplImage* pal_vision_util::Image::getIplImg ( ) [inline]

Definition at line 169 of file image_processing.h.

unsigned char pal_vision_util::Image::getPixelB ( int  col,
int  row,
int  ch 
) const

Definition at line 259 of file image_processing.cpp.

float pal_vision_util::Image::getPixelF ( int  col,
int  row,
int  ch 
) const

Definition at line 268 of file image_processing.cpp.

short pal_vision_util::Image::getPixelS ( int  col,
int  row,
int  ch 
) const

Definition at line 277 of file image_processing.cpp.

int pal_vision_util::Image::getWidth ( ) const [inline]

Definition at line 152 of file image_processing.h.

void pal_vision_util::Image::loadImage ( const std::string &  fileName)

Definition at line 234 of file image_processing.cpp.

pal_vision_util::Image::operator IplImage * ( ) const [inline]

Definition at line 173 of file image_processing.h.

IplImage* pal_vision_util::Image::operator-> ( void  ) const [inline]

Definition at line 171 of file image_processing.h.

release the ownership of the returned IplImage.

Returns:
NULL if no IplImage was owned. The pointer to the IplImage otherwise.

Definition at line 246 of file image_processing.cpp.

void pal_vision_util::Image::resizeImage ( int  width,
int  height,
int  channels,
int  depth 
)

Definition at line 253 of file image_processing.cpp.

void pal_vision_util::Image::set ( IplImage *  img)

take the ownership of the given pointed object. If it already owned another pointed IplImage it is first realeased.

Definition at line 239 of file image_processing.cpp.

void pal_vision_util::Image::setPixelB ( int  col,
int  row,
int  ch,
unsigned char  value 
)

Definition at line 287 of file image_processing.cpp.

void pal_vision_util::Image::setPixelF ( int  col,
int  row,
int  ch,
float  value 
)

Definition at line 297 of file image_processing.cpp.

void pal_vision_util::Image::setPixelS ( int  col,
int  row,
int  ch,
short  value 
)

Definition at line 292 of file image_processing.cpp.


Member Data Documentation

IplImage* pal_vision_util::Image::_img [private]

Definition at line 178 of file image_processing.h.

Definition at line 177 of file image_processing.h.

Definition at line 179 of file image_processing.h.


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


pal_vision_segmentation
Author(s): Bence Magyar
autogenerated on Fri Aug 28 2015 11:57:00