Ask Your Question

Revision history [back]

To read a video you can use this tutorials.

About color you can use split function to extract BGR plane

To read a video you can use this tutorials.

About color you can use split function to extract BGR plane

Added by @StevenPuttemans

A small code example:

VideoCapture cap("/path/to/video/location");
Mat frame;
while(true){
   cap >> frame;
   if(frame.empty()){
      break;
   }
   vector<Mat> channels;
   split(frame, channels);
   imshow("Red Channel", channels[2]);
   waitKey(15);
}