mirror of
https://github.com/azaion/autopilot.git
synced 2026-04-22 22:26:35 +00:00
50 lines
771 B
C++
50 lines
771 B
C++
#pragma once
|
|
|
|
#include <QObject>
|
|
#include <QString>
|
|
#include <QVector>
|
|
#include <opencv2/core.hpp>
|
|
|
|
|
|
class AiEngineRectangle {
|
|
public:
|
|
int left;
|
|
int top;
|
|
int right;
|
|
int bottom;
|
|
};
|
|
|
|
|
|
class AiEngineObject {
|
|
public:
|
|
AiEngineRectangle rectangle;
|
|
float propability;
|
|
int classId;
|
|
};
|
|
|
|
|
|
class AiEngineInferenceResult {
|
|
public:
|
|
cv::Mat frame;
|
|
QVector<AiEngineObject> objects;
|
|
};
|
|
|
|
|
|
class AiEngineInference : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit AiEngineInference(QString modelPath, QObject *parent = nullptr);
|
|
bool isActive(void);
|
|
|
|
protected:
|
|
QString mModelPath;
|
|
bool mActive;
|
|
|
|
public slots:
|
|
virtual void performInferenceSlot(cv::Mat frame) = 0;
|
|
|
|
signals:
|
|
void resultsReady(AiEngineInferenceResult results);
|
|
};
|