mirror of
https://github.com/azaion/autopilot.git
synced 2026-04-22 12:46:34 +00:00
Addd initial AiEngineGimbalControl class
This commit is contained in:
@@ -26,6 +26,8 @@ AiEngine::AiEngine(QString modelPath, QObject *parent)
|
||||
connect(mInference, &AiEngineInference::resultsReady, this, &AiEngine::inferenceResultsReceivedSlot, Qt::QueuedConnection);
|
||||
connect(this, &AiEngine::inferenceFrame, mInference, &AiEngineInference::performInferenceSlot, Qt::QueuedConnection);
|
||||
inferenceThread->start();
|
||||
|
||||
mGimbalControl = new AiEngineGimbalControl(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -41,15 +43,15 @@ void AiEngine::stop(void)
|
||||
}
|
||||
|
||||
|
||||
void AiEngine::inferenceResultsReceivedSlot(AiEngineInferenceResult results)
|
||||
void AiEngine::inferenceResultsReceivedSlot(AiEngineInferenceResult result)
|
||||
{
|
||||
(void)results;
|
||||
qDebug() << "AiEngine got inference results in thread: " << QThread::currentThreadId();
|
||||
//qDebug() << "AiEngine got inference results in thread: " << QThread::currentThreadId();
|
||||
|
||||
cv::imshow("Received Frame", results.frame);
|
||||
mGimbalControl->inferenceResultSlot(result);
|
||||
cv::imshow("Received Frame", result.frame);
|
||||
|
||||
//#ifndef OPI5_BUILD
|
||||
//cv::imshow("Received Frame", results.frame);
|
||||
//cv::imshow("Received Frame", result.frame);
|
||||
//#endif
|
||||
}
|
||||
|
||||
@@ -60,7 +62,7 @@ void AiEngine::frameReceivedSlot(cv::Mat frame)
|
||||
//cv::imshow("Received Frame", frame);
|
||||
|
||||
if (mInference->isActive() == false) {
|
||||
qDebug() << "AiEngine. Inference thread is free. Sending frame to it.";
|
||||
//qDebug() << "AiEngine. Inference thread is free. Sending frame to it.";
|
||||
emit inferenceFrame(frame.clone());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user