FrameID() and lost frames

Post Reply
dashesy
Posts: 33
Joined: Fri Mar 27, 2009 8:47 am
Location: Utah

FrameID() and lost frames

Post 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
beckdo
Posts: 520
Joined: Tue Jan 02, 2007 2:02 pm

Re: FrameID() and lost frames

Post 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
dashesy
Posts: 33
Joined: Fri Mar 27, 2009 8:47 am
Location: Utah

Re: FrameID() and lost frames

Post 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.
dashesy
Posts: 33
Joined: Fri Mar 27, 2009 8:47 am
Location: Utah

Re: FrameID() and lost frames

Post 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.
dashesy
Posts: 33
Joined: Fri Mar 27, 2009 8:47 am
Location: Utah

Re: FrameID() and lost frames

Post 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.
beckdo
Posts: 520
Joined: Tue Jan 02, 2007 2:02 pm

Re: FrameID() and lost frames

Post 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.
Post Reply