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);
Now images look like this :