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

bit_rshiftbit_rshiftbit_rshiftBitRshiftBitRshift (Operator)

Name

bit_rshiftbit_rshiftbit_rshiftBitRshiftBitRshift — Right shift of all pixels of the image.

Signature

bit_rshift(Image : ImageRShift : Shift : )

Herror bit_rshift(const Hobject Image, Hobject* ImageRShift, const Hlong Shift)

Herror T_bit_rshift(const Hobject Image, Hobject* ImageRShift, const Htuple Shift)

Herror bit_rshift(Hobject Image, Hobject* ImageRShift, const HTuple& Shift)

HImage HImage::BitRshift(const HTuple& Shift) const

HImageArray HImageArray::BitRshift(const HTuple& Shift) const

void HOperatorSetX.BitRshift(
[in] IHUntypedObjectX* Image, [out] IHUntypedObjectX*ImageRShift, [in] VARIANT Shift)

IHImageX* HImageX.BitRshift([in] Hlong Shift)

static void HOperatorSet.BitRshift(HObject image, out HObject imageRShift, HTuple shift)

HImage HImage.BitRshift(int shift)

Description

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

Parallelization

Parameters

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

Input image(s).

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

Result image(s) by shift operation.

ShiftShiftShiftShiftshift (input_control)  integer HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

shift value

Default value: 3

Suggested values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 20, 24, 30, 31

Typical range of values: 0 ≤ Shift Shift Shift Shift shift ≤ 31

Minimum increment: 1

Recommended increment: 1

Restriction: (Shift >= 1) && (Shift <= 31)

Example (C)

bit_rshift(Int2Image,&ReducedInt2Image,8);
convert_image_type(ReducedInt2Image,&ByteImage,"byte");

Result

If the images are correct (type) and ShiftShiftShiftShiftshift has a valid value the operator bit_rshiftbit_rshiftbit_rshiftBitRshiftBitRshift 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

scale_imagescale_imagescale_imageScaleImageScaleImage

See also

bit_lshiftbit_lshiftbit_lshiftBitLshiftBitLshift

Module

Foundation


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