形态学

更新时间:2023-09-25 14:00:02 阅读量: 综合文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

***********************形态学(灰度)******************************************** dual_rank(Image : ImageRank : MaskType, Radius, ModePercent, Margin : )

dual_rank — 使用圆形或矩形的掩膜开运算、中值、闭运算

dual_rank进行所有输入图像的灰度值非线性变换(图像)。圆形或方形可以作为结构元素。dual_rank影响rank_image连续两个电话。在第一次调用范围的灰度值与所指示的范围(modepercent)。的这个计算结果的rank_image进一步调用的输入,此时使用范围值100 modepercent。

当过滤不同参数的边界处理(保证金)可以选择:

灰度值(gray value) 像素的图像的边缘外被假定为是恒定的(与表示灰度值)。

持续的(continued) 连续的边缘像素。

'cyclic' 图像边缘的循环的周期延拓。

“mirrored”, 反映在图像边缘像素。

一系列的过滤是按以下方法计算:指定的掩码是放在图像是在这样一种方式,在掩模的中心筛选一旦接触到所有像素。对于每一个像素的相邻像素被掩模覆盖在一个提升其灰度值对应的序列进行排序。

每个排序的序列的灰度值包含灰度值像面具一样的数字图像点。n最高的元素,(= modepercent,等级值0??100分)选择和设置在相应的结果图像的灰度值,结果 如果modepercent是0,然后操作员等于灰度值的开口(gray_opening)。如果modepercent是50,在中值滤波算子的结果,这是应用两次(median_image)。

参数:

Image (input_object) (multichannel-)image(-array) → object (byte / int2 / uint2 / int4 / real) 被过滤的输入图像

ImageRank (output_object) multichannel-image(-array) → object (byte / int2 / uint2 / int4 / real)

过滤后的图像

MaskType (input_control) string → (string) 掩码类型.

默认值: 'circle'

可选值: 'circle', 'square'

Radius (input_control) integer → (integer)

掩码半径. 默认值: 1

建议值: 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 15, 19, 25, 31, 39, 47, 59 典型范围: 1 ≤ Radius ≤ 101 最小增量: 1 推荐增量: 2

ModePercent (input_control) integer → (integer)

过滤模式: 0 相关对应开运算 , 50 相关到中值,100相关到闭运算。 默认值: 10

建议值: 0, 2, 5, 10, 15, 20, 40, 50, 60, 80, 85, 90, 95, 98, 100 典型范围: 0 ≤ ModePercent ≤ 100 最小增量: 1 推荐增量: 2

Margin (input_control) string → (string / integer / real) Border treatment. 默认值: 'mirrored'

建议值: 'mirrored', 'cyclic', 'continued', 0, 30, 60, 90, 120, 150, 180, 210, 240, 255

//-------------------------------------------------------------------------------------------------------------

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

gen_disc_se — 为灰度形态学建立一个椭圆型的结构元

gen_disc_se产生一个椭圆形的结构元素(SE)用于图像的灰度形态学。的参数类型决定了图像类型。它必须的图像类型匹配的图像是在随后的操作处理电话使用这个结构元素。参数的宽度和高度确定的两个主要轴的长度椭圆。Smax的值确定的结构元件的最大灰度值。对于任意的结构元素的生成,看到read_gray_se。结构元素可以保存为与运营商write_image帮助图像。然而,小心使用,支持alpha通道的图像格式保存结构元素的形状如'的TIFF,PNG的JP2 '或' '。这些文件可以被再次加载与运行

SE (output_object) image → object (byte / uint2 / real) 建立的结构元对象

Type (input_control) string → (string) 像素类型

默认值: 'byte'

可选值: 'byte', 'uint2', 'real'

Width (input_control) integer → (integer) 结构元的宽度 默认值: 5

建议值: 0, 1, 2, 3, 4, 5, 10, 15, 20 典型范围: 0 ≤ Width ≤ 511 (lin) 最小增量: 1 推荐增量: 1

Height (input_control) integer → (integer) 结构元的高度 默认值: 5

建议值: 0, 1, 2, 3, 4, 5, 10, 15, 20 典型范围: 0 ≤ Height ≤ 511 (lin) 最小增量: 1

推荐增量: 1

Smax (input_control) number → (real / integer) 结构元的最大灰度值 默认值: 0

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

//------------------------------------------------------------------------------------------------------------------------------------------------------------------

3:gray_bothat(Image, SE : ImageBotHat : : )

gray_bothat — Perform a gray value bottom hat transformation on an image. 执行一个底帽变化

gray_bothat applies a gray value bottom hat transformation to the input image Image with the structuring element SE. The image type of the structuring element SE must match the image type of the input image Image. The gray value bottom hat transformation of an image i with a structuring element s is defined as bothat(i,s) = (i +- s) - i ,

i.e., the difference of the closing of the image with s and the image (see gray_closing). For the generation of structuring elements, see read_gray_se.

The gray value erosion is particularly fast for flat structuring elements, i.e. structuring elements with a constant gray level within their domain.

gray_bothat施加灰度值底帽变换和元素硒构造输入图像。硒元素,必须构建的图像类型

输入图像的图像的图像类型匹配。底帽变换的灰度值的图像我与一个结构元素的定义为

在(我,S)=(I + S)-我,

例如,对与图像的图像的闭合差(见gray_closing)。的结构元素的生成,看到read_gray_se。

灰度侵蚀特别快,平结构元素,即在一个恒定的灰度domain.rts alpha通道内保存的结构元素

结构元素的形状如'的TIFF,PNG的JP2 '或' '。这些文件可以被再次加载与运行

参数:

Image (input_object) (multichannel-)image(-array) → object (byte / uint2 / real) 输入的图像

SE (input_object) singlechannelimage → object (byte / uint2 / real) 结构元

ImageBotHat (output_object) (multichannel-)image(-array) → object (byte / uint2 / real) 得到的图像

