HALCON Reference Manual 10.0.2
Table of Contents / OCR / Hyperboxes ClassesClassesClasses | | | Operators

write_ocrwrite_ocrwrite_ocrWriteOcrWriteOcr (Operator)

Name

write_ocrwrite_ocrwrite_ocrWriteOcrWriteOcr — Writing an OCR classifier into a file.

Signature

write_ocr( : : OcrHandle, FileName : )

Herror write_ocr(const Hlong OcrHandle, const char* FileName)

Herror T_write_ocr(const Htuple OcrHandle, const Htuple FileName)

Herror write_ocr(const HTuple& OcrHandle, const HTuple& FileName)

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

void HOperatorSetX.WriteOcr(
[in] VARIANT OcrHandle, [in] VARIANT FileName)

void HOCRBoxX.WriteOcr([in] BSTR FileName)

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

void HOCRBox.WriteOcr(string fileName)

Description

The operator write_ocrwrite_ocrwrite_ocrWriteOcrWriteOcr writes the OCR classifier OcrHandleOcrHandleOcrHandleOcrHandleocrHandle into the file FileNameFileNameFileNameFileNamefileName. 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_ocrread_ocrReadOcrReadOcr. The extension will be added automatically to the parameter FileNameFileNameFileNameFileNamefileName.

Attention

The output file FileNameFileNameFileNameFileNamefileName must be given without extension.

Parallelization

Parameters

OcrHandleOcrHandleOcrHandleOcrHandleocrHandle (input_control)  ocr_box HOCRBox, HTupleHOCRBox, HTupleHOCRBoxX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong)

ID of the OCR classifier.

FileNameFileNameFileNameFileNamefileName (input_control)  filename.write HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

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

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

File extension: .obc

Result

If the parameter OcrHandleOcrHandleOcrHandleOcrHandleocrHandle is valid and the indicated file can be written, the operator write_ocrwrite_ocrwrite_ocrWriteOcrWriteOcr returns the value 2 (H_MSG_TRUE). Otherwise an exception will be raised.

Possible Predecessors

traind_ocr_class_boxtraind_ocr_class_boxtraind_ocr_class_boxTraindOcrClassBoxTraindOcrClassBox, trainf_ocr_class_boxtrainf_ocr_class_boxtrainf_ocr_class_boxTrainfOcrClassBoxTrainfOcrClassBox

Possible Successors

do_ocr_multido_ocr_multido_ocr_multiDoOcrMultiDoOcrMulti, do_ocr_singledo_ocr_singledo_ocr_singleDoOcrSingleDoOcrSingle

See also

read_ocrread_ocrread_ocrReadOcrReadOcr, do_ocr_multido_ocr_multido_ocr_multiDoOcrMultiDoOcrMulti, traind_ocr_class_boxtraind_ocr_class_boxtraind_ocr_class_boxTraindOcrClassBoxTraindOcrClassBox, trainf_ocr_class_boxtrainf_ocr_class_boxtrainf_ocr_class_boxTrainfOcrClassBoxTrainfOcrClassBox

Module

OCR/OCV


Table of Contents / OCR / Hyperboxes ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH