Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

here's split:

Mat bgr = imread("my.png"); 
Mat yuv;
cvtColor(bgr,yuv,CV_BGR2YUV);

Mat chan[3];
split(yuv,chan);

Mat y = chan[0];
Mat u = chan[1];
Mat v = chan[2];

here's split:

Mat bgr = imread("my.png");  
Mat yuv;
cvtColor(bgr,yuv,CV_BGR2YUV);

Mat chan[3];
split(yuv,chan);

Mat y = chan[0];
Mat u = chan[1];
Mat v = chan[2];

here's split:

Mat bgr = imread("my.png"); 

Mat yuv;
cvtColor(bgr,yuv,CV_BGR2YUV);
ycbcr;
cvtColor(bgr,ycbcr,CV_BGR2YCBCR);

Mat chan[3];
split(yuv,chan);
split(ycbcr,chan);

Mat y  = chan[0];
Mat u cb = chan[1];
Mat v cr = chan[2];