//------------------------------------------------------------------------- 4.gray_closing(Image, SE : ImageClosing : : ) gray_closing —在图像上执行灰度值闭操。

gray_closing applies a gray value closing to the input image Image with the structuring element SE. The image type of the structuring element SE must match the image type of the input image Image. The gray value closing of an image i with a structuring element s is defined as i +- s = (i + s) - transpose(s) ,

i.e., a dilation of the image with s followed by an erosion with the transposed structuring element (see gray_dilation and gray_erosion). For the generation of structuring elements, see read_gray_se.

The gray value closing is particularly fast for flat structuring elements, i.e., structuring elements with a constant gray level within their domain.

参数:

Image (input_object) (multichannel-)image(-array) → object (byte / uint2 / real) 输入图像

SE (input_object) singlechannelimage → object (byte / uint2 / real) 结构元

ImageClosing (output_object) (multichannel-)image(-array) → object (byte / uint2 / real) 灰度闭操作后的图像。

//-------------------------------------------------------------------------

5:gray_closing_rect(Image : ImageClosing : MaskHeight, MaskWidth : )

gray_closing_rect — 使用矩形掩码执行灰度值闭操作

gray_closing_rect applies a gray value closing to the input image Image with a rectangular mask of size (MaskHeight, MaskWidth). The resulting image is returned in ImageClosing. If the parameters MaskHeight or MaskWidth are even, they are changed to the next larger odd value. At the border of the image the gray values are mirrored.

The gray value closing of an image i with a rectangular structuring element s is defined as i +- s = (i + s) - s ,

i.e., a dilation of the image with s followed by an erosion with s (see gray_dilation_rect and gray_erosion_rect).

gray_closing_rect施加灰度值接近与大小的矩形的罩的输入图像的图像(maskheight,maskwidth)。所得到的图像恢复

imageclosing。如果参数maskheight或maskwidth甚至,他们改变到下一个较大的奇异值。在图像的灰度值的边界

镜像。

我有一个矩形的图像结构元素的灰度值关闭的定义是

我+ S =(I + S)的,

例如,一个扩张与图像后用侵蚀(见gray_dilation_rect和gray_erosion_rect)。,即具有恒定的灰度domain.rts alpha通道内保存的结构元素

结构元素的形状如'的TIFF,PNG的JP2 '或' '。这些文件可以被再次加载与运行

参数:

Image (input_object) (multichannel-)image(-array) → object (byte / direction / cyclic / uint2 / int2 / int4 / real) 输入图像

ImageClosing (output_object) (multichannel-)image(-array) → object (byte / direction / cyclic / uint2 / int2 / int4 / real) 灰度闭图像

MaskHeight (input_control) extent.y → (integer) 掩膜高. 默认值: 11

建议值: 3, 5, 7, 9, 11, 13, 15

典型范围: 3 ≤ MaskHeight ≤ 511 最小增量: 2 推荐增量: 2

Restriction: odd(MaskHeight)

10:gray_opening(Image, SE : ImageOpening : : ) gray_opening — 在图像上执行灰度开运算

gray_opening适用于输入图像的灰度值开放图像元素硒的构建。结构元素的SE图像类型必须匹配的图像

输入图像的图像类型。我与图像的结构元素的灰度值的开放的定义是

我+ S =(我的)+转置(S),

即,与图像的转置结构元素膨胀侵蚀(见gray_erosion和gray_dilation)。用于生成

结构元素,看到read_gray_se。

灰度值的开放是特别快速平结构元素,即,在他们的领域的一个恒定的灰度结构元素。

参数:

Image (input_object) (multichannel-)image(-array) → object (byte / uint2 / real) Input image.

SE (input_object) singlechannelimage → object (byte / uint2 / real) Structuring element.

ImageOpening (output_object) (multichannel-)image(-array) → object (byte / uint2 / real) Gray-opened image.

//------------------------------------------------------------------------------

11:gray_opening_rect(Image : ImageOpening : MaskHeight, MaskWidth : )

gray_opening_rect — 使用矩形掩膜执行一个灰度值开运算

gray_opening_rect适用于灰度值的输入图像与开口大小的矩形遮罩(maskheight,maskwidth)。所得到的图像恢复

imageopening。如果参数maskheight或maskwidth甚至,他们改变到下一个较大的奇异值。在图像的灰度值的边界

镜像。

我有一个矩形的图像结构元素的灰度值的开放的定义是

我+ S =(I + S),

即,侵蚀与图像之后与扩张的(见gray_erosion_rect和gray_dilation_rect)。tructuring元素,即,在他们的领域的一个恒定的灰度结构元素。

参数:

Image (input_object) (multichannel-)image(-array) → object (byte / direction / cyclic / uint2 / int2 / int4 / real) 输入图像

ImageOpening (output_object) (multichannel-)image(-array) → object (byte / direction / cyclic / uint2 / int2 / int4 / real) 灰度开后的图像

MaskHeight (input_control) extent.y → (integer) mask高度 默认值: 11

建议值: 3, 5, 7, 9, 11, 13, 15

典型范围: 3 ≤ MaskHeight ≤ 511 最小增量: 2 推荐增量: 2

Restriction: odd(MaskHeight)

MaskWidth (input_control) extent.x → (integer) mask宽度 默认值: 11

建议值: 3, 5, 7, 9, 11, 13, 15

典型范围: 3 ≤ MaskWidth ≤ 511 最小增量: 2 推荐增量: 2

Restriction: odd(MaskWidth)

//---------------------------------------------------------------------------------

12:gray_opening_shape(Image : ImageOpening : MaskHeight, MaskWidth, MaskShape : )

gray_opening_shape适用于灰度图像的输入图像的开口形状maskshape结构元件。掩模的偏移值是0和它的

水平和垂直尺寸由maskheight和maskwidth定义。由此产生的图像是在imageopening返回。

如果参数maskheight或maskwidth类型为整数,甚至,他们改变到下一个较大的奇异值。相反,如果至少有一个

