ScreenTranslator/ImageProcessing.h
Gres 37d8d3afcd Use Leptonica for image proprocessing.
Convert image to grayscale to reduce size.
Limit scaled image max size.
2014-03-30 18:40:18 +04:00

19 lines
426 B
C++

#ifndef IMAGEPROCESSING_H
#define IMAGEPROCESSING_H
#include <QImage>
class Pix;
//! Convert QImage to Leptonica's PIX.
Pix* convertImage(const QImage& image);
//! Convert Leptonica's PIX to QImage.
QImage convertImage(Pix &image);
//! Propare image for OCR.
Pix* prepareImage (const QImage& image, int preferredScale);
//! Free allocated resources for image.
void cleanupImage (Pix** image);
#endif // IMAGEPROCESSING_H