PANDORE Version 6 GREYC-IMAGE

pand



Performs binary and between images or graphs and intersection between region maps.



Synopsis

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

Description

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

For integer images, the "and" operator uses the '&' C operator and is applied on each pixel:

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

For real image, the "and" operator uses the '*' C operator:

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

For color or multispectral images, the "and" operator is computed separately on each band.

For graphs, the "and" operator is "*" and it is applied on each node values.

For region maps, the "and" operator is the intersection between regions. The result im_out is a new region map with common regions, giving preference to smaller regions. Common regions are regions at the same location and a label > 0. It is not necessary that the regions have the same label value.

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 PAnd( const Img2duc &im_in1, const Img2duc &im_in2, Img2duc &im_out );

Author: Régis Clouard