1 | initial version |
Are those images identical, outside of this difference you are searching for? If yes, you can use != operator like this:
Mat binary_image = (your_image1 != your_image2);
This will create image (called binary_image). Value of its pixel will be 0 your images are same in this pixel. If they are not the same then value of appropriate pixel will be 255.
If those images are not identical but only 'similar' the problem will be much more difficult.