Herror ::close_ocr (
    const HTuple &OcrHandle
)

Deallocation of the memory of an OCR classifier.

The operator ::close_ocr deallocates the memory of the classifier having the number OcrHandle. Hereby all corresponding data will be deleted. However, if necessary, they can be saved in advance using the operator ::write_ocr. The number OcrHandle 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).


Parameters

OcrHandle (input_control)
ocr -> HTuple.long
ID of the OCR classifier to be deleted.


Example
HTuple      OcrHandle,Class,Confidence;
long        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 OcrHandle is valid, the operator ::close_ocr returns the value H_MSG_TRUE. Otherwise an exception will be raised.


Possible Predecessors

::write_ocr_trainf


Possible Successors

::read_ocr


Module

Optical character recognition



Copyright © 1996-2002 MVTec Software GmbH