reduce_ocr_class_svmT_reduce_ocr_class_svmReduceOcrClassSvmReduceOcrClassSvmreduce_ocr_class_svm (算子)
名称
reduce_ocr_class_svmT_reduce_ocr_class_svmReduceOcrClassSvmReduceOcrClassSvmreduce_ocr_class_svm — 通过简化的 SVM 对训练好的基于 SVM 的 OCR 分类器进行近似。
签名
void ReduceOcrClassSvm(const HTuple& OCRHandle, const HTuple& Method, const HTuple& MinRemainingSV, const HTuple& MaxError, HTuple* OCRHandleReduced)
HOCRSvm HOCRSvm::ReduceOcrClassSvm(const HString& Method, Hlong MinRemainingSV, double MaxError) const
HOCRSvm HOCRSvm::ReduceOcrClassSvm(const char* Method, Hlong MinRemainingSV, double MaxError) const
HOCRSvm HOCRSvm::ReduceOcrClassSvm(const wchar_t* Method, Hlong MinRemainingSV, double MaxError) const
(
Windows only)
描述
reduce_ocr_class_svmreduce_ocr_class_svmReduceOcrClassSvmReduceOcrClassSvmReduceOcrClassSvmreduce_ocr_class_svm reduces the classification time of an
SVM based OCR classifier OCRHandleOCRHandleOCRHandleOCRHandleOCRHandleocrhandle by returning a reduced
copy of it in OCRHandleReducedOCRHandleReducedOCRHandleReducedOCRHandleReducedOCRHandleReducedocrhandle_reduced. The parameters
MethodMethodMethodMethodmethodmethod, MinRemainingSVMinRemainingSVMinRemainingSVMinRemainingSVminRemainingSVmin_remaining_sv and MaxErrorMaxErrorMaxErrorMaxErrormaxErrormax_error have
the same meaning as in reduce_class_svmreduce_class_svmReduceClassSvmReduceClassSvmReduceClassSvmreduce_class_svm and are described
there. Please note that classification time can also be
significantly reduced with a preprocessing step in
create_ocr_class_svmcreate_ocr_class_svmCreateOcrClassSvmCreateOcrClassSvmCreateOcrClassSvmcreate_ocr_class_svm, which possibly introduces less
errors.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
OCRHandleOCRHandleOCRHandleOCRHandleOCRHandleocrhandle (输入控制) ocr_svm → HOCRSvm, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Original handle of SVM-based OCR-classifier.
MethodMethodMethodMethodmethodmethod (输入控制) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Type of postprocessing to reduce number of SVs.
默认值:
'bottom_up'
"bottom_up"
"bottom_up"
"bottom_up"
"bottom_up"
"bottom_up"
值列表:
'bottom_up'"bottom_up""bottom_up""bottom_up""bottom_up""bottom_up"
MinRemainingSVMinRemainingSVMinRemainingSVMinRemainingSVminRemainingSVmin_remaining_sv (输入控制) integer → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Minimum number of remaining SVs.
默认值:
2
建议值:
2, 3, 4, 5, 7, 10, 15, 20, 30, 50
限制:
MinRemainingSV >= 2
MaxErrorMaxErrorMaxErrorMaxErrormaxErrormax_error (输入控制) real → HTuplefloatHTupleHtuple (real) (double) (double) (double)
Maximum allowed error of reduction.
默认值:
0.001
建议值:
0.0001, 0.0002, 0.0005, 0.001, 0.002, 0.005, 0.01, 0.02, 0.05
限制:
MaxError > 0.0
OCRHandleReducedOCRHandleReducedOCRHandleReducedOCRHandleReducedOCRHandleReducedocrhandle_reduced (输出控制) ocr_svm → HOCRSvm, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
SVMHandle of reduced OCR classifier.
结果
如果参数有效,算子 reduce_ocr_class_svmreduce_ocr_class_svmReduceOcrClassSvmReduceOcrClassSvmReduceOcrClassSvmreduce_ocr_class_svm 返回值 2 ( H_MSG_TRUE )。如有必要,则抛出异常。
可能的前趋
trainf_ocr_class_svmtrainf_ocr_class_svmTrainfOcrClassSvmTrainfOcrClassSvmTrainfOcrClassSvmtrainf_ocr_class_svm,
get_support_vector_num_ocr_class_svmget_support_vector_num_ocr_class_svmGetSupportVectorNumOcrClassSvmGetSupportVectorNumOcrClassSvmGetSupportVectorNumOcrClassSvmget_support_vector_num_ocr_class_svm
可能的后继
do_ocr_single_class_svmdo_ocr_single_class_svmDoOcrSingleClassSvmDoOcrSingleClassSvmDoOcrSingleClassSvmdo_ocr_single_class_svm,
do_ocr_multi_class_svmdo_ocr_multi_class_svmDoOcrMultiClassSvmDoOcrMultiClassSvmDoOcrMultiClassSvmdo_ocr_multi_class_svm,
get_support_vector_ocr_class_svmget_support_vector_ocr_class_svmGetSupportVectorOcrClassSvmGetSupportVectorOcrClassSvmGetSupportVectorOcrClassSvmget_support_vector_ocr_class_svm,
get_support_vector_num_ocr_class_svmget_support_vector_num_ocr_class_svmGetSupportVectorNumOcrClassSvmGetSupportVectorNumOcrClassSvmGetSupportVectorNumOcrClassSvmget_support_vector_num_ocr_class_svm
另见
create_ocr_class_svmcreate_ocr_class_svmCreateOcrClassSvmCreateOcrClassSvmCreateOcrClassSvmcreate_ocr_class_svm
参考文献
Bernhard Schölkopf, Alexander J.Smola: “Learning with Kernels”;
The MIT Press, London; 1999.
模块
光学字符识别/光学字符验证