|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
34 size_t inHeight = inImg.
height();
35 size_t singleImage_rowSizeByte = outImgL.
getRowSize();
40 for(
size_t h=0; h<inHeight; h++)
43 memcpy(pixelLeft + h*singleImage_rowSizeByte, pixelInput, singleImage_rowSizeByte);
44 memcpy(pixelRight + h*singleImage_rowSizeByte, pixelInput+=singleImage_rowSizeByte, singleImage_rowSizeByte);
47 pixelInput+= singleImage_rowSizeByte;
77 size_t singleImage_rowSizeByte = inImgL.
getRowSize();
80 unsigned char * pixelOutLeft = outImg.
getRawImage();
81 unsigned char * pixelOutRight = outImg.
getRawImage() + singleImage_rowSizeByte;
83 size_t height = inImgL.
height();
85 for(
size_t h=0; h<height; h++)
88 memcpy(pixelOutLeft, pixelLeft, singleImage_rowSizeByte);
89 memcpy(pixelOutRight, pixelRight, singleImage_rowSizeByte);
92 pixelOutLeft += 2*singleImage_rowSizeByte;
93 pixelOutRight += 2*singleImage_rowSizeByte;
94 pixelLeft += singleImage_rowSizeByte;
95 pixelRight += singleImage_rowSizeByte;
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.
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.
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.
size_t getRawImageSize() const
Access to the internal buffer size information (this is how much memory has been allocated for the im...
size_t getRowSize() const
Size of the underlying image buffer rows.
size_t width() const
Gets width of image in pixels.
static bool checkImages(const Image &bigImg, const Image &smallImg1, const Image &smallImg2)
void resize(size_t imgWidth, size_t imgHeight)
Reallocate an image to be of a desired size, throwing away its current contents.
size_t height() const
Gets height of image in pixels.
Base class for storing images.
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.
unsigned char * getRawImage() const
Access to the internal image buffer.
virtual int getPixelCode() const
Gets pixel type identifier.