#ifndef CAPTURETHREAD_H
#define CAPTURETHREAD_H

#include <QThread>

#include <opencv2/opencv.hpp>
#include <opencv2/highgui.hpp>

class QPainter;

class CaptureThread : public QThread
{
        Q_OBJECT
    public:
        explicit CaptureThread(QObject *parent = 0);

        QImage *MatToQImage(const cv::Mat *matImage);
        void stopThread();
        void startThread();

    protected:
        void run();

    private:
        bool stopWork;

        QImage *disQImg;
        QImage *roiBiggerImg;

};

#endif // CAPTURETHREAD_H
