PDA

View Full Version : synchronized images



Unregistered
February 17, 2005, 14:41:05
Thank you for the fast answer. I use an 5Hz external trigger, so I would like to snap and save 5 pairs of synchronized images in one sec.
My code is very simple: I use 2 ActiveX controls for the 2 cameras with same attributes(exposure time 1/64 sec, frame rate 7.5 f/sec, trigger mode on...)
And in a simple do loop cycle :
Icimagincontrol1.Memorysnapimage
Icimagincontrol2.Memorysnapimage
Icimagincontrol1.Memorysaveimage ...
Icimagincontrol2.Memorysaveimage ...

This code doesn't work well, there is ~0.2sec latency between the images. It seems the Memorysnapimage waits for the next frame? What is the function of the MemorySnapTimeout property in this case?
Is there any other way to synchronized images? Could you send me a VB sample code in this topic?
Thanks, Zoli

Stefan Geissler
February 17, 2005, 16:31:50
Zoli,

i am afraid, have no sample for this case. i suggest to set the time out to -1, so memorysnapimage waits with no timeout.

I must test this on my own.

Stefan Geissler
February 17, 2005, 16:36:12
Zoli,

we found the the problem:
Icimagincontrol1.Memorysnapimage
waits for an image and returns after an image has been received.
Then Icimagincontrol2.Memorysnapimage is called, but the image that was delivered by the trigger has been loast. This declares, why you have 0.2 sec (5 Hz) delay between the images.

A solution is to use the Imageavailable event to save the images.

Bruns
February 23, 2005, 16:34:03
Thank you Stefan, the Imageavailable event works.
Regards, Zoli

Bruns
May 6, 2005, 14:54:05
Hi!

I use the Imageavailable event to save the synchronized pair of images as you suggested. It works good, but only at the first ~2000 images, then it seems the 0.2sec not enough to capture and save the images, the Imageavailable events of the 2 Icimagincontrol objects are blended.

Have you got any idea?
Thanks,
Z

Stefan Geissler
May 6, 2005, 16:51:04
Hi Zoli,

This sounds strange to me, because normally, this should not happen.

It is it possible, that windows does something unexpected like showing the screensaver, working on the harddisk etc? This may initiates some IRQs, that stop the data transfer from the FireWire bus.