learn_ndim_normlearn_ndim_normLearnNdimNormLearnNdimNormlearn_ndim_normT_learn_ndim_norm
Short description
learn_ndim_normlearn_ndim_normLearnNdimNormLearnNdimNormlearn_ndim_normT_learn_ndim_norm — Construct classes for class_ndim_normClassNdimNorm.
Signature
learn_ndim_norm( region Foreground, region Background, image Image, string Metric, number Distance, number MinNumberPercent, out real Radius, out real Center, out real Quality )learn_ndim_norm( Foreground, Background, Image : : Metric, Distance, MinNumberPercent : Radius, Center, 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 )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 )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]
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 )
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)
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 )
Description
learn_ndim_normLearnNdimNorm generates classification clusters from the
region Foregroundforegroundforeground and the corresponding gray values in
the multi-channel image Imageimageimage, which can be used in
class_ndim_normClassNdimNorm. Backgroundbackgroundbackground determines a class
of pixels not to be found in class_ndim_normClassNdimNorm. This
parameter may be empty (empty object).
The parameter Distancedistancedistance determines the maximum distance
Radiusradiusradius of the clusters. It describes the minimum distance
between two cluster centers. If the parameter Distancedistancedistance
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
MinNumberPercentminNumberPercentmin_number_percent, otherwise the cluster is not returned.
MinNumberPercentminNumberPercentmin_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
Metricmetricmetric). The Euclidean metric usually yields the better
results, but takes longer to compute. The parameter
Qualityqualityquality 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 Backgroundbackgroundbackground do not influence on the
clustering. They are merely used to check the results that can be
expected.
Execution information
-
Multithreading type: exclusive (runs in parallel only with independent operators).
-
Multithreading scope: global (may be called from any thread).
-
Processed without parallelization.
Parameters
Foregroundforegroundforeground (input_object) region(-array) → objectobjectHObjectHRegionHObjectHobject
Foreground pixels to be trained.
Backgroundbackgroundbackground (input_object) region(-array) → objectobjectHObjectHRegionHObjectHobject
Background pixels to be trained (rejection class).
Imageimageimage (input_object) (multichannel-)image(-array) → object (byte)object (byte)HObject (byte)HImage (byte)HObject (byte)Hobject (byte)
Multi-channel training image.
Metricmetricmetric (input_control) string → (string)(string)HTuple (HString)HTuple (string)strHtuple (char*)
Metric to be used.
Default: 'euclid'"euclid"
List of values: 'euclid', 'maximum'"euclid", "maximum"
Distancedistancedistance (input_control) number → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[int, float]Htuple (double / Hlong)
Maximum cluster radius.
Default: 10.010.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.01.0, 2.0, 3.0, 4.0, 6.0, 8.0, 10.0, 13.0, 17.0, 24.0, 30.0, 40.0
Value range: 1.0 ≤ Distance (lin)
Minimum increment: 0.01
Recommended increment: 1.0
MinNumberPercentminNumberPercentmin_number_percent (input_control) number → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[int, float]Htuple (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: 0.010.01
Suggested values: 0.001, 0.05, 0.1, 0.2, 0.5, 1.0, 2.0, 5.0, 10.00.001, 0.05, 0.1, 0.2, 0.5, 1.0, 2.0, 5.0, 10.0
Value range: 0.0 ≤ MinNumberPercent ≤ 100.0 (lin)
Minimum increment: 0.01
Recommended increment: 0.1
Radiusradiusradius (output_control) real-array → (real)(real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)
Cluster radii or half edge lengths.
Centercentercenter (output_control) real-array → (real)(real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)
Coordinates of all cluster centers.
Qualityqualityquality (output_control) real → (real)(real)HTuple (double)HTuple (double)floatHtuple (double)
Overlap of the rejection class with the classified
objects (1: no overlap).
Assertion: 0 <= Quality && Quality <= 1
Result
learn_ndim_normLearnNdimNorm 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" and 'empty_region_result'"empty_region_result"
with set_systemSetSystem. If necessary, an exception is raised.
Combinations with other operators
Combinations
Possible predecessors
min_max_grayMinMaxGray, sobel_ampSobelAmp, binomial_filterBinomialFilter, gauss_filterGaussFilter, reduce_domainReduceDomain, diff_of_gaussDiffOfGauss
Possible successors
class_ndim_normClassNdimNorm, connectionConnection, dilation1Dilation1, erosion1Erosion1, openingOpening, closingClosing, rank_regionRankRegion, shape_transShapeTrans, skeletonSkeleton
See also
class_ndim_normClassNdimNorm, histo_2dimHisto2dim
References
P. Haberäcker, “Digitale Bildverarbeitung”;
Hanser-StudienbĂĽcher, MĂĽnchen, Wien, 1987
Module
Foundation