libalvision  1.14
 All Classes Namespaces Files Functions Variables Macros Pages
Classes | Public Member Functions | Static Public Member Functions
AL::ALImage Class Reference

List of all members.

Classes

struct  FOV
 Manage the field of view of the image that changes with camera model and cropping.
struct  ROI

Public Member Functions

 ALImage (int pWidth, int pHeight, int pColorSpace, bool pDataAreExternal=false, float pLeftAngle=0.f, float pTopAngle=0.f, float pRightAngle=0.f, float pBottomAngle=0.f)
 constructor
 ALImage (int pResolution, int pColorSpace, bool pDataAreExternal=false, float pLeftAngle=0.f, float pTopAngle=0.f, float pRightAngle=0.f, float pBottomAngle=0.f)
 constructor
ALValue toALValue ()
 return an ALValue containing image structure
void setWidth (const int width)
void setHeight (const int height)
void setLeftAngle (const float leftAngle)
void setTopAngle (const float topAngle)
void setRightAngle (const float rightAngle)
void setBottomAngle (const float bottomAngle)
void setAngles (const float leftAngle, const float topAngle, const float rightAngle, const float bottomAngle)
bool setSize (int pResolution)
 set the Resolution of the image without changing the allocation size.
bool setResolution (int pResolution)
 set the Resolution of the image without changing the allocation size.
bool setColorSpace (int pColorSpace)
 set the ColorSpace of the image without changing the allocation size.
const unsigned char * getFrame () const
 return the reference to the image data
const unsigned char * getData () const
 return the reference to the image data
unsigned char * getFrame ()
 return the pointer to the image data
unsigned char * getData ()
 return the pointer to the image data
void setData (unsigned char *pData)
 set the image data pointer to point to the specified buffer
void setTimeStamp (const qi::os::timeval pTimeStamp)
 set the image timestamp
void setTimeStamp (long long pTimeStamp)
 set the image timestamp
void setTimeStamp (int pSeconds, int pMicroSeconds)
 set the image timestamp
void setCameraId (char pCameraId)
 set the ID of the camera that shot the picture
unsigned int getSize () const
int getWidth (void) const
int getHeight (void) const
int getResolution (void) const
int getColorSpace (void) const
int getNbLayers (void) const
long long getTimeStamp (void) const
char getCameraId () const
int getMaxResolution (void) const
int getNbOfLayersMax (void) const
bool areDataExternal (void) const
int getAllocatedSize () const
float getLeftAngle (void) const
float getTopAngle (void) const
float getRightAngle (void) const
float getBottomAngle (void) const
void getAngles (float &leftAngle, float &topAngle, float &rightAngle, float &bottomAngle)
std::string toString (void) const
int getNumOfROIs () const
const ROIgetROI (int index) const
void addROI (const ROI &rect)
void cleanROIs ()
void setEnableROIs (bool enable)
bool isROIEnabled () const
int writeFile (const char *_fileNameAndPath)
int readFile (const char *_fileNameAndPath)
int savePPM (const char *_fileNameAndPath)
bool computeYUV422imageFromBGR (IplImage *_src)
bool computeYUV422imageFromBGR (int height, int width, char *data)
bool computeBGRimageFromYUV422 (const unsigned char *_dest)
bool computeYYYUUUVVVimageFromYUV422 (const unsigned char *_dest)
bool computeYYYYUUVVimageFromYUV422 (const unsigned char *_dest)

Static Public Member Functions

static ALImagefromALValue (const ALValue &image)

Detailed Description

Definition at line 28 of file alimage.h.


Constructor & Destructor Documentation

AL::ALImage::ALImage ( int  pWidth,
int  pHeight,
int  pColorSpace,
bool  pDataAreExternal = false,
float  pLeftAngle = 0.f,
float  pTopAngle = 0.f,
float  pRightAngle = 0.f,
float  pBottomAngle = 0.f 
)

constructor

 *ALImage
