LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

!!!help!!! synchronization camera and measurements

Hi,
 
I need help. I am student and i am learning Labview 8.0. My goal is synchronization of camera and maesurement. Which camera is the best? How can i do it? What I need? Which solution is the best and which is the cheapest. Sorry for my english. Thanks very much for your advices and replies.
 
Dan
0 Kudos
Message 1 of 14
(6,767 Views)

Dan,
Thank you for your interest in National Instruments.  What type of acquisition do you need to do (1394, Analog, Camera Link)?  It depends on how fast a frame rate/how fast you are taking measurements to determine what kind of system you need.  What kind of data acquisition are you doing?  If you want to synch an image with a measurement you need to set up a triggered acquisition in LabVIEW that will trigger the camera to start taking images as well as measurements.  The main thing is that you will need a camera that can do triggered acquisition.  It will have pins on the back for triggering.  For this you will need one of our frame grabbers and a DAQ card.  I have posted some links below that you should look through to determine what it is you want to do.

Data Acquisition Hardware

Frame Grabbers


Advanced Analog Triggering and Synchronization Techniques

Regards,
Mark T
Applications Engineer | National Instruments

 
0 Kudos
Message 2 of 14
(6,738 Views)

Thanks Mark for your reply,

my goal is suggest to my chef some solutions....our measurements is 1kHz and higher and we want to acquire video at least 25Hz.. I thing there are 3 possibilities:

1) USB camera with software triggering

             How acurate is this option? What I need? I now that camera which goes under DirectShow. Need I anything else? And how can I synchronize that with measurement?

2) FireWire with software or hardware triggering

            My questions are the same. .. Can I use standart (public) camera? camera will be non-stop online and I acquire only same frames, is it possible and how can I do that?

3) Some your Imaq card with camera

            Same questions.

 

Our DAQ has RTSI connector. I hope,i provide all important informations to you.

Thanks very much for your replies.

Dan

 

 

0 Kudos
Message 3 of 14
(6,704 Views)
with the standart (public) camera I mean MiniDV camera...
0 Kudos
Message 4 of 14
(6,704 Views)

Dan,
You could use a USB camera to acquire the video but the USB driver is very limited in functionality.  You can only acquire video or snap pictures.  Also our USB driver is not supported by Applications Engineers it is just provided as is to allow some very limited functionality of USB cameras.  It is possible to acquire video from a USB camera or standard 1394 camera and at the same time be acquiring data with your DAQ card but the synchronization of the data and the frames will not be as accurate if you do not have a 1394 camera that can do triggered acquisition.  So if you need the start of the camera acquisition to start at the same time as you are acquiring data then you will need to get a camera that supports triggering.  Acquiring at 25 Hz should not be a problem and you will be able to acquire data at the same time but the start will be software timed.  You would just set up an image and data acquisition separately in LabVIEW and then start them at the same time.  Once you have acquired the video and the data you would then just divide down the data and assign  it to each frame.  The most accurate way of doing this is if you have a triggerable 1394 camera you can then use the DAQ cards on board counter and generate a pulse at the correct interval for each new "frame" of data that would then be sent out to the camera.  For this you will not need RITSI. 

For Option 1:
You will only need a USB camera and our free USB driver.

For Option 2:
You will need to buy our 1394 driver and use a 1394 camera (preferably triggered)

For Option 3:
You could use one of our Analog Frame grabbers and an Analog camera.  This is not recommended.  It would be easier to go with 1394 because you have the possiblity of implementing a triggerable camera.

I hope this information was helpful.

Regards,
Mark T
Applications Engineering | National Instruments
Message 5 of 14
(6,691 Views)
Hi,
I have some new questions...We decided to buy USB camera Microsoft LifeCam VX6000. How can I save video from this camera and data (temperature measurement), resp. how can I recognize which frame belongs to data? Thank you very much for your early reply.
Dan
0 Kudos
Message 6 of 14
(6,615 Views)
Hello Dan,

There is actually a very good example that illustrates exactly how to do this.  If you open up the "Example Finder" in LabVIEW (under the Help menu) you can search for "AVI" and you should see an example called: "AVI read write with Data Example".  This example uses an already saved AVI file then generates data and saves it to each frame of the AVI.  You can then go back through the AVI frame by frame and see the data associated with it.  All you would need to do is replace the loading of the AVI file with your image acquisition.  This should get you started.  I hope this information helps.  Thanks and have a great day.

Regards,
Mark T
Applications Engineer
National Instruments
0 Kudos
Message 7 of 14
(6,592 Views)

Thanks you very much Mark T,

this was very helpfull, but I have some more problems. I want to do something like pause in saving video...we have some voltage measurement and we start it by trigger signal, i want to acquire video on this signal but i want to see video all the time and some problems with time marks. I have to seek the frame according to time and the time is save in each frame as a data. For example I am going to capture data from 2 - 2,5s and from 5 to 6s, I want to have only one video with competent frames and when I want to read frames I want to seek them that I enter the time...

Thanks for your help

Dan

0 Kudos
Message 8 of 14
(6,548 Views)

Hello Dan,

If you want to display the live video feed all the time but only write certain frames to the AVI it's only a matter of programming.  You will need an outer while loop that is constantly reading images and displaying them.  Then you will also need a case structure within the while loop where the AVI write frame VI will be.  The Boolean input to the case structure will then be determined from your data acquisition device's trigger.  You will need to read the trigger line and when it triggers execute the correct state of the case structure to save that current frame in the AVI.  Please note that this methodology for saving an image by reading a trigger line on a DAQ device is going to be very non deterministic.  Since you do not have the ability to trigger the camera the frame you are saving might not be the same frame the data corresponds too.  The trigger and data acquisition will happen in real time but reading the trigger for purposes of saving images to the AVI file will happen when ever windows executes that part of the code.  So as long as it does not have to be real accurate this might work.

So I assume that with each frame you are also writing a time stamp with the image.  To then perform a "seek" on the images according to the timestamp it will just be a matter of iterating through each image, extracting out the data, then comparing that data to the timestamp you need.  As soon as it finds the correct timestamp then update an IMAQ display with the correct image.  I hope this information helps.  Thanks and have a great day.

Regards,
Mark T
Applications Engineer
National Instruments 

0 Kudos
Message 9 of 14
(6,534 Views)
Hi,
thanks for your reply,
you wrote that there can be problem with synchronization. Do you have a better idea how to do it? Thanks for your suggestions.
Dan
0 Kudos
Message 10 of 14
(6,473 Views)