iVS3D v2.0.0
Loading...
Searching...
No Matches
imageprocessor.h
1#ifndef IMAGEPROCESSOR_H
2#define IMAGEPROCESSOR_H
3
4#include <opencv2/core.hpp>
5#include <opencv2/imgcodecs.hpp>
6#include <opencv2/imgproc.hpp>
7
8#include <QString>
9#include <QDir>
10#include <QRect>
11#include <QDebug>
12
13#include <vector>
14#include <memory>
15#include <optional>
16
17#include "reader.h"
18
23public:
24 cv::Mat image; // processed image, i.e. resized, cropped, ...
25 cv::Mat originalImage; // original image before any processing
26 uint index;
27 QString filename;
28};
29
34public:
35 virtual std::optional<QString> execute(ImageContext &ctx) = 0;
36 virtual ~ImageCommand() = default;
37};
38
40 std::vector<std::unique_ptr<ImageCommand>> commands;
41
42public:
43 void addCommand(std::unique_ptr<ImageCommand> cmd);
44 std::optional<QString> process(ImageContext &context);
45};
46
47#endif //IMAGEPROCESSOR_H
The ImageCommand class is an abstract interface for commands regarding image operations such as resiz...
Definition imageprocessor.h:33
The ImageContext class provides contetx information for executing ImageCommands. This data can be mod...
Definition imageprocessor.h:22
Definition imageprocessor.h:39