Here is code for getting RGB channels from an image.
#include #include using namespace std; using namespace cv; int main