crop_rectangle1crop_rectangle1CropRectangle1CropRectangle1crop_rectangle1 (算子)
名称
crop_rectangle1crop_rectangle1CropRectangle1CropRectangle1crop_rectangle1 — 剪切一个或多个矩形图像区域。
签名
Herror crop_rectangle1(const Hobject Image, Hobject* ImagePart, const Hlong Row1, const Hlong Column1, const Hlong Row2, const Hlong Column2)
Herror T_crop_rectangle1(const Hobject Image, Hobject* ImagePart, const Htuple Row1, const Htuple Column1, const Htuple Row2, const Htuple Column2)
void CropRectangle1(const HObject& Image, HObject* ImagePart, const HTuple& Row1, const HTuple& Column1, const HTuple& Row2, const HTuple& Column2)
HImage HImage::CropRectangle1(const HTuple& Row1, const HTuple& Column1, const HTuple& Row2, const HTuple& Column2) const
HImage HImage::CropRectangle1(Hlong Row1, Hlong Column1, Hlong Row2, Hlong Column2) const
static void HOperatorSet.CropRectangle1(HObject image, out HObject imagePart, HTuple row1, HTuple column1, HTuple row2, HTuple column2)
HImage HImage.CropRectangle1(HTuple row1, HTuple column1, HTuple row2, HTuple column2)
HImage HImage.CropRectangle1(int row1, int column1, int row2, int column2)
def crop_rectangle1(image: HObject, row_1: MaybeSequence[int], column_1: MaybeSequence[int], row_2: MaybeSequence[int], column_2: MaybeSequence[int]) -> HObject
描述
算子 crop_rectangle1crop_rectangle1CropRectangle1CropRectangle1CropRectangle1crop_rectangle1 cuts one or more rectangular areas
from each of the input images. The areas are indicated by rectangles,
which are defined by the coordinates of their upper left and their lower
right corners. The upper left corners 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 within the image,
then each of the resulting images has the size of its corresponding
rectangle.
执行信息
- 支持 OpenCL 计算设备。
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 在元组级别上自动并行化。
参数
ImageImageImageImageimageimage (输入对象) (multichannel-)image(-array) → objectHImageHObjectHImageHobject (byte* / direction* / cyclic* / int1* / int2* / uint2* / int4* / int8 / real*) *允许用于计算设备
输入图像。
ImagePartImagePartImagePartImagePartimagePartimage_part (输出对象) (multichannel-)image(-array) → objectHImageHObjectHImageHobject * (byte* / direction* / cyclic* / int1* / int2* / uint2* / int4* / int8 / real*) *允许用于计算设备
Image area.
Row1Row1Row1Row1row1row_1 (输入控制) 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
≤
Row1
Row1
Row1
Row1
row1
row_1
≤
1024
Column1Column1Column1Column1column1column_1 (输入控制) 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
≤
Column1
Column1
Column1
Column1
column1
column_1
≤
1024
Row2Row2Row2Row2row2row_2 (输入控制) rectangle.corner.y(-array) → HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Line index of lower right corner of image area.
默认值:
200
建议值:
10, 20, 50, 100, 200, 300, 500
值范围:
0
≤
Row2
Row2
Row2
Row2
row2
row_2
≤
1024
Column2Column2Column2Column2column2column_2 (输入控制) rectangle.corner.x(-array) → HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Column index of lower right corner of image area.
默认值:
200
建议值:
10, 20, 50, 100, 200, 300, 500
值范围:
0
≤
Column2
Column2
Column2
Column2
column2
column_2
≤
1024
可能的后继
disp_imagedisp_imageDispImageDispImageDispImagedisp_image
替代
crop_partcrop_partCropPartCropPartCropPartcrop_part,
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
模块
基础