I wanted to look at only the R+G channels in an RGB image because I get better contrasts to detect an object when the Blue channel is removed. I used OpenCV to split the cha
Alright, I got to work using mixChannels():I have attached an addition to the code snippet above:
Mat gr( image.rows, image.cols, CV_8UC3);
// forming an array of matrices is a quite efficient operation,
// because the matrix data is not copied, only the headers
Mat out[] = {gr};
// bgr[1] -> gr[1],
// bgr[2] -> gr[2],
int from_to[] = {1,1, 2,2 };
mixChannels( &image, 1, out, 2, from_to, 2 );
imshow("R+G",gr);
Thanks Harsha