Reply
Thread Tools
Posts: 61 | Thanked: 77 times | Joined on Dec 2009 @ Lancaster
#1
I want to draw on top of a video stream. I wrote a QT application that shows the video stream as an xoverlay, whcih is overlayed over a QWidget object (More detail can be found in this post).

I tried to add a QPixmap to the QWidget, but, as I expected, the xoverlay (video stream) covered the QPixmap object, so you could not see the drawing bellow.

I found suggestions to use qt4-x11 library. Checked it out and it looks quit complicated.

Any other suggestions on how to overlay a QWidget over the xoverlay?

Klen
 
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#2
try asking the author of Burgerface - he has managed to do it
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -
 
Posts: 51 | Thanked: 15 times | Joined on Apr 2009 @ ChengDu, SiChuan, P.R.C
#3
Maybe you should search qtcartoonizer in https://garage.maemo.org/ and look at camera.cpp that's good example for how use camera with QT in Maemo.

BTW, i already posted same in your post http://talk.maemo.org/showthread.php...d=1#post555080
 

The Following User Says Thank You to funpig For This Useful Post:
Posts: 61 | Thanked: 77 times | Joined on Dec 2009 @ Lancaster
#4
Originally Posted by funpig View Post
Maybe you should search qtcartoonizer in https://garage.maemo.org/ and look at camera.cpp that's good example for how use camera with QT in Maemo.

BTW, i already posted same in your post http://talk.maemo.org/showthread.php...d=1#post555080
Sorry. I missed that. I will check it straight away.

Thanks.
Klen
 
Posts: 61 | Thanked: 77 times | Joined on Dec 2009 @ Lancaster
#5
I checked qtcartonizer. The example is exactly what I am looking for, however, the camera part of the application does not work on my N900.

When I install the deb package I get an error on two dependencies, but I guess they are just errors in the deb packing as those packages are installed on my phone.

Thanks funpig.

Klen
 
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#6
which dependencies are erroring?
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -
 
Posts: 143 | Thanked: 99 times | Joined on Jun 2009 @ Houston
#7
Originally Posted by klen View Post
I checked qtcartonizer. The example is exactly what I am looking for
yeah, I thought that I could understand how to use the camera using this example but clearly I'm missing something.

So, i create my QCamera object and gstream initializes ok. Then I create a videoLabel object (like they do) but i can't make it play any video. everytime I call camera->play() nothing happens. cerr returns "camera emit video not ready". I'm really missing something here...
can someone help? please?

Thanks
 
Posts: 143 | Thanked: 99 times | Joined on Jun 2009 @ Houston
#8
Originally Posted by tpaixao View Post
yeah, I thought that I could understand how to use the camera using this example but clearly I'm missing something.

So, i create my QCamera object and gstream initializes ok. Then I create a videoLabel object (like they do) but i can't make it play any video. everytime I call camera->play() nothing happens. cerr returns "camera emit video not ready". I'm really missing something here...
can someone help? please?
In fact, I tried to build qtcartoonizer and it built ok but when I try to acquire an image from the camera, it doesn't work. Anyone managed to get it to work?
 
Posts: 61 | Thanked: 77 times | Joined on Dec 2009 @ Lancaster
#9
I have the same problem with qtcartonizer. When I request a photo the camera emits signal "camera emit video not ready". I reported the bug on the garage development page. No reply so far.

If you manage to get any progress, pleas post it.

Cheers,
Klen
 
Posts: 61 | Thanked: 77 times | Joined on Dec 2009 @ Lancaster
#10
One example application that does drawing over the video stream is BurgerFace. Unfortunately there is no source code available, however, jfk gave some guidance on technology he used to implement the application.

His replies can be found on here.

To sum up: jfk used SDL libraries to implement BurgerFace application. For capturing images from the camera he used V4L2, however he suggests gstreamer might be more user friendly. One of the reasons why he used SDL instead of xoverlays is that overlays cause flickering when drawn upon a camera stream. I also noticed this problem when i was changing the size of the camera stream window.

I also analyzed the qtcartonizer code in more detail and figured out that the application only draws on top of a static taken by the camera and not onto a live video stream. Therefore, the application does not face the limitation issue of the overlay.

Has anyone any idea what is causing this flickering in overlays and how to fix it? Unfortunately I have not got the source code to show you.

Thanks for help.
Klen
 
Reply


 
Forum Jump


All times are GMT. The time now is 02:09.