ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How would I save and name multiple images automatically acquired from a Imaqdx camera?

I have a code that can save images however, there is a need for user input when it comes to saving the images.

 

I also attached the code.

0 Kudos
Message 1 of 8
(5,605 Views)

Hi Theydon,

remove the dialog and build your path (including filename) inside your loop and connect it directly to your save function.

 

Mike

Message 2 of 8
(5,592 Views)
I removed the dialog and took the path thread and attached straight to the save function and got this error. 
 
Error -1074395992 occurred at IMAQ
WriteTIFFFile
File access denied.
 
Possible reason(s):

IMAQ Vision:  (Hex 0xBFF604A8) File access denied. 
0 Kudos
Message 3 of 8
(5,576 Views)

Hi Theydon,

 

Make sure that you are sending it a .TIFF file extension, and that you have permission to access the file.  To double check the file path that you are actually sending to the WriteTIFFile.vi, right click on the file path wire that is going into that VI and select "Create>Indicator".  If this does not work, then please post your code with the modifications that you have made so others can take a look at it. 

 

Cheers,

Marti C
Applications Engineer
National Instruments
NI Medical
0 Kudos
Message 4 of 8
(5,563 Views)

I have the automatic saving under wraps however, the naming remains an issue. Any insight as to how I can sequentially name the images I capture?

 

Thanks to MikeS81 and Marti C for your help thus far (sorry for my poor manners).\

 

I attached the updated file. 

0 Kudos
Message 5 of 8
(5,552 Views)

Hi Theydon,

 

From the looks of your code, it looks like you already are.  The iteration number to a string inserted into a file path should be giving you sequential files ("Sample1, Sample2", etc.).  Are you not seeing this behavior?

 

Cheers, 

Marti C
Applications Engineer
National Instruments
NI Medical
Message 6 of 8
(5,533 Views)

I understand the naming conventions now. Two more pressing issues have arisen.

 

When 10+ photos are taken, the naming skips the numbers 8 and 9 for instance, photos would be named #6, #7, #10, #11..., #16, #17, #20, #21 etc.

Any idea why? 

 

~also~ 

 

Is there any way for me to increase the amount of photos taken per second or am I limited to the timing of the for loop?

 

Thanks again for all of your responses. 

0 Kudos
Message 7 of 8
(5,525 Views)

Hi Theydon,

 

The number of photos is going to be set by how often you are calling that IMAQdx Snap.  This right now is going to be limited by the prep time between shots.  If you make it so the loop will run more than once a second, you will get more photos.  

 

Secondly, why do you have that while loop around the write to file?  You don't actually need it, and this is probably what is causing the files to skipover those files.  If you would still like to decide whether or not to save the image, you could use a case structure instead of this while loop. 

 

Cheers,

Marti C
Applications Engineer
National Instruments
NI Medical
0 Kudos
Message 8 of 8
(5,514 Views)