参数是float类型,输入图像与下一个较大的和下一个较小的奇怪的面具大小转换,并输出

图像imageopening

从两个中间图像插值。因此,请注意,gray_opening_shape返回掩模尺寸,不同的结果,例如,4和4!

在案件的价值研究

参数: Parameters

Image (input_object) (multichannel-)image(-array) → object (byte / uint2) 输入图像--它的最小灰度值被计算

ImageOpening (output_object) (multichannel-)image(-array) → object (byte / uint2) 输出图像-填充最小灰度值

MaskHeight (input_control) extent.y → (real / integer) 掩膜 高 默认值: 11

建议值: 3, 5, 7, 9, 11, 13, 15

典型范围: 1.0 ≤ MaskHeight ≤ 511.0

MaskWidth (input_control) extent.x → (real / integer) 掩膜宽 默认值: 11

建议值: 3, 5, 7, 9, 11, 13, 15

典型范围: 1.0 ≤ MaskWidth ≤ 511.0

MaskShape (input_control) string → (string) 掩膜形状

默认值: 'octagon'

可选值: 'rectangle', 'rhombus', 'octagon'

//------------------------------------------------------------------------------------- 13:gray_range_rect(Image : ImageResult : MaskHeight, MaskWidth : )

gray_range_rect - 侦测矩形内的灰度值范围。

Image (input_object) (multichannel-)image(-array) → object (byte / direction / cyclic / uint2 / int2 / int4 / real)

输入图像,灰度范围计算用到

ImageResult (output_object) (multichannel-)image(-array) → object (byte / direction / cyclic / uint2 / int2 / int4 / real)

输出图像填充灰度值范围

MaskHeight (input_control) extent.y → (integer) 过滤淹膜高度 默认值: 11

建议值: 3, 5, 7, 9, 11, 13, 15

典型范围: 3 ≤ MaskHeight ≤ 511 (lin) 最小增量: 2 推荐增量: 2

Restriction: odd(MaskHeight)

MaskWidth (input_control) extent.x → (integer) 过滤淹膜宽度 默认值: 11

建议值: 3, 5, 7, 9, 11, 13, 15

典型范围: 3 ≤ MaskWidth ≤ 511 (lin) 最小增量: 2 推荐增量: 2

Restriction: odd(MaskWidth)

//------------------------------------------------------------------------------------

14:gray_opening_shape(Image : ImageOpening : MaskHeight, MaskWidth, MaskShape : ) gray_opening_shape — 使用选择的掩码对图像进行灰度开运算。

gray_opening_shape applies a gray value opening to the input image Image with the structuring element of shape MaskShape. The mask's offset values are 0 and its horizontal and vertical size is defined by MaskHeight and MaskWidth. The resulting image is returned in ImageOpening.

If the parameters MaskHeight or MaskWidth are of the type integer and are even, they are changed to the next larger odd value. In contrast, if at least one of the two parameters is of the type float, the input image Image is transformed with both the next larger and the next smaller odd mask size, and the output image ImageOpening is interpolated from the two intermediate images. Therefore, note that gray_opening_shape returns different results for mask sizes of, e.g., 4 and 4.0! In case of the values 'rhombus' and 'octagon' for the MaskShape control parameter, MaskHeight and MaskWidth must be equal. The parameter value 'octagon' for MaskShape denotes an equilateral octagonal mask which is a suitable approximation for a circular structure. At the border of the image the gray values are mirrored.

The gray value opening of an image i with a structuring element s is defined as i -+ s = (i - s) + s ,

i.e., an erosion of the image with s followed by a dilation with s (see gray_erosion_shape and gray_dilation_shape).

gray_opening_shape适用于灰度图像的输入图像的开口形状maskshape结构元件。掩模的偏移值是0和它的

水平和垂直尺寸由maskheight和maskwidth定义。由此产生的图像是在imageopening返回。

如果参数maskheight或maskwidth类型为整数,甚至,他们改变到下一个较大的奇异值。相反,如果至少有一个

参数是float类型,输入图像与下一个较大的和下一个较小的奇怪的面具大小转换,并输出图像imageopening

从两个中间图像插值。因此,请注意,gray_opening_shape返回掩模尺寸,不同的结果,例如,4和4!

在案件的价值研究

Image (input_object) (multichannel-)image(-array) → object (byte / uint2) 输入图像-最小灰度值被计算

ImageOpening (output_object) (multichannel-)image(-array) → object (byte / uint2) 输出图像,填充最小灰度值

MaskHeight (input_control) extent.y → (real / integer) 掩码高 默认值: 11

建议值: 3, 5, 7, 9, 11, 13, 15

典型范围: 1.0 ≤ MaskHeight ≤ 511.0

MaskWidth (input_control) extent.x → (real / integer) 掩码宽 默认值: 11

建议值: 3, 5, 7, 9, 11, 13, 15

典型范围: 1.0 ≤ MaskWidth ≤ 511.0

MaskShape (input_control) string → (string) 掩码形状.

默认值: 'octagon'

可选值: 'rectangle', 'rhombus', 'octagon'

//------------------------------------------------------------------------------

15:gray_range_rect(Image : ImageResult : MaskHeight, MaskWidth : )

gray_range_rect calculates the gray value range, i.e., the difference (max - min) of the maximum and minimum gray values, of the input image Image within a rectangular mask of size (MaskHeight, MaskWidth) for each image point. The resulting image is returned in ImageResult.

If the parameters MaskHeight or MaskWidth are even, they are changed to the next smaller odd value. At the border of the image the gray values are mirrored.

gray_range_rect计算灰度值的范围,即,差(最大最小)的最大和最小灰度值,在一个长方形的输入图像的图像

掩模尺寸(maskheight,maskwidth)为每个图像点。由此产生的图像是在imageresult返回。如果参数maskheight或maskwidth甚至,他们是

换到下一个较小的奇异值。在图像的灰度值边界的两个mirrored.ne

