Ask Your Question

Revision history [back]

Hi Michael!

Probably the best option to this problem, is separate the different channels of your videoline (Y,U and V).

Something like this: Mat yuv422_DDR_RAM = {99, bc, 12, bc, 99, bc, ...}

Mat y = {99,12,99,...} Mat u = {bc,bc,...} Mat v = {bc,...}

After this, you can calculate the histogram of channel Y, using the OpenCV functions and the object cv::Mat y. Repeat the process to channel U and channel V.

If you want the original image you must resize cv::Mat u and cv::Mat v to the same values of width and height of cv::Mat y. After the resizing process you can merge the objects Mat y, u and v.

Cheers, Victor