Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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

image description

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.