I have a byte buffer (unsigned char) of RGBA format, I wish to use this image data in OpenCV, use it as a IplImage. How to convert from this byte buffer to IplImage*?
1 | initial version |
I have a byte buffer (unsigned char) of RGBA format, I wish to use this image data in OpenCV, use it as a IplImage. How to convert from this byte buffer to IplImage*?
2 | No.2 Revision |
I have a byte buffer (unsigned char( unsigned char * ) of RGBA format, I wish to use this image data in OpenCV, use it as a IplImage.
How to convert from this byte buffer to IplImage*?IplImage?
3 | No.3 Revision |
I have a byte buffer ( unsigned char * ) of RGBA format, I wish to use this image data in OpenCV, use it as a IplImage. How to convert from this byte buffer to IplImage?
Think I have worked this out myself, still testing.
IplImage* img = cvCreateImage( cvSize(width,height), IPL_DEPTH_8U, 4);
cvSetData(img, buffer, width*4);
4 | retagged |
I have a byte buffer ( unsigned char * ) of RGBA format, I wish to use this image data in OpenCV, use it as a IplImage. How to convert from this byte buffer to IplImage?
Think I have worked this out myself, still testing.
IplImage* img = cvCreateImage( cvSize(width,height), IPL_DEPTH_8U, 4);
cvSetData(img, buffer, width*4);