learn_ndim_box ( Foreground, Background, MultiChannelImage : : ClassifHandle : )

Train the current classificator using a multi-channel image.

learn_ndim_box trains the classificator ClassifHandle with the gray values of MultiChannelImage using the points in Foreground as training sample. The points in Background are to be rejected by the classificator. The classificator trained thus can be used in class_ndim_box to segment multi-channel images. Foreground are the points that have to be found, Background contains the points which shall not be found.

Each pixel is trained once during the training process. For points in Foreground the class ``0'' is used, while for Background ``1'' is used. Pixels are trained by alternating points from Foreground with points from Background. If one region is smaller than the other, pixels are taken cyclically from the smaller region until the larger region is exhausted. learn_ndim_box later accepts only points which can be classified into class ``0''.

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.


Attention

All channels must be of the same type and have the same size.


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).

MultiChannelImage (input_object)
multichannel-image(-array) -> object : byte / direction / cyclic / int1 / int2 / int4 / real
Multi-channel training image.

ClassifHandle (input_control)
class_box -> integer
Classificator's handle number.


Complexity

Let N be the number of generated hyper-cuboids and F be the area of the input region. Then the runtime complexity is O(N * F).


Result

class_ndim_box returns 2 (H_MSG_TRUE) if all parameters are correct and there is an active classificator. 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.


Parallelization Information

learn_ndim_box is local and processed completely exclusively without parallelization.


Possible Predecessors

create_class_box, draw_region


Possible Successors

class_ndim_box, descript_class_box


Alternatives

learn_class_box


Module

Region processing



Copyright © 1996-2005 MVTec Software GmbH