learn_ndim_norm — Construct classes for class_ndim_norm.
learn_ndim_norm generates classification clusters from the region Foreground and the corresponding gray values in the multi-channel image Image, which can be used in class_ndim_norm. Background determines a class of pixels not to be found in class_ndim_norm. This parameter may be empty (empty object).
The parameter Distance determines the maximum distance Radius of the clusters. It describes the minimum distance between two cluster centers. If the parameter Distance 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 MinNumberPercent, otherwise the cluster is not returned. MinNumberPercent 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 Metric). The Euclidian metric usually yields the better results, but takes longer to compute. The parameter Quality 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 Background 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_norm and learn_ndim_box is that in the latter case the rejection class affects the classification process itself. Here, a hyper plane is generated that separates Foreground and Background classes, so that no points in feature space are classified incorrectly. As for learn_ndim_norm, however, an overlap between Foreground and Background class is allowed. This has its effect on the return value Quality. The larger the overlap, the smaller this value.
Foreground pixels to be trained.
Background pixels to be trained (rejection class).
Multi-channel training image.
Metric to be used.
Default value: 'euclid'
List of values: 'euclid', 'maximum'
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: 0.0 ≤ Distance ≤ 511.0 (lin)
Minimum increment: 0.01
Recommended increment: 1.0
Restriction: Distance > 0.0
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 ≤ 100.0 (lin)
Minimum increment: 0.01
Recommended increment: 0.1
Restriction: 0 <= MinNumberPercent && MinNumberPercent <= 100
Cluster radii or half edge lengths.
Coordinates of all cluster centers.
Overlap of the rejection class with the classified objects (1: no overlap).
Assertion: 0 <= Quality && Quality <= 1
learn_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' and 'empty_region_result' with set_system. If necessary, an exception is raised.
min_max_gray, sobel_amp, binomial_filter, gauss_filter, reduce_domain, diff_of_gauss
class_ndim_norm, connection, dilation1, erosion1, opening, closing, rank_region, shape_trans, skeleton
P. Haberäcker, “Digitale Bildverarbeitung”; Hanser-Studienbücher, München, Wien, 1987