iVS3D v2.0.0
Loading...
Searching...
No Matches
imagegatherer.h
1#ifndef IMAGEGATHERER_H
2#define IMAGEGATHERER_H
3
4#include <QObject>
5#include <QHash>
6#include <iostream>
7#include <vector>
8#include <algorithm>
9#include <numeric>
10#include <future>
11#include <mutex>
12#include <opencv2/core.hpp>
13
14#include "reader.h"
15
29class ImageGatherer : public QObject
30{
31 Q_OBJECT
32public:
33 ImageGatherer(Reader *reader, std::vector<uint> futureFrames);
34 QPair<cv::Mat, cv::Mat> gatherImagePair(uint from, uint to);
35
36protected:
42 virtual cv::Mat gatherSingleImage(uint frameIdx) = 0;
43
44 Reader *m_reader;
45 QHash<uint, cv::Mat> m_bufferedImages;
46
47private:
48 bool checkStoredImages(uint idx, cv::Mat *out);
49 static cv::Mat gatherSingleImageStatic(uint frameIdx, ImageGatherer *imgg);
50};
51
52#endif // IMAGEGATHERER_H
The ImageGatherer class is an interface which defines the structure for the hardware specific algorit...
Definition imagegatherer.h:30
virtual cv::Mat gatherSingleImage(uint frameIdx)=0
gatherSingleImage reads, resizes and greyscales a single frame
The Reader interface defines functions which are used for reading and parsing the import.
Definition reader.h:23