ClassesClassesClassesClasses | | | | Operators

remove_noise_regionremove_noise_regionRemoveNoiseRegionremove_noise_regionRemoveNoiseRegionRemoveNoiseRegion (Operator)

Name

remove_noise_regionremove_noise_regionRemoveNoiseRegionremove_noise_regionRemoveNoiseRegionRemoveNoiseRegion — Remove noise from a region.

Signature

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)

Herror remove_noise_region(Hobject InputRegion, Hobject* OutputRegion, const HTuple& Type)

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

HRegionArray HRegionArray::RemoveNoiseRegion(const HTuple& Type) const

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

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

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

void HOperatorSetX.RemoveNoiseRegion(
[in] IHUntypedObjectX* InputRegion, [out] IHUntypedObjectX*OutputRegion, [in] VARIANT Type)

IHRegionX* HRegionX.RemoveNoiseRegion([in] BSTR Type)

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

HRegion HRegion.RemoveNoiseRegion(string type)

Description

remove_noise_regionremove_noise_regionRemoveNoiseRegionremove_noise_regionRemoveNoiseRegionRemoveNoiseRegion 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.

Parallelization

Parameters

InputRegionInputRegionInputRegionInputRegionInputRegioninputRegion (input_object)  region(-array) objectHRegionHRegionHRegionHRegionXHobject

Regions to be modified.

OutputRegionOutputRegionOutputRegionOutputRegionOutputRegionoutputRegion (output_object)  region(-array) objectHRegionHRegionHRegionHRegionXHobject *

Less noisy regions.

TypeTypeTypeTypeTypetype (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Mode of noise removal.

Default value: 'n_4' "n_4" "n_4" "n_4" "n_4" "n_4"

List of values: '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"

Complexity

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

Result

remove_noise_regionremove_noise_regionRemoveNoiseRegionremove_noise_regionRemoveNoiseRegionRemoveNoiseRegion returns 2 (H_MSG_TRUE) if all parameters are correct. The behavior in case of empty input (no regions given) can be set via set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>). If necessary, an exception is raised.

Possible Predecessors

connectionconnectionConnectionconnectionConnectionConnection, regiongrowingregiongrowingRegiongrowingregiongrowingRegiongrowingRegiongrowing, pouringpouringPouringpouringPouringPouring, class_ndim_normclass_ndim_normClassNdimNormclass_ndim_normClassNdimNormClassNdimNorm

Possible Successors

select_shapeselect_shapeSelectShapeselect_shapeSelectShapeSelectShape

See also

dilation1dilation1Dilation1dilation1Dilation1Dilation1, intersectionintersectionIntersectionintersectionIntersectionIntersection, gen_region_pointsgen_region_pointsGenRegionPointsgen_region_pointsGenRegionPointsGenRegionPoints

Module

Foundation


ClassesClassesClassesClasses | | | | Operators