iVS3D v2.0.0
Loading...
Searching...
No Matches
BlurAlgorithm.h
1#ifndef BLURALGORITHM_H
2#define BLURALGORITHM_H
3
4#include <QObject>
5#include <QtConcurrent/QtConcurrentMap>
6#include <QtConcurrent>
7#include <opencv2/core/core.hpp>
8#include <opencv2/imgproc.hpp>
9
10#include "progressable.h"
11#include "reader.h"
12#include "sequentialreader.h"
13
27class BlurAlgorithm : public QObject {
28 Q_OBJECT
29
30 public:
35 virtual QString getName() = 0;
43 double calcOneBluriness(Reader *images, int index);
56 std::vector<double> calcFullBluriness(Reader *images,
57 Progressable *reciever,
58 volatile bool *stopped,
59 std::vector<uint> idxList,
60 std::vector<double> blurValues);
61
62 protected:
63 double parallelCalculation(const cv::Mat &image,
64 const std::vector<double> &blurValues,
65 const uint &idx, const int &progress,
66 Progressable *receiver);
74 virtual double singleCalculation(const cv::Mat &image) = 0;
75
76 private:
77 volatile int m_lastProgress = 0;
78};
79#endif // BLURALGORITHM_H
The BlurAlgorithm interface provides an interface for different algorithms calculating blur values fo...
Definition BlurAlgorithm.h:27
virtual QString getName()=0
getName returns the algorithm display name.
double calcOneBluriness(Reader *images, int index)
calcOneBluriness calculates blur meassure for one image specified by index.
Definition BlurAlgorithm.cpp:10
std::vector< double > calcFullBluriness(Reader *images, Progressable *reciever, volatile bool *stopped, std::vector< uint > idxList, std::vector< double > blurValues)
calcFullBluriness calculates blur meassures for all images within the given range.
virtual double singleCalculation(const cv::Mat &image)=0
singleCalculation This functions implements the actual blur algortihm
The Progressable interface is used to by multithreaded actions such as sampling or exporting to repor...
Definition progressable.h:18
The Reader interface defines functions which are used for reading and parsing the import.
Definition reader.h:23