How to do Addition and Subtraction of Binary image
Mat result = img1 + img2;
imshow("h", result);
Mat re1 = result1 - img1;
imshow("h1", re1);
img1 and img2 are Binary image.
But image 're1' have other color, no only have White and Black
How to solve this problem???????
I think that the matrix 'result' and 're1' establish in the type of binary image matrix. But I don't know what to do.
Hi, add and substraction methods in binary image are bit operation,you can use bitwise-and, bitwise-not,bitwise-or to do what you want:)
I used 'bitwise_and(img1,img2,result)' Pero have other color, too.
it's a bit unclear, what you want to achieve.