Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

i want to split and show R B G pictures ,why does it not work?

namedWindow("dst");
//i want t show R B G pictures
vector<Mat> spl;

src = imread("t1.jpg");
imshow("SRC",src);
split(src,spl);
imshow("spl1",spl[0]);
imshow("spl2",spl[1]);
imshow("spl3",spl[2]);

i want to split and show R B G pictures ,why does it not work?

namedWindow("dst");
//i want t show R B G pictures
vector<Mat> spl;

src = imread("t1.jpg");
imshow("SRC",src);
split(src,spl);
imshow("spl1",spl[0]);
imshow("spl2",spl[1]);
imshow("spl3",spl[2]);
imshow("spl1",spl[0]);//b
imshow("spl2",spl[1]);//g
imshow("spl3",spl[2]);//r

i want to split and show R B G pictures ,why does it not work?

namedWindow("dst");
//i want t show R B G pictures
vector<Mat> spl;

src = imread("t1.jpg");
imshow("SRC",src);
split(src,spl);
imshow("spl1",spl[0]);//b
imshow("spl2",spl[1]);//g
imshow("spl3",spl[2]);//r