Skip to content

bit_rshiftBitRshiftBitRshiftbit_rshiftbit_rshiftπŸ”—

Short descriptionπŸ”—

bit_rshiftBitRshiftBitRshiftbit_rshiftbit_rshift β€” Right shift of all pixels of the image.

SignatureπŸ”—

bit_rshift( image Image, out image ImageRShift, integer Shift )void BitRshift( const HObject& Image, HObject* ImageRShift, const HTuple& Shift )static void HOperatorSet.BitRshift( HObject image, out HObject imageRShift, HTuple shift )def bit_rshift( image: HObject, shift: int ) -> HObject

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

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

HImage HImage::BitRshift( Hlong Shift ) const

HImage HImage.BitRshift( int shift )

DescriptionπŸ”—

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

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 tuple level.

  • Automatically parallelized on channel level.

  • Automatically parallelized on domain level.

ParametersπŸ”—

Imageimageimage (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).

ImageRShiftimageRShiftimage_rshift (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 shift operation.

Shiftshiftshift (input_control) integer β†’ (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

shift value

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

ExampleπŸ”—

(C)

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

ResultπŸ”—

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

scale_imageScaleImage

See also

bit_lshiftBitLshift

ModuleπŸ”—

Foundation