LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving a series of images (from a smart camera) into an AVI file

Solved!
Go to solution

Hello,

 

I have a lab setup in which we view brain cell deflections in a well-plate after being pressurized with air for 50ms. I have a smart camera hooked up to an IMAQ PCI card to acquire images.

I'm trying to save the series of images into an avi file, so that I can view the deflections in a slow video.

 

The way I have it set up at the moment takes an image and saves it in an avi pre-existing (some random .avi that I didn't need) format. But here are some problems:

1. I would like for the VI to create a NEW .avi, rather than saving it into a pre-existing one.

2. Right now, each image simply overwrites the previous one in the avi file. So the resulting avi is a 00:00 length movie with a single image (the last frame that camera viewed).

 

I have what I have programmed attached. Any help would be appreciated.

 

Thank you,

 

B.J. Kim

University of Michigan

0 Kudos
Message 1 of 5
(2,770 Views)

Hello B. J.

 

Thank you for choosing National Instruments! 

 

I believe the easiest solution to your problem may be available in the LabVIEW example finder.  If you open example finder and click the search tab, search the term "avi".  You will see an example called "Grab and Save to AVI.vi"  Does this give you the functionality you are looking for?

 

Additionally, you may be interested in the following community examples.

 

Grab and Save to AVI and/or View AVI (IMAQ or IMAQdx)
https://decibel.ni.com/content/docs/DOC-15136

NI-IMAQdx Grab and Save to AVI
https://decibel.ni.com/content/docs/DOC-3587

 

Please let me know if I can be of further assistance!

 

 

Sincerely,

Greg S.
0 Kudos
Message 2 of 5
(2,759 Views)

I have seen those, and I have tried to incorporate them into my VI. But since I'm not very familiar with those functions, I can't seem to integrate them very well.

 

I notice that none of the examples use Vision Acquisition. I get my images from my Basler 504k camera from that. When I tried to somehow link the Write AVI function to the Vision Acquisition, it does not seem to work.

 

Can you help me figure out how to do this?

 

Thank you

 

B.J.

0 Kudos
Message 3 of 5
(2,753 Views)

Here is an updated version (attached). I kept trying to incorporate the examples you showed me, and I have made a little bit of a progress.

 

It now saves a new avi file, and it's not a single image movie anymore. It's got as many images as I run the VI for. BUT, it only saves the very first image the camera takes and just loops it over and over again until I press stop. So the resulting avi shows a still image of the very first view of the camera for however long I ran the VI for.

 

Any suggestions on how I can fix this?


Thank you,

 

B.J.

0 Kudos
Message 4 of 5
(2,746 Views)
Solution
Accepted by topic author bjkimUM

Never mind, solved it. Just put the Vision Acquisition into the smaller loop.

 

thanks,

 

B.J.

0 Kudos
Message 5 of 5
(2,737 Views)