Discussion:
acquisition from digital camera
(too old to reply)
jimmy-b
2008-08-06 14:10:08 UTC
Permalink
I have connected my digital camera with the LabView software, and I can snap pictures. But how can I make an acquisition of images (specifying the nr. of pictures, the time between images and the name under wich the image is saved (e.g. automatic numbering). This is a rather straightforward procedure available in many acquisition softwares, so I hope there already exists a LabView program which can do this.
 
Thank you for your help.
MikeS81
2008-08-06 15:10:06 UTC
Permalink
Hi jimmy-b,
how can you snap pictures from your camera? Do you use the vision toolkit? Do you use a single vi? If yes, use a loop, insert your vi and a wait function. Connect an array with your wait values to the wait function.
 
Hope it helps.Mike
jimmy-b
2008-08-07 09:10:09 UTC
Permalink
Hi Mike,
I indeed use the vision toolkit. Operating from this I can grab pictures and changes parameters. However, I have totally no experience with programming in LabView. If I'm not mistaking a VI is a self-made program written in LabView. I just wondered if someone could help me with the programming or could send me a working program.
Anayway, tx for the help
smercurio_fc
2008-08-07 14:10:07 UTC
Permalink
jimmy-b wrote:
Hi Mike,
However, I have totally no experience with programming in LabView. If I'm not mistaking a VI is a self-made program written in LabView. I just wondered if someone could help me with the programming or could send me a working program.
You really need to spend some time going through the tutorials and reading the LabVIEW Help. Somebody sending you a working program will do you no good since you are bound to need to make changes, and you won't know what to do!To learn more about LabVIEW it is recommended that you go through the tutorial(s) and look over the material in the NI Developer Zone's <a href="http://zone.ni.com/devzone/cda/tut/p/id/5054" target="_blank">Learning Center</a> which provides links to other materials and other tutorials. You can also take the <a href="http://www.ni.com/academic/lv_training/how_learn_lv.htm" target="_blank">online courses</a> for free.
smercurio_fc
2008-08-06 15:10:11 UTC
Permalink
It's a straightforward procedure with many acquisition software programs because somebody wrote it that way. This means you have to do the same thing. :smileywink:As indicated you can just use a loop that's driven by the number of pictures you want to take. It doesn't sound like you want a different wait time depending on which picture you want to take, so you wouldn't use an array of wait values, but rather a single value. You also need to define some sort of format for the filename. Use the Format Into String function to create your filename based on whatever rule you want. Crude example:


Example_VI_BD6.png:
Loading Image...
James McN
2008-08-07 10:40:20 UTC
Permalink
Hi Jimmy,
If you have the vision assistant installed you should be able to perform all the operations you require in that without any need for labVIEW coding.&nbsp; You can then export it as a LabVIEW VI or C code.
You should find it in programs&gt;&gt;national instruments&gt;&gt;vision assistant.
If you cannot find it let me know what software and hardware you already have and I can find out if you should have recieved it.&nbsp; It should come with any NI Vision hardware that you may have and certain vision toolkits.
Regards,
jimmy-b
2008-08-07 12:40:09 UTC
Permalink
Dear James,
I have the vision assistant 8.5 installed. At first sight, this indeed allows me to make acquisitions, although I have not figgered out how I can change the intervaltime. I will first get familiar with the program by reading the manual.
How can I export it as a LabView VI, or what's the idea behind exporting it?
Thank you very much for the information.
&nbsp;
James McN
2008-08-07 15:10:08 UTC
Permalink
Hi Again Jimmy,
I have been having a bit of a play and realised that you can only process images in the stand alone Vision Assistant.&nbsp; You can acquire images manually to process but cannot use it to generate code to acquire as well.&nbsp; Thankfully this is also straight forward using an vision acquisition express VI.&nbsp; Express VIs mean that you configure them in a pop up box without the need for much coding.
For your particular problem in terms of setting a delay you will need to start by using the express VI to perform a finite acquistion with inline processing.&nbsp; This will place the VI inside of a for&nbsp;loop that will allow it to snap images over and over and will also automatically put the items you need on your front panel.&nbsp; You can control how often this while loop iterates using timing and this will control how often it will request an image from the camera.&nbsp; You can do this by dropping a time delay express VI or a wait VI any where in the loop.&nbsp; If you use the time delay express VI then it will give you a pop up to enter the time delay.&nbsp; If you use the wait VI then you will have to use a numeric constant or control and wire it to the input of the VI.&nbsp; This constant should contain the time delay in milliseconds that you require.
In terms of saving the files the example code already posted is good but you will be saving images so if you go to your&nbsp;vision pallete and go to vision utilities&gt;&gt;files there is a VI to save to the usual image file formats.&nbsp; Im not sure if you've found context help yet but if not pressing ctrl+h will bring up a window that means if you hover over the VIs it will show you what needs wiring where.
I hope this helps and apologies for the previous misunderstand.&nbsp; Best of luck!
Continue reading on narkive:
Loading...