参数是float类型,输入图像与下一个较大的和下一个较小的奇怪的面具大小转换,并输出图像imageopening

从两个中间图像插值。因此,请注意,gray_opening_shape返回掩模尺寸,不同的结果,例如,4和4!

在案件的价值研究

参数:

Image (input_object) (multichannel-)image(-array) → object (byte / direction / cyclic / uint2 / int2 / int4 / real)

输入图像,灰度值范围背景算

ImageResult (output_object) (multichannel-)image(-array) → object (byte / direction / cyclic / uint2 / int2 / int4 / real) 输出图像,填充灰度范围

MaskHeight (input_control) extent.y → (integer) 过滤掩膜的高度 默认值: 11

建议值: 3, 5, 7, 9, 11, 13, 15

典型范围: 3 ≤ MaskHeight ≤ 511 (lin) 最小增量: 2 推荐增量: 2

Restriction: odd(MaskHeight)

MaskWidth (input_control) extent.x → (integer) 过滤掩膜的宽度 默认值: 11

建议值: 3, 5, 7, 9, 11, 13, 15

典型范围: 3 ≤ MaskWidth ≤ 511 (lin) 最小增量: 2

推荐增量: 2

Restriction: odd(MaskWidth)

//------------------------------------------------------------------------------------

16:gray_tophat(Image, SE : ImageTopHat : : )

gray_tophat — Perform a gray value top hat transformation on an image. 在一个图像上执行灰度值顶帽变化

gray_tophat applies a gray value top hat transformation to the input image Image with the structuring element SE. The image type of the structuring element SE must match the image type of the input image Image. The gray value top hat transformation of an image i with a structuring element s is defined as tophat(i,s) = i - (i -+ s) ,

i.e., the difference of the image and its opening with s (see gray_opening). For the generation of structuring elements, see read_gray_se.

The top hat transformation is particularly fast for flat structuring elements, i.e. structuring elements with a constant gray level within their domain.

gray_tophat适用于灰度值的顶帽变换和元素硒的构造输入图像。硒元素,必须构建的图像类型

输入图像的图像的图像类型匹配。灰度值的顶帽变换的图像我与一个结构元素的定义为

(我的礼帽,S)=我(我的),

例如,在图像和开放的差异(见gray_opening)。的结构元素的生成,看到read_gray_se。

顶帽变换是特别快速平结构元素,即在其域内恒定的灰度结构元素。从两个中间图像。因此,请注意,gray_opening_shape返回掩模尺寸,不同的结果,例如,4和4!

在案件的价值研究 参数:

Image (input_object) (multichannel-)image(-array) → object (byte / uint2 / real) 输入图像

SE (input_object) singlechannelimage → object (byte / uint2 / real) 结构元

ImageTopHat (output_object) (multichannel-)image(-array) → object (byte / uint2 / real) 输出图像

//---------------------------------------------------------------------------------------

17:read_gray_se( : SE : FileName : )

read_gray_se —装入一个结构元

参数:

SE (output_object) image → object (byte / uint2 / real) 输出得到的结构元

FileName (input_control) filename.read → (string) 文件名

扩展名: .gse

****************************形态学(区域)************************************** 1.bottom_hat(Region, StructElement : RegionBottomHat : : )

bottom_hat — Compute the bottom hat of regions. 计算区域底部帽子。

bottom_hat computes the closing of Region with StructElement. The difference between the result of the closing and the original region is called the bottom hat. In contrast to closing, which merges regions under certain circumstances, bottom_hat computes the regions generated by such a merge. The position of StructElement is meaningless, since a closing operation is invariant with respect to the choice of the reference point.

Structuring elements (StructElement) can be generated with operators such as gen_circle, gen_rectangle1, gen_rectangle2, gen_ellipse, draw_region, gen_region_polygon, gen_region_points, etc.

参数:

Region (input_object) region(-array) → object 被处理的区域

StructElement (input_object) region → object 结构元(position independent).

RegionBottomHat (output_object) region(-array) → object 操作结果

//--------------------------------------------------------

2:boundary(Region : RegionBorder : BoundaryType : ) boundary — 减少区域到其边界.

boundary computes the boundary of a region by using morphological operations. The parameter BoundaryType determines the type of boundary to compute: 'inner', 'inner_filled' and 'outer'.

boundary computes the contour of each input region. The resulting regions consist only of the minimal border of the input regions. If BoundaryType is set to 'inner', the contour lies within the original region, if it is set to 'outer', it is one pixel outside of the original region. If BoundaryType is set to 'inner_filled', holes in the interior of the input region are suppressed.

参数:

Region (input_object) region(-array) → object 区域--它的边界要被计算出来

RegionBorder (output_object) region(-array) → object 边界区域(们)。

BoundaryType (input_control) string → (string) 边界类型.

默认值: 'inner'

可选值: 'inner', 'outer', 'inner_filled'

//-------------------------------------------------------------

3:closing(Region, StructElement : RegionClosing : : ) closing — Close a region. 闭操作

A closing operation is defined as a dilation followed by a Minkowsi subtraction. By applying closing to a region, larger structures remain mostly intact, while small gaps between adjacent regions and holes smaller than StructElement are closed, and the regions' boundaries are smoothed. All closing variants share the property that separate regions are not merged, but remain separate objects. The position of StructElement is meaningless, since a closing operation is invariant with respect to the choice of the reference point.

Structuring elements (StructElement) can be generated with operators such as gen_circle, gen_rectangle1, gen_rectangle2, gen_ellipse, draw_region, gen_region_polygon, gen_region_points, etc.

参数:

Region (input_object) region(-array) → object 输入区域

StructElement (input_object) region → object 结构元(位置不变).

RegionClosing (output_object) region(-array) → object

输出结果

//------------------------------------------------------------ 4:closing_circle(Region : RegionClosing : Radius : ) closing_circle — 使用圆的结构元对区域闭操作

参数:

Region (input_object) region(-array) → object 输入区域

RegionClosing (output_object) region(-array) → object 输出区域

