<< binaryor Image_Processing_Tool_3 bricontra >>

Image_Processing_Tool_3 >> Image_Processing_Tool_3 > binaryxor

binaryxor

Computes binary XOR operation of two logical arrays.

Calling Sequence

y = binaryxor(x1,x2)

Parameters

x1

A logical array whose elements are either 0's and 1's only or T's and F's only.

x2

A logical array whose elements are either 0's and 1's only or T's and F's only.

y

A logical array obtained after performing XOR operation of the two input logical arrays.

Description

It computes binary XOR operation between two size compatible logical arrays. Both input arrays may be of 0's and 1's or T's and F's. Or one of the input arrays may be of 0's and 1's and the other be of T's and F's. The output parameter is a logical array whose elements are T's and F's only.

Examples

x=imread('lena.png');
x=rgb2gray(x);
x=double(x);
z=x>=125;
c=findContour(z,0);
c1=findContour(1-z,0);
y=binaryxor(c,c1);
imshow(y) // displaying binary XORed image

See Also

Authors

<< binaryor Image_Processing_Tool_3 bricontra >>