Convert RGBA byte buffer to OpenCV image?
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);