Pregunta

I have a simulation in Gazebo in which I am publishing an image raw data topic which have raw image data. Now I want to display that data in qt as a video. I am not sure what I should use as a video widget. What I have in mind is to make a graphicsScene and display data as an QImage but data frequency is to high and loading it to QImage on that frequency doesnt seem to me a good approach. looking forward for optimal suggestions.

Thanks.

(p.s I am using linux 10.04 with qt4.x and Ros electric)

¿Fue útil?

Solución

I already use QT+OpenCV to display an image from a webcam @20Hz, and to do this I used QImage.

To be sure, just have a look to the source code of OpenCV, they also use a QImage in the function imshow (if you compile it with QT support). Look at : the source line 2389, you will see how to set a raw image, into a QImage.

If you just want to display an image, I don't think you will need a QGraphicsScene, just set you QImage in a QLabel.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top