answered May 18 '13
easy!
Mat src=imread("my.png"); Mat planes[3]; split(src,planes); // planes[2] is the red channel