Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

timestamp for Image capture

I am using IEEE 1394 firwire cameras using continuous grabing
Is there a way for the computer to  know that the camera got a new frame before the computer actually read the image?
I want to make the computer to set a time stamp at that moment and then calculate the delay between
the this moment and the time when the computer actually read the frame in.
 

Thanks
Cindy
0 Kudos
Message 1 of 5
(5,310 Views)
Hello Cindy,

Thank you for using National Instruments discussion forums.  The only way to do this is if your camera actually sends over a timestamp when it acquires an image.  So this will be camera dependent.  There is some good information about extracting out the time information from a 1394 camera in the discussion forum posted HERE.  They reference the IMAQdx driver which is the new driver for 1394 cameras.  I hope this information helps.  Thanks and have a great day.

Regards,
Mark T
Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(5,293 Views)
It seems that thread only talks about  Gig camera

For the Pointgrey 1394 camera I am using, it suggests to do it the following way:
  • Embedded image timestamp - The recommended timestamp mechanism for PGR cameras is the image timestamp. It takes the 1394 cycle timer at the time that the shutter was closed and embeds the information in the image pixels. This is the most accurate of the timestamps. In order to access this, you need to set the appropriate bit of the FRAME_INFO register 12F8h or use flycaptureSetImageTimestamping() (PGR FlyCapture v1.5.x.x only), and then use a function to read the first 4 bytes of the image (the timestamp is located in the first 4 pixels of the image). For an example of how this is done using the Flycapture API, refer to the MultipleCameraEx sample program included with the latest FlyCapture SDK. For an example of how to manually parse the image data to retrieve this timestamp
However, how can I set the register and still use the image acquisition and process package of NI? I tried to set the register '12F8h' using the IMAQ API, but it  returns error message   "Error -50401 occurred at an unidentified location"

Is there a way to do this?






0 Kudos
Message 3 of 5
(5,269 Views)
Hi Akang,
 
Using IMAQdx (or the Legacy 1394 API) you need to add the Base Address of the firewire camera to any register offsets. This can be done with a property node. I made a quick IMAQdx example VI to set the register and extract the timestamp from images. I verified this works on a DragonFly Express, but it appears all the PointGrey cameras with this support expose it in the same way.
 
This example only works if the camera is in 8-bit mode. If it is not, the example would need to either get raw, unprocessed image data or decode it differently based on the bit depth.
 
Let me know if you have any more questions,
Eric G
Download All
Message 4 of 5
(5,258 Views)
It works great. Thanks a lot for that. Do you know if there is a way to
obtain the same IEEE 1394 clock from the computer side in labview, or in another language?
The computer and the camera are on the same bus, the camera can set a time stamp
based on the bus clock, so should be the computer.

The above method provides a way to give a timestamp on the camera side when
the image is captured. I want also to obtain the same 1394 clock on the computer side
when other events happened so that I can obtain the time difference from the image
capture to these other events.

Thanks

Cindy


0 Kudos
Message 5 of 5
(5,213 Views)