I have an image with 3 channels (img) and another one with a single channel (ch1).
Mat img(5,5,CV_64FC3); Mat ch1 (5,5,CV_64FC1);
I
A simpler one if you have a RGB with 3 channels is cvSplit() if i'm not wrong, you have less to configure... (and i think it is also well optimized).
I would use cvMixChannel() for "harder" tasks... :p (i know i am lazy).
here is the documentation for cvSplit()