LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQdx grab and save images (i.e. PNG, TIFF, etc) not AVIs

Hello Vision users,
          
        I'm trying to make a VI with IMAQdx that with, external triggering, will continuously save images at the fastest rate possible.  I've seen lots of examples for making AVIs, and have run them successfully at 314fps,  but haven't found a single one for making images (i'm using Labview 8.6, imaqdx vision software, have an AVT pike camera, and 1394b firewire).
 
Does anyone have any such code (i'm willing to put the external triggering on the backburner for now)?  If not, any ideas on efficient ways of building one (i.e. should I be using snap, or sequence instead of grab?, what is the ideal way of generating the naming:for-loop vs while-loop?) ? And what is the difference between using "imaqdx grab vis", versus "imaqdx get image vi"
 
I've been messing around with some code i found online and have a preliminary code (attached), but for some reason it outputs numbering way higher than the actually number of acquired tiffs (e.g. i acquire ~1677 tiffs, but have numbering that jumps around and ends at ~2402). Also, it says I'm still acquiring at 314fps, which seems a little odd, as I've been told image saving is slower than AVI saving.
 
 
 
 
 

0 Kudos
Message 1 of 11
(6,188 Views)

Hello,

 

I would recommend using the IMAQdx Get Image VI over IMAQdx Grab, as it enables you to choose the buffer to read from when having buffered acquisition setup. THe IMAQdx Grab VI only shows the latest acquired image, which may or may not be the next image you would like to get access to. The IMAQdx Get Image VI gives you the flexibility to specify the buffer number during a buffered acquisition.

 

I am not sure why you are saving to less number of TIFF files than the number indicated in the 'Photo #' indicator. You may be receiving an error in the IMAQ Write File VI. Try wiring an indicator to the error output to check for any errors. 

 

If this is proving to be much slower than saving directly to an AVI, you could always choosed to read frames from the created AVI and then save each frame to an image file. I hope this helps. 

Vivek Nath
National Instruments
Applications Engineer

Machine Vision
0 Kudos
Message 2 of 11
(6,156 Views)

im doing my project by using labview about vision. i want try it also if it can help my project..

0 Kudos
Message 3 of 11
(5,048 Views)

Hi,

can I ask you how did you managed to aquire avi at 314fps?

because I'm trying to use the avi vi for acquiring videos at 300fps, but the maximum I manage to reach is 90 fps,

thank you!

A

0 Kudos
Message 4 of 11
(4,859 Views)

Can you save to individual images instead?

You can create AVI afterwards.

 

Save to disk is slow.

You can use multiple parallel loops to speed up.

 

Hardware solution:

Use SSD + RAID instead of traditional hard disk.

 

George Zou
0 Kudos
Message 5 of 11
(4,852 Views)

Yes, I tried to save as single images, using the template...I've just started to use LabView so I still have't the skill to create something from scratch.

And also saving single images I have 90 fsp while the framerate output reads 300..I understand from several discussions that the best solution is to buffer the image using as you said multiple parallel loops and after the acquisition save them. I was looking for some king of tutorial/sample code but I have't found something specific so far..

 

Antonio

0 Kudos
Message 6 of 11
(4,843 Views)

Antonio, 

 

If you search around our website, the discussion forums, and NI Community pages, you will find a many examples of LabVIEW code that implements the Producer/Consumer architecture. You can also find a template for it on your LabVIEW program already by going to:

 

LabVIEW >> File >> New >> From Template >> Frameworks >> Design Patterns >> Producer/Consumer Design Pattern

 

Here is just one of a large amount of examples that I found by searching through the NI Community.

Huntington W
National Instruments
Applications Engineer

***Don't forget to give Kudos and Accepted as Solution where it is deserved***
0 Kudos
Message 7 of 11
(4,827 Views)

Hi Huntington,

 

thanks for the link, I honestly miss this one.

In my case, i need to record experiments of 1 or 2 minutes at 300/400fps.. do you think that saving in a buffer all the frame and then save the images after the acquisition is a good solution?

Thanks,

 

Antonio

0 Kudos
Message 8 of 11
(4,815 Views)

Hello Veritas, 

 

I have a problem saving contiuous acquisition in MAX. Actually I'm new in this and havn't has much of experience. I'm using IMAQdx and IEEE 1394 (fire wire), and my quesion is can I save 2 capture in MAX or a AVI movie or do I need to use Lab View? 

 

I have red many frumes but unfortunately I couldn't come up with a single routin. The only option MAX in IMAQdx gives me is to same a single image at a time as far as I know. 

 

Thank you for your help

Kia

0 Kudos
Message 9 of 11
(4,038 Views)

Hi, I have seen your post in 2013, it seems to have a long time. Now I have a same problem for saving the video images; Also, I have run your code, the results shows that sample1-7, sample10; sample11-17;sample20;  like this and so on; So, how did you solve this problem with your code? Thanks.

Chen

0 Kudos
Message 10 of 11
(3,459 Views)