Hi Folks,
I am having problem to run ARToolkit with DirectX. The problem is: whenever I try to run "simple" application provided with ARToolKitDirectShow2.52, after getting the first frame it would stop and never work again. I have already successfull installed DirectX 8.1.
I have tried to run with the changes advised by Patrick and Dirk (below in this email) but still it no progress.
Any suggestion would be highly appreciated.
Thanks in advance.
Adnan.
Patrick AS Sinclair <pass99r@e ..............> wrote:
These were the changes I was advised to make by Dirk.
Patrick
---------- Forwarded message ----------
Date: Mon, 4 Feb 2002 21:30:41 +0100
From: Dirk Harms
To: Patrick Sinclair , artoolkit@h ..................
Subject: Re: Trouble with DirectShow versions of the ARToolkit
> I'm still having the same problem with the DirectShow versions of the
> ARToolkit. When I start any of the example programs they start up,
> capture the first frame and displays it but they don't get the next
> frame. The problem is almost definitely in the ARFrameGrabber capture
> bit.
Had the same Problem when using a tv Card but it worked with an USB Cam.
Pehaps it dosn't work rigth with VfW Drivers.
Try the following changes:
in ARFrameGrabber::Init
instead of
pSampleGrabber-! >SetBufferSamples(TRUE);
pSampleGrabber->SetOneShot(TRUE);
pSampleGrabber->SetBufferSamples(FALSE);
pSampleGrabber->SetOneShot(FALSE);
and remove
pMediaEvent->WaitForCompletion(INFINITE, &evCode);
And in the ARFrameGrabber::GrabFrame
remove
pMediaEvent->WaitForCompletion(INFINITE, &evCode);
But then it can happen that the first Frames have the frong Size, so you
have to check the if the Size of the Frame is x*y*4 and if not ruturn
ZUero and change the mainloop of the exview to abourt if the
Framegrabbing returns Zero.
Hope this helps
_____
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now
|