Classes | |
struct | PCL_ROI |
Enumerations | |
enum class | OrganizationType { Organized , Unorganized } |
Functions | |
bool | vertSplit (const yarp::sig::Image &inImg, yarp::sig::Image &outImgL, yarp::sig::Image &outImgR) |
Split vertically an image in two images of the same size. | |
bool | horzSplit (const yarp::sig::Image &inImg, yarp::sig::Image &outImgUp, yarp::sig::Image &outImgDown) |
Split horizontally an image in two images of the same size. | |
bool | horzConcat (const yarp::sig::Image &inImgL, const yarp::sig::Image &inImgR, yarp::sig::Image &outImg) |
Concatenate horizontally two images of the same size in one with double width. | |
bool | vertConcat (const yarp::sig::Image &inImgUp, const yarp::sig::Image &inImgDown, yarp::sig::Image &outImg) |
Concatenate vertically two images of the same size in one with double height. | |
bool | cropRect (const yarp::sig::Image &inImg, const std::pair< unsigned int, unsigned int > &vertex1, const std::pair< unsigned int, unsigned int > &vertex2, yarp::sig::Image &outImg) |
Crop a rectangle area out of an image given two opposite vertices. | |
bool | sum (yarp::sig::Image &OutImg, const yarp::sig::Image &InImg, bool colorkey_enable, int colorkey, bool alpha_enable, float alpha, size_t off_x, size_t off_y) |
applies an image on the top over another image. | |
yarp::sig::PointCloud< yarp::sig::DataXYZ > | depthToPC (const yarp::sig::ImageOf< yarp::sig::PixelFloat > &depth, const yarp::sig::IntrinsicParams &intrinsic) |
depthToPC, compute the PointCloud given depth image and the intrinsic parameters of the camera. | |
yarp::sig::PointCloud< yarp::sig::DataXYZ > | depthToPC (const yarp::sig::ImageOf< yarp::sig::PixelFloat > &depth, const yarp::sig::IntrinsicParams &intrinsic, const yarp::sig::utils::PCL_ROI &roi, size_t step_x=1, size_t step_y=1, const std::string &output_order="+X+Y+Z") |
depthToPC, compute the PointCloud given depth image, the intrinsic parameters of the camera and a Region Of Interest. | |
template<typename T1 , typename T2 > | |
yarp::sig::PointCloud< T1 > | depthRgbToPC (const yarp::sig::ImageOf< yarp::sig::PixelFloat > &depth, const yarp::sig::ImageOf< T2 > &color, const yarp::sig::IntrinsicParams &intrinsic, const yarp::sig::utils::OrganizationType organizationType=yarp::sig::utils::OrganizationType::Organized, size_t step_x=1, size_t step_y=1, const std::string &output_order="+X+Y+Z") |
depthRgbToPC, compute the colored PointCloud given depth image, color image and the intrinsic parameters of the camera. | |
|
strong |
Enumerator | |
---|---|
Organized | |
Unorganized |
Definition at line 15 of file PointCloudUtils.h.
bool yarp::sig::utils::cropRect | ( | const yarp::sig::Image & | inImg, |
const std::pair< unsigned int, unsigned int > & | vertex1, | ||
const std::pair< unsigned int, unsigned int > & | vertex2, | ||
yarp::sig::Image & | outImg | ||
) |
Crop a rectangle area out of an image given two opposite vertices.
[in] | inImg | input image. |
[in] | vertex1 | first vertex of the crop rectangle area. |
[in] | vertex2 | second vertex of the crop rectangle area. |
[out] | outImg | result of cropping the input image. |
Definition at line 115 of file ImageUtils.cpp.
yarp::sig::PointCloud< T1 > yarp::sig::utils::depthRgbToPC | ( | const yarp::sig::ImageOf< yarp::sig::PixelFloat > & | depth, |
const yarp::sig::ImageOf< T2 > & | color, | ||
const yarp::sig::IntrinsicParams & | intrinsic, | ||
const yarp::sig::utils::OrganizationType | organizationType = yarp::sig::utils::OrganizationType::Organized , |
||
size_t | step_x = 1 , |
||
size_t | step_y = 1 , |
||
const std::string & | output_order = "+X+Y+Z" |
||
) |
depthRgbToPC, compute the colored PointCloud given depth image, color image and the intrinsic parameters of the camera.
[in] | depth,the | input depth image. |
[in] | color,the | input color image. |
[in] | intrinsic,intrinsic | parameter of the camera. |
[in] | organizationType,if | organized the point cloud has size (width, depth). if unorganized the point cloud has size (width*height, 1). Note that in this case the data are organized column-wise (i.e. y,x and not x,y) |
[in] | step_x,the | depth image size can be decimated, by selecting a column every step_x; |
[in] | step_y,the | depth image size can be decimated, by selecting a row every step_y; |
[in] | output_order,the | string will optionally rearrange data in any combination of positive and negative axes. e.g. "+Z-Y+X". Useful when dealing with not right-handed coordinate systems. Optimized for efficiency during point cloud creation with no additional computation. |
Definition at line 62 of file PointCloudUtils-inl.h.
PointCloud< DataXYZ > yarp::sig::utils::depthToPC | ( | const yarp::sig::ImageOf< yarp::sig::PixelFloat > & | depth, |
const yarp::sig::IntrinsicParams & | intrinsic | ||
) |
depthToPC, compute the PointCloud given depth image and the intrinsic parameters of the camera.
[in] | depth,the | input depth image. |
[in] | intrinsic,intrinsic | parameter of the camera. |
Definition at line 16 of file PointCloudUtils.cpp.
PointCloud< DataXYZ > yarp::sig::utils::depthToPC | ( | const yarp::sig::ImageOf< yarp::sig::PixelFloat > & | depth, |
const yarp::sig::IntrinsicParams & | intrinsic, | ||
const yarp::sig::utils::PCL_ROI & | roi, | ||
size_t | step_x = 1 , |
||
size_t | step_y = 1 , |
||
const std::string & | output_order = "+X+Y+Z" |
||
) |
depthToPC, compute the PointCloud given depth image, the intrinsic parameters of the camera and a Region Of Interest.
[in] | depth,the | input depth image. |
[in] | intrinsic,intrinsic | parameter of the camera. |
[in] | roi,the | Region Of Interest intrinsic of the depth image that we want to convert. |
[in] | step_x,the | depth image size can be decimated, by selecting a column every step_x; |
[in] | step_y,the | depth image size can be decimated, by selecting a row every step_y; |
[in] | output_order,the | string will optionally rearrange data in any combination of positive and negative axes. e.g. "+Z-Y+X". Useful when dealing with not right-handed coordinate systems. Optimized for efficiency during point cloud creation with no additional computation. |
Definition at line 40 of file PointCloudUtils.cpp.
bool yarp::sig::utils::horzConcat | ( | const yarp::sig::Image & | inImgL, |
const yarp::sig::Image & | inImgR, | ||
yarp::sig::Image & | outImg | ||
) |
Concatenate horizontally two images of the same size in one with double width.
[in] | inImgL | input left image. |
[in] | inImgR | input right image. |
[out] | outImg | result of the horizontal concatenation. |
Definition at line 69 of file ImageUtils.cpp.
bool yarp::sig::utils::horzSplit | ( | const yarp::sig::Image & | inImg, |
yarp::sig::Image & | outImgUp, | ||
yarp::sig::Image & | outImgDown | ||
) |
Split horizontally an image in two images of the same size.
[in] | inImg | image to be horizontally split. |
[out] | outImgUp | top half of inImg. |
[out] | outImgDown | bottom half of inImg. |
Definition at line 52 of file ImageUtils.cpp.
bool yarp::sig::utils::sum | ( | yarp::sig::Image & | OutImg, |
const yarp::sig::Image & | InImg, | ||
bool | colorkey_enable, | ||
int | colorkey, | ||
bool | alpha_enable, | ||
float | alpha, | ||
size_t | off_x, | ||
size_t | off_y | ||
) |
applies an image on the top over another image.
Currently it is implemented only for RGB Images
[in/out] | OutImg the output image. It must be a valid image on the top of which data will be summed. It may contain a background or it can be zero. | |
[in] | InImg | the layer to be applied |
[in] | colorkey | colorkey for the InImg image. If a pixel is == colorkey, then it will be made transparent and the background will be visible. |
[in] | alpha | to be applied to InImg. |
[in] | off_x | horizontal offset applied to InImg. Excess will be cropped. |
[in] | off_y | vertical offset applied to InImg. Excess will be cropped. |
Definition at line 147 of file ImageUtils.cpp.
bool yarp::sig::utils::vertConcat | ( | const yarp::sig::Image & | inImgUp, |
const yarp::sig::Image & | inImgDown, | ||
yarp::sig::Image & | outImg | ||
) |
Concatenate vertically two images of the same size in one with double height.
[in] | inImgUp | input top image. |
[in] | inImgDown | input bottom image. |
[out] | outImg | result of the horizontal concatenation. |
Definition at line 100 of file ImageUtils.cpp.
bool yarp::sig::utils::vertSplit | ( | const yarp::sig::Image & | inImg, |
yarp::sig::Image & | outImgL, | ||
yarp::sig::Image & | outImgR | ||
) |
Split vertically an image in two images of the same size.
[in] | inImg | image to be vertically split. |
[out] | outImgL | left half of inImg. |
[out] | outImgR | right half of inImg. |
Definition at line 25 of file ImageUtils.cpp.