gen_disc_segen_disc_seGenDiscSeGenDiscSegen_disc_se (算子)

名称

gen_disc_segen_disc_seGenDiscSeGenDiscSegen_disc_se — 为灰度形态学生成椭圆结构元素。

签名

gen_disc_se( : SE : Type, Width, Height, Smax : )

Herror gen_disc_se(Hobject* SE, const char* Type, const Hlong Width, const Hlong Height, double Smax)

Herror T_gen_disc_se(Hobject* SE, const Htuple Type, const Htuple Width, const Htuple Height, const Htuple Smax)

void GenDiscSe(HObject* SE, const HTuple& Type, const HTuple& Width, const HTuple& Height, const HTuple& Smax)

void HImage::GenDiscSe(const HString& Type, Hlong Width, Hlong Height, const HTuple& Smax)

void HImage::GenDiscSe(const HString& Type, Hlong Width, Hlong Height, double Smax)

void HImage::GenDiscSe(const char* Type, Hlong Width, Hlong Height, double Smax)

void HImage::GenDiscSe(const wchar_t* Type, Hlong Width, Hlong Height, double Smax)   ( Windows only)

static void HOperatorSet.GenDiscSe(out HObject SE, HTuple type, HTuple width, HTuple height, HTuple smax)

void HImage.GenDiscSe(string type, int width, int height, HTuple smax)

void HImage.GenDiscSe(string type, int width, int height, double smax)

def gen_disc_se(type: str, width: int, height: int, smax: Union[int, float]) -> HObject

描述

gen_disc_segen_disc_seGenDiscSeGenDiscSeGenDiscSegen_disc_se generates an ellipsoidal structuring element (SESESESESEse) for gray morphology of images. The parameter TypeTypeTypeTypetypetype determines the image type. It must match the image type of the image to be processed in subsequent operator calls using this structuring element. The parameters WidthWidthWidthWidthwidthwidth and HeightHeightHeightHeightheightheight determine the length of the two major axes of the ellipse. The value of SmaxSmaxSmaxSmaxsmaxsmax determines the maximum gray value of the structuring element. For the generation of arbitrary structuring elements, see read_gray_seread_gray_seReadGraySeReadGraySeReadGraySeread_gray_se。The structuring element can be saved as image with the help of the operator write_imagewrite_imageWriteImageWriteImageWriteImagewrite_image。However, take care to use an image format that supports alpha channels to save the shape of the structuring element such as 'tiff', 'jp2' or 'png'. These files can then be loaded again with the operator read_imageread_imageReadImageReadImageReadImageread_image

执行信息

参数

SESESESESEse (输出对象)  image objectHImageHObjectHImageHobject * (byte / uint2 / real)

Generated structuring element.

TypeTypeTypeTypetypetype (输入控制)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Pixel type.

默认值: 'byte' "byte" "byte" "byte" "byte" "byte"

值列表: 'byte'"byte""byte""byte""byte""byte", 'real'"real""real""real""real""real", 'uint2'"uint2""uint2""uint2""uint2""uint2"

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

Width of the structuring element.

默认值: 5

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

值范围: 0 ≤ Width Width Width Width width width ≤ 511 (lin)

最小增量: 1

建议增量: 1

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

Height of the structuring element.

默认值: 5

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

值范围: 0 ≤ Height Height Height Height height height ≤ 511 (lin)

最小增量: 1

建议增量: 1

SmaxSmaxSmaxSmaxsmaxsmax (输入控制)  number HTupleUnion[int, float]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Maximum gray value of the structuring element.

默认值: 0

建议值: 0, 1, 2, 5, 10, 20, 30, 40

结果

gen_disc_segen_disc_seGenDiscSeGenDiscSeGenDiscSegen_disc_se 在所有参数正确时返回 2 ( H_MSG_TRUE )。如有必要,则抛出异常。

可能的后继

gray_erosiongray_erosionGrayErosionGrayErosionGrayErosiongray_erosion, gray_dilationgray_dilationGrayDilationGrayDilationGrayDilationgray_dilation, gray_openinggray_openingGrayOpeningGrayOpeningGrayOpeninggray_opening, gray_closinggray_closingGrayClosingGrayClosingGrayClosinggray_closing, gray_tophatgray_tophatGrayTophatGrayTophatGrayTophatgray_tophat, gray_bothatgray_bothatGrayBothatGrayBothatGrayBothatgray_bothat, write_imagewrite_imageWriteImageWriteImageWriteImagewrite_image

替代

read_gray_seread_gray_seReadGraySeReadGraySeReadGraySeread_gray_se, read_imageread_imageReadImageReadImageReadImageread_image

另见

paint_regionpaint_regionPaintRegionPaintRegionPaintRegionpaint_region, paint_graypaint_grayPaintGrayPaintGrayPaintGraypaint_gray, crop_partcrop_partCropPartCropPartCropPartcrop_part

模块

基础