PANDORE Version 6 GREYC-IMAGE

pxor



Performs binary xor between images or graphs and symmetrical difference between region maps.



Synopsis

pxor [-m mask] [im_in1|-] [im_in2|-] [im_out|-]

Description

pxor performs a bitwise "xor" between values of the two inputs im_in1 and im_in2.

If inputs are integer images, the "xor" uses the '^' C operator and is applied on each pixel:

   pixel(im_out) = pixel(im_in1) ^ pixel(im_in2);

For real image, the "xor" operator is:

   if pixel(im1[p]) == pixel(im[2]))
   then pixel(imd[p]=0)
   else pixel(imd[p]) = pixel(im1[p])+pixel(im2[p])

For color or multispectral image, the "xor" operator is computed separately on each band.

For graph, the "xor" operator is implemented by if then else and it is applied on each node values.

For region map, the "xor" operator is the symmetrical difference between regions:

Union(im_in1,im_in2) - Intersection(im_in1,im_in2).

The two inputs must be of the same type.

Inputs

Outputs

Result

Returns SUCCESS or FAILURE.
For region map, returns the new higher label value.

Examples

See also

logic

C++ prototype

Errc PXor( const Img2duc &im_in1, const Img2duc &im_in2, Img2duc &im_out );

Author: Régis Clouard