Initial Linux Qt OpenCV project
This commit is contained in:
33
app/include/ImageWorker.h
Normal file
33
app/include/ImageWorker.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#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)
|
||||
Reference in New Issue
Block a user