Parameters:
0]: [int] width of the image
1]: [int] height of the image
2]: [int] color space of the image
3]: [bool] is data buffer external, or is it allocated with the image?
4]: [float] camera FOV left angle in radian
5]: [float] camera FOV top angle in radian
6]: [float] camera FOV right angle in radian
7]: [float] camera FOV bottom angle in radian
AL::ALImage::ALImage ( int  pResolution,
int  pColorSpace,
bool  pDataAreExternal = false,
float  pLeftAngle = 0.f,
float  pTopAngle = 0.f,
float  pRightAngle = 0.f,
float  pBottomAngle = 0.f 
)

constructor

 *ALImage
Parameters:
0]: [int] resolution of the image
1]: [int] color space of the image
2]: [bool] is data buffer external, or is it allocated with the image?
3]: [float] camera FOV left angle in radian
4]: [float] camera FOV top angle in radian
5]: [float] camera FOV right angle in radian
6]: [float] camera FOV bottom angle in radian

Member Function Documentation

const unsigned char* AL::ALImage::getData ( ) const
inline

return the reference to the image data

 *getData
Returns:
reference to the image data

Definition at line 149 of file alimage.h.

unsigned char* AL::ALImage::getData ( )
inline

return the pointer to the image data

 *getData
Returns:
pointer to the image data

Definition at line 167 of file alimage.h.

const unsigned char* AL::ALImage::getFrame ( ) const
inline

return the reference to the image data

 *getFrame //DEPRECATED
Returns:
reference to the image data

Definition at line 139 of file alimage.h.

unsigned char* AL::ALImage::getFrame ( )
inline

return the pointer to the image data

 *getFrame //DEPRECATED
Returns:
pointer to the image data

Definition at line 157 of file alimage.h.

unsigned int AL::ALImage::getSize ( ) const
inline
 *getSize
Returns:
the size of the allocated memory for the image (the size of fData buffer)

Definition at line 221 of file alimage.h.

void AL::ALImage::setCameraId ( char  pCameraId)
inline

set the ID of the camera that shot the picture

 *setCameraId
Parameters:
0]: [int] ID of the camera that shot the picture

Definition at line 214 of file alimage.h.

bool AL::ALImage::setColorSpace ( int  pColorSpace)

set the ColorSpace of the image without changing the allocation size.

 *setColorSpace
Parameters:
0]: [int] ColorSpace of the image
void AL::ALImage::setData ( unsigned char *  pData)
inline

set the image data pointer to point to the specified buffer

 *setData
Parameters:
0]: [uInt8*] pointer to the image data buffer

Definition at line 174 of file alimage.h.

bool AL::ALImage::setResolution ( int  pResolution)

set the Resolution of the image without changing the allocation size.

 *setResolution
Parameters:
0]: [int] resolution of the image
bool AL::ALImage::setSize ( int  pResolution)
inline

set the Resolution of the image without changing the allocation size.

 *setSize //DEPRECATED
Parameters:
0]: [int] resolution of the image

Definition at line 118 of file alimage.h.

void AL::ALImage::setTimeStamp ( const qi::os::timeval  pTimeStamp)
inline

set the image timestamp

 *setTimeStamp
Parameters:
0]: [qi::os::timeval format

Definition at line 181 of file alimage.h.

void AL::ALImage::setTimeStamp ( long long  pTimeStamp)
inline

set the image timestamp

 *setTimeStamp
Parameters:
0]: [long long] time in a long long format

Definition at line 195 of file alimage.h.

void AL::ALImage::setTimeStamp ( int  pSeconds,
int  pMicroSeconds 
)
inline

set the image timestamp

 *setTimeStamp
Parameters:
0]: [int] time in seconds
1]: [int] time in µseconds

Definition at line 203 of file alimage.h.

ALValue AL::ALImage::toALValue ( )

return an ALValue containing image structure

 *toALValue
Returns:
[0] : [int] with of the image
[1] : [int] height of the image
[2] : [int] number of layers of the image
[3] : [int] colorspace of the image
[4] : [int] time stamp in second
[5] : [int] time stamp in microsecond (and under second)
[6] : [int] data of the image
[7] : [int] camera ID
[8] : [float] camera FOV left angle (radian)
[9] : [float] camera FOV top angle (radian)
[10]: [float] camera FOV right angle (radian)
[11]: [float] camera FOV bottom angle (radian)

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