mirror of
https://github.com/azaion/autopilot.git
synced 2026-04-22 10:36:34 +00:00
Changed directory structure and renamed applications
- autopilot -> drone_controller - rtsp_ai_player -> ai_controller - added top level qmake project file - updated documentation - moved small demo applications from tmp/ to misc/
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QVector>
|
||||
#include <opencv2/core.hpp>
|
||||
#include <opencv2/imgproc.hpp>
|
||||
#include "aienginedefinitions.h"
|
||||
|
||||
|
||||
const int INFERENCE_SQUARE_WIDTH = 640;
|
||||
const int INFERENCE_SQUARE_HEIGHT = 640;
|
||||
|
||||
|
||||
class AiEngineObject {
|
||||
public:
|
||||
AiEngineRectangle rectangle;
|
||||
float propability;
|
||||
int classId;
|
||||
QString classStr;
|
||||
};
|
||||
|
||||
|
||||
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:
|
||||
cv::Mat resizeAndPad(const cv::Mat& src);
|
||||
QString mModelPath;
|
||||
bool mActive;
|
||||
int mNumber;
|
||||
QVector<QString> mClassNames;
|
||||
|
||||
public slots:
|
||||
virtual void performInferenceSlot(cv::Mat frame) = 0;
|
||||
virtual void initialize(int number) = 0;
|
||||
signals:
|
||||
void resultsReady(AiEngineInferenceResult results);
|
||||
};
|
||||
Reference in New Issue
Block a user