Files
Tuomas Järvinen e3643ea622 Small fixes to AI Controller
- 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
2024-10-24 18:36:12 +02:00

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;
};