Ask Your Question

Revision history [back]

Just pass the IR image as second parameter to copyTo. Only pixels with a non-zero value in the mask are copied:

http://docs.opencv.org/2.4/modules/core/doc/basic_structures.html?highlight=clone#mat-copyto

Just pass the IR image as second parameter to copyTo. Only pixels with a non-zero value in the mask are copied:

http://docs.opencv.org/2.4/modules/core/doc/basic_structures.html?highlight=clone#mat-copytolink text

// Update: As the mask has to be CV_8U, you could use cv::convertTo to change the type.

Just pass the IR image as second parameter to copyTo. Only pixels with a non-zero value in the mask are copied:

link textCopyTo With mask

// Update: As the mask has to be CV_8U, you could use cv::convertTo to change the type.