03-18-2016 01:09 PM
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?
03-18-2016 01:53 PM
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
03-18-2016 02:39 PM
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?
03-18-2016 04:03 PM
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
03-18-2016 05:11 PM
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.
03-18-2016 07:49 PM
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
03-24-2016 05:58 PM