Radius (input_control) real → (real / integer) 结构元的半径 默认值: 3.5

推荐值: 1.5, 2.5, 3.5, 4.5, 5.5, 7.5, 9.5, 12.5, 15.5, 19.5, 25.5, 33.5, 45.5, 60.5, 110.5 典型范围: 0.5 ≤ Radius ≤ 511.5 (lin) 最小增量: 1.0 推荐增量: 1.0

//------------------------------------------------------------------

5:closing_golay(Region : RegionClosing : GolayElement, Rotation : ) closing_golay — Close a region with an element from the Golay alphabet.

closing_golay is defined as a Minkowski addition followed by a Minkowski subtraction. First the Minkowski addition of the input region (Region) with the structuring element from the Golay alphabet defined by GolayElement and Rotation is computed. Then the Minkowski subtraction of the result and the structuring element rotated by 180 degrees is performed. The following structuring elements are available: 'l', 'm', 'd', 'c', 'e', 'i', 'f', 'f2', 'h', 'k'.

The rotation number Rotation determines which rotation of the element should be used, and whether the foreground (even) or background version (odd) of the selected element should be used. The Golay elements, together with all possible rotations, are described with the operator golay_elements.

closing_golay serves to close holes smaller than the structuring element, and to smooth regions' boundaries.

参数:

Region (input_object) region(-array) → object 输入区域

RegionClosing (output_object) region(-array) → object 得到的区域

hit_or_miss_golay performs the hit-or-miss-transformation for the input regions Region using all rotations of a structuring element from the Golay alphabet. The result of the operator is the union of all intermediate results of the respective rotations. The following structuring elements are available:

'l', 'm', 'd', 'c', 'e', 'i', 'f', 'f2', 'h', 'k'.

The Golay elements, together with all possible rotations, are described with the operator golay_elements.

参数:

Region (input_object) region(-array) → object 要被处理的区域

RegionHitMiss (output_object) region(-array) → object 操作的结果区域

GolayElement (input_control) string → (string) 来自格雷字母表的结构元 默认值: 'h'

可选值: 'l', 'm', 'd', 'c', 'e', 'i', 'f', 'f2', 'h', 'k'

//------------------------------------------------------------------------------------

22:minkowski_add1(Region, StructElement : RegionMinkAdd : Iterations : ) 在区域上执行闵科夫斯基加运算

Region (input_object) region(-array) → object 要膨胀的区域

StructElement (input_object) region → object 结构元

RegionMinkAdd (output_object) region(-array) → object 膨胀

Iterations (input_control) integer → (integer) 迭代此时

默认值: 1

推荐值: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 17, 20, 30, 40, 50 典型范围: 1 ≤ Iterations (lin) 最小增量: 1 推荐增量: 1

——————————————————————————

23:minkowski_add2(Region, StructElement : RegionMinkAdd : Row, Column, Iterations : )

功能:

膨胀区域(使用参考点)

参数:

Region (input_object) region(-array) → object 被膨胀的区域

StructElement (input_object) region → object 结构元

RegionMinkAdd (output_object) region(-array) → object 膨胀后的区域

Row (input_control) point.y → (integer) 参考点的行坐标

典型范围: 1 ≤ Row ≤ 511 (lin) 最小增量: 1 推荐增量: 1

Column (input_control) point.x → (integer) 参考点的列坐标

典型范围: 1 ≤ Column ≤ 511 (lin) 最小增量: 1 推荐增量: 1

Iterations (input_control) integer → (integer) 迭代次数 默认值: 1

推荐值: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 17, 20, 30, 40, 50 典型范围: 1 ≤ Iterations (lin) 最小增量: 1 推荐增量: 1

———————————————————————————

24:minkowski_sub1(Region, StructElement : RegionMinkSub : Iterations : )

腐蚀一个区域

minkowski_sub1 computes the Minkowski subtraction of the input regions with a 结构元By applying minkowski_sub1 to a region, its boundary gets smoothed. In the process, the area of the region is reduced. Furthermore, connected regions may be split. Such regions, however, remain logically one region. The Minkowski subtraction is a set-theoretic region operation. It uses the intersection operation.

Let M (StructElement) and R (Region) be two regions, where M is the structuring element and R is the region to be processed. Furthermore, let m be a point in M. Then the displacement vector v(m) = (dx,dy) is defined as the difference of the center of gravity of M and the vector v(m). Let t(v(m))(R) denote the translation of a region R by a vector v(m). Then

/ \\

minkowski_sub1(R,M) := | | t (R) | | v(m) m in M

For each point m in M a translation of the region R is performed. The intersection of all these translations is the Minkowski subtraction of R with M. minkowski_sub1 is similar to the operator erosion1, the difference is that in erosion1 the structuring element is mirrored at the origin. The position of StructElement is meaningless, since the displacement vectors are determined with respect to the center of gravity of M.

The parameter Iterations determines the number of iterations which are to be performed with the 结构元The result of iteration n-1 is used as input for iteration n. From the above definition it follows that the maximum region is generated in case of an empty 结构元

Structuring elements (StructElement) can be generated with operators such as gen_circle, gen_rectangle1, gen_rectangle2, gen_ellipse, draw_region, gen_region_polygon, gen_region_points, etc

参数:

Region (input_object) region(-array) → object 被腐蚀的区域

StructElement (input_object) region → object 结构元

RegionMinkSub (output_object) region(-array) → object 腐蚀后的区域

Iterations (input_control) integer → (integer) 迭代次数

默认值: 1

推荐值: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 17, 20, 30, 40, 50 典型范围: 1 ≤ Iterations (lin) 最小增量: 1 推荐增量: 1

———————————————————————————

25:minkowski_sub2(Region, StructElement : RegionMinkSub : Row, Column, Iterations : )

腐蚀区域 (使用参考点).

Region (input_object) region(-array) → object 要腐蚀的区域

StructElement (input_object) region → object 结构元

RegionMinkSub (output_object) region(-array) → object 腐蚀后的区域

