Operator Reference

regiongrowing_nregiongrowing_nRegiongrowingNRegiongrowingNregiongrowing_n (Operator)

regiongrowing_nregiongrowing_nRegiongrowingNRegiongrowingNregiongrowing_n — Segment an image using regiongrowing for multi-channel images.

Signature

Herror regiongrowing_n(const Hobject MultiChannelImage, Hobject* Regions, const char* Metric, double MinTolerance, double MaxTolerance, const Hlong MinSize)

Herror T_regiongrowing_n(const Hobject MultiChannelImage, Hobject* Regions, const Htuple Metric, const Htuple MinTolerance, const Htuple MaxTolerance, const Htuple MinSize)

void RegiongrowingN(const HObject& MultiChannelImage, HObject* Regions, const HTuple& Metric, const HTuple& MinTolerance, const HTuple& MaxTolerance, const HTuple& MinSize)

HRegion HImage::RegiongrowingN(const HString& Metric, const HTuple& MinTolerance, const HTuple& MaxTolerance, Hlong MinSize) const

HRegion HImage::RegiongrowingN(const HString& Metric, double MinTolerance, double MaxTolerance, Hlong MinSize) const

HRegion HImage::RegiongrowingN(const char* Metric, double MinTolerance, double MaxTolerance, Hlong MinSize) const

HRegion HImage::RegiongrowingN(const wchar_t* Metric, double MinTolerance, double MaxTolerance, Hlong MinSize) const   ( Windows only)

static void HOperatorSet.RegiongrowingN(HObject multiChannelImage, out HObject regions, HTuple metric, HTuple minTolerance, HTuple maxTolerance, HTuple minSize)

HRegion HImage.RegiongrowingN(string metric, HTuple minTolerance, HTuple maxTolerance, int minSize)

HRegion HImage.RegiongrowingN(string metric, double minTolerance, double maxTolerance, int minSize)

def regiongrowing_n(multi_channel_image: HObject, metric: str, min_tolerance: Union[int, float], max_tolerance: Union[int, float], min_size: int) -> HObject

Description

regiongrowing_nregiongrowing_nRegiongrowingNRegiongrowingNregiongrowing_n performs a multi-channel regiongrowing. The channels give rise to an n-dimensional feature vector. Neighboring points are aggregated into the same region if the difference of their feature vectors with respect to the given metric lies in the interval [MinToleranceMinToleranceMinToleranceminTolerancemin_tolerance, MaxToleranceMaxToleranceMaxTolerancemaxTolerancemax_tolerance]. Only neighbors of the 4-neighborhood are examined. The following metrics can be used:

Let denote the gray value in the feature vector at point of the image, and likewise be the gray value in the feature vector at point a neighboring point . Let be the gray value with index . Furthermore, let denote MinToleranceMinToleranceMinToleranceminTolerancemin_tolerance and denote MaxToleranceMaxToleranceMaxTolerancemaxTolerancemax_tolerance.

'1-norm'"1-norm""1-norm""1-norm""1-norm":

Sum of absolute values

'2-norm'"2-norm""2-norm""2-norm""2-norm":

Euclidean distance

'3-norm'"3-norm""3-norm""3-norm""3-norm":

p - Norm with p = 3

'4-norm'"4-norm""4-norm""4-norm""4-norm":

p - Norm with p = 4

'n-norm'"n-norm""n-norm""n-norm""n-norm":

Minkowski distance

'max-diff'"max-diff""max-diff""max-diff""max-diff":

Supremum distance

'min-diff'"min-diff""min-diff""min-diff""min-diff":

Infimum distance

'variance'"variance""variance""variance""variance":

Variance of gray value differences

'dot-product'"dot-product""dot-product""dot-product""dot-product":

Dot product

'correlation'"correlation""correlation""correlation""correlation":

Correlation

'mean-diff'"mean-diff""mean-diff""mean-diff""mean-diff":

Difference of arithmetic means

'mean-ratio'"mean-ratio""mean-ratio""mean-ratio""mean-ratio":

Ratio of arithmetic means

'length-diff'"length-diff""length-diff""length-diff""length-diff":

Difference of the vector lengths

'length-ratio'"length-ratio""length-ratio""length-ratio""length-ratio":

Ratio of the vector lengths

'n-norm-ratio'"n-norm-ratio""n-norm-ratio""n-norm-ratio""n-norm-ratio":

Ratio of the vector lengths w.r.t the p-norm with p = n

'gray-max-diff'"gray-max-diff""gray-max-diff""gray-max-diff""gray-max-diff":

Difference of the maximum gray values

'gray-max-ratio'"gray-max-ratio""gray-max-ratio""gray-max-ratio""gray-max-ratio":

Ratio of the maximum gray values

'gray-min-diff'"gray-min-diff""gray-min-diff""gray-min-diff""gray-min-diff":

Difference of the minimum gray values

'gray-min-ratio'"gray-min-ratio""gray-min-ratio""gray-min-ratio""gray-min-ratio":

Ratio of the minimum gray values

'variance-diff'"variance-diff""variance-diff""variance-diff""variance-diff":

Difference of the variances over all gray values (channels)

'variance-ratio'"variance-ratio""variance-ratio""variance-ratio""variance-ratio":

Ratio of the variances over all gray values (channels)

'mean-abs-diff'"mean-abs-diff""mean-abs-diff""mean-abs-diff""mean-abs-diff":

Difference of the sum of absolute values over all gray values (channels)

'mean-abs-ratio'"mean-abs-ratio""mean-abs-ratio""mean-abs-ratio""mean-abs-ratio":

Ratio of the sum of absolute values over all gray values (channels)

