learn_ndim_normT_learn_ndim_normLearnNdimNormLearnNdimNormlearn_ndim_norm (Operator)

Name

learn_ndim_normT_learn_ndim_normLearnNdimNormLearnNdimNormlearn_ndim_norm — Construct classes for class_ndim_normclass_ndim_normClassNdimNormClassNdimNormClassNdimNormclass_ndim_norm.

Signature

learn_ndim_norm(Foreground, Background, Image : : Metric, Distance, MinNumberPercent : Radius, Center, Quality)

Herror T_learn_ndim_norm(const Hobject Foreground, const Hobject Background, const Hobject Image, const Htuple Metric, const Htuple Distance, const Htuple MinNumberPercent, Htuple* Radius, Htuple* Center, Htuple* Quality)

void LearnNdimNorm(const HObject& Foreground, const HObject& Background, const HObject& Image, const HTuple& Metric, const HTuple& Distance, const HTuple& MinNumberPercent, HTuple* Radius, HTuple* Center, HTuple* Quality)

HTuple HImage::LearnNdimNorm(const HRegion& Foreground, const HRegion& Background, const HString& Metric, const HTuple& Distance, const HTuple& MinNumberPercent, HTuple* Center, double* Quality) const

HTuple HImage::LearnNdimNorm(const HRegion& Foreground, const HRegion& Background, const HString& Metric, double Distance, double MinNumberPercent, HTuple* Center, double* Quality) const

HTuple HImage::LearnNdimNorm(const HRegion& Foreground, const HRegion& Background, const char* Metric, double Distance, double MinNumberPercent, HTuple* Center, double* Quality) const

HTuple HImage::LearnNdimNorm(const HRegion& Foreground, const HRegion& Background, const wchar_t* Metric, double Distance, double MinNumberPercent, HTuple* Center, double* Quality) const   (Windows only)

HTuple HRegion::LearnNdimNorm(const HRegion& Background, const HImage& Image, const HString& Metric, const HTuple& Distance, const HTuple& MinNumberPercent, HTuple* Center, double* Quality) const

HTuple HRegion::LearnNdimNorm(const HRegion& Background, const HImage& Image, const HString& Metric, double Distance, double MinNumberPercent, HTuple* Center, double* Quality) const

HTuple HRegion::LearnNdimNorm(const HRegion& Background, const HImage& Image, const char* Metric, double Distance, double MinNumberPercent, HTuple* Center, double* Quality) const

HTuple HRegion::LearnNdimNorm(const HRegion& Background, const HImage& Image, const wchar_t* Metric, double Distance, double MinNumberPercent, HTuple* Center, double* Quality) const   (Windows only)

static void HOperatorSet.LearnNdimNorm(HObject foreground, HObject background, HObject image, HTuple metric, HTuple distance, HTuple minNumberPercent, out HTuple radius, out HTuple center, out HTuple quality)

HTuple HImage.LearnNdimNorm(HRegion foreground, HRegion background, string metric, HTuple distance, HTuple minNumberPercent, out HTuple center, out double quality)

HTuple HImage.LearnNdimNorm(HRegion foreground, HRegion background, string metric, double distance, double minNumberPercent, out HTuple center, out double quality)

HTuple HRegion.LearnNdimNorm(HRegion background, HImage image, string metric, HTuple distance, HTuple minNumberPercent, out HTuple center, out double quality)

HTuple HRegion.LearnNdimNorm(HRegion background, HImage image, string metric, double distance, double minNumberPercent, out HTuple center, out double quality)

def learn_ndim_norm(foreground: HObject, background: HObject, image: HObject, metric: str, distance: Union[int, float], min_number_percent: Union[int, float]) -> Tuple[Sequence[float], Sequence[float], float]

Description

learn_ndim_normlearn_ndim_normLearnNdimNormLearnNdimNormLearnNdimNormlearn_ndim_norm generates classification clusters from the region ForegroundForegroundForegroundForegroundforegroundforeground and the corresponding gray values in the multi-channel image ImageImageImageImageimageimage, which can be used in class_ndim_normclass_ndim_normClassNdimNormClassNdimNormClassNdimNormclass_ndim_norm. BackgroundBackgroundBackgroundBackgroundbackgroundbackground determines a class of pixels not to be found in class_ndim_normclass_ndim_normClassNdimNormClassNdimNormClassNdimNormclass_ndim_norm. This parameter may be empty (empty object).

The parameter DistanceDistanceDistanceDistancedistancedistance determines the maximum distance RadiusRadiusRadiusRadiusradiusradius of the clusters. It describes the minimum distance between two cluster centers. If the parameter DistanceDistanceDistanceDistancedistancedistance is small the (small) hyper-cubes or hyper-spheres can approximate the feature space well. Simultaneously the runtime during classification increases.

The ratio of the number of pixels in a cluster to the total number of pixels (in percent) must be larger than the value of MinNumberPercentMinNumberPercentMinNumberPercentMinNumberPercentminNumberPercentmin_number_percent, otherwise the cluster is not returned. MinNumberPercentMinNumberPercentMinNumberPercentMinNumberPercentminNumberPercentmin_number_percent serves to eliminate outliers in the training set. If it is chosen too large many clusters are suppressed.

Two different clustering procedures can be selected: The minimum Euclidean distance algorithm (n-dimensional hyper-spheres) and the maximum algorithm (n-dimensional hyper-cubes) for describing the pixels of the image to classify in the n-dimensional histogram (parameter MetricMetricMetricMetricmetricmetric). The Euclidian metric usually yields the better results, but takes longer to compute. The parameter QualityQualityQualityQualityqualityquality returns the quality of the clustering. It is a measure of overlap between the rejection class and the classificator classes. Values larger than 0 denote the corresponding ratio of overlap. If no rejection region is given, its value is set to 1. The regions in BackgroundBackgroundBackgroundBackgroundbackgroundbackground do not influence on the clustering. They are merely used to check the results that can be expected.

