HALCON Reference Manual / Segmentation / Classification Operators

class_ndim_box (Operator)

Name

class_ndim_box — Classify pixels using hyper-cuboids.

Synopsis

class_ndim_box(MultiChannelImage : Regions : ClassifHandle : )

Description

class_ndim_box classifies the pixels of the multi-channel image given in MultiChannelImage. To do so, the classificator ClassifHandle created with create_class_box is used. The classificator can be trained using learn_ndim_box or as described with create_class_box. More information on the structure of the classificator can be found also under that operator.

MultiChannelImage is a multi channel image. Its pixel values are used for the classification.

Parameters

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

Regions (output_object) region-array object
Classification result.

ClassifHandle (input_control) class_box (integer)
Handle of the classifier.

Example

read_image(Bild,'meer')
disp_image(Image,WindowHandle)
set_color(WindowHandle,'green')
fwrite_string('Draw the learning region')
fnew_line()
draw_region(Reg1,WindowHandle)
reduce_domain(Image,Reg1,Foreground)
set_color(WindowHandle,'red')
fwrite_string('Draw Background')
fnew_line()
draw_region(Reg2,WindowHandle)
reduce_domain(Image,Reg2,Background)
fwrite_string('Training')
fnew_line()
create_class_box(ClassifHandle)
learn_ndim_box(Foreground,Background,Image,ClassifHandle)
fwrite_string('Classification')
fnew_line()
class_ndim_box(Image,Res,ClassifHandle)
set_draw(WindowHandle,'fill')
disp_region(Res,WindowHandle)
close_class_box(ClassifHandle)

Complexity

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

Result

class_ndim_box returns 2 (H_MSG_TRUE) if all parameters are correct. The behavior with respect to the input images and output regions can be determined by setting the values of the flags 'no_object_result', 'empty_region_result', and 'store_empty_region' with set_system. If necessary, an exception is raised.

Parallelization Information

class_ndim_box is local and processed completely exclusively without parallelization.

Possible Predecessors

create_class_box, learn_class_box, median_image, compose2, compose3, compose4, compose5, compose6, compose7

Alternatives

class_ndim_norm, class_2dim_sup, class_2dim_unsup

See also

descript_class_box

Module

Foundation


HALCON Reference Manual / Segmentation / Classification Operators
Version 9.0.2 Copyright © 1996-2010 MVTec Software GmbH