From: Johann Schoonees <j.schoonees@ir...> - 2004-12-12 22:18:25
Jason Meltzer wrote:
> I am wondering if it is possible to obtain the exact time a frame was
> taken, rather than calling the gettimeofday() or similar routine after the
> capture call finishes execution. Are these times essentiall equivalent, or
> is there some buffering going on which could shift them?
You can get a reasonably accurate timestamp of, for example, a
hardware trigger edge if you know a few extra things about your camera:
1. Trigger set-up time (time between hardware trigger edge and start
2. Sensor line transfer time (Time to transfer one line to transmit
3. Transmission set-up time (time between transmit-buffer-ready and
start of transmission).
There are ways to measure these numbers if your owner's manual does
not list them - let me know if you are interested.
The general timestamp calculation is to start with the filltime
provided by video1394 and then work backwards through the 1394
transmission time, the integration time, and the various internal
camera delays. You could look at some Camwire code examples in
camlatency.c and camwire_1394.c where I calculate timestamps.
Johann Schoonees Research engineer
Industrial Research Limited, PO Box 2225, Auckland, New Zealand
Phone +64 9 9203679 Fax +64 9 3028106 http://www.is.irl.cri.nz/
Camwire's home: http://kauri.auck.irl.cri.nz/~johanns/camwire/