'max-abs-diff'"max-abs-diff""max-abs-diff""max-abs-diff""max-abs-diff":

Difference of the maximum distance of the components

'max-abs-ratio'"max-abs-ratio""max-abs-ratio""max-abs-ratio""max-abs-ratio":

Ratio of the maximum distance of the components

'min-abs-diff'"min-abs-diff""min-abs-diff""min-abs-diff""min-abs-diff":

Difference of the minimum distance of the components

'min-abs-ratio'"min-abs-ratio""min-abs-ratio""min-abs-ratio""min-abs-ratio":

Ratio of the minimum distance of the components

'plane'"plane""plane""plane""plane":

The following has to hold for all :

Regions with an area less than MinSizeMinSizeMinSizeminSizemin_size are suppressed.

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

MultiChannelImageMultiChannelImageMultiChannelImagemultiChannelImagemulti_channel_image (input_object)  (multichannel-)image(-array) objectHImageHObjectHObjectHobject (byte)

Input image.

RegionsRegionsRegionsregionsregions (output_object)  region-array objectHRegionHObjectHObjectHobject *

Segmented regions.

MetricMetricMetricmetricmetric (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Metric for the distance of the feature vectors.

Default: '2-norm' "2-norm" "2-norm" "2-norm" "2-norm"

List of values: '1-norm'"1-norm""1-norm""1-norm""1-norm", '2-norm'"2-norm""2-norm""2-norm""2-norm", '3-norm'"3-norm""3-norm""3-norm""3-norm", '4-norm'"4-norm""4-norm""4-norm""4-norm", 'correlation'"correlation""correlation""correlation""correlation", 'dot-product'"dot-product""dot-product""dot-product""dot-product", 'gray-max-diff'"gray-max-diff""gray-max-diff""gray-max-diff""gray-max-diff", 'gray-max-ratio'"gray-max-ratio""gray-max-ratio""gray-max-ratio""gray-max-ratio", 'gray-min-diff'"gray-min-diff""gray-min-diff""gray-min-diff""gray-min-diff", 'gray-min-ratio'"gray-min-ratio""gray-min-ratio""gray-min-ratio""gray-min-ratio", 'length-diff'"length-diff""length-diff""length-diff""length-diff", 'length-ratio'"length-ratio""length-ratio""length-ratio""length-ratio", 'max-abs-diff'"max-abs-diff""max-abs-diff""max-abs-diff""max-abs-diff", 'max-abs-ratio'"max-abs-ratio""max-abs-ratio""max-abs-ratio""max-abs-ratio", 'max-diff'"max-diff""max-diff""max-diff""max-diff", 'mean-abs-diff'"mean-abs-diff""mean-abs-diff""mean-abs-diff""mean-abs-diff", 'mean-abs-ratio'"mean-abs-ratio""mean-abs-ratio""mean-abs-ratio""mean-abs-ratio", 'mean-diff'"mean-diff""mean-diff""mean-diff""mean-diff", 'mean-ratio'"mean-ratio""mean-ratio""mean-ratio""mean-ratio", 'min-abs-diff'"min-abs-diff""min-abs-diff""min-abs-diff""min-abs-diff", 'min-abs-ratio'"min-abs-ratio""min-abs-ratio""min-abs-ratio""min-abs-ratio", 'min-diff'"min-diff""min-diff""min-diff""min-diff", 'n-norm'"n-norm""n-norm""n-norm""n-norm", 'n-norm-ratio'"n-norm-ratio""n-norm-ratio""n-norm-ratio""n-norm-ratio", 'plane'"plane""plane""plane""plane", 'variance'"variance""variance""variance""variance", 'variance-diff'"variance-diff""variance-diff""variance-diff""variance-diff", 'variance-ratio'"variance-ratio""variance-ratio""variance-ratio""variance-ratio"

MinToleranceMinToleranceMinToleranceminTolerancemin_tolerance (input_control)  number HTupleUnion[int, float]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Lower threshold for the features' distance.

Default: 0.0

Suggested values: 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 12.0, 14.0, 16.0, 18.0, 20.0, 25.0, 30.0

MaxToleranceMaxToleranceMaxTolerancemaxTolerancemax_tolerance (input_control)  number HTupleUnion[int, float]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Upper threshold for the features' distance.

Default: 20.0

Suggested values: 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 12.0, 14.0, 16.0, 18.0, 20.0, 25.0, 30.0

MinSizeMinSizeMinSizeminSizemin_size (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Minimum size of the output regions.

Default: 30

Suggested values: 1, 10, 25, 50, 100, 200, 500, 1000

Value range: 1 ≤ MinSize MinSize MinSize minSize min_size

Minimum increment: 1

Recommended increment: 5

Result

regiongrowing_nregiongrowing_nRegiongrowingNRegiongrowingNregiongrowing_n 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""no_object_result""no_object_result""no_object_result", 'empty_region_result'"empty_region_result""empty_region_result""empty_region_result""empty_region_result", and 'store_empty_region'"store_empty_region""store_empty_region""store_empty_region""store_empty_region" with set_systemset_systemSetSystemSetSystemset_system. If necessary, an exception is raised.

Possible Predecessors

compose2compose2Compose2Compose2compose2, compose3compose3Compose3Compose3compose3

Alternatives

class_2dim_supclass_2dim_supClass2dimSupClass2dimSupclass_2dim_sup, class_ndim_normclass_ndim_normClassNdimNormClassNdimNormclass_ndim_norm

See also

regiongrowing_meanregiongrowing_meanRegiongrowingMeanRegiongrowingMeanregiongrowing_mean

Module

Foundation