Continuous Image update using GraphicsView



  • I am working on an Image processing application which is written using QWidget and now we are planning to upgrade it using Graphics View Framework.

    How it is possible to update images continuously while receiving it from a connected camera to the Graphics Scene?

    I have seen that we can use below code to show image on scene.

    QGraphicsPixmapItem *pixItem= scene.addPixmap(image);
    

    I need to consider two scenarios

    1. Display Image is captured on request by user.
    2. Display Continuous image captured by camera.

    Can anyone suggest what will be the best approach to implement this use-case using GraphicsView framework.


  • Lifetime Qt Champion

    Hi,

    Looks like you are looking for QGraphicsVideoItem



  • Thanks for the reply.
    QGraphicsVideoItem will not suit for my application.

    Since it is an image processing application I need to get images from the camera. It can be coming in any speed. As I mentioned in my comment the user can click button "Capture" then camera will capture new image and send it to my application and it should display it.


  • Lifetime Qt Champion

    That part is described here. It doesn't have to do with the preview itself but how you control your camera object.



  • The camera which I have mentioned is actually is a Vision Sensor which is connected via ethernet. I dont think it is possible to use Camera module for this sensor in my application.
    The image which are captured by this vision sensor is transferred to my application using TCP/IP/.
    My actual concern is how efficiently I can display images in Graphics View using QGraphicsPixmapItem or other way.


  • Lifetime Qt Champion

    Then indeed, it won't be supported out of the box but that's not really problem.

    What is your video stream format ? Image size ? Frame rate ?



  • Its not actually a video stream. The images are acquired on request. The image format we use is QImage::Format_Indexed8.
    We support multiple resolutions from QQVGA to SXGA


  • Lifetime Qt Champion

    At which speed to you plan to request them ?



Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.