Row (input_control) point.y → (integer) 参考点的列坐标 默认值: 0

推荐值: 0, 10, 16, 32, 64, 100, 128 典型范围: 0 ≤ Row ≤ 511 (lin) 最小增量: 1 推荐增量: 1

Column (input_control) point.x → (integer) 参考点的行坐标 默认值: 0

推荐值: 0, 10, 16, 32, 64, 100, 128 典型范围: 0 ≤ Column ≤ 511 (lin) 最小增量: 1 推荐增量: 1

Iterations (input_control) integer → (integer) 迭代此时 默认值: 1

推荐值: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 17, 20, 30, 40, 50 典型范围: 1 ≤ Iterations (lin) 最小增量: 1 推荐增量: 1

———————————————————————————

26:morph_hat(Region, StructElement : RegionMorphHat : : )

计算顶帽和底帽的联合

morph_hat computes the union of the regions that are removed by an opening operation with the regions that are added by a closing operation. Hence this is the union of the results of top_hat and bottom_hat. The position of StructElement does not influence the result.

Structuring elements (StructElement) can be generated with operators such as gen_circle, gen_rectangle1, gen_rectangle2, gen_ellipse, draw_region, gen_region_polygon, gen_region_points, etc.

参数:

Region (input_object) region(-array) → object 要被处理的区域

StructElement (input_object) region → object 结构元(位置不变)

RegionMorphHat (output_object) region(-array) → object 得到的区域并集

———————————————————————————

27:morph_skeleton(Region : RegionSkeleton : : )

计算区域的形态骨架

Region (input_object) region(-array) → object 带处理的区域

RegionSkeleton (output_object) region(-array) → object 结果区域形态谷歌架.

———————————————————————————

28:morph_skiz(Region : RegionSkiz : Iterations1, Iterations2 : )

GolayElement (input_control) string → (string) 格雷字母表得出的结构元 默认值: 'h'

可选值: 'l', 'm', 'd', 'c', 'e', 'i', 'f', 'f2', 'h', 'k'

Rotation (input_control) integer → (integer)

的Golay元旋转。根据不同的元素,并不是所有的旋转是有效的。 默认值: 0

可选值: 0, 2, 4, 6, 8, 10, 12, 14, 1, 3, 5, 7, 9, 11, 13, 15

复杂度:

Let F be the area of an input region. Then the runtime complexity for one region is: O(6 * sqrt(F)) .

//------------------------------------------------------------------------------ 6:closing_rectangle1(Region : RegionClosing : Width, Height : ) closing_rectangle1 — 使用矩形结构元对区域闭操作。

closing_rectangle1 performs a dilation_rectangle1 followed by an erosion_rectangle1 on the input region Region. The size of the rectangular structuring element is determined by the parameters Width and Height. As is the case for all closing variants, regions' boundaries are smoothed and holes within a region which are smaller than the rectangular structuring element are closed.

参数:

Region (input_object) region(-array) → object 输入区域

RegionClosing (output_object) region(-array) → object 闭操作得到的区域

Width (input_control) extent.x → (integer / real) 矩形结构元的宽度 默认值: 10

推荐值: 1, 2, 3, 4, 5, 7, 9, 12, 15, 19, 25, 33, 45, 60, 110, 150, 200 典型范围: 1 ≤ Width ≤ 511 (lin) 最小增量: 1 推荐增量: 1

Height (input_control) extent.y → (integer / real) 矩形结构元的高度 默认值: 10

推荐值: 1, 2, 3, 4, 5, 7, 9, 12, 15, 19, 25, 33, 45, 60, 110, 150, 200 典型范围: 1 ≤ Height ≤ 511 (lin)

最小增量: 1 推荐增量: 1

Complexity

Let F1 be the area of an input region and H be the height of the rectangle. Then the runtime complexity for one region is:

O(2 * sqrt(F1) * log2(H)) .

//-------------------------------------------------------------------------------------- 7:dilation1(Region, StructElement : RegionDilation : Iterations : )

dilation1 — Dilate a region. 膨胀一个区域

参数:

Region (input_object) region(-array) → object 膨胀的区域

StructElement (input_object) region → object 结构元

RegionDilation (output_object) region(-array) → object 膨胀后的区域

Iterations (input_control) integer → (integer) 迭代次数 默认值: 1

推荐值: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 17, 20, 30, 40, 50 典型范围: 1 ≤ Iterations (lin) 最小增量: 1 推荐增量: 1

//--------------------------------------------------------------------------------------

8:dilation2(Region, StructElement : RegionDilation : Row, Column, Iterations : ) dilation2 — Dilate a region (using a reference point). 膨胀一个区域(使用一个参考点)

参数:

Region (input_object) region(-array) → object 输入区域

StructElement (input_object) region → object 结构元

RegionDilation (output_object) region(-array) → object 输出膨胀后的区域.

Row (input_control) point.y → (integer) 参考点行坐标 默认值: 0

Column (input_control) point.x → (integer) 参考点的列坐标 默认值: 0

Iterations (input_control) integer → (integer) 迭代次数. 默认值: 1

推荐值: 1, 2, 3, 4, 5, 7, 11, 17, 25, 32, 64, 128 典型范围: 1 ≤ Iterations (lin) 最小增量: 1 推荐增量: 1

//--------------------------------------------------------------------------------------

9: dilation_circle(Region : RegionDilation : Radius : ) 使用圆形结构元膨胀区域。

参数:

Region (input_object) region(-array) → object 输入要膨胀的区域

RegionDilation (output_object) region(-array) → object 膨胀后得到的区域

Radius (input_control) real → (real / integer) 圆形结构圆半径. 默认值: 3.5

推荐值: 1.5, 2.5, 3.5, 4.5, 5.5, 7.5, 9.5, 12.5, 15.5, 19.5, 25.5, 33.5, 45.5, 60.5, 110.5 典型范围: 0.5 ≤ Radius ≤ 511.5 (lin) 最小增量: 1.0 推荐增量: 1.0

