Added new qmake config option which enables real gimbal camera

Gimbal camera can be enabled and used for example with command:
qmake6 CONFIG+=gimbal && make && ./rtsp_ai_player ~/azaion/models/onnx/yolov8m.onnx
This commit is contained in:
Tuomas Järvinen
2024-07-27 11:53:26 +03:00
parent 7052a05d55
commit ba810592b5
4 changed files with 28 additions and 6 deletions
+8 -1
View File
@@ -50,7 +50,11 @@ AiEngine::AiEngine(QString modelPath, QObject *parent)
inferenceThread3->start();
#endif
#ifdef GIMBAL
mGimbalClient = new AiEngineGimbalClient(this);
#else
mGimbalClient = nullptr;
#endif
}
@@ -73,7 +77,10 @@ void AiEngine::inferenceResultsReceivedSlot(AiEngineInferenceResult result)
qDebug() << "FPS = " << (mFrameCounter / (mElapsedTimer.elapsed()/1000.0f));
//qDebug() << "AiEngine got inference results in thread: " << QThread::currentThreadId();
mGimbalClient->inferenceResultSlot(result);
if (mGimbalClient != nullptr) {
mGimbalClient->inferenceResultSlot(result);
}
cv::imshow("Received Frame", result.frame);
}