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?
1 | initial version |
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?
2 | retagged |
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?
3 | No.3 Revision |
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 :
4 | No.4 Revision |
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 :