//------------------------------------------------------------------------------------

10:dilation_golay(Region : RegionDilation : GolayElement, Iterations, Rotation : )

使用来自格雷字母表的结构元膨胀区域 。

dilation_golay dilates a region with the selected element GolayElement from the Golay alphabet. The following structuring elements are available: 'l', 'm', 'd', 'c', 'e', 'i', 'f', 'f2', 'h', 'k'.

The rotation number Rotation determines which rotation of the element should be used, and whether the foreground (even) or background version (odd) of the selected element should be used. The Golay elements, together with all possible rotations, are described with the operator golay_elements. The operator works by shifting the structuring element over the region to be processed (Region). For all positions of the structuring element that intersect the region, the corresponding reference point (relative to the structuring element) is added to the output region. This means that the union of all translations of the structuring element within the region is computed.

The parameter Iterations determines the number of iterations which are to be performed with the 结构元The result of iteration n-1 is used as input for iteration n.

参数:

Region (input_object) region(-array) → object 输入要膨胀的区域

RegionDilation (output_object) region(-array) → object 膨胀后得到的区域

GolayElement (input_control) string → (string) 来自格雷字母表的结构元 默认值: 'h'

可选值: 'l', 'm', 'd', 'c', 'e', 'i', 'f', 'f2', 'h', 'k'

Iterations (input_control) integer → (integer) 迭代次数 默认值: 1

推荐值: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 17, 20, 30, 40, 50 典型范围: 1 ≤ Iterations (lin) 最小增量: 1 推荐增量: 1

Rotation (input_control) integer → (integer)

格雷元素转角, 依赖元素, 不是所有的转角都可以. 默认值: 0

可选值: 0, 2, 4, 6, 8, 10, 12, 14, 1, 3, 5, 7, 9, 11, 13, 15

//----------------------------------------------------------------------------------

3:closing(Region, StructElement : RegionClosing : : )

功能:闭区域.

A closing operation is defined as a dilation followed by a Minkowsi subtraction. By applying closing to a region, larger structures remain mostly intact, while small gaps between adjacent regions and holes smaller than StructElement are closed, and the regions' boundaries are smoothed. All closing variants share the property that separate regions are not merged, but remain separate objects. The position of StructElement is meaningless, since a closing operation is invariant with respect to the choice of the reference point.

Structuring elements (StructElement) can be generated with operators such as gen_circle, gen_rectangle1, gen_rectangle2, gen_ellipse, draw_region, gen_region_polygon, gen_region_points, etc.

参数:

Region (input_object) region(-array) → object 要闭操作的区域

StructElement (input_object) region → object 结构元(position-invariant).

RegionClosing (output_object) region(-array) → object 结果

//-------------------------------------------------------------------------------

4:closing_circle(Region : RegionClosing : Radius : )

功能: 使用圆形结构元对区域闭操作。

closing_circle behaves analogously to closing, i.e., the regions' boundaries are smoothed and holes within a region which are smaller than the circular structuring element of radius Radius are closed. The closing_circle operation is defined as a dilation followed by a Minkowski subtraction, both with the same circular structuring element.

参数:

Region (input_object) region(-array) → object 被闭合操作的区域.

RegionClosing (output_object) region(-array) → object 闭操作后的结构元.

Radius (input_control) real → (real / integer) Radius of the circular structuring element. 默认值: 3.5

推荐值: 1.5, 2.5, 3.5, 4.5, 5.5, 7.5, 9.5, 12.5, 15.5, 19.5, 25.5, 33.5, 45.5, 60.5, 110.5 典型范围: 0.5 ≤ Radius ≤ 511.5 (lin) 最小增量: 1.0 推荐增量: 1.0

//-------------------------------------------------------------------------------

5:closing_golay(Region : RegionClosing : GolayElement, Rotation : )

功能:Close a region with an element from the Golay alphabet.

closing_golay is defined as a Minkowski addition followed by a Minkowski subtraction. First the Minkowski addition of the input region (Region) with the structuring element from the Golay alphabet defined by GolayElement and Rotation is computed. Then the Minkowski subtraction of the result and the structuring element rotated by 180 degrees is performed. The following structuring elements are available: 'l', 'm', 'd', 'c', 'e', 'i', 'f', 'f2', 'h', 'k'.

The rotation number Rotation determines which rotation of the element should be used, and whether the foreground (even) or background version (odd) of the selected element should be used. The Golay elements, together with all possible rotations, are described with the operator golay_elements.

closing_golay serves to close holes smaller than the structuring element, and to smooth regions' boundaries.

参数:

Region (input_object) region(-array) → object 要闭操作的区域

RegionClosing (output_object) region(-array) → object 结果

GolayElement (input_control) string → (string) 格雷结构元 默认值: 'h'

可选值: 'l', 'm', 'd', 'c', 'e', 'i', 'f', 'f2', 'h', 'k'

Rotation (input_control) integer → (integer)

Rotation of the Golay element. Depending on the element, not all rotations are valid.

默认值: 0

可选值: 0, 2, 4, 6, 8, 10, 12, 14, 1, 3, 5, 7, 9, 11, 13, 15

//---------------------------------------------------------------------------

6: closing_rectangle1(Region : RegionClosing : Width, Height : )

功能:Close a region with a rectangular structuring element.

closing_rectangle1 performs a dilation_rectangle1 followed by an erosion_rectangle1 on the input region Region. The size of the rectangular structuring element is determined by the parameters Width and Height. As is the case for all closing variants, regions' boundaries are smoothed and holes within a region which are smaller than the rectangular structuring element are closed.

参数:

Region (input_object) region(-array) → object 要闭操作的区域

RegionClosing (output_object) region(-array) → object 得到的区域

Width (input_control) extent.x → (integer / real) 结构矩形宽度 默认值: 10

