OpenCV  3.4.8
Open Source Computer Vision
Public Member Functions | List of all members
cv::text::OCRHMMDecoder::ClassifierCallback Class Reference

Callback with the character classifier is made a class. More...

#include <opencv2/text/ocr.hpp>

Public Member Functions

virtual ~ClassifierCallback ()
 
virtual void eval (InputArray image, std::vector< int > &out_class, std::vector< double > &out_confidence)
 The character classifier must return a (ranked list of) class(es) id('s) More...
 

Detailed Description

Callback with the character classifier is made a class.

This way it hides the feature extractor and the classifier itself, so developers can write their own OCR code.

The default character classifier and feature extractor can be loaded using the utility function loadOCRHMMClassifierNM and KNN model provided in https://github.com/opencv/opencv_contrib/blob/master/modules/text/samples/OCRHMM_knn_model_data.xml.gz.

Constructor & Destructor Documentation

§ ~ClassifierCallback()

virtual cv::text::OCRHMMDecoder::ClassifierCallback::~ClassifierCallback ( )
inlinevirtual

Member Function Documentation

§ eval()

virtual void cv::text::OCRHMMDecoder::ClassifierCallback::eval ( InputArray  image,
std::vector< int > &  out_class,
std::vector< double > &  out_confidence 
)
virtual

The character classifier must return a (ranked list of) class(es) id('s)

Parameters
imageInput image CV_8UC1 or CV_8UC3 with a single letter.
out_classThe classifier returns the character class categorical label, or list of class labels, to which the input image corresponds.
out_confidenceThe classifier returns the probability of the input image corresponding to each classes in out_class.

The documentation for this class was generated from the following file: