learn_ndim_boxT_learn_ndim_boxLearnNdimBoxLearnNdimBoxlearn_ndim_box (算子)

名称

learn_ndim_boxT_learn_ndim_boxLearnNdimBoxLearnNdimBoxlearn_ndim_box — 使用多通道图像训练分类器。

警告

learn_ndim_boxlearn_ndim_boxLearnNdimBoxLearnNdimBoxLearnNdimBoxlearn_ndim_box 已过时,仅出于向后兼容性考虑而保留。

签名

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

Herror T_learn_ndim_box(const Hobject Foreground, const Hobject Background, const Hobject MultiChannelImage, const Htuple ClassifHandle)

void LearnNdimBox(const HObject& Foreground, const HObject& Background, const HObject& MultiChannelImage, const HTuple& ClassifHandle)

void HImage::LearnNdimBox(const HRegion& Foreground, const HRegion& Background, const HClassBox& ClassifHandle) const

void HRegion::LearnNdimBox(const HRegion& Background, const HImage& MultiChannelImage, const HClassBox& ClassifHandle) const

void HClassBox::LearnNdimBox(const HRegion& Foreground, const HRegion& Background, const HImage& MultiChannelImage) const

static void HOperatorSet.LearnNdimBox(HObject foreground, HObject background, HObject multiChannelImage, HTuple classifHandle)

void HImage.LearnNdimBox(HRegion foreground, HRegion background, HClassBox classifHandle)

void HRegion.LearnNdimBox(HRegion background, HImage multiChannelImage, HClassBox classifHandle)

void HClassBox.LearnNdimBox(HRegion foreground, HRegion background, HImage multiChannelImage)

def learn_ndim_box(foreground: HObject, background: HObject, multi_channel_image: HObject, classif_handle: HHandle) -> None

描述

learn_ndim_boxlearn_ndim_boxLearnNdimBoxLearnNdimBoxLearnNdimBoxlearn_ndim_box trains the classificator ClassifHandleClassifHandleClassifHandleClassifHandleclassifHandleclassif_handle with the gray values of MultiChannelImageMultiChannelImageMultiChannelImageMultiChannelImagemultiChannelImagemulti_channel_image using the points in ForegroundForegroundForegroundForegroundforegroundforeground as training sample. The points in BackgroundBackgroundBackgroundBackgroundbackgroundbackground are to be rejected by the classificator. The classificator trained thus can be used in class_ndim_boxclass_ndim_boxClassNdimBoxClassNdimBoxClassNdimBoxclass_ndim_box to segment multi-channel images. ForegroundForegroundForegroundForegroundforegroundforeground are the points that should be found, BackgroundBackgroundBackgroundBackgroundbackgroundbackground contains the points that should not be found.

Each pixel is trained once during the training process. For points in ForegroundForegroundForegroundForegroundforegroundforeground the class “0” is used, while for BackgroundBackgroundBackgroundBackgroundbackgroundbackground “1” is used. Pixels are trained by alternating points from ForegroundForegroundForegroundForegroundforegroundforeground with points from BackgroundBackgroundBackgroundBackgroundbackgroundbackground. If one region is smaller than the other, pixels are taken cyclically from the smaller region until the larger region is exhausted. learn_ndim_boxlearn_ndim_boxLearnNdimBoxLearnNdimBoxLearnNdimBoxlearn_ndim_box later accepts only points that can be classified into class “0”.

From a user's point of view the key difference between learn_ndim_normlearn_ndim_normLearnNdimNormLearnNdimNormLearnNdimNormlearn_ndim_norm and learn_ndim_boxlearn_ndim_boxLearnNdimBoxLearnNdimBoxLearnNdimBoxlearn_ndim_box is that in the latter case the rejection class affects the classification process itself. Here, a hyper plane is generated that separates ForegroundForegroundForegroundForegroundforegroundforeground and BackgroundBackgroundBackgroundBackgroundbackgroundbackground classes, so that no points in feature space are classified incorrectly. As for learn_ndim_normlearn_ndim_normLearnNdimNormLearnNdimNormLearnNdimNormlearn_ndim_norm, however, an overlap between ForegroundForegroundForegroundForegroundforegroundforeground and BackgroundBackgroundBackgroundBackgroundbackgroundbackground class is allowed. This has its effect on the return value Quality. The larger the overlap, the smaller this value.

注意

All channels must be of the same type.

执行信息

此算子修改后续输入参数的状态:

在执行此算子时,若该参数值需在多个线程间使用,则必须对其访问进行同步。

参数

ForegroundForegroundForegroundForegroundforegroundforeground (输入对象)  region(-array) objectHRegionHObjectHRegionHobject

Foreground pixels to be trained.

BackgroundBackgroundBackgroundBackgroundbackgroundbackground (输入对象)  region(-array) objectHRegionHObjectHRegionHobject

Background pixels to be trained (rejection class).

MultiChannelImageMultiChannelImageMultiChannelImageMultiChannelImagemultiChannelImagemulti_channel_image (输入对象)  (multichannel-)image(-array) objectHImageHObjectHImageHobject (byte / direction / cyclic / int1 / int2 / int4 / real)

Multi-channel training image.

ClassifHandleClassifHandleClassifHandleClassifHandleclassifHandleclassif_handle (输入控制,状态被修改)  class_box HClassBox, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the classifier.

复杂度

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

结果

learn_ndim_boxlearn_ndim_boxLearnNdimBoxLearnNdimBoxLearnNdimBoxlearn_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'"no_object_result""no_object_result""no_object_result""no_object_result""no_object_result" and 'empty_region_result'"empty_region_result""empty_region_result""empty_region_result""empty_region_result""empty_region_result" with set_systemset_systemSetSystemSetSystemSetSystemset_system。如有必要,则抛出异常。

可能的前趋

create_class_boxcreate_class_boxCreateClassBoxCreateClassBoxCreateClassBoxcreate_class_box, draw_regiondraw_regionDrawRegionDrawRegionDrawRegiondraw_region

可能的后继

class_ndim_boxclass_ndim_boxClassNdimBoxClassNdimBoxClassNdimBoxclass_ndim_box, descript_class_boxdescript_class_boxDescriptClassBoxDescriptClassBoxDescriptClassBoxdescript_class_box

替代

learn_class_boxlearn_class_boxLearnClassBoxLearnClassBoxLearnClassBoxlearn_class_box, learn_ndim_normlearn_ndim_normLearnNdimNormLearnNdimNormLearnNdimNormlearn_ndim_norm

模块

基础