推荐值: 1, 2, 3, 4, 5, 7, 9, 12, 15, 19, 25, 33, 45, 60, 110, 150, 200 典型范围: 1 ≤ Width ≤ 511 (lin) 最小增量: 1 推荐增量: 1

Height (input_control) extent.y → (integer / real) 结构矩形高度 默认值: 10

推荐值: 1, 2, 3, 4, 5, 7, 9, 12, 15, 19, 25, 33, 45, 60, 110, 150, 200 典型范围: 1 ≤ Height ≤ 511 (lin) 最小增量: 1 推荐增量: 1

//---------------------------------------------------------------------------

7:dilation1(Region, StructElement : RegionDilation : Iterations : )

功能:Dilate a region.

dilation1 dilates the input regions with a 结构元By applying dilation1 to a region, its boundary gets smoothed. In the process, the area of the region is enlarged. Furthermore, disconnected regions may be merged. Such regions, however, remain logically distinct region. The dilation is a set-theoretic region operation. It uses the union operation.

Let M (StructElement) and R (Region) be two regions, where M is the structuring element and R is the region to be processed. Furthermore, let m be a point in M. Then the displacement vector v(m) = (dx,dy) is defined as the difference of the center of gravity of M and the vector v(m). Let t(v(m))(R) denote the translation of a region R by a vector v(m). Then | |

dilation1(R,M) := | | t (R) \\__/ -v(m) m in M

For each point m in M a translation of the region R is performed. The union of all these translations is the dilation of R with M. dilation1 is similar to the operator minkowski_add1, the difference is that in dilation1 the structuring element is mirrored at the origin. The position of StructElement is meaningless, since the displacement vectors are determined with respect to the center of gravity of M.

The parameter Iterations determines the number of iterations which are to be performed with the 结构元The result of iteration n-1 is used as input for iteration n. From the above definition it follows that an empty region is generated in case of an empty 结构元

Structuring elements (StructElement) can be generated with operators such as gen_circle, gen_rectangle1, gen_rectangle2, gen_ellipse, draw_region, gen_region_polygon, gen_region_points, etc.

参数:

Region (input_object) region(-array) → object 要膨胀的区域

StructElement (input_object) region → object 结构元

RegionDilation (output_object) region(-array) → object 膨胀后的区域

Iterations (input_control) integer → (integer) 迭代次数 默认值: 1

推荐值: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 17, 20, 30, 40, 50 典型范围: 1 ≤ Iterations (lin) 最小增量: 1 推荐增量: 1

//-----------------------------------------------------------------------------------

7:dilation2(Region, StructElement : RegionDilation : Row, Column, Iterations : )

功能:Dilate a region (using a reference point

dilation2 dilates the input regions with a structuring element (StructElement) having the reference

point (Row,Column). dilation2 has a similar effect as dilation1, the difference is that the reference point of the structuring element can be chosen arbitrarily. The parameter Iterations determines the number of iterations which are to be performed with the 结构元The result of iteration n-1 is used as input for iteration n.

An empty region is generated in case of an empty 结构元

Structuring elements (StructElement) can be generated with operators such as gen_circle, gen_rectangle1, gen_rectangle2, gen_ellipse, draw_region, gen_region_polygon, gen_region_points, etc.

参数:

Region (input_object) region(-array) → object Regions to be dilated.

StructElement (input_object) region → object 结构元

RegionDilation (output_object) region(-array) → object Dilated regions.

Row (input_control) point.y → (integer) Row coordinate of the reference point. 默认值: 0

Column (input_control) point.x → (integer) Column coordinate of the reference point. 默认值: 0

Iterations (input_control) integer → (integer) Number of iterations. 默认值: 1

推荐值: 1, 2, 3, 4, 5, 7, 11, 17, 25, 32, 64, 128 典型范围: 1 ≤ Iterations (lin) 最小增量: 1 推荐增量: 1

———————————————————————————8:dilation_circle(Region : RegionDilation : Radius : )

功能:Dilate a region with a circular structuring element.

dilation_circle applies a Minkowski addition with a circular structuring element to the input regions Region. Because the circular mask is symmetrical, this is identical to a dilation. The size of the circle used as structuring element is determined by Radius.

The operator results in enlarged regions, smoothed region boundaries, and the holes smaller than the circular mask in the interior of the region are closed. It is useful to select only values like 3.5,

5.5, etc. for Radius in order to avoid a translation of a region, because integer radii result in the circle having a non-integer center of gravity which is rounded to the next integer.

参数:

Region (input_object) region(-array) → object Regions to be dilated.

RegionDilation (output_object) region(-array) → object Dilated regions.

Radius (input_control) real → (real / integer) Radius of the circular structuring element. 默认值: 3.5

推荐值: 1.5, 2.5, 3.5, 4.5, 5.5, 7.5, 9.5, 12.5, 15.5, 19.5, 25.5, 33.5, 45.5, 60.5, 110.5 典型范围: 0.5 ≤ Radius ≤ 511.5 (lin) 最小增量: 1.0 推荐增量: 1.0

9: dilation_golay(Region : RegionDilation : GolayElement, Iterations, Rotation : )

功能: Dilate a region with an element from the Golay alphabet.

dilation_golay dilates a region with the selected element GolayElement from the Golay alphabet. The following structuring elements are available: 'l', 'm', 'd', 'c', 'e', 'i', 'f', 'f2', 'h', 'k'.

The rotation number Rotation determines which rotation of the element should be used, and whether the foreground (even) or background version (odd) of the selected element should be used. The Golay elements, together with all possible rotations, are described with the operator golay_elements. The operator works by shifting the structuring element over the region to be processed (Region). For all positions of the structuring element that intersect the region, the corresponding reference point (relative to the structuring element) is added to the output region. This means that the union of all translations of the structuring element within the region is computed.

The parameter Iterations determines the number of iterations which are to be performed with the 结构元The result of iteration n-1 is used as input for iteration n.

参数:

Region (input_object) region(-array) → object

本文来源:https://www.bwwdw.com/article/jmnd.html

Top