YARP
Yet Another Robot Platform
yarp::sig::utils Namespace Reference

Image utilities. More...

Detailed Description

Image utilities.

PointCloud utilities.

Functions

bool vertSplit (const yarp::sig::Image &inImg, yarp::sig::Image &outImgL, yarp::sig::Image &outImgR)
 vertSplit, split vertically an image in two images of the same size. More...
 
bool horzSplit (const yarp::sig::Image &inImg, yarp::sig::Image &outImgUp, yarp::sig::Image &outImgDown)
 horzSplit, split horizontally an image in two images of the same size. More...
 
bool horzConcat (const yarp::sig::Image &inImgL, const yarp::sig::Image &inImgR, yarp::sig::Image &outImg)
 horzConcat, concatenate horizontally two images of the same size in one with double width. More...
 
bool vertConcat (const yarp::sig::Image &inImgUp, const yarp::sig::Image &inImgDown, yarp::sig::Image &outImg)
 vertConcat, concatenate vertically two images of the same size in one with double height. More...
 
yarp::sig::PointCloud< yarp::sig::DataXYZdepthToPC (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. More...
 
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)
 depthRgbToPC, compute the colored PointCloud given depth image, color image and the intrinsic parameters of the camera. More...
 

Function Documentation

◆ depthRgbToPC()

template<typename T1 , typename T2 >
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 
)

depthRgbToPC, compute the colored PointCloud given depth image, color image and the intrinsic parameters of the camera.

Parameters
[in]depth,theinput depth image.
[in]color,theinput color image.
[in]intrinsic,intrinsicparameter of the camera.
Note
the intrinsic parameters are the one of the depth sensor if the depth frame IS NOT aligned with the colored one. On the other hand use the intrinsic parameters of the RGB camera if the frames are aligned.
Returns
the pointcloud obtained by the de-projection.

Definition at line 13 of file PointCloudUtils-inl.h.

◆ depthToPC()

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.

Parameters
[in]depth,theinput depth image.
[in]intrinsic,intrinsicparameter of the camera.
Note
the intrinsic parameters are the one of the depth sensor if the depth frame IS NOT aligned with the colored one. On the other hand use the intrinsic parameters of the RGB camera if the frames are aligned.
Returns
the pointcloud obtained by the de-projection.

Definition at line 14 of file PointCloudUtils.cpp.

◆ horzConcat()

bool yarp::sig::utils::horzConcat ( const yarp::sig::Image inImgL,
const yarp::sig::Image inImgR,
yarp::sig::Image outImg 
)

horzConcat, concatenate horizontally two images of the same size in one with double width.

Parameters
inImgL[in]input left image.
inImgR[in]input right image.
outImg[out]result of the horizontal concatenation.
Note
The input images must have same dimensions and pixel type, and the output image must have same height and double width.
Returns
true on success, false otherwise.

Definition at line 69 of file ImageUtils.cpp.

◆ horzSplit()

bool yarp::sig::utils::horzSplit ( const yarp::sig::Image inImg,
yarp::sig::Image outImgUp,
yarp::sig::Image outImgDown 
)

horzSplit, split horizontally an image in two images of the same size.

Parameters
inImg[in]image to be horizontally split.
outImgUp[out]top half of inImg.
outImgDown[out]bottom half of inImg.
Note
The input image must have same height, double width of the output images and same pixel type.
Returns
true on success, false otherwise.

Definition at line 52 of file ImageUtils.cpp.

◆ vertConcat()

bool yarp::sig::utils::vertConcat ( const yarp::sig::Image inImgUp,
const yarp::sig::Image inImgDown,
yarp::sig::Image outImg 
)

vertConcat, concatenate vertically two images of the same size in one with double height.

Parameters
inImgUp[in]input top image.
inImgDown[in]input bottom image.
outImg[out]result of the horizontal concatenation.
Note
The input images must have same dimensions and pixel type, and the output image must have same width and double height.
Returns
true on success, false otherwise.

Definition at line 100 of file ImageUtils.cpp.

◆ vertSplit()

bool yarp::sig::utils::vertSplit ( const yarp::sig::Image inImg,
yarp::sig::Image outImgL,
yarp::sig::Image outImgR 
)

vertSplit, split vertically an image in two images of the same size.

Parameters
inImg[in]image to be vertically split.
outImgL[out]left half of inImg.
outImgR[out]right half of inImg.
Note
The input image must have same height, double width of the output images and same pixel type.
Returns
true on success, false otherwise.

Definition at line 25 of file ImageUtils.cpp.