ARToolKit | Mailing List Archive |
![]() |
From: | Manuel.Buechler@t .......... (=?iso-8859-1?Q?Manuel_B=FCchler?=) | Received: | Dec 5, 2004 |
To | "'Daniel Wagner'" <daniel@i ...............> | ||
Subject: | AW: arVideoGetImage | ||
Hi I didn' change anything at the function arVideoGetImage. So the Code is the same as you can download it from the page of = ARToolKit. I just copies it from the simple project into my OpenSG project. The call of this function: if( (dataPtr =3D (ARUint8 *)arVideoGetImage()) =3D=3D NULL ) { arUtilSleep(2); printf("VideoBild wurde nicht gelesen!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); exit (0); } As you can see the same ar in simple. But not the same result ;-) Bye Manuel -----Urspr=FCngliche Nachricht----- Von: Daniel Wagner [mailto:daniel@i ...............]=20 Gesendet: Sonntag, 5. Dezember 2004 14:45 An: Manuel B=FCchler Cc: artoolkit@h .................. Betreff: Re: arVideoGetImage Manuel B=FCchler wrote: > I=92m working on an combination of ARToolKit and OpenSG. > > My first try is to combine the 01hello project with the simple project = > of ARtoolKit. > > My problem is that the function arVideoGetImage work perfect in the=20 > simple project of ARToolKit. > > But when I put it into my own OpenSG project (used in the same way as=20 > in the simple project) the result of > > The call of this function is NULL. So the hole application stops. > hi Manuel, both libraries are open source. it should be no problem for you to step into arVideoGetImage and provide = the community here with more information about where the malfunction=20 happens... bye, Daniel |
From: | Manuel.Buechler@t .......... (=?iso-8859-1?Q?Manuel_B=FCchler?=) | Received: | Dec 8, 2004 |
To | "'Peter Oost'" <h.b.oost@s .................>, <artoolkit@h ..................> | ||
Subject: | AW: arVideoGetImage | ||
Hello Here i get you a more specific explanation what is my problem. I made = all of these init-stuff which Is also in the example project simple. Now I want = to get an image from my camera with this code (the same as in simple except = the printf) if( (dataPtr =3D (ARUint8 *)arVideoGetImage()) =3D=3D NULL ) { arUtilSleep(2); printf("Videobild w=FCrde nicht geladen!!!!!!!!!!!!!!!!!!!!!!!"); exit(1); } But everytime the programm stops with exit(1) because the dataPtr is = NULL I tried to find the error in the libARvideo. I made some printf to get = to know where the error begins in the function arVideoGetImage. But this function seem to be ignored. Every printf I made in this = function don't come to the console. So it seem to be that this function isn't = call. But there is a call as you can see in the code above. Does anyone know about this error and can help me to solve it? Thanks. -----Urspr=FCngliche Nachricht----- Von: owner-artoolkit@h .................. [mailto:owner-artoolkit@h ..................] Im Auftrag von Peter Oost Gesendet: Sonntag, 5. Dezember 2004 22:52 An: artoolkit@h .................. Betreff: Re: arVideoGetImage > Manuel B=FCchler wrote: > both libraries are open source. > it should be no problem for you to step into arVideoGetImage and > provide the community here with more information about where the > malfunction happens... > > bye, > Daniel "Manuel B=FCchler" wrote: > Hi > > I didn' change anything at the function arVideoGetImage. > So the Code is the same as you can download it from the page of > ARToolKit. I just copies it from the simple project into my OpenSG > project. > The call of this function: > > if( (dataPtr =3D (ARUint8 *)arVideoGetImage()) =3D=3D NULL ) { > arUtilSleep(2); > printf("VideoBild wurde nicht > gelesen!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); > exit (0); > } Before you can call arVideoGetImage() you'll have to initialize a few=20 things. Check whether you have done this properly (see the init() = function=20 in the Simple example). Also look inside the arVideoGetImage function to = see where exactly it goes wrong (as Daniel suggested). -Peter=20 |
From: | Peter Oost <h.b.oost@s .................> | Received: | Dec 8, 2004 |
To | Manuel =?ISO-8859-1?Q?B=FCchler?= <Manuel.Buechler@t ..........> | ||
Subject: | Re: AW: arVideoGetImage | ||
On Wed, 2004-12-08 at 21:22 +0100, Manuel Büchler wrote: > Hello > > Here i get you a more specific explanation what is my problem. I made all of > these init-stuff which Is also in the example project simple. Now I want to > get an image from my camera with this code (the same as in simple except the > printf) > > if( (dataPtr = (ARUint8 *)arVideoGetImage()) == NULL ) { > arUtilSleep(2); > printf("Videobild würde nicht > geladen!!!!!!!!!!!!!!!!!!!!!!!"); > exit(1); > } > > But everytime the programm stops with exit(1) because the dataPtr is NULL > I tried to find the error in the libARvideo. I made some printf to get to > know where the error begins in the function arVideoGetImage. > But this function seem to be ignored. Every printf I made in this function > don't come to the console. So it seem to be that this function isn't call. > But there is a call as you can see in the code above. The first thing to spring to mind is: did you put the printf in the correct arVideoGetImage function? There are different function definitions for V4L, firewire cams, win32 etc. Other than that I wouldn't know how to help you. -Peter |
From: | Peter Oost <h.b.oost@s .................> | Received: | Dec 8, 2004 |
To | Manuel =?ISO-8859-1?Q?B=FCchler?= <Manuel.Buechler@t ..........> | ||
Subject: | Re: AW: arVideoGetImage | ||
On Wed, 2004-12-08 at 21:22 +0100, Manuel Büchler wrote: > Hello > > Here i get you a more specific explanation what is my problem. I made all of > these init-stuff which Is also in the example project simple. Now I want to > get an image from my camera with this code (the same as in simple except the > printf) > > if( (dataPtr = (ARUint8 *)arVideoGetImage()) == NULL ) { > arUtilSleep(2); > printf("Videobild würde nicht > geladen!!!!!!!!!!!!!!!!!!!!!!!"); > exit(1); > } > > But everytime the programm stops with exit(1) because the dataPtr is NULL > I tried to find the error in the libARvideo. I made some printf to get to > know where the error begins in the function arVideoGetImage. > But this function seem to be ignored. Every printf I made in this function > don't come to the console. So it seem to be that this function isn't call. > But there is a call as you can see in the code above. Ah, I had a look at my own code, it uses this: while( (dataPtr = (ARUint8 *)arVideoGetImage()) == NULL ) arUtilSleep(2); Apparently it is quite likely that the first (few) calls don't immediately give a correct result. I hope this works for you. -Peter |
From: | Philip Lamb <phil@e ..........> | Received: | Dec 9, 2004 |
To | Manuel.Buechler@t .......... (Manuel =?iso-8859-1?Q?B=FCchler?= ), <artoolkit@h ..................> | ||
Subject: | Re: AW: arVideoGetImage | ||
Manuel, Getting NULL returned from arVideoGetImage is not cause for calling exit(), so don't do that. NULL can be returned when a frame is not ready from the camera, but that doesn't mean one won't ever become ready. You should just keep sleeping and calling arVideoGetImage until either you get a frame or you reach some self-imposed time limit e.g. 10 seconds. Regards, Phil. At 9:22 PM +0100 8/12/04, Manuel Büchler wrote: >Hello > >Here i get you a more specific explanation what is my problem. I made all of >these init-stuff which Is also in the example project simple. Now I want to >get an image from my camera with this code (the same as in simple except the >printf) > >if( (dataPtr = (ARUint8 *)arVideoGetImage()) == NULL ) { > arUtilSleep(2); > printf("Videobild würde nicht >geladen!!!!!!!!!!!!!!!!!!!!!!!"); > exit(1); > } > >But everytime the programm stops with exit(1) because the dataPtr is NULL >I tried to find the error in the libARvideo. I made some printf to get to >know where the error begins in the function arVideoGetImage. >But this function seem to be ignored. Every printf I made in this function >don't come to the console. So it seem to be that this function isn't call. >But there is a call as you can see in the code above. > >Does anyone know about this error and can help me to solve it? > >Thanks. > |