ClassesClassesClassesClasses | | | | Operators

bit_andbit_andBitAndbit_andBitAndBitAnd (Operator)

Name

bit_andbit_andBitAndbit_andBitAndBitAnd — Bit-by-bit AND of all pixels of the input images.

Signature

bit_and(Image1, Image2 : ImageAnd : : )

Herror bit_and(const Hobject Image1, const Hobject Image2, Hobject* ImageAnd)

Herror T_bit_and(const Hobject Image1, const Hobject Image2, Hobject* ImageAnd)

Herror bit_and(Hobject Image1, Hobject Image2, Hobject* ImageAnd)

HImage HImage::BitAnd(const HImage& Image2) const

HImageArray HImageArray::BitAnd(const HImageArray& Image2) const

void BitAnd(const HObject& Image1, const HObject& Image2, HObject* ImageAnd)

HImage HImage::BitAnd(const HImage& Image2) const

void HOperatorSetX.BitAnd(
[in] IHUntypedObjectX* Image1, [in] IHUntypedObjectX* Image2, [out] IHUntypedObjectX*ImageAnd)

IHImageX* HImageX.BitAnd([in] IHImageX* Image2)

static void HOperatorSet.BitAnd(HObject image1, HObject image2, out HObject imageAnd)

HImage HImage.BitAnd(HImage image2)

Description

The operator bit_andbit_andBitAndbit_andBitAndBitAnd calculates the “and” of all pixels of the input images bit by bit. The semantics of the “and” operation corresponds to that of C for the respective types (signed char, unsigned char, short, unsigned 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.

Parallelization

Parameters

Image1Image1Image1Image1Image1image1 (input_object)  (multichannel-)image(-array) objectHImageHImageHImageHImageXHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4)

Input image(s) 1.

Image2Image2Image2Image2Image2image2 (input_object)  (multichannel-)image(-array) objectHImageHImageHImageHImageXHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4)

Input image(s) 2.

ImageAndImageAndImageAndImageAndImageAndimageAnd (output_object)  (multichannel-)image(-array) objectHImageHImageHImageHImageXHobject * (byte / direction / cyclic / int1 / int2 / uint2 / int4)

Result image(s) by AND-operation.

Example (HDevelop)

read_image(Image1,'fabrik')
dev_display (Image1)
read_image(Image2,'monkey')
dev_display (Image2)
bit_and(Image1,Image2,ImageBitAnd)
dev_display (ImageBitAnd)

Example (C)

read_image(&Image1,"monkey");
disp_image(Image1,WindowHandle);
read_image(&Image2,"fabrik");
disp_image(Image2,WindowHandle);
bit_and(Image1,Image2,&ImageBitAnd);
disp_image(ImageBitAnd,WindowHandle);

Example (HDevelop)

read_image(Image1,'fabrik')
dev_display (Image1)
read_image(Image2,'monkey')
dev_display (Image2)
bit_and(Image1,Image2,ImageBitAnd)
dev_display (ImageBitAnd)

Example (HDevelop)

read_image(Image1,'fabrik')
dev_display (Image1)
read_image(Image2,'monkey')
dev_display (Image2)
bit_and(Image1,Image2,ImageBitAnd)
dev_display (ImageBitAnd)

Example (HDevelop)

read_image(Image1,'fabrik')
dev_display (Image1)
read_image(Image2,'monkey')
dev_display (Image2)
bit_and(Image1,Image2,ImageBitAnd)
dev_display (ImageBitAnd)

Example (HDevelop)

read_image(Image1,'fabrik')
dev_display (Image1)
read_image(Image2,'monkey')
dev_display (Image2)
bit_and(Image1,Image2,ImageBitAnd)
dev_display (ImageBitAnd)

Result

If the images are correct (type and number) the operator bit_andbit_andBitAndbit_andBitAndBitAnd returns the value 2 (H_MSG_TRUE). The behavior in case of empty input (no input images available) is set via the operator set_system(::'no_object_result',<Result>:)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>) If necessary an exception is raised.

Alternatives

bit_maskbit_maskBitMaskbit_maskBitMaskBitMask, add_imageadd_imageAddImageadd_imageAddImageAddImage, max_imagemax_imageMaxImagemax_imageMaxImageMaxImage

See also

bit_maskbit_maskBitMaskbit_maskBitMaskBitMask, add_imageadd_imageAddImageadd_imageAddImageAddImage, max_imagemax_imageMaxImagemax_imageMaxImageMaxImage

Module

Foundation


ClassesClassesClassesClasses | | | | Operators