ocr_change_charT_ocr_change_charOcrChangeCharOcrChangeCharocr_change_char (算子名称)

名称

ocr_change_charT_ocr_change_charOcrChangeCharOcrChangeCharocr_change_char — Define a new conversion table for the characters.

警告

ocr_change_charocr_change_charOcrChangeCharOcrChangeCharOcrChangeCharocr_change_char is obsolete and is only provided for reasons of backward compatibility. New applications should use the MLP, SVM or CNN based operators instead.

参数签名

ocr_change_char( : : OcrHandle, Character : )

Herror T_ocr_change_char(const Htuple OcrHandle, const Htuple Character)

void OcrChangeChar(const HTuple& OcrHandle, const HTuple& Character)

void HOCRBox::OcrChangeChar(const HTuple& Character) const

static void HOperatorSet.OcrChangeChar(HTuple ocrHandle, HTuple character)

void HOCRBox.OcrChangeChar(HTuple character)

def ocr_change_char(ocr_handle: HHandle, character: Sequence[str]) -> None

描述

该算子 ocr_change_charocr_change_charOcrChangeCharOcrChangeCharOcrChangeCharocr_change_char establishes a new look-up table for the characters. Hereby the number of strings of CharacterCharacterCharacterCharactercharactercharacter must be the same as of the classifier OcrHandleOcrHandleOcrHandleOcrHandleocrHandleocr_handle. In order to enlarge the font, 该算子 ocr_change_charocr_change_charOcrChangeCharOcrChangeCharOcrChangeCharocr_change_char may be used as follows: More characters than actually needed will be indicated when creating a network using (create_ocr_class_boxcreate_ocr_class_boxCreateOcrClassBoxCreateOcrClassBoxCreateOcrClassBoxcreate_ocr_class_box). The last n characters will not be used so far. If more characters are needed at a later stage, these unused characters will be allocated and then trained with the help of the operator ocr_change_charocr_change_charOcrChangeCharOcrChangeCharOcrChangeCharocr_change_char.

运行信息

This operator modifies the state of the following input parameter:

During execution of this operator, access to the value of this parameter must be synchronized if it is used across multiple threads.

参数表

OcrHandleOcrHandleOcrHandleOcrHandleocrHandleocr_handle (input_control, state is modified)  ocr_box HOCRBox, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

ID of the OCR-network to be changed.

CharacterCharacterCharacterCharactercharactercharacter (input_control)  string-array HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)

New assign of characters.

Default: ['a','b','c'] ["a","b","c"] ["a","b","c"] ["a","b","c"] ["a","b","c"] ["a","b","c"]

例程 (C)

HTuple  Character1, Character2, OcrHandle;
create_tuple(&Character1,26);
set_s(Character1,"a",0);
set_s(Character1,"b",1);
/* set parameter values */
T_create_ocr_net(WidthPattern,HeightPattern,Interpolation,
                 Features,HiddenLayer,Init,Character1,&OcrHandle);
/* later... */
create_tuple(&Character2,26);
set_s(Character2,"alpha",0);
set_s(Character2,"beta",1);
T_ocr_change_char(OcrHandle,Character2);

结果

If the number of characters in CharacterCharacterCharacterCharactercharactercharacter is identical with the number of the characters of the network, 该算子 ocr_change_charocr_change_charOcrChangeCharOcrChangeCharOcrChangeCharocr_change_char 返回值 2 ( H_MSG_TRUE) . Otherwise an exception will be raised.

可能的前置算子

read_ocrread_ocrReadOcrReadOcrReadOcrread_ocr

可能的后置算子

do_ocr_multi_class_mlpdo_ocr_multi_class_mlpDoOcrMultiClassMlpDoOcrMultiClassMlpDoOcrMultiClassMlpdo_ocr_multi_class_mlp, do_ocr_single_class_mlpdo_ocr_single_class_mlpDoOcrSingleClassMlpDoOcrSingleClassMlpDoOcrSingleClassMlpdo_ocr_single_class_mlp

模块

OCR/OCV