HALCON Reference Manual 10.0.2
Table of Contents / Filters / Bit ClassesClassesClasses | | | Operators

bit_orbit_orbit_orBitOrBitOr (Operator)

Name

bit_orbit_orbit_orBitOrBitOr — Bit-by-bit OR of all pixels of the input images.

Signature

bit_or(Image1, Image2 : ImageOr : : )

Herror bit_or(const Hobject Image1, const Hobject Image2, Hobject* ImageOr)

Herror T_bit_or(const Hobject Image1, const Hobject Image2, Hobject* ImageOr)

Herror bit_or(Hobject Image1, Hobject Image2, Hobject* ImageOr)

HImage HImage::BitOr(const HImage& Image2) const

HImageArray HImageArray::BitOr(const HImageArray& Image2) const

void HOperatorSetX.BitOr(
[in] IHUntypedObjectX* Image1, [in] IHUntypedObjectX* Image2, [out] IHUntypedObjectX*ImageOr)

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

static void HOperatorSet.BitOr(HObject image1, HObject image2, out HObject imageOr)

HImage HImage.BitOr(HImage image2)

Description

The operator bit_orbit_orbit_orBitOrBitOr calculates the “or” of all pixels of the input images bit by bit. The semantics of the “or”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

Image1Image1Image1Image1image1 (input_object)  (multichannel-)image(-array) objectHImageHImageHImageXHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4)

Input image(s) 1.

Image2Image2Image2Image2image2 (input_object)  (multichannel-)image(-array) objectHImageHImageHImageXHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4)

Input image(s) 2.

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

Result image(s) by OR-operation.

Example (HDevelop)

read_image(Image0,'monkey')
disp_image(Image0,WindowHandle)
read_image(Image1,'fabrik')
disp_image(Image1,WindowHandle)
bit_or(Image0,Image1,ImageBitO)
disp_image(ImageBitO,WindowHandle)

Example (C)

read_image(&Image0,"monkey");
disp_image(Image0,WindowHandle);
read_image(&Image1,"fabrik");
disp_image(Image1,WindowHandle);
bit_or(Image0,Image1,&ImageBitO);
disp_image(ImageBitO,WindowHandle);

Example (HDevelop)

read_image(Image0,'monkey')
disp_image(Image0,WindowHandle)
read_image(Image1,'fabrik')
disp_image(Image1,WindowHandle)
bit_or(Image0,Image1,ImageBitO)
disp_image(ImageBitO,WindowHandle)

Example (HDevelop)

read_image(Image0,'monkey')
disp_image(Image0,WindowHandle)
read_image(Image1,'fabrik')
disp_image(Image1,WindowHandle)
bit_or(Image0,Image1,ImageBitO)
disp_image(ImageBitO,WindowHandle)

Example (HDevelop)

read_image(Image0,'monkey')
disp_image(Image0,WindowHandle)
read_image(Image1,'fabrik')
disp_image(Image1,WindowHandle)
bit_or(Image0,Image1,ImageBitO)
disp_image(ImageBitO,WindowHandle)

Result

If the images are correct (type and number) the operator bit_orbit_orbit_orBitOrBitOr 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>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>) If necessary an exception is raised.

Alternatives

bit_andbit_andbit_andBitAndBitAnd, add_imageadd_imageadd_imageAddImageAddImage

See also

bit_xorbit_xorbit_xorBitXorBitXor, bit_andbit_andbit_andBitAndBitAnd

Module

Foundation


Table of Contents / Filters / Bit ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH