We have a constantly changing radar image which is 8000x8000 pixels. Whenever the radar image changes, a slot function is executed as below:
void MainMapWidget::slotRadarImageChanged(const QImage &image){
std::unique_ptr<ImageFrame> m_imageFrame = std::make_unique<ImageFrame>(image, m_ImageOverlayEnvelope, this);
m_imageOverlay->setImageFrame(m_imageFrame.get());
}This slotRadarImageChanged is not being called after each radar echo, instead we wait 30 echoes to be received and after that imageChanged signal is emitted. We detected that this function occupies CPU so much, causing a bottleneck in our program. If the image is 2000x2000 it does not cause any delays.
In short, we want to find a way to optimize passing our QImage to ImageOverlay. If there are any other alternative ways to do this, please share with us.