get_support_vector_ocr_class_svmT_get_support_vector_ocr_class_svmGetSupportVectorOcrClassSvmGetSupportVectorOcrClassSvm (Operator)
Name
get_support_vector_ocr_class_svmT_get_support_vector_ocr_class_svmGetSupportVectorOcrClassSvmGetSupportVectorOcrClassSvm
— Return the index of a support vector from a trained OCR classifier that is
based on support vector machines.
Signature
Description
The operator get_support_vector_ocr_class_svmget_support_vector_ocr_class_svmGetSupportVectorOcrClassSvmGetSupportVectorOcrClassSvmGetSupportVectorOcrClassSvm
maps support
vectors of a trained SVM-based OCR classifier (given in
OCRHandleOCRHandleOCRHandleOCRHandleOCRHandle
) to the original training data set. The index of
the SV is specified with IndexSupportVectorIndexSupportVectorIndexSupportVectorIndexSupportVectorindexSupportVector
. The index is
counted from 0, i.e., IndexSupportVectorIndexSupportVectorIndexSupportVectorIndexSupportVectorindexSupportVector
must be a number
between 0 and IndexSupportVectors
- 1, where
IndexSupportVectors
can be determined with
get_support_vector_num_ocr_class_svmget_support_vector_num_ocr_class_svmGetSupportVectorNumOcrClassSvmGetSupportVectorNumOcrClassSvmGetSupportVectorNumOcrClassSvm
. The index of this SV
in the training data is returned in IndexIndexIndexIndexindex
.
get_support_vector_ocr_class_svmget_support_vector_ocr_class_svmGetSupportVectorOcrClassSvmGetSupportVectorOcrClassSvmGetSupportVectorOcrClassSvm
can, for example, be used
to visualize the support vectors. To do so, the train file that has
been used to train the SVM must be read with
read_ocr_trainfread_ocr_trainfReadOcrTrainfReadOcrTrainfReadOcrTrainf
. The value returned in IndexIndexIndexIndexindex
must
be incremented by 1 and can then be used to select the
support vectors with select_objselect_objSelectObjSelectObjSelectObj
from the training
characters. If more than one train file has been used in
trainf_ocr_class_svmtrainf_ocr_class_svmTrainfOcrClassSvmTrainfOcrClassSvmTrainfOcrClassSvm
IndexIndexIndexIndexindex
behaves as if all train
files had been merged into one train file with
concat_ocr_trainfconcat_ocr_trainfConcatOcrTrainfConcatOcrTrainfConcatOcrTrainf
.
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
OCRHandleOCRHandleOCRHandleOCRHandleOCRHandle
(input_control) ocr_svm →
HOCRSvm, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
OCR handle.
IndexSupportVectorIndexSupportVectorIndexSupportVectorIndexSupportVectorindexSupportVector
(input_control) integer-array →
HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Number of stored support vectors.
IndexIndexIndexIndexindex
(output_control) real →
HTupleHTupleHtuple (real) (double) (double) (double)
Index of the support vector in the training set.
Result
If the parameters are valid the operator
get_support_vector_ocr_class_svmget_support_vector_ocr_class_svmGetSupportVectorOcrClassSvmGetSupportVectorOcrClassSvmGetSupportVectorOcrClassSvm
returns the value 2 (H_MSG_TRUE). If
necessary, an exception is raised.
Possible Predecessors
trainf_ocr_class_svmtrainf_ocr_class_svmTrainfOcrClassSvmTrainfOcrClassSvmTrainfOcrClassSvm
,
get_support_vector_num_ocr_class_svmget_support_vector_num_ocr_class_svmGetSupportVectorNumOcrClassSvmGetSupportVectorNumOcrClassSvmGetSupportVectorNumOcrClassSvm
See also
create_ocr_class_svmcreate_ocr_class_svmCreateOcrClassSvmCreateOcrClassSvmCreateOcrClassSvm
,
read_ocr_trainfread_ocr_trainfReadOcrTrainfReadOcrTrainfReadOcrTrainf
,
append_ocr_trainfappend_ocr_trainfAppendOcrTrainfAppendOcrTrainfAppendOcrTrainf
,
concat_ocr_trainfconcat_ocr_trainfConcatOcrTrainfConcatOcrTrainfConcatOcrTrainf
Module
OCR/OCV