ScreenTranslator/Recognizer.h
Gres 6e85bfd7eb Allow select ocr language in SelectionDialog.
Support this in Recognizer and Translator.
2014-04-04 18:40:37 +04:00

41 lines
651 B
C++

#ifndef RECOGNIZER_H
#define RECOGNIZER_H
#include <QObject>
#include "QPixmap"
#include "ProcessingItem.h"
namespace tesseract
{
class TessBaseAPI;
}
class Recognizer : public QObject
{
Q_OBJECT
public:
explicit Recognizer(QObject *parent = 0);
signals:
void recognized (ProcessingItem item);
void error (QString text);
public slots:
void recognize (ProcessingItem item);
void applySettings ();
private:
bool initEngine (tesseract::TessBaseAPI*&engine);
private:
tesseract::TessBaseAPI* engine_;
QString tessDataDir_;
QString ocrLanguage_;
int imageScale_;
};
#endif // RECOGNIZER_H