Herror ::bit_mask (
    Hobject Image,
    Hobject *ImageMask,
    const HTuple &BitMask
)
HImage HImage::BitMask (
    const HTuple &BitMask
) const
HImageArray HImageArray::BitMask (
    const HTuple &BitMask
) const

Logical ``AND'' of each pixel using a bit mask.

The operator ::bit_mask carries out an ``and'' operation of each pixel with a fixed mask. The semantics of the ``and'' operation corresponds to that of C for the respective types (signed char, unsigned char, short, int/long). Only the pixels within the definition range of the image are processed.

Several images can be processed in one call. An output image is generated for every input image.


Parameters

Image (input_object)
(multichannel-)image(-array) -> Hobject: HImage(Array) ( byte / int1 / int2 / int4 )
Input image(s).

ImageMask (output_object)
(multichannel-)image(-array) -> Hobject * : HImage(Array) ( byte / int1 / int2 / int4 )
Result image(s) by combination with mask.

BitMask (input_control)
integer -> HTuple.long
Bit field
Default value: 128
List of values: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096
Suggested values: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096


Result

If the images are correct (type) the operator ::bit_mask returns the value 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 handling is raised.


Possible Successors

::threshold, ::bit_or


Alternatives

::bit_slice


See also

::bit_and, ::bit_lshift


Module

Image filters



Copyright © 1996-2002 MVTec Software GmbH