Skip to content

regiongrowing_meanregiongrowing_meanRegiongrowingMeanRegiongrowingMeanregiongrowing_meanregiongrowing_mean🔗

Short description🔗

regiongrowing_meanregiongrowing_meanRegiongrowingMeanRegiongrowingMeanregiongrowing_meanregiongrowing_mean — Perform a region growing using mean gray values.

Signature🔗

regiongrowing_mean( image Image, out region Regions, point.y StartRows, point.x StartColumns, number Tolerance, integer MinSize )regiongrowing_mean( Image : Regions : StartRows, StartColumns, Tolerance, MinSize : )void RegiongrowingMean( const HObject& Image, HObject* Regions, const HTuple& StartRows, const HTuple& StartColumns, const HTuple& Tolerance, const HTuple& MinSize )static void HOperatorSet.RegiongrowingMean( HObject image, out HObject regions, HTuple startRows, HTuple startColumns, HTuple tolerance, HTuple minSize )def regiongrowing_mean( image: HObject, start_rows: MaybeSequence[int], start_columns: MaybeSequence[int], tolerance: float, min_size: int ) -> HObject

Herror regiongrowing_mean( const Hobject Image, Hobject* Regions, const Hlong StartRows, const Hlong StartColumns, double Tolerance, const Hlong MinSize )

Herror T_regiongrowing_mean( const Hobject Image, Hobject* Regions, const Htuple StartRows, const Htuple StartColumns, const Htuple Tolerance, const Htuple MinSize )

HRegion HImage::RegiongrowingMean( const HTuple& StartRows, const HTuple& StartColumns, double Tolerance, Hlong MinSize ) const

HRegion HImage::RegiongrowingMean( Hlong StartRows, Hlong StartColumns, double Tolerance, Hlong MinSize ) const

HRegion HImage.RegiongrowingMean( HTuple startRows, HTuple startColumns, double tolerance, int minSize )

HRegion HImage.RegiongrowingMean( int startRows, int startColumns, double tolerance, int minSize )

Description🔗

regiongrowing_meanRegiongrowingMean performs a region growing using the mean gray values of a region, starting from points given by StartRowsstartRowsstart_rows and StartColumnsstartColumnsstart_columns. At any point in the process the mean gray value of the current region is calculated. Gray values at the boundary of the region are added to the region if they differ from the current mean by less than Tolerancetolerancetolerance. Regions smaller than MinSizeminSizemin_size are suppressed.

If no starting points are given (empty tuples), the expansion process starts at the upper leftmost point, and is continued with the first unprocessed point after a region has been created.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Automatically parallelized on tuple level.

Parameters🔗

Imageimageimage (input_object) singlechannelimage(-array) → object (byte / uint2 / int4)object (byte / uint2 / int4)HObject (byte / uint2 / int4)HImage (byte / uint2 / int4)HObject (byte / uint2 / int4)Hobject (byte / uint2 / int4)

Input image.

Regionsregionsregions (output_object) region-array → objectobjectHObjectHRegionHObjectHobject *

Segmented regions.

StartRowsstartRowsstart_rows (input_control) point.y(-array) → (integer)(integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (Hlong)

Row coordinates of the starting points.

Default: [][]
Value range: 0 ≤ StartRows
Minimum increment: 1
Recommended increment: 1

StartColumnsstartColumnsstart_columns (input_control) point.x(-array) → (integer)(integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (Hlong)

Column coordinates of the starting points.

Default: [][]
Value range: 0 ≤ StartColumns
Minimum increment: 1
Recommended increment: 1

Tolerancetolerancetolerance (input_control) number → (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Maximum deviation from the mean.

Default: 5.05.0
Suggested values: 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 12.0, 15.0, 17.0, 20.0, 25.0, 30.0, 40.00.5, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 12.0, 15.0, 17.0, 20.0, 25.0, 30.0, 40.0
Restriction: Tolerance > 0.0

MinSizeminSizemin_size (input_control) integer → (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Minimum size of a region.

Default: 100100
Suggested values: 0, 10, 30, 50, 100, 500, 1000, 20000, 10, 30, 50, 100, 500, 1000, 2000
Value range: 0 ≤ MinSize
Minimum increment: 1
Recommended increment: 100

Result🔗

regiongrowing_meanRegiongrowingMean returns 2 (H_MSG_TRUE) if all parameters are correct. The behavior with respect to the input images and output regions can be determined by setting the values of the flags 'no_object_result'"no_object_result", 'empty_region_result'"empty_region_result", and 'store_empty_region'"store_empty_region" with set_systemSetSystem. If necessary, an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

binomial_filterBinomialFilter, gauss_filterGaussFilter, sigma_imageSigmaImage, anisotropic_diffusionAnisotropicDiffusion, median_imageMedianImage, mean_imageMeanImage

Possible successors

select_shapeSelectShape, reduce_domainReduceDomain, openingOpening, expand_regionExpandRegion

Alternatives

regiongrowingRegiongrowing, regiongrowing_nRegiongrowingN

Module🔗

Foundation