ScreenTranslator/Recognizer.h

41 lines
651 B
C
Raw Normal View History

#ifndef RECOGNIZER_H
#define RECOGNIZER_H
#include <QObject>
#include "QPixmap"
2013-11-26 13:44:00 +07:00
#include "ProcessingItem.h"
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:
2013-11-26 13:44:00 +07:00
void recognized (ProcessingItem item);
2013-11-24 19:43:37 +07:00
void error (QString text);
public slots:
2013-11-26 13:44:00 +07:00
void recognize (ProcessingItem item);
2013-11-24 19:43:37 +07:00
void applySettings ();
private:
bool initEngine (tesseract::TessBaseAPI*&engine);
2013-11-24 19:43:37 +07:00
private:
tesseract::TessBaseAPI* engine_;
QString tessDataDir_;
QString ocrLanguage_;
int imageScale_;
};
#endif // RECOGNIZER_H