crop_domain_relcrop_domain_relCropDomainRelCropDomainRelcrop_domain_rel裁剪域相对(算子)

名称

crop_domain_relcrop_domain_relCropDomainRelCropDomainRelcrop_domain_rel — 剪切相对于域的图像区域。

签名

crop_domain_rel(Image : ImagePart : Top, Left, Bottom, Right : )

Herror crop_domain_rel(const Hobject Image, Hobject* ImagePart, const Hlong Top, const Hlong Left, const Hlong Bottom, const Hlong Right)

Herror T_crop_domain_rel(const Hobject Image, Hobject* ImagePart, const Htuple Top, const Htuple Left, const Htuple Bottom, const Htuple Right)

void CropDomainRel(const HObject& Image, HObject* ImagePart, const HTuple& Top, const HTuple& Left, const HTuple& Bottom, const HTuple& Right)

HImage HImage::CropDomainRel(Hlong Top, Hlong Left, Hlong Bottom, Hlong Right) const

static void HOperatorSet.CropDomainRel(HObject image, out HObject imagePart, HTuple top, HTuple left, HTuple bottom, HTuple right)

HImage HImage.CropDomainRel(int top, int left, int bottom, int right)

def crop_domain_rel(image: HObject, top: int, left: int, bottom: int, right: int) -> HObject

描述

crop_domain_relcrop_domain_relCropDomainRelCropDomainRelCropDomainRelcrop_domain_rel 从输入图像中裁剪出一个矩形区域。该区域由输入图像域的包围矩形决定。可以通过控制参数调整该矩形在顶部(TopTopTopToptoptop)、左侧(LeftLeftLeftLeftleftleft)、底部(BottomBottomBottomBottombottombottom)和右侧(RightRightRightRightrightright)的位置。正值会使区域变小,负值会使区域变大。如果所有参数都设置为零,则该区域保持不变。

执行信息

参数

ImageImageImageImageimageimage (输入对象)  (multichannel-)image(-array) objectHImageHObjectHImageHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real)

输入图像。

ImagePartImagePartImagePartImagePartimagePartimage_part (输出对象)  (multichannel-)image(-array) objectHImageHObjectHImageHobject * (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real)

图像区域。

TopTopTopToptoptop (输入控制)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

顶部剪裁的行数。

默认值: -1

建议值: -20, -10, -5, -3, -2, -1, 0, 1, 2, 3, 4, 5, 10, 20

LeftLeftLeftLeftleftleft (输入控制)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

左侧裁剪的列数。

默认值: -1

建议值: -20, -10, -5, -3, -2, -1, 0, 1, 2, 3, 4, 5, 10, 20

BottomBottomBottomBottombottombottom (输入控制)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

底部剪裁的行数。

默认值: -1

建议值: -20, -10, -5, -3, -2, -1, 0, 1, 2, 3, 4, 5, 10, 20

RightRightRightRightrightright (输入控制)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

右侧剪裁的列数。

默认值: -1

建议值: -20, -10, -5, -3, -2, -1, 0, 1, 2, 3, 4, 5, 10, 20

结果

crop_domain_relcrop_domain_relCropDomainRelCropDomainRelCropDomainRelcrop_domain_rel 在所有参数正确时返回 2 (H_MSG_TRUE)。当输入为空(未指定区域)时,可设置行为通过算子 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>),以及输入区域为空时,可设置行为通过算子 set_system('empty_region_result',<Result>)set_system("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)set_system("empty_region_result",<Result>)。如有必要,则抛出异常。

可能的前趋

reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain, thresholdthresholdThresholdThresholdThresholdthreshold, connectionconnectionConnectionConnectionConnectionconnection, regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowingregiongrowing, pouringpouringPouringPouringPouringpouring

替代

crop_domaincrop_domainCropDomainCropDomainCropDomaincrop_domain, crop_rectangle1crop_rectangle1CropRectangle1CropRectangle1CropRectangle1crop_rectangle1

另见

smallest_rectangle1smallest_rectangle1SmallestRectangle1SmallestRectangle1SmallestRectangle1smallest_rectangle1, intersectionintersectionIntersectionIntersectionIntersectionintersection, gen_rectangle1gen_rectangle1GenRectangle1GenRectangle1GenRectangle1gen_rectangle1, clip_regionclip_regionClipRegionClipRegionClipRegionclip_region

模块

基础