Converting Y + biplanar CrCb into RGB Mat
I have a data stored in a layout with two planes. First plane is Y plane and second one is CrCb, where those values are interleaved. Each pixel in Y plane is 8 bit long and each pixel of CrCb plane is 16 bits long (8 bits Cr and 8 bits for Cb). How can I create a cv::Mat
from this format and convert it to ordinary RGB (or BGR) format? Thank you.
can you show, how you acquire that data ?
You'll have to map it into two cv::Mat. The first is the Y data, and the second is a two channel Mat to hold the U and V. Then split the U and V, and merge all three.
Then it's just a standard cvtColor.