read_ocrT_read_ocrReadOcrReadOcrread_ocr (算子名称)

名称

read_ocrT_read_ocrReadOcrReadOcrread_ocr — Read an OCR classifier from a file.

警告

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

参数签名

read_ocr( : : FileName : OcrHandle)

Herror T_read_ocr(const Htuple FileName, Htuple* OcrHandle)

void ReadOcr(const HTuple& FileName, HTuple* OcrHandle)

void HOCRBox::HOCRBox(const HString& FileName)

void HOCRBox::HOCRBox(const char* FileName)

void HOCRBox::HOCRBox(const wchar_t* FileName)   ( Windows only)

void HOCRBox::ReadOcr(const HString& FileName)

void HOCRBox::ReadOcr(const char* FileName)

void HOCRBox::ReadOcr(const wchar_t* FileName)   ( Windows only)

static void HOperatorSet.ReadOcr(HTuple fileName, out HTuple ocrHandle)

public HOCRBox(string fileName)

void HOCRBox.ReadOcr(string fileName)

def read_ocr(file_name: str) -> HHandle

描述

该算子 read_ocrread_ocrReadOcrReadOcrReadOcrread_ocr reads an OCR classifier from a file FileNameFileNameFileNameFileNamefileNamefile_name. This file will hereby be searched in the directory ($HALCONROOT/ocr/) as well as in the currently used directory. If too many classifiers have been loaded, an error message will be displayed.

运行信息

This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.

参数表

FileNameFileNameFileNameFileNamefileNamefile_name (input_control)  filename.read HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Name of the OCR classifier file.

Default: 'testnet' "testnet" "testnet" "testnet" "testnet" "testnet"

File extension: .obc, .fnt

OcrHandleOcrHandleOcrHandleOcrHandleocrHandleocr_handle (output_control)  ocr_box HOCRBox, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

ID of the read OCR classifier.

结果

If the indicated file is available and the format is correct, 该算子 read_ocrread_ocrReadOcrReadOcrReadOcrread_ocr 返回值 2 ( H_MSG_TRUE) . Otherwise an exception will be raised.

可能的前置算子

reset_obj_dbreset_obj_dbResetObjDbResetObjDbResetObjDbreset_obj_db

可能的后置算子

do_ocr_multido_ocr_multiDoOcrMultiDoOcrMultiDoOcrMultido_ocr_multi, do_ocr_singledo_ocr_singleDoOcrSingleDoOcrSingleDoOcrSingledo_ocr_single, traind_ocr_class_boxtraind_ocr_class_boxTraindOcrClassBoxTraindOcrClassBoxTraindOcrClassBoxtraind_ocr_class_box, trainf_ocr_class_boxtrainf_ocr_class_boxTrainfOcrClassBoxTrainfOcrClassBoxTrainfOcrClassBoxtrainf_ocr_class_box

参考其它

write_ocrwrite_ocrWriteOcrWriteOcrWriteOcrwrite_ocr, do_ocr_multido_ocr_multiDoOcrMultiDoOcrMultiDoOcrMultido_ocr_multi, traind_ocr_class_boxtraind_ocr_class_boxTraindOcrClassBoxTraindOcrClassBoxTraindOcrClassBoxtraind_ocr_class_box, trainf_ocr_class_boxtrainf_ocr_class_boxTrainfOcrClassBoxTrainfOcrClassBoxTrainfOcrClassBoxtrainf_ocr_class_box

模块

OCR/OCV