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
22
class
ImageContext
{
23
public
:
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
33
class
ImageCommand
{
34
public
:
35
virtual
std::optional<QString> execute(
ImageContext
&ctx) = 0;
36
virtual
~ImageCommand
() =
default
;
37
};
38
39
class
ImageProcessor
{
40
std::vector<std::unique_ptr<ImageCommand>> commands;
41
42
public
:
43
void
addCommand(std::unique_ptr<ImageCommand> cmd);
44
std::optional<QString> process(
ImageContext
&context);
45
};
46
47
#endif
//IMAGEPROCESSOR_H
ImageCommand
The ImageCommand class is an abstract interface for commands regarding image operations such as resiz...
Definition
imageprocessor.h:33
ImageContext
The ImageContext class provides contetx information for executing ImageCommands. This data can be mod...
Definition
imageprocessor.h:22
ImageProcessor
Definition
imageprocessor.h:39
iVS3D
src
iVS3D-core
model
export
imageprocessor.h
Generated by
1.9.8