image = | bitwiseNotImg (inIntImg) |
Bitwise not operation on one input image
If the input and output images buffer types are ipsdk::image::eImageBufferType::eIBT_Binary, then the operator ipsdk::imaproc::logic::logicalNotImg can be applied instead.
On output image values are given by:
(with corresponding to the Bitwise not operator).
Input and output images must have same size and buffer type. Buffers must be of type integer.
A Bitwise not operator applied to one integer performs the logical not operation on each bit of the binary representation of this integer. As shown in the truth table below, the result in each position is 1 if the bit is 0; otherwise, the result is 0.
Input bit | Output bit |
---|---|
0 | 1 |
1 | 0 |
For instance, if we compute the result of a Bitwise not on the integer 5, we obtain;
! 0101 (decimal 5) = 1010 (decimal 10)
Here is an example of a Bitwise not operation applied to one 2D binary image (black pixels have value 0, white pixels have value 1) :