Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

For only a single channel, you could use this:

Mat src_grn = Mat::zeros(src.rows, src.cols, CV_8UC1); //green channel from src
int from_to[] = { 1, 0 }; //copy green channel only (assume BGR)
mixChannels(&src, 1, &src_grn, 1, from_to, 1);

I'm grabbing the green only from a white-hot object, which has the best contrast. Dimmer things will need some other tricks though...let me know how it goes!