bit_xor ( Image1, Image2 : ImageXor : : )

Bit-by-bit XOR of all pixels of the input images.

The operator bit_xor calculates the "xor" of all pixels of the input images bit by bit. The semantics of the "xor" operation corresponds to that of C for the respective types (signed char, unsigned char, short, int/long). The images must have the same size and pixel type. The pixels within the definition range of the image in the first parameter are processed.

Several images can be processed in one call. In this case both input parameters contain the same number of images which are then processed in pairs. An output image is generated for every pair.


Parameters

Image1 (input_object)
image(-array) -> object : byte / int1 / int2 / int4
Input image 1

Image2 (input_object)
image(-array) -> object : byte / int1 / int2 / int4
Input image 2

ImageXor (output_object)
image(-array) -> object : byte / int1 / int2 / int4
Result of XOR-operation


Example
read_image(:Image0:'affe':) >
disp_image(Image0:::) >
read_image(:Image1:'fabrik':) >
disp_image(Image1:::) >
bit_xor(Image0,Image1:ImageBitX::) >
disp_image(ImageBitX:::).

Result

If the parameter values are correct the operator bit_and returns the value TRUE. The behavior in case of empty input (no input images available) can be determined by the operator set_system(::'no_object_result',<Result>:) If necessary an exception is raised.


Alternatives

bit_or, bit_and, add__


See also

bit_or, bit_and



Copyright © 1996-1997 MVTec Software GmbH