#include <alimage.h>
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 | |
~ALImage () | |
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) const |
std::string | toString (void) const |
int | getNumOfROIs () const |
const ROI * | getROI (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 (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 ALImage * | fromALValue (const ALValue &image) |
Allocate an ALImage and return a pointer on it using an ALValue to fill it. |
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
[in] | pWidth | width of the image |
[in] | pHeight | height of the image |
[in] | pColorSpace | color space of the image |
[in] | pDataAreExternal | is data buffer external, or is it allocated with the image? |
[in] | pLeftAngle | camera FOV left angle in radian |
[in] | pTopAngle | camera FOV top angle in radian |
[in] | pRightAngle | camera FOV right angle in radian |
[in] | pBottomAngle | 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
[in] | pResolution | resolution of the image |
[in] | pColorSpace | color space of the image |
[in] | pDataAreExternal | is data buffer external, or is it allocated with the image? |
[in] | pLeftAngle | camera FOV left angle in radian |
[in] | pTopAngle | camera FOV top angle in radian |
[in] | pRightAngle | camera FOV right angle in radian |
[in] | pBottomAngle | camera FOV bottom angle in radian |
void AL::ALImage::addROI | ( | const ROI & | rect | ) | [inline] |
bool AL::ALImage::areDataExternal | ( | void | ) | const [inline] |
void AL::ALImage::cleanROIs | ( | ) | [inline] |
bool AL::ALImage::computeBGRimageFromYUV422 | ( | const unsigned char * | _dest | ) |
bool AL::ALImage::computeYUV422imageFromBGR | ( | int | height, |
int | width, | ||
char * | data | ||
) |
bool AL::ALImage::computeYYYUUUVVVimageFromYUV422 | ( | const unsigned char * | _dest | ) |
bool AL::ALImage::computeYYYYUUVVimageFromYUV422 | ( | const unsigned char * | _dest | ) |
static ALImage* AL::ALImage::fromALValue | ( | const ALValue & | image | ) | [static] |
Allocate an ALImage and return a pointer on it using an ALValue to fill it.
[in] | image | ALValue containing: image[0] : [int] with of the image image[1] : [int] height of the image image[2] : [int] number of layers of the image image[3] : [int] colorspace of the image image[4] : [int] time stamp in second image[5] : [int] time stamp in microsecond (and under second) image[6] : [int] data of the image image[7] : [int] camera ID image[8] : [float] camera FOV left angle (radian) image[9] : [float] camera FOV top angle (radian) image[10]: [float] camera FOV right angle (radian) image[11]: [float] camera FOV bottom angle (radian) |
int AL::ALImage::getAllocatedSize | ( | ) | const [inline] |
void AL::ALImage::getAngles | ( | float & | leftAngle, |
float & | topAngle, | ||
float & | rightAngle, | ||
float & | bottomAngle | ||
) | const [inline] |
float AL::ALImage::getBottomAngle | ( | void | ) | const [inline] |
char AL::ALImage::getCameraId | ( | ) | const [inline] |
int AL::ALImage::getColorSpace | ( | void | ) | const [inline] |
const unsigned char* AL::ALImage::getData | ( | ) | const [inline] |
unsigned char* AL::ALImage::getData | ( | ) | [inline] |
const unsigned char* AL::ALImage::getFrame | ( | ) | const [inline] |
unsigned char* AL::ALImage::getFrame | ( | ) | [inline] |
int AL::ALImage::getHeight | ( | void | ) | const [inline] |
float AL::ALImage::getLeftAngle | ( | void | ) | const [inline] |
int AL::ALImage::getMaxResolution | ( | void | ) | const [inline] |
int AL::ALImage::getNbLayers | ( | void | ) | const [inline] |
int AL::ALImage::getNbOfLayersMax | ( | void | ) | const [inline] |
int AL::ALImage::getNumOfROIs | ( | ) | const [inline] |
int AL::ALImage::getResolution | ( | void | ) | const [inline] |
float AL::ALImage::getRightAngle | ( | void | ) | const [inline] |
const ROI* AL::ALImage::getROI | ( | int | index | ) | const [inline] |
unsigned int AL::ALImage::getSize | ( | ) | const [inline] |
long long AL::ALImage::getTimeStamp | ( | void | ) | const [inline] |
float AL::ALImage::getTopAngle | ( | void | ) | const [inline] |
int AL::ALImage::getWidth | ( | void | ) | const [inline] |
bool AL::ALImage::isROIEnabled | ( | ) | const [inline] |
int AL::ALImage::readFile | ( | const char * | _fileNameAndPath | ) |
int AL::ALImage::savePPM | ( | const char * | _fileNameAndPath | ) |
void AL::ALImage::setAngles | ( | const float | leftAngle, |
const float | topAngle, | ||
const float | rightAngle, | ||
const float | bottomAngle | ||
) | [inline] |
void AL::ALImage::setBottomAngle | ( | const float | bottomAngle | ) | [inline] |
void AL::ALImage::setCameraId | ( | char | pCameraId | ) | [inline] |
bool AL::ALImage::setColorSpace | ( | int | pColorSpace | ) |
set the ColorSpace of the image without changing the allocation size.
setColorSpace
[in] | pColorSpace | ColorSpace of the image. |
void AL::ALImage::setData | ( | unsigned char * | pData | ) | [inline] |
void AL::ALImage::setEnableROIs | ( | bool | enable | ) | [inline] |
void AL::ALImage::setHeight | ( | const int | height | ) | [inline] |
void AL::ALImage::setLeftAngle | ( | const float | leftAngle | ) | [inline] |
bool AL::ALImage::setResolution | ( | int | pResolution | ) |
set the Resolution of the image without changing the allocation size.
setResolution
[in] | pResolution | resolution of the image. |
void AL::ALImage::setRightAngle | ( | const float | rightAngle | ) | [inline] |
bool AL::ALImage::setSize | ( | int | pResolution | ) | [inline] |
set the Resolution of the image without changing the allocation size.
[in] | pResolution | resolution of the image |
void AL::ALImage::setTimeStamp | ( | const qi::os::timeval | pTimeStamp | ) | [inline] |
void AL::ALImage::setTimeStamp | ( | long long | pTimeStamp | ) | [inline] |
void AL::ALImage::setTimeStamp | ( | int | pSeconds, |
int | pMicroSeconds | ||
) | [inline] |
void AL::ALImage::setTopAngle | ( | const float | topAngle | ) | [inline] |
void AL::ALImage::setWidth | ( | const int | width | ) | [inline] |
ALValue AL::ALImage::toALValue | ( | ) |
return an ALValue containing image structure
toALValue
std::string AL::ALImage::toString | ( | void | ) | const |
int AL::ALImage::writeFile | ( | const char * | _fileNameAndPath | ) |