Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Capture and save a sequence of images using the example

Dear Friends,

I'm trying to modify the following example vi (attached) to make it able to capture and save a sequence of images into .gif or .png or .bmp (whatever format) files but couldn't get it work. Basically I'm trying to be able to set the firewire camera attributes before capturing image sequence. Can someone help me with the modification. I'm really new to labview. Any input will be greatly appreciated! Thanks

Jerry
0 Kudos
Message 1 of 4
(3,525 Views)
Hi Jerry,
Are you trying to capture an indefinite number of frames, or do you have a known number of frames you'd like to capture each time you make an acquisition? If it is a known number of images, you may be better off using the Sequence example.

And then if you only have a few attributes you'd like to set, and know exactly what you want to set, you could simply add a property node in between the IMAQdx Open Camera VI and the IMAQdx Sequence VI. Then all you'd have to do is add in a for loop which saves each image from the sequence's array of captured images to a unique filename, and then you can close your camera session and dispose of your images.
0 Kudos
Message 2 of 4
(3,506 Views)
Hi Vijay,

Thanks. For the following vi, how do I determine the path name to save the image sequence into a sequence of 10 images named imag00~imag10?

jerry
0 Kudos
Message 3 of 4
(3,501 Views)
Hi Jerry,
You can use the Format Into Value VI to take the loop iteration count and convert that into part of a file name, then add the appropriate extension to the (i.e. file 0 would be File000.bmp or png/jpg/etc., file 1 would be File001.bmp...). And you can do all that within the same For loop. Then you want to change the folder selection control to choose existing (or new) folders rather than files. This can be done by right-clicking it and selecting "Browse Options...". This way you force the control to only send paths to folders and not paths to specific files. Then you use a Build Path function to combine that folder name with the filename you built in each iteration of the loop,a nd use that as your save-to location. I've made those simple modifications and included them here.

And remember to dispose of your images when you're done with each one of them 🙂
0 Kudos
Message 4 of 4
(3,491 Views)