Page 1 of 1

FrameID() and lost frames

Posted: Wed Dec 12, 2012 3:24 pm
by dashesy
What happens to the frame ID if a frame is lost (bad frame). For example if FrameID == 10 and next frame is invalid, starting the next valid frame do I get FrameID == 12 or FrameID == 11?
Similar t this question; what happens to TimeStamp() if a frame is lost?

The reason I am asking this, is I synchronize to external trigger and only care about the number of sample clocks rather than actual frames.

Thanks

Re: FrameID() and lost frames

Posted: Wed Dec 12, 2012 6:36 pm
by beckdo
If a frame is dropped the FrameID will skip the dropped frame. So in your example, the FrameID==12 on the next valid frame.

By the same token, if TimeStamp()=0.01 then there was a skipped frame, the next one would be TimeStamp()=0.03

Re: FrameID() and lost frames

Posted: Mon Feb 04, 2013 5:59 pm
by dashesy
Does FrameID always increase based on max fps (for V100R2 being 100) or camera->SetFrameRate will affect it. I am trying to find why for 50fps FrameID increases by 2 at every capture (seems more predictable to assume a drop).
Meanwhile I am using OptiHub2 and clock it by External Sync in.

Re: FrameID() and lost frames

Posted: Tue Feb 05, 2013 8:52 am
by dashesy
Now I think it does depend of fps, so it is not as useful when clocking the camera myself. Please let me know if there is a way to find missed frames while using the external clock.

Re: FrameID() and lost frames

Posted: Tue Feb 05, 2013 10:52 am
by dashesy
Ok more findings. If I set camera->SetFrameRate(50) then FrameID always returns in the steps of 2 frames, even if I clock the camera at 1fps using external clock.

Re: FrameID() and lost frames

Posted: Wed Feb 06, 2013 11:17 am
by beckdo
For most of our USB cameras the FrameID increments by one every 1/maxframerate seconds. So if you set the frame rate to 50%, like you suggest, the FrameID increments by 2 every frame.

We've updated this behavior on our newest devices (Flex13, S250e, and Prime series). The FrameID increments 1 based on the fastest connected camera. So if you have 1 camera in your system and you set it to 50 FPS the FrameID will increment by 1. However if you have two cameras in your system and one is set to 100 FPS and the other to 50FPS, the camera set to 50 FPS will have a FrameID that increments by 2.