Files
autopilot/ai_controller/src-opi5/aiengineinferenceopi5.h
T
Tuomas Järvinen 45c19baa45 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/
2024-10-19 14:44:34 +02:00

27 lines
753 B
C++

#pragma once
#include <QObject>
#include "aiengineinference.h"
#include "yolov8.h"
#include "image_utils.h"
class AiEngineInferenceOpi5 : public AiEngineInference
{
Q_OBJECT
public:
explicit AiEngineInferenceOpi5(QString modelPath, QObject *parent = nullptr);
~AiEngineInferenceOpi5();
void initialize(int number) override;
public slots:
void performInferenceSlot(cv::Mat frame) override;
private:
image_buffer_t convertCV2FrameToImageBuffer(const cv::Mat& bgrFrame);
void freeImageBuffer(image_buffer_t& imgBuffer);
cv::Mat resizeToHalfAndAssigntoTopLeft640x640(const cv::Mat& inputFrame);
void drawObjects(cv::Mat& image, const object_detect_result_list& result_list);
rknn_app_context_t mRrknnAppCtx0;
};