No Frame Available

Asa_E-E
Posts: 16
Joined: Mon Jun 25, 2012 8:01 am

No Frame Available

Post by Asa_E-E » Mon Aug 06, 2012 12:11 pm

What is general cause of the No Frame Available error? Periodically, when I run the cameras using the API, I get this error often. However, to resolve this, all I have to do is a hard restart (unplug the hub and plug it back in) and re-run my code. Sometimes, it doesn't even take a hard restart, just re-running my code. I'm not sure what would cause this to happen.

Thanks,
Asa

NaturalPoint - Mike
Posts: 1896
Joined: Tue Feb 01, 2011 8:41 am
Location: Corvallis, OR

Re: No Frame Available

Post by NaturalPoint - Mike » Mon Aug 06, 2012 4:50 pm

What type of cameras are you using?

Asa_E-E
Posts: 16
Joined: Mon Jun 25, 2012 8:01 am

Re: No Frame Available

Post by Asa_E-E » Tue Aug 07, 2012 6:08 am

S250e

NaturalPoint - Mike
Posts: 1896
Joined: Tue Feb 01, 2011 8:41 am
Location: Corvallis, OR

Re: No Frame Available

Post by NaturalPoint - Mike » Tue Aug 07, 2012 11:52 am

Do you just run TT_Update(); once and get no frame available or does it loop TT_Update(); if no frame is found for a period of time?

Asa_E-E
Posts: 16
Joined: Mon Jun 25, 2012 8:01 am

Re: No Frame Available

Post by Asa_E-E » Tue Aug 07, 2012 12:07 pm

The former. If no frame is available, the loop simply repeats (calls TT_Update() again).

NaturalPoint - Mike
Posts: 1896
Joined: Tue Feb 01, 2011 8:41 am
Location: Corvallis, OR

Re: No Frame Available

Post by NaturalPoint - Mike » Tue Aug 07, 2012 12:12 pm

How long will it go without a frame?

Asa_E-E
Posts: 16
Joined: Mon Jun 25, 2012 8:01 am

Re: No Frame Available

Post by Asa_E-E » Tue Aug 07, 2012 1:39 pm

It usually does not go for more than one loop (~10 ms) without there being a frame. In some tests, it will miss a frame once and everything will be fine. In others, it'll keep missing frames periodically in fairly short intervals.

I can do a bit of testing soon to try and replicate this behavior and see how many frames pass between there being no frame available.

NaturalPoint - Mike
Posts: 1896
Joined: Tue Feb 01, 2011 8:41 am
Location: Corvallis, OR

Re: No Frame Available

Post by NaturalPoint - Mike » Tue Aug 07, 2012 3:15 pm

My guess would be that TT_Update(); is being called before the frame arrives. Try putting the TT_Update(); call in a loop that repeats the command until it returns success. There should be no real need to put in a delay. If you have to, start small (10us or so) and go up from there until you find something that works.

Asa_E-E
Posts: 16
Joined: Mon Jun 25, 2012 8:01 am

Re: No Frame Available

Post by Asa_E-E » Wed Aug 08, 2012 7:12 am

I did what you suggested and have TT_Update() loop until successful. Unfortunately, I'm still running into problems with the availability of frames. I'm timing each loop in my code and finding major discrepancies, all of which seem to arise from waiting for a frame to be available. For example, one loop will take ~0.005 s (~200 fps) whereas another loop will take ~0.065 s (~15 fps). Any idea why the time it takes a frame to be available seems to be so inconsistent?

NaturalPoint - Mike
Posts: 1896
Joined: Tue Feb 01, 2011 8:41 am
Location: Corvallis, OR

Re: No Frame Available

Post by NaturalPoint - Mike » Wed Aug 08, 2012 9:37 am

What type of application are you compiling? Is this console? MFC? CLR? what compiler are you using? IF you use the visualtest.exe application included in the SDK binaries, does it detect and run properly? (it should show reported framerate)

Post Reply