Results 1 to 10 of 10

Thread: Displaying real time images

  1. #1
    Join Date
    Jan 2007
    Posts
    21
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Displaying real time images

    Hi...i am working on QT for the first time...I have some doubts regarding displaying real time images using QT designer...
    I have to display real time images from 4 cameras on the same Widget....I also need to zoom these images on button press....

    Can you plz tell me tht is this thing possible in QT?

    Or will it be better to use SDL?

    How can i interface SDL with QT?

  2. #2
    Join Date
    Jan 2006
    Location
    Alingsås, Sweden
    Posts
    437
    Thanks
    3
    Thanked 39 Times in 39 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Displaying real time images

    That should not be a problem - if your hardware can handle it. What frame rates and image sizes are we speaking of here?

    For zooming you could use an OpenGL surface for showing the images - that would give you hardware acceleration where available.

  3. #3
    Join Date
    Jan 2007
    Posts
    21
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Displaying real time images

    I have to display 4 real time images on 4 windows of the same form, each image having frame rate of 7.5fps.
    Each image size is 160x120.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Displaying real time images

    Ok, but what is the problem? Either use QLabel or a QGLWidget as Johan suggested... and do the animation by connecting a custom slot to a QTimer timeout() signal.

  5. #5
    Join Date
    Jan 2007
    Posts
    21
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Displaying real time images

    the problem is that i am not able to understand how to integrate SDL with QT.
    I found one example code in which they were using Qthread for integrating SDL with QT.
    I am using QT3.1v and the code is for QT4.0 . So i was not able to compile it.

    in my application i am displaying the SDL window whenever the user want to view the camera images. At that time i am closing my QT window. So i need to integrate my SDL part in the slot created for that button click. Should i use Qthread for this purpose??

  6. #6
    Join Date
    Jan 2006
    Location
    Gloucester, UK
    Posts
    18
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Displaying real time images

    I'm just getting into video stuff using SDL.
    You can integrate an SDL window into a QTWidget - I'm using Linux - but I think you should be able do it in Windows as well.

  7. #7
    Join Date
    Jan 2007
    Posts
    21
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Displaying real time images

    Hi...
    I am able to switch from my QT window to SDL window....
    On my SDL window i have a Back button. On clicking this Back button my SDL window must close and the previous QT screen must re-appear.
    I am calling the function in which i hv wriiten the code to display the specific QT screen.
    Now this QT screen is not my Main screen which comes up when i start my GUI application.

    i have declared that function in my cpp file as extern and accessing it thru a C file where my SDL code is written.

    Can u plz tell me how i switch back to my QT screen

  8. #8
    Join Date
    Jan 2007
    Posts
    21
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Displaying real time images

    can anyone plz help me in how to give back the control to QT window from SDL window.???

    When i quit my SDL window to go back to QT screen, i get segmentation fault and the entire application exits

  9. #9
    Join Date
    Jan 2006
    Location
    Gloucester, UK
    Posts
    18
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Displaying real time images

    Without seeing the actual code I can only assume something like the following:

    I assume that you call the SDL_SetVideoMode() function to setup the SDL window and i assume that you keep a pointer to the SDL_Surface.
    The SDL window pops up independently - i am guessing that whenyou close the SDL window maybe you are still somewhere trying to use the SDL_Surface pointer or the SDL_Surface which is now void and gone

  10. #10
    Join Date
    Jan 2007
    Posts
    21
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Displaying real time images

    Hi..
    I am able to integrate SDL and QT now......
    On my button click the SDL window opens.

    There is one Back button on the SDL window. On clicking this Back Button the SDL window is closed and QT window opens again. But when i do this more 2 times i get the following error:

    Return Val :1
    X Error: BadLength (poly request too large or internal Xlib length error) 16
    Major opcode: 3
    Minor opcode: 0
    Resource id: 0x0


    Is this any issue with QT ?

Similar Threads

  1. Problem with pointers while using localtime() and time()
    By jamadagni in forum General Programming
    Replies: 7
    Last Post: 11th January 2006, 15:48

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.