osgART 2.0 RC3: fix and black window.

Community support forum for users of the GPL-licensed osgART Standard Edition v1.0 and proprietary-licensed osgART Professional Edition v1.1
jduran
Posts: 9
Joined: Fri Feb 05, 2010 7:51 am

osgART 2.0 RC3: fix and black window.

Postby jduran » Fri Feb 05, 2010 8:21 am

Dear all,

I've downloaded osgART 2.0 RC3 to testing. I've compiled it with artookit 2.7.1 in x86_64 in Fedora 12 (gcc 4.4.2). To compile the library, the line

#include<cstdlib>

has been added to file 'include/osgART/Utils'. Also, I've modified the artoolkit Configure file to add the option -fFIC to compile, if not it wasn't linked with osgART.

After that, I've tested osgART, by running some commands (video is captured from gstreamer): the applications only show a black screen with no video at all. Some time to time, the applications doesn't open the window. The version of OpenSceneGraf installed is 2.8.2.

If more help is needed, please, let me know.

Joaquim Duran

jduran
Posts: 9
Joined: Fri Feb 05, 2010 7:51 am

Re: osgART 2.0 RC3: fix and black window.

Postby jduran » Tue Feb 09, 2010 7:22 am

Hello,

Finally I've fixed the problem: I'm able to see the video captured from ARToolKit using osgART. To fix the problem, I've modified the condition to check if the ARToolKitVideo has captured a new frame from camera or not. This is the patch:

Code: Select all

--- ARToolKitVideo.cpp.orig   2010-02-09 13:15:27.000000000 +0100
+++ ARToolKitVideo.cpp   2010-02-09 15:32:48.000000000 +0100
@@ -307,7 +307,7 @@
 
       osg::Timer t;
 
-      if (0 == ar2VideoCapNext(video))
+      if (ar2VideoCapNext(video))
       {
          if (newImage = (unsigned char*)ar2VideoGetImage(video))
          {


Currently it works with my camera at 320x240 and at 640x480.

What I've detected is that many times I execute a osgART demo, the application gets locked at ARTtoolkit init functions while camera is recording, but If the application is not locked at this point, then the application starts and the video is visible.

Thanks and Best Regards,
Joaquim Duran

gabrielgmendonca
Posts: 1
Joined: Sat Jul 24, 2010 12:40 pm

Re: osgART 2.0 RC3: fix and black window.

Postby gabrielgmendonca » Sat Jul 24, 2010 12:42 pm

Thanks!
That worked for me too.

enekochan
Posts: 4
Joined: Mon Apr 18, 2011 4:44 am

Re: osgART 2.0 RC3: fix and black window.

Postby enekochan » Sun May 08, 2011 12:55 pm

The real problem is in ARToolKit 2.72.1. The function ar2VideoCapNext in file "lib/SRC/VideoGStreamer/video.c" should return 0 but it returns TRUE.
Last edited by enekochan on Tue May 31, 2011 2:44 am, edited 1 time in total.

retrakker
Posts: 125
Joined: Mon Dec 18, 2006 5:00 pm
Contact:

Re: osgART 2.0 RC3: fix and black window.

Postby retrakker » Wed May 25, 2011 7:24 am

I'll see if we can fix that upstream. Thanks for the hint.


Return to “[ARCHIVED] osgART Standard & Professional Editions”

Who is online

Users browsing this forum: No registered users and 2 guests