rahulch

Untitled

Sep 23rd, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #ifndef VIDEOFILTERRUNNABLE_H
  2. #define VIDEOFILTERRUNNABLE_H
  3.  
  4. #include <QObject>
  5. #include <QVideoSurfaceFormat>
  6. #include <QVideoFrame>
  7. #include <QAbstractVideoFilter>
  8. #include <QVideoFilterRunnable>
  9.  
  10. #include "opencv2/videoio.hpp"
  11.  
  12. #include "peopleidentificationmainwindow.h"
  13.  
  14. class QVideoSurfaceFormat;
  15. class QVideoFrame;
  16. class QAbstractVideoFilter;
  17. class QObject;
  18.  
  19. extern PeopleIdentificationMainWindow* peopleIdentificationMainWindow;
  20.  
  21. class VideoFilterRunnable : public QVideoFilterRunnable, public QObject {
  22.     Q_OBJECT
  23.  
  24. public:
  25.  
  26.     QVideoFrame run(QVideoFrame *input, const QVideoSurfaceFormat &surfaceFormat, RunFlags flags);
  27.    
  28.     QImage imageFromVideoFrame(const QVideoFrame& buffer);
  29.  
  30. signals:
  31.     void finished(QObject *result);
  32.  
  33. private:
  34.     cv::Mat img;
  35.     cv::Mat img_BGR;
  36.  
  37. };
  38.  
  39. #endif
Add Comment
Please, Sign In to add comment