Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I assume your camera provides frame as an uchar* buff where A,R,G,B values of type uchar for one pixel are placed sequentially. Then the Mat initialization should look something like this:

int w, h;     // picture width and height
ucnar* buff;  // w*h*4 bytes, no strides between image lines
// ...
Mat m(h, w, CV_8UC4, buff);