1 | initial version |
Basically the answers to my own question will solve your problem. You have to be sure that you use the copyTo statements correctly.
http://answers.opencv.org/question/10336/combining-multiple-cvmat-images-into-single-cvmat/
Basically you need to do the following:
blue_channel.copyTo( result_channel( Rect(0, 0, cols, rows) ) );
green_channel.copyTo( result_channel( Rect(cols, 0, cols, rows) ) );
red_channel.copyTo( result_channel( Rect(cols*2, 0, cols, rows) ) );
Where the blue/green/red channels would be your image that you want to place over the face. The result image is the frame you grab and the rect region of interest is the bounding box your algorithm dumps.
However, this is the C++ interface that is used. Hope this suits your problem.