PDA

View Full Version : Displaying real time images



Sheetal
25th January 2007, 09:16
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?

e8johan
25th January 2007, 09:51
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.

Sheetal
25th January 2007, 10:34
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.

wysota
1st February 2007, 18:14
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.

Sheetal
4th February 2007, 06:26
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??

guestgulkan
4th February 2007, 18:11
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.

Sheetal
6th February 2007, 12:50
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

Sheetal
8th February 2007, 10:55
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

guestgulkan
8th February 2007, 20:56
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

Sheetal
22nd February 2007, 12:29
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 ?