ClassesClasses | | Operators

class_ndim_boxT_class_ndim_boxClassNdimBoxClassNdimBox (Operator)

Name

class_ndim_boxT_class_ndim_boxClassNdimBoxClassNdimBox — Classify pixels using hyper-cuboids.

Warning

class_ndim_boxclass_ndim_boxClassNdimBoxClassNdimBoxClassNdimBox is obsolete and is only provided for reasons of backward compatibility.

Signature

class_ndim_box(MultiChannelImage : Regions : ClassifHandle : )

Herror T_class_ndim_box(const Hobject MultiChannelImage, Hobject* Regions, const Htuple ClassifHandle)

void ClassNdimBox(const HObject& MultiChannelImage, HObject* Regions, const HTuple& ClassifHandle)

HRegion HImage::ClassNdimBox(const HClassBox& ClassifHandle) const

HRegion HClassBox::ClassNdimBox(const HImage& MultiChannelImage) const

static void HOperatorSet.ClassNdimBox(HObject multiChannelImage, out HObject regions, HTuple classifHandle)

HRegion HImage.ClassNdimBox(HClassBox classifHandle)

HRegion HClassBox.ClassNdimBox(HImage multiChannelImage)

Description

class_ndim_boxclass_ndim_boxClassNdimBoxClassNdimBoxClassNdimBox classifies the pixels of the multi-channel image given in MultiChannelImageMultiChannelImageMultiChannelImageMultiChannelImagemultiChannelImage. To do so, the classificator ClassifHandleClassifHandleClassifHandleClassifHandleclassifHandle created with create_class_boxcreate_class_boxCreateClassBoxCreateClassBoxCreateClassBox is used. The classificator can be trained using learn_ndim_boxlearn_ndim_boxLearnNdimBoxLearnNdimBoxLearnNdimBox or as described with create_class_boxcreate_class_boxCreateClassBoxCreateClassBoxCreateClassBox. More information on the structure of the classificator can be found also under that operator.

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

Execution Information

Parameters

MultiChannelImageMultiChannelImageMultiChannelImageMultiChannelImagemultiChannelImage (input_object)  (multichannel-)image(-array) objectHImageHImageHobject (byte / direction / cyclic / int1 / int2 / int4 / real)

Multi channel input image.

RegionsRegionsRegionsRegionsregions (output_object)  region-array objectHRegionHRegionHobject *

Classification result.

ClassifHandleClassifHandleClassifHandleClassifHandleclassifHandle (input_control)  class_box HClassBox, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the classifier.

Example (HDevelop)

read_image(Image,'montery')
dev_display(Image)
dev_set_color('green')
disp_message (WindowHandle, 'Draw learning region  ',\
              'window', 12, 12, 'black', 'true')
draw_region(Reg1,WindowHandle)
reduce_domain(Image,Reg1,Foreground)
dev_set_color('red')
disp_message (WindowHandle, 'Draw background region',\
              'window', 12, 12, 'black', 'true')
draw_region(Reg2,WindowHandle)
reduce_domain(Image,Reg2,Background)
disp_message (WindowHandle, 'Training...           ',\
              'window', 12, 12, 'black', 'true')
create_class_box(ClassifHandle)
learn_ndim_box(Foreground,Background,Image,ClassifHandle)
disp_message (WindowHandle, 'Classification        ',\
              'window', 12, 12, 'black', 'true')
class_ndim_box(Image,Res,ClassifHandle)
dev_set_draw('fill')
dev_display (Res)
close_class_box(ClassifHandle)

Example (C)

read_image(&Image,"montery");
disp_image(Image,WindowHandle);
set_color(WindowHandle,"green");
fwrite_string(FileHandle,"Draw the foreground");
fnew_line(FileHandle);
draw_region(&Reg1,WindowHandle);
reduce_domain(Image,Reg1,&Foreground);
set_color(WindowHandle,"red");
fwrite_string(FileHandle,"Draw background");
fnew_line(FileHandle);
draw_region(&Reg2,WindowHandle);
reduce_domain(Image,Reg2,&Background);
fwrite_string(FileHandle,"Start to learn");
fnew_line(FileHandle);
create_class_box(&ClassifHandle);
learn_ndim_box(Foreground,Background,Image,ClassifHandle);
fwrite_string(FileHandle,"Start classification");
fnew_line(FileHandle);
class_ndim_box(Image,&Res,ClassifHandle);
set_draw(WindowHandle,"fill");
disp_region(Res,WindowHandle);
close_class_box(ClassifHandle);

Example (HDevelop)

read_image(Image,'montery')
dev_display(Image)
dev_set_color('green')
disp_message (WindowHandle, 'Draw learning region  ',\
              'window', 12, 12, 'black', 'true')
draw_region(Reg1,WindowHandle)
reduce_domain(Image,Reg1,Foreground)
dev_set_color('red')
disp_message (WindowHandle, 'Draw background region',\
              'window', 12, 12, 'black', 'true')
draw_region(Reg2,WindowHandle)
reduce_domain(Image,Reg2,Background)
disp_message (WindowHandle, 'Training...           ',\
              'window', 12, 12, 'black', 'true')
create_class_box(ClassifHandle)
learn_ndim_box(Foreground,Background,Image,ClassifHandle)
disp_message (WindowHandle, 'Classification        ',\
              'window', 12, 12, 'black', 'true')
class_ndim_box(Image,Res,ClassifHandle)
dev_set_draw('fill')
dev_display (Res)
close_class_box(ClassifHandle)

Example (HDevelop)

read_image(Image,'montery')
dev_display(Image)
dev_set_color('green')
disp_message (WindowHandle, 'Draw learning region  ',\
              'window', 12, 12, 'black', 'true')
draw_region(Reg1,WindowHandle)
reduce_domain(Image,Reg1,Foreground)
dev_set_color('red')
disp_message (WindowHandle, 'Draw background region',\
              'window', 12, 12, 'black', 'true')
draw_region(Reg2,WindowHandle)
reduce_domain(Image,Reg2,Background)
disp_message (WindowHandle, 'Training...           ',\
              'window', 12, 12, 'black', 'true')
create_class_box(ClassifHandle)
learn_ndim_box(Foreground,Background,Image,ClassifHandle)
disp_message (WindowHandle, 'Classification        ',\
              'window', 12, 12, 'black', 'true')
class_ndim_box(Image,Res,ClassifHandle)
dev_set_draw('fill')
dev_display (Res)
close_class_box(ClassifHandle)

Example (HDevelop)

read_image(Image,'montery')
dev_display(Image)
dev_set_color('green')
disp_message (WindowHandle, 'Draw learning region  ',\
              'window', 12, 12, 'black', 'true')
draw_region(Reg1,WindowHandle)
reduce_domain(Image,Reg1,Foreground)
dev_set_color('red')
disp_message (WindowHandle, 'Draw background region',\
              'window', 12, 12, 'black', 'true')
draw_region(Reg2,WindowHandle)
reduce_domain(Image,Reg2,Background)
disp_message (WindowHandle, 'Training...           ',\
              'window', 12, 12, 'black', 'true')
create_class_box(ClassifHandle)
learn_ndim_box(Foreground,Background,Image,ClassifHandle)
disp_message (WindowHandle, 'Classification        ',\
              'window', 12, 12, 'black', 'true')
class_ndim_box(Image,Res,ClassifHandle)
dev_set_draw('fill')
dev_display (Res)
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_boxclass_ndim_boxClassNdimBoxClassNdimBoxClassNdimBox 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'"no_object_result""no_object_result""no_object_result""no_object_result", 'empty_region_result'"empty_region_result""empty_region_result""empty_region_result""empty_region_result", and 'store_empty_region'"store_empty_region""store_empty_region""store_empty_region""store_empty_region" with set_systemset_systemSetSystemSetSystemSetSystem. If necessary, an exception is raised.

Possible Predecessors

create_class_boxcreate_class_boxCreateClassBoxCreateClassBoxCreateClassBox, learn_class_boxlearn_class_boxLearnClassBoxLearnClassBoxLearnClassBox, median_imagemedian_imageMedianImageMedianImageMedianImage, compose2compose2Compose2Compose2Compose2, compose3compose3Compose3Compose3Compose3, compose4compose4Compose4Compose4Compose4, compose5compose5Compose5Compose5Compose5, compose6compose6Compose6Compose6Compose6, compose7compose7Compose7Compose7Compose7

Alternatives

class_ndim_normclass_ndim_normClassNdimNormClassNdimNormClassNdimNorm, class_2dim_supclass_2dim_supClass2dimSupClass2dimSupClass2dimSup, class_2dim_unsupclass_2dim_unsupClass2dimUnsupClass2dimUnsupClass2dimUnsup

See also

descript_class_boxdescript_class_boxDescriptClassBoxDescriptClassBoxDescriptClassBox

Module

Foundation


ClassesClasses | | Operators