From a user's point of view the key difference between learn_ndim_normlearn_ndim_normLearnNdimNormLearnNdimNormLearnNdimNormlearn_ndim_norm and learn_ndim_boxlearn_ndim_boxLearnNdimBoxLearnNdimBoxLearnNdimBoxlearn_ndim_box is that in the latter case the rejection class affects the classification process itself. Here, a hyper plane is generated that separates ForegroundForegroundForegroundForegroundforegroundforeground and BackgroundBackgroundBackgroundBackgroundbackgroundbackground classes, so that no points in feature space are classified incorrectly. As for learn_ndim_normlearn_ndim_normLearnNdimNormLearnNdimNormLearnNdimNormlearn_ndim_norm, however, an overlap between ForegroundForegroundForegroundForegroundforegroundforeground and BackgroundBackgroundBackgroundBackgroundbackgroundbackground class is allowed. This has its effect on the return value QualityQualityQualityQualityqualityquality. The larger the overlap, the smaller this value.

Execution Information

Parameters

ForegroundForegroundForegroundForegroundforegroundforeground (input_object)  region(-array) objectHRegionHObjectHRegionHobject

Foreground pixels to be trained.

BackgroundBackgroundBackgroundBackgroundbackgroundbackground (input_object)  region(-array) objectHRegionHObjectHRegionHobject

Background pixels to be trained (rejection class).

ImageImageImageImageimageimage (input_object)  (multichannel-)image(-array) objectHImageHObjectHImageHobject (byte)

Multi-channel training image.

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

Metric to be used.

Default value: 'euclid' "euclid" "euclid" "euclid" "euclid" "euclid"

List of values: 'euclid'"euclid""euclid""euclid""euclid""euclid", 'maximum'"maximum""maximum""maximum""maximum""maximum"

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

Maximum cluster radius.

Default value: 10.0

Suggested values: 1.0, 2.0, 3.0, 4.0, 6.0, 8.0, 10.0, 13.0, 17.0, 24.0, 30.0, 40.0

Typical range of values: 1.0 ≤ Distance Distance Distance Distance distance distance (lin)

Minimum increment: 0.01

Recommended increment: 1.0

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

The ratio of the number of pixels in a cluster to the total number of pixels (in percent) must be larger than MinNumberPercent (otherwise the cluster is not output).

Default value: 0.01

Suggested values: 0.001, 0.05, 0.1, 0.2, 0.5, 1.0, 2.0, 5.0, 10.0

Typical range of values: 0.0 ≤ MinNumberPercent MinNumberPercent MinNumberPercent MinNumberPercent minNumberPercent min_number_percent ≤ 100.0 (lin)

Minimum increment: 0.01

Recommended increment: 0.1

RadiusRadiusRadiusRadiusradiusradius (output_control)  real-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Cluster radii or half edge lengths.

CenterCenterCenterCentercentercenter (output_control)  real-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Coordinates of all cluster centers.

QualityQualityQualityQualityqualityquality (output_control)  real HTuplefloatHTupleHtuple (real) (double) (double) (double)

Overlap of the rejection class with the classified objects (1: no overlap).

Assertion: 0 <= Quality && Quality <= 1

Result

learn_ndim_normlearn_ndim_normLearnNdimNormLearnNdimNormLearnNdimNormlearn_ndim_norm returns 2 (H_MSG_TRUE) if all parameters are correct. The behavior with respect to the input images 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""no_object_result" and 'empty_region_result'"empty_region_result""empty_region_result""empty_region_result""empty_region_result""empty_region_result" with set_systemset_systemSetSystemSetSystemSetSystemset_system. If necessary, an exception is raised.

Possible Predecessors

min_max_graymin_max_grayMinMaxGrayMinMaxGrayMinMaxGraymin_max_gray, sobel_ampsobel_ampSobelAmpSobelAmpSobelAmpsobel_amp, binomial_filterbinomial_filterBinomialFilterBinomialFilterBinomialFilterbinomial_filter, gauss_filtergauss_filterGaussFilterGaussFilterGaussFiltergauss_filter, reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain, diff_of_gaussdiff_of_gaussDiffOfGaussDiffOfGaussDiffOfGaussdiff_of_gauss

Possible Successors

class_ndim_normclass_ndim_normClassNdimNormClassNdimNormClassNdimNormclass_ndim_norm, connectionconnectionConnectionConnectionConnectionconnection, dilation1dilation1Dilation1Dilation1Dilation1dilation1, erosion1erosion1Erosion1Erosion1Erosion1erosion1, openingopeningOpeningOpeningOpeningopening, closingclosingClosingClosingClosingclosing, rank_regionrank_regionRankRegionRankRegionRankRegionrank_region, shape_transshape_transShapeTransShapeTransShapeTransshape_trans, skeletonskeletonSkeletonSkeletonSkeletonskeleton

Alternatives

learn_ndim_boxlearn_ndim_boxLearnNdimBoxLearnNdimBoxLearnNdimBoxlearn_ndim_box, learn_class_boxlearn_class_boxLearnClassBoxLearnClassBoxLearnClassBoxlearn_class_box

See also

class_ndim_normclass_ndim_normClassNdimNormClassNdimNormClassNdimNormclass_ndim_norm, histo_2dimhisto_2dimHisto2dimHisto2dimHisto2dimhisto_2dim

References

P. Haberäcker, “Digitale Bildverarbeitung”; Hanser-Studienbücher, München, Wien, 1987

Module

Foundation