cv.bitwise_xor - MATLAB File Help |
Calculates the per-element bit-wise "exclusive or" operation on two arrays or an array and a scalar
dst = cv.bitwise_xor(src1, src2)
dst = cv.bitwise_xor(src1, src2, 'OptionName', optionValue, ...)
dst
when a mask is used. Not set
by default.The function calculates the per-element bit-wise logical "exclusive-or" operation for:
Two arrays when src1
and src2
have the same size:
dst(I) = src1(I) XOR src2(I) if mask(I) != 0
An array and a scalar when src2
is constructed from Scalar or has the
same number of elements as size(src1,3)
:
dst(I) = src1(I) XOR src2 if mask(I) != 0
A scalar and an array when src1
is constructed from Scalar or has the
same number of elements as size(src2,3)
:
dst(I) = src1 XOR src2(I) if mask(I) != 0
In case of floating-point arrays, their machine-specific bit representations (usually IEEE754-compliant) are used for the operation. In case of multi-channel arrays, each channel is processed independently. In the second and third cases above, the scalar is first converted to the array type.