YUV422(16bit) to RGB(24bit) conversion
Hi All, I am trying to convert a yuv422(16 bit) image to RGB(or BGR, 24 bit), with little success so far. My code is as follows:
cv::Mat rgb(input->Height(), input->Width(), CV_8UC2, (char*)input->GetData());
cv::Mat webimg(workingImage->Height(), workingImage->Width(), CV_8UC3, workingImage->GetData());
cv::cvtColor(rgb, webimg, CV_YUV2RGB_UYVY);
The coloring I am getting is way off(mostly green and purple like one of those old MTV clips)
Any help would be appreciated.