Files
chengnan/app/include/ImageWorker.h
2026-05-29 22:29:38 +08:00

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)