bit_rshiftbit_rshiftBitRshiftBitRshiftbit_rshift (算子名称)

名称

bit_rshiftbit_rshiftBitRshiftBitRshiftbit_rshift — Right shift of all pixels of the image.

参数签名

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)

void BitRshift(const HObject& Image, HObject* ImageRShift, const HTuple& Shift)

HImage HImage::BitRshift(Hlong Shift) const

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

HImage HImage.BitRshift(int shift)

def bit_rshift(image: HObject, shift: int) -> HObject

描述

该算子 bit_rshiftbit_rshiftBitRshiftBitRshiftBitRshiftbit_rshift 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.

运行信息

参数表

ImageImageImageImageimageimage (input_object)  (multichannel-)image(-array) objectHImageHObjectHImageHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4)

Input image(s).

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

Result image(s) by shift operation.

ShiftShiftShiftShiftshiftshift (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

shift value

Default: 3

Suggested values: 0, 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

例程 (C)

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

结果

If the images are correct (type) and ShiftShiftShiftShiftshiftshift has a valid value 该算子 bit_rshiftbit_rshiftBitRshiftBitRshiftBitRshiftbit_rshift 返回值 2 ( H_MSG_TRUE) . The behavior in case of empty input (no input images available) is set via 该算子 set_system(::'no_object_result',<Result>:)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>) If necessary an exception is raised.

可替代算子

scale_imagescale_imageScaleImageScaleImageScaleImagescale_image

参考其它

bit_lshiftbit_lshiftBitLshiftBitLshiftBitLshiftbit_lshift

模块

Foundation