crop_partcrop_partCropPartCropPartcrop_part (Operator)

名称

crop_partcrop_partCropPartCropPartcrop_part — 剪切一个或多个矩形图像区域。

签名

crop_part(Image : ImagePart : Row, Column, Width, Height : )

Herror crop_part(const Hobject Image, Hobject* ImagePart, const Hlong Row, const Hlong Column, const Hlong Width, const Hlong Height)

Herror T_crop_part(const Hobject Image, Hobject* ImagePart, const Htuple Row, const Htuple Column, const Htuple Width, const Htuple Height)

void CropPart(const HObject& Image, HObject* ImagePart, const HTuple& Row, const HTuple& Column, const HTuple& Width, const HTuple& Height)

HImage HImage::CropPart(const HTuple& Row, const HTuple& Column, const HTuple& Width, const HTuple& Height) const

HImage HImage::CropPart(Hlong Row, Hlong Column, Hlong Width, Hlong Height) const

static void HOperatorSet.CropPart(HObject image, out HObject imagePart, HTuple row, HTuple column, HTuple width, HTuple height)

HImage HImage.CropPart(HTuple row, HTuple column, HTuple width, HTuple height)

HImage HImage.CropPart(int row, int column, int width, int height)

def crop_part(image: HObject, row: MaybeSequence[int], column: MaybeSequence[int], width: MaybeSequence[int], height: MaybeSequence[int]) -> HObject

描述

The operator crop_partcrop_partCropPartCropPartCropPartcrop_part cuts one or more rectangular area from each of the input images. The areas are indicated by rectangles, which are defined by the coordinates of their upper left corner and by their size. The upper left corners of the rectangles must be within the image. At the right side and at the bottom, the rectangles may exceed the image, but the domain of the output images is set so that only the part that can be derived from the input image is contained. If the rectangular areas fall completely within the image, then each of the resulting images has the size of its corresponding rectangle.

执行信息

参数

ImageImageImageImageimageimage (input_object)  (multichannel-)image(-array) objectHImageHObjectHImageHobject (byte* / direction* / cyclic* / int1* / int2* / uint2* / int4* / int8 / real*) *allowed for compute devices

Input image.

ImagePartImagePartImagePartImagePartimagePartimage_part (output_object)  (multichannel-)image(-array) objectHImageHObjectHImageHobject * (byte* / direction* / cyclic* / int1* / int2* / uint2* / int4* / int8 / real*) *allowed for compute devices

Image area.

RowRowRowRowrowrow (input_control)  rectangle.origin.y(-array) HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Line index of upper left corner of image area.

默认值: 100

建议值: 10, 20, 50, 100, 200, 300, 500

值范围: 0 ≤ Row Row Row Row row row ≤ 1024

ColumnColumnColumnColumncolumncolumn (input_control)  rectangle.origin.x(-array) HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Column index of upper left corner of image area.

默认值: 100

建议值: 10, 20, 50, 100, 200, 300, 500

值范围: 0 ≤ Column Column Column Column column column ≤ 1024

WidthWidthWidthWidthwidthwidth (input_control)  rectangle.extent.x(-array) HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Width of new image.

默认值: 128

建议值: 32, 64, 128, 256, 512, 768

值范围: 0 ≤ Width Width Width Width width width ≤ 1024

HeightHeightHeightHeightheightheight (input_control)  rectangle.extent.y(-array) HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Height of new image.

默认值: 128

建议值: 32, 64, 128, 256, 512, 525

值范围: 0 ≤ Height Height Height Height height height ≤ 1024

可能的后继算子

disp_imagedisp_imageDispImageDispImageDispImagedisp_image

替代算子

crop_rectangle1crop_rectangle1CropRectangle1CropRectangle1CropRectangle1crop_rectangle1, crop_domaincrop_domainCropDomainCropDomainCropDomaincrop_domain, change_formatchange_formatChangeFormatChangeFormatChangeFormatchange_format, reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain

另见

zoom_image_sizezoom_image_sizeZoomImageSizeZoomImageSizeZoomImageSizezoom_image_size, zoom_image_factorzoom_image_factorZoomImageFactorZoomImageFactorZoomImageFactorzoom_image_factor

模块

Foundation