34 lines
607 B
C++
34 lines
607 B
C++
#pragma once
|
|
|
|
#include "ImageProcessor.h"
|
|
|
|
#include <QObject>
|
|
#include <QMetaType>
|
|
#include <opencv2/core.hpp>
|
|
|
|
Q_DECLARE_METATYPE(cv::Mat)
|
|
|
|
class ImageWorker final : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
enum class Operation {
|
|
Rotate,
|
|
Scale,
|
|
Translate,
|
|
ExtractTargets,
|
|
ClassifySimple
|
|
};
|
|
Q_ENUM(Operation)
|
|
|
|
public Q_SLOTS:
|
|
void process(cv::Mat image, ImageWorker::Operation operation, double value, int dx, int dy);
|
|
|
|
Q_SIGNALS:
|
|
void finished(ProcessResult result);
|
|
void failed(QString message);
|
|
};
|
|
|
|
Q_DECLARE_METATYPE(ImageWorker::Operation)
|