mirror of
https://github.com/azaion/autopilot.git
synced 2026-04-22 10:16:33 +00:00
e3643ea622
- removed QtSerialPort from the Qt CONFIG parameters - remove compiler warnings - reduced logging - fixed FPS to show what AI really analyzed - RTSP reader tries to connect to the stream once per second until it succeeds
38 lines
953 B
C++
38 lines
953 B
C++
#pragma once
|
|
|
|
#include <QElapsedTimer>
|
|
#include <QObject>
|
|
#include <opencv2/core.hpp>
|
|
#include <opencv2/videoio.hpp>
|
|
#include "aienginertsplistener.h"
|
|
#include "aiengineinference.h"
|
|
#include "aienginegimbalclient.h"
|
|
|
|
class AiEngine : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit AiEngine(QString modelPath, QObject *parent = nullptr);
|
|
void start(void);
|
|
void stop(void);
|
|
|
|
public slots:
|
|
void frameReceivedSlot(cv::Mat frame);
|
|
void inferenceResultsReceivedSlot(AiEngineInferenceResult result);
|
|
|
|
signals:
|
|
void inferenceFrame(cv::Mat frame);
|
|
void inferenceFrame2(cv::Mat frame);
|
|
void inferenceFrame3(cv::Mat frame);
|
|
|
|
private:
|
|
uint32_t mRtspFrameCounter;
|
|
uint32_t mInferenceFrameCounter;
|
|
QElapsedTimer mRtspElapsedTimer;
|
|
AiEngineRtspListener *mRtspListener;
|
|
AiEngineInference *mInference;
|
|
AiEngineInference *mInference2;
|
|
AiEngineInference *mInference3;
|
|
AiEngineGimbalClient *mGimbalClient;
|
|
};
|