LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to save multiple snap shots in one file?

Hi,

I've been trying to take snap shots using a USB camera and save the them into one file; however, I've had no luck with the saving part. Can anybody help me with this problem? I've attached the code I'm using in case anybody wants to take a look.

Thank You,
Molana
0 Kudos
Message 1 of 3
(2,546 Views)
One way of saving all images in the same file could be to save them as an AVI file. The required vis are in the Vision utilities/File/AVI subpalette. One advantage of this technique is that you can open the file with
any video utility.
 
Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
        
Message 2 of 3
(2,528 Views)

Hi Molana,

If you are looking to save these images to file, you can use either the IMAQ Writefile VIs, or potentially the AVI writefile VIs.  These VIs are both on the FIle I/O palette of the Vision Utilities subpalette.  To write an AVI file, you <b>open</b>, write to, and then <b>close</b> a session, very similar to most processes in LabVIEW.

I also noticed in your code that you are enumerating your USB cameras and closing the camera session all within the while loop.  This adds a great deal of overhead and time to your acquisition process.  I would recommend moving these processes outside of the acquisition loop, such that they occur once before and once after the snaps.

If you are still having trouble acquiring, I would recommend that you download and install the NI IMAQ driver.  It includes examples for snapping and saving images with NI IMAQ.  This process is extremely similar to that which you would use in NI IMAQ for USB.

Hope this helps!

Robert

0 Kudos
Message 3 of 3
(2,511 Views)