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

Construct clusters for class_ndim1__.

learn_ndim1__ generates classification clusters from the region Foreground and the corresponding gray values in the multi-channel image Image, which can be used in class_ndim1__. Background determines a class of pixels not to be found in class_ndim1__. This parameter may be empty (empty tuple).

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. At the same time 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 too many clusters are suppressed.

Two different clustering procedures can be selected: The minimum distance algorithm (n-dimensional hyper-spheres) and the maximum algorithm (n-dimensional nyper-cubes) for describing the pixels of the image to classify in the n-dimensional histogram (parameter Metric). The Euclidian metric usually yields the best 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 classifier classes. Values larger than 0 denote the respective ratio of overlap. If no rejection region is given, its value is set to 1. The regions in Background have no influence on the clustering; they are merely used to check the results that can be expected.


Parameters

Foreground (input_object)
region(-array) -> object
Foreground pixels to be trained.

Background (input_object)
region(-array) -> object
Background pixels to be trained (rejection class).

Image (input_object)
image(-array) -> object : byte / int1 / int2 / int4 / real
Multi-channel training image.

Metric (input_control)
string -> string
Metric used.
Default value: 'euclid'
List of values: 'euclid', 'maximum'

Distance (input_control)
number -> real / integer
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
Range of values: 0.0 <= Distance <= 511.0 (lin)
Minimum increment: 0.01
Recommended increment: 1.0
Restriction: Radius > 0.0

MinNumberPercent (input_control)
number -> real / integer
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
Range of values: 0.0 <= MinNumberPercent <= 100.0 (lin)
Minimum increment: 0.01
Recommended increment: 0.1
Restriction: (0 <= MinNumberPercent) && (MinNumberPercent <= 100)

NumberOfChannels (input_control)
integer-array -> integer
Number of channels to use.
Default value: 3
Suggested values: 1, 2, 3, 4, 5, 6, 7

Radius (output_control)
real-array -> real
Cluster radii of half edge lengths.

Center (output_control)
real-array -> real
Coordinates of all cluster centers.

Quality (output_control)
real -> real
Overlap of the rejection class with the classified objects (1: no overlap).
Assertion: (0 <= Quality) && (Quality <= 1)


Result

learn_ndim1__ returns TRUE if all parameters are correct. The behaviour 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.


Possible Predecessors

min_max__, sobel_amp, gauss__, reduce_domain, diff_of_gauss__


Possible Successors

class_ndim1__, connection, dilation1, erosion1, opening, closing, count, shape_trans, skeleton


See also

class_ndim1__, learn_ndim2__, histo_2dim__


References

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



Copyright © 1996-1997 MVTec Software GmbH