ClassesClasses | | Operators

close_ocrclose_ocrCloseOcrCloseOcr (Operator)

Name

close_ocrclose_ocrCloseOcrCloseOcr — Deallocation of the memory of an OCR classifier.

Warning

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

Signature

close_ocr( : : OcrHandle : )

Herror close_ocr(const Hlong OcrHandle)

Herror T_close_ocr(const Htuple OcrHandle)

void CloseOcr(const HTuple& OcrHandle)

static void HOperatorSet.CloseOcr(HTuple ocrHandle)

Description

The operator close_ocrclose_ocrCloseOcrCloseOcrCloseOcr deallocates the memory of the classifier having the number OcrHandleOcrHandleOcrHandleOcrHandleocrHandle. Hereby all corresponding data will be deleted. However, if necessary, they can be saved in advance using the operator write_ocrwrite_ocrWriteOcrWriteOcrWriteOcr. The number OcrHandleOcrHandleOcrHandleOcrHandleocrHandle will be invalid after the call; but later the system can use it again for new classifiers.

Attention

All data of the classifier will be deleted in main memory (not on the hard disk).

Execution Information

This operator modifies the state of the following input parameter:

The value of this parameter may not be shared across multiple threads without external synchronization.

Parameters

OcrHandleOcrHandleOcrHandleOcrHandleocrHandle (input_control, state is modified)  ocr_box HOCRBox, HTupleHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

ID of the OCR classifier to be deleted.

Example (C)

HTuple      OcrHandle,Class,Confidence;
Hlong        orc_handle;

read_ocr("testnet",&orc_handle);
/* image processing */
create_tuple(&OcrHandle,1);
set_i(OcrHandle,orc_handle,0);
T_do_ocr_multi(Character,Image,OcrHandle,&Class,&Confidence);
close_ocr(orc_handle);

Result

If the parameter OcrHandleOcrHandleOcrHandleOcrHandleocrHandle is valid, the operator close_ocrclose_ocrCloseOcrCloseOcrCloseOcr returns the value 2 (H_MSG_TRUE). Otherwise an exception will be raised.

Possible Predecessors

write_ocr_trainfwrite_ocr_trainfWriteOcrTrainfWriteOcrTrainfWriteOcrTrainf

Possible Successors

read_ocrread_ocrReadOcrReadOcrReadOcr

Module

OCR/OCV


ClassesClasses | | Operators