class_ndim_boxT_class_ndim_boxClassNdimBoxClassNdimBoxclass_ndim_box (算子)
名称
class_ndim_boxT_class_ndim_boxClassNdimBoxClassNdimBoxclass_ndim_box — 使用超立方体对像素进行分类。
警告
class_ndim_boxclass_ndim_boxClassNdimBoxClassNdimBoxClassNdimBoxclass_ndim_box 已过时,仅出于向后兼容性考虑而保留。
签名
描述
class_ndim_boxclass_ndim_boxClassNdimBoxClassNdimBoxClassNdimBoxclass_ndim_box classifies the pixels of the multi-channel
image given in MultiChannelImageMultiChannelImageMultiChannelImageMultiChannelImagemultiChannelImagemulti_channel_image. To do so, the
classificator ClassifHandleClassifHandleClassifHandleClassifHandleclassifHandleclassif_handle
created with create_class_boxcreate_class_boxCreateClassBoxCreateClassBoxCreateClassBoxcreate_class_box is used. The
classificator can be trained using learn_ndim_boxlearn_ndim_boxLearnNdimBoxLearnNdimBoxLearnNdimBoxlearn_ndim_box or as
described with create_class_boxcreate_class_boxCreateClassBoxCreateClassBoxCreateClassBoxcreate_class_box。More information on the
structure of the classificator can be found also under that operator.
MultiChannelImageMultiChannelImageMultiChannelImageMultiChannelImagemultiChannelImagemulti_channel_image is a multi channel image. Its
pixel values are used for the classification.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
MultiChannelImageMultiChannelImageMultiChannelImageMultiChannelImagemultiChannelImagemulti_channel_image (输入对象) (multichannel-)image(-array) → objectHImageHObjectHImageHobject (byte / direction / cyclic / int1 / int2 / int4 / real)
Multi channel input image.
RegionsRegionsRegionsRegionsregionsregions (输出对象) region-array → objectHRegionHObjectHRegionHobject *
Classification result.
ClassifHandleClassifHandleClassifHandleClassifHandleclassifHandleclassif_handle (输入控制) class_box → HClassBox, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle of the classifier.
示例(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)
示例(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);
示例(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)
示例(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)
示例(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)
复杂度
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).
结果
class_ndim_boxclass_ndim_boxClassNdimBoxClassNdimBoxClassNdimBoxclass_ndim_box 在所有参数正确时返回 2 ( H_MSG_TRUE )。 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""no_object_result", 'empty_region_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""store_empty_region" with set_systemset_systemSetSystemSetSystemSetSystemset_system。如有必要,则抛出异常。
可能的前趋
create_class_boxcreate_class_boxCreateClassBoxCreateClassBoxCreateClassBoxcreate_class_box,
learn_class_boxlearn_class_boxLearnClassBoxLearnClassBoxLearnClassBoxlearn_class_box,
median_imagemedian_imageMedianImageMedianImageMedianImagemedian_image,
compose2compose2Compose2Compose2Compose2compose2,
compose3compose3Compose3Compose3Compose3compose3,
compose4compose4Compose4Compose4Compose4compose4,
compose5compose5Compose5Compose5Compose5compose5,
compose6compose6Compose6Compose6Compose6compose6,
compose7compose7Compose7Compose7Compose7compose7
替代
class_ndim_normclass_ndim_normClassNdimNormClassNdimNormClassNdimNormclass_ndim_norm,
class_2dim_supclass_2dim_supClass2dimSupClass2dimSupClass2dimSupclass_2dim_sup,
class_2dim_unsupclass_2dim_unsupClass2dimUnsupClass2dimUnsupClass2dimUnsupclass_2dim_unsup
另见
descript_class_boxdescript_class_boxDescriptClassBoxDescriptClassBoxDescriptClassBoxdescript_class_box
模块
基础