image = | bitwiseSubImgImg (inIntImg1,inIntImg2) |
Subtract two binary image to remove pixels in the image 2 from the image 1.
This algorithm computes a bitwise butraction between two images. The bitwise subtraction is given by the formula :
A Bitwise sub operator applied to 2 integers performs the logical and operation on each pair of corresponding bits of the binary representation of these 2 integers. As shown in the truth table below, the result in each position is 1 if the first bit is 1 and the second bit is 1; otherwise, the result is 0.
Input bit #1 | Input bit #2 | Output bit : |
---|---|---|
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 1 |
1 | 1 | 0 |
Here is an example of a Bitwise sub operation applied to two 2D binary images (black pixels have value 0, white pixels have value 1):