write_ocrT_write_ocrWriteOcrWriteOcrwrite_ocr (Operator)

Name

write_ocrT_write_ocrWriteOcrWriteOcrwrite_ocr — Writing an OCR classifier into a file.

Warning

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

Signature

write_ocr( : : OcrHandle, FileName : )

Herror T_write_ocr(const Htuple OcrHandle, const Htuple FileName)

void WriteOcr(const HTuple& OcrHandle, const HTuple& FileName)

void HOCRBox::WriteOcr(const HString& FileName) const

void HOCRBox::WriteOcr(const char* FileName) const

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

static void HOperatorSet.WriteOcr(HTuple ocrHandle, HTuple fileName)

void HOCRBox.WriteOcr(string fileName)

def write_ocr(ocr_handle: HHandle, file_name: str) -> None

Description

The operator write_ocrwrite_ocrWriteOcrWriteOcrWriteOcrwrite_ocr writes the OCR classifier OcrHandleOcrHandleOcrHandleOcrHandleocrHandleocr_handle into the file FileNameFileNameFileNameFileNamefileNamefile_name. Since the data of the classifier will be lost when the program is finished, they have to be stored after the training if the user wants to use them again at a later execution of the program. The data can then be read with the help of the operator read_ocrread_ocrReadOcrReadOcrReadOcrread_ocr. The extension will be added automatically to the parameter FileNameFileNameFileNameFileNamefileNamefile_name.

Attention

The output file FileNameFileNameFileNameFileNamefileNamefile_name must be given without extension.

Execution Information

Parameters

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

ID of the OCR classifier.

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

Name of the file for the OCR classifier (without extension).

Default value: 'my_ocr' "my_ocr" "my_ocr" "my_ocr" "my_ocr" "my_ocr"

File extension: .obc

Result

If the parameter OcrHandleOcrHandleOcrHandleOcrHandleocrHandleocr_handle is valid and the indicated file can be written, the operator write_ocrwrite_ocrWriteOcrWriteOcrWriteOcrwrite_ocr returns the value TRUE. Otherwise an exception will be raised.

Possible Predecessors

traind_ocr_class_boxtraind_ocr_class_boxTraindOcrClassBoxTraindOcrClassBoxTraindOcrClassBoxtraind_ocr_class_box, trainf_ocr_class_boxtrainf_ocr_class_boxTrainfOcrClassBoxTrainfOcrClassBoxTrainfOcrClassBoxtrainf_ocr_class_box

Possible Successors

do_ocr_multido_ocr_multiDoOcrMultiDoOcrMultiDoOcrMultido_ocr_multi, do_ocr_singledo_ocr_singleDoOcrSingleDoOcrSingleDoOcrSingledo_ocr_single

See also

read_ocrread_ocrReadOcrReadOcrReadOcrread_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

Module

OCR/OCV