ScreenTranslator/Recognizer.h

40 lines
581 B
C
Raw Normal View History

#ifndef RECOGNIZER_H
#define RECOGNIZER_H
#include <QObject>
#include "QPixmap"
2013-11-24 19:43:37 +07:00
namespace tesseract
{
class TessBaseAPI;
}
class Recognizer : public QObject
{
Q_OBJECT
public:
explicit Recognizer(QObject *parent = 0);
signals:
void recognized (QString text);
2013-11-24 19:43:37 +07:00
void error (QString text);
public slots:
void recognize (QPixmap pixmap);
2013-11-24 19:43:37 +07:00
void applySettings ();
private:
bool initEngine ();
private:
tesseract::TessBaseAPI* engine_;
QString tessDataDir_;
QString ocrLanguage_;
int imageScale_;
};
#endif // RECOGNIZER_H