First time here? Check out the FAQ!
answered 2015-11-13 20:53:40 -0600
i tested your code. it works without problem with latest OpenCV 3.0.0-dev. try changing vector<Mat> channels; to Mat channels[3]; may be this change solve your problem.
vector<Mat> channels;
Mat channels[3];