remove_noise_regionremove_noise_regionRemoveNoiseRegionRemoveNoiseRegionremove_noise_region (算子)

名称

remove_noise_regionremove_noise_regionRemoveNoiseRegionRemoveNoiseRegionremove_noise_region — 移除某个区域的噪声。

签名

remove_noise_region(InputRegion : OutputRegion : Type : )

Herror remove_noise_region(const Hobject InputRegion, Hobject* OutputRegion, const char* Type)

Herror T_remove_noise_region(const Hobject InputRegion, Hobject* OutputRegion, const Htuple Type)

void RemoveNoiseRegion(const HObject& InputRegion, HObject* OutputRegion, const HTuple& Type)

HRegion HRegion::RemoveNoiseRegion(const HString& Type) const

HRegion HRegion::RemoveNoiseRegion(const char* Type) const

HRegion HRegion::RemoveNoiseRegion(const wchar_t* Type) const   ( Windows only)

static void HOperatorSet.RemoveNoiseRegion(HObject inputRegion, out HObject outputRegion, HTuple type)

HRegion HRegion.RemoveNoiseRegion(string type)

def remove_noise_region(input_region: HObject, type: str) -> HObject

描述

remove_noise_regionremove_noise_regionRemoveNoiseRegionRemoveNoiseRegionRemoveNoiseRegionremove_noise_region removes noise from a region. Depending on TypeTypeTypeTypetypetype one of the following structuring elements will be used:

'n_4'

A structuring element consisting of the four 4-neighbors of a point is being used: .X. X.X .X.

'n_8'

A structuring element consisting of the four 8-neighbors of a point is being used: X.X ... X.X

'n_48'

A structuring element consisting of the four 4-neighbors and the four 8-neighbors of a point is being used: XXX X.X XXX

A dilation with this structuring element is performed and the intersection of the result and the input region is calculated. Thus, all pixels having no according neighbors are removed.

执行信息

参数

InputRegionInputRegionInputRegionInputRegioninputRegioninput_region (输入对象)  region(-array) objectHRegionHObjectHRegionHobject

Regions to be modified.

OutputRegionOutputRegionOutputRegionOutputRegionoutputRegionoutput_region (输出对象)  region(-array) objectHRegionHObjectHRegionHobject *

Less noisy regions.

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

Mode of noise removal.

默认值: 'n_4' "n_4" "n_4" "n_4" "n_4" "n_4"

值列表: 'n_4'"n_4""n_4""n_4""n_4""n_4", 'n_48'"n_48""n_48""n_48""n_48""n_48", 'n_8'"n_8""n_8""n_8""n_8""n_8"

复杂度

Let F be the area of the input region. Then the runtime complexity is

结果

remove_noise_regionremove_noise_regionRemoveNoiseRegionRemoveNoiseRegionRemoveNoiseRegionremove_noise_region 在所有参数正确时返回 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>)。如有必要,则抛出异常。

可能的前趋

connectionconnectionConnectionConnectionConnectionconnection, regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowingregiongrowing, pouringpouringPouringPouringPouringpouring, class_ndim_normclass_ndim_normClassNdimNormClassNdimNormClassNdimNormclass_ndim_norm

可能的后继

select_shapeselect_shapeSelectShapeSelectShapeSelectShapeselect_shape

另见

dilation1dilation1Dilation1Dilation1Dilation1dilation1, intersectionintersectionIntersectionIntersectionIntersectionintersection, gen_region_pointsgen_region_pointsGenRegionPointsGenRegionPointsGenRegionPointsgen_region_points

模块

基础