Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Crash in cvtColor

Hi,

I m trying to apply opencv algo on a yuv framebuffer.

I m doing something like this My framebuffer input in of type unsigned char.

Mat frame(640,480,CV_8UC1,0.0);

memcpy(frame.data,yuvframebuffer,bufferLen);

Mat gray(640,480,CV_8UC1,0.0);

cvtColor(frame, gray,CV_YUV2RGB_YV12);

I m getting "CV exception in memory location [..] "

Please let me know what I m doing wrong here..

click to hide/show revision 2
No.2 Revision

Crash in cvtColor

Hi,

I m trying to apply opencv algo on a yuv framebuffer.

I m doing something like this My framebuffer input in of type unsigned char.

Mat frame(640,480,CV_8UC1,0.0);

frame(640,480,CV_8UC1,0.0); memcpy(frame.data,yuvframebuffer,bufferLen); Mat gray(640,480,CV_8UC1,0.0);

memcpy(frame.data,yuvframebuffer,bufferLen);

Mat gray(640,480,CV_8UC1,0.0);

cvtColor(frame, gray,CV_YUV2RGB_YV12);

gray,CV_YUV2RGB_YV12);

I m getting "CV exception in memory location [..] "

Please let me know what I m doing wrong here..