Herror ::trainf_ocr_class_box (
    const HTuple &OcrHandle,
    const HTuple &FileName,
    double *AvgConfidence
)

Training of an OCR classifier with the help of a training file.

The operator ::trainf_ocr_class_box trains the classifier OcrHandle via the indicated training files. Any number of files can be indicated. The parameter AvgConfidence provides information about the success of the training: It contains the average confidence of the trained characters measured by a re-classification. The confidence of mismatched characters is set to 0 (thus, the average confidence will be decreased significantly).


Attention

The names of the characters in the file must fit the network.


Parameters

OcrHandle (input_control)
ocr -> HTuple.long
ID of the desired OCR-network.

FileName (input_control)
filename(-array) -> HTuple.char *
Name(s) of the training file(s).
Default value: ''train_ocr''

AvgConfidence (output_control)
real -> double *
Average confidence during a re-classification of the trained characters.


Example
HTuple  FileName, OcrHandle, AvgConfidence;
T_create_ocr_class_box(WidthPattern,HeightPattern,Interpolation,
                    Features,\Character,&OcrHandle);
create_tuple(&FileName,2);
set_s(FileName,"data1",0);
set_s(FileName,"data2",1);
T_trainf_ocr_class_box(OcrHandle,FileName,&AvgConfidence);

Result

If the file name is correct and the data fit the network, the operator ::trainf_ocr_class_box returns the value H_MSG_TRUE. Otherwise an exception will be raised.


Possible Predecessors

::create_ocr_class_box, ::read_ocr


Possible Successors

::traind_ocr_class_box, ::write_ocr, ::do_ocr_multi, ::do_ocr_single


Alternatives

::traind_ocr_class_box


Module

Optical character recognition



Copyright © 1996-2002 MVTec Software GmbH