Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Creating a Mat object from a YV12 image buffer

Hi ! I have a buffer which contains an image in YV12 format. Now I want to either convert this buffer to rbg or create a Mat object from it directly! Can someone help me?

click to hide/show revision 2
retagged

Creating a Mat object from a YV12 image buffer

Hi ! I have a buffer which contains an image in YV12 format. Now I want to either convert this buffer to rbg or create a Mat object from it directly! Can someone help me?

Creating a Mat object from a YV12 image buffer

Hi ! I have a buffer which contains an image in YV12 format. Now I want to either convert this buffer to rbg or create a Mat object from it directly! Can someone help me?me? I tried moster's way : cv::Mat input(rows, cols, CV_8UC1, buffer); cv::Mat converted; cv::cvtColor(input, converted, CV_YUV2RGB_YV12);

Now images look like this : image description

Creating a Mat object from a YV12 image buffer

Hi ! I have a buffer which contains an image in YV12 format. Now I want to either convert this buffer to rbg or create a Mat object from it directly! Can someone help me? I tried moster's way : :

cv::Mat input(rows, cols, CV_8UC1, buffer);
cv::Mat converted;
cv::cvtColor(input, converted, CV_YUV2RGB_YV12);

CV_YUV2RGB_YV12);

Now images look like this : image description