Skip to content

bit_orBitOrBitOrbit_orbit_orπŸ”—

Short descriptionπŸ”—

bit_orBitOrBitOrbit_orbit_or β€” Bit-by-bit OR of all pixels of the input images.

SignatureπŸ”—

bit_or( image Image1, image Image2, out image ImageOr )void BitOr( const HObject& Image1, const HObject& Image2, HObject* ImageOr )static void HOperatorSet.BitOr( HObject image1, HObject image2, out HObject imageOr )def bit_or( image_1: HObject, image_2: HObject ) -> HObject

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

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

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

HImage HImage.BitOr( HImage image2 )

DescriptionπŸ”—

The operator bit_orBitOr 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.

Execution informationπŸ”—

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Automatically parallelized on domain level.

ParametersπŸ”—

Image1image1image_1 (input_object) (multichannel-)image(-array) β†’ object (byte / direction / cyclic / int1 / int2 / uint2 / int4)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4)HImage (byte / direction / cyclic / int1 / int2 / uint2 / int4)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4)Hobject (byte / direction / cyclic / int1 / int2 / uint2 / int4)

Input image(s) 1.

Image2image2image_2 (input_object) (multichannel-)image(-array) β†’ object (byte / direction / cyclic / int1 / int2 / uint2 / int4)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4)HImage (byte / direction / cyclic / int1 / int2 / uint2 / int4)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4)Hobject (byte / direction / cyclic / int1 / int2 / uint2 / int4)

Input image(s) 2.

ImageOrimageOrimage_or (output_object) (multichannel-)image(-array) β†’ object (byte / direction / cyclic / int1 / int2 / uint2 / int4)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4)HImage (byte / direction / cyclic / int1 / int2 / uint2 / int4)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4)Hobject * (byte / direction / cyclic / int1 / int2 / uint2 / int4)

Result image(s) by OR-operation.

ExampleπŸ”—

(HDevelop)

read_image(Image1,'fabrik')
dev_display (Image1)
read_image(Image2,'monkey')
dev_display (Image2)
bit_or(Image1,Image2,ImageBitOr)
dev_display (ImageBitOr)
(C)
read_image(&Image1,"monkey")\;
disp_image(Image1,WindowHandle)\;
read_image(&Image2,"fabrik")\;
disp_image(Image2,WindowHandle)\;
bit_or(Image1,Image2,&ImageBitOr)\;
disp_image(ImageBitOr,WindowHandle)\;

ResultπŸ”—

If the images are correct (type and number) the operator bit_orBitOr 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>:) If necessary an exception is raised.

Combinations with other operatorsπŸ”—

Combinations

Alternatives

bit_andBitAnd, add_imageAddImage

See also

bit_xorBitXor, bit_andBitAnd

ModuleπŸ”—

Foundation