c++ - Appying a binary threshold filter on a rgb image opencv -


i have binary mat obtained thresholding. need apply binary mat on rgb mat. there method in opencv apply binary mask on rgb image?

just use bitwise_and function:

mat dest; bitwise_and(rgbmat, binarymat, dest); 

it should work, if not, use cvtcolor function convert binarymat bgr:

cvtcolor(binarymat, binarymat, cv_gray2bgr); //but before bitwise_and function 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -