Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How accurate can I syncronize DAQmx and Vision Acquisition w-o using hardware?

Hi all!

 

 

I have been tasked with building a simple little system that cna acquire video from a Directshow compliant USB camera simultaneously while recording analog data via a USB-DAQ. 

 

So I will use DAQmx and NI Vision VAS.  Its pretty straight forward.

 

My question is how well can I synrchonize these two data streams on a Windows machine without using a hardware trigger?  The camera that was chosen does NOT have any digital I/O.  So I assume I'll just have to setup the two separate tasks in LabVIEW and then try and launch the tasks as near to simultaneously as possible.  Any guesses how closely synched they'll be?  

 

Each recording session is short... maybe 10-20 mins... so I am not too worried about drift over time.  I think I just need to try and trigger both tasks as close to simultaneously as possible.

 

The customer has asked that the analog and video by synched to at least 100 ms.  My gut feeling is that if you want synchronization better than +-1000ms then you should use a hardware trigger.  Which would mean I need to buy a new camera with digital I/O, right?  Any tips?

http://www.medicollector.com
0 Kudos
Message 1 of 7
(4,859 Views)

Starting both processes at the same time should get you within a second, but it is hard to say how much better than that you can do.  You might be able to test synchronization by having a small LED flash in the image and recording the LED voltage using DAQ.  This would give you an idea of close the synchronization is.

 

I think to get within 100 ms reliably, I would want a hardware trigger.  Even if you start both processes at the same time, it takes a bit of time for the initialization of the processes.

 

Perhaps if you were to have both processes already running, then clear the DAQ buffer right when the image arrives, you could get fairly good synchronization that way.  I would think it would be within a couple of image frames.  That just depends on the delay between acquisition at the devices and data/image arriving in your progam.  This would be a much more predictable delay, which you could probably correct for.

 

I would probably still buy a new camera, unless they are extremely expensive.  The time/money you waste trying to do it the hard way will end up being worse than just buying a camera.

 

Bruce

Bruce Ammons
Ammons Engineering
Message 2 of 7
(4,852 Views)

Thanks, Bruce.  You confirmed my thoughts.  I agree.

 

Only challenge is finding the camera.  they are currently using this "digital microscope" camera:

 

http://www.dinolite.us/products/ad413t-i2v

 

I'm not so familiar with these types of cameras.  Any thoughts on how to find a similar camera that has digital I/O?

http://www.medicollector.com
0 Kudos
Message 3 of 7
(4,846 Views)

That could be a difficult one.  This would require a camera, lens, and lighting, with unusual requirements (UV, IR, etc.).  They will probably complain loudly if you have to switch to a multi-component solution.

 

Maybe figuring out a software method might work better after all.  It really depends what they need.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 4 of 7
(4,842 Views)

Thanks, Bruce.  One more question:

 

What if I switched to an analog camera like these ones:

 

http://www.dinolite.us/products/digital-microscopes/tv-vga-output/rca

 

Those cameras are similar to what they have.  

 

Could I then use a frame grabber with I/O and trigger the video acquisition?  I've never used a framegrabber like that before.  Not even sure if thats possible.

http://www.medicollector.com
0 Kudos
Message 5 of 7
(4,836 Views)

NI doesn't have any analog cards for video any more.  You might be able to find a third party card, but it is probably a step backwards.

 

I think starting both acquisitions, then finding matching offsets for starting points would probably work.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 6 of 7
(4,828 Views)
there is different between image Acquisition start and start to show image or start to process them
so I think you do not need use software trigger for image Acquisition you need trigger for image show in window or image processing. so start to acquire your images any time that your start your code but use trigger for show or process them
in your software based on your frame rate of capture you can make syncronizetion time shorter for example for 30fps camera you can reach up to 33 ms
0 Kudos
Message 7 of 7
(4,730 Views)