Ask Your Question

Revision history [back]

Actually I am guessing he wants a 3 channel image, but combined into a single matrix. This can be done the following way:

Mat 3channels(hueMask.rows, hueMask.cols, CV_8UC3);
Mat in[] = { hueMask , saturationMask, valueMask };
int from_to[] = { 0,0, 1,1, 2,2 };
mixChannels( in, 3, &3channels, 1, from_to, 3 );