From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Labview to control a digital camera

Hi,
Im trying to use Labview 8.5 to control a digital camera (a 1394 firewall digital camera) with the ultimate goal of creating a 3D image. I am a new labview user so I'm having many difficulties. I have figured out how to control brightness, contrast, and gamma but I still need to control the aperture, shutter spped, and the exposure time from the computer before I capture the picture. I am also having difficulties trying to zoom in and out. The toolbar on the side allows me to zoom in, but not back out. I would also like to do a sequenced aquistion where I can generate a time log file. I am able to take sequenced pictures, as many as I need to, but I can't save them to a disk. How exactly do I save multiple images to my computer? If anyone knows an answer to any of my questions, I would greatly appreciate the help.
I have attached the two programs that I am using into one program. One aquires the image and the other does the sequence aqusition.
Thank you,
Jessica
 
Melody
0 Kudos
Message 1 of 31
(5,304 Views)
Aperture can be controlled by adjusting your lens.As far your zoom in in concerned.Press shift + zoom u will be able to zoom out.For saving multiple image it is very simple.Use a While loop get the iteration convert it into string .Use a string to path function.Concatinate it with ur desired file path seperated with a"\".Give the conc output to write jpg or bmp file.Give the ur image output as input to the write function.If u didnt get it let em know i will send u a vi.
Message 2 of 31
(5,281 Views)
can you post your vi for Lv 8.0.I am using 8 and am not able to open your vi
Message 3 of 31
(5,280 Views)
Thank you! I got the zoom out to work, but I am still having trouble saving. I tried to do what you suggested but I wasn't successful. I have attached the block diagram for my program; thank you very  much for your help!
Melody
0 Kudos
Message 4 of 31
(5,248 Views)
I figured out how to save my images- thank you for your help. I am still unsure about how grab a few frames and then perform frame averaging. I can do a sequenced aquisition but I cannot then average the frames together to reduce noise. Any ideas?
Melody
0 Kudos
Message 5 of 31
(5,238 Views)
Hello Skittleme1,

You could use the IMAQ Operator functions to perform the averaging of images. In the Fuctions Palette, they are located under Vision and Motion >> Image Processing >> Operators. These functions should enable you to add multiple images and average them out.

I hope this helps.
Vivek Nath
National Instruments
Applications Engineer

Machine Vision
Message 6 of 31
(5,233 Views)
Hi,
I need the program to average a certain number of frames together taken from my camera. I need the user to input a number of frames to average so I created a For Loop to try to accomplish this. I am having a problem somewhere and I am not sure what I am doing wrong. I have attached the program- for LabVIEW 8.0- can you figure out what is going wrong?
Thank you so much
Melody
0 Kudos
Message 7 of 31
(5,219 Views)

can you figure out what is going wrong?

A lot.Y have u connected the output of the time delay to the imaq data type?Dont use a for loop use an while loop instead.,Dont configure grab for every iteration.Put it outside the loop.Since u want to grab simultaneous images u need to have an eye on the bandwidth else u will not get proper images
Message 8 of 31
(5,192 Views)

I tried to fix what you suggested, but I am still having problems- I am new to LabVIEW and am a research student trying to create a program so that I can study the strength of soft tissue. I wanted to use a For Loop so that the user could input the number of images to average together. Also, what did you mean keep an eye on the bandwidth?

I have attached my reworked program and the example that LabVIEW supplied for frame averaging. It takes presaved pictures and averages their frames together. That would work just fine if I could chose the files that I want to use, but I cannot figure out how to wire that. If it is easier to change that, then I would be happy to use that example instead, but everything I try doesn't seem to work. Any ideas?

Thank you so much for all of your help!

Melody
Download All
0 Kudos
Message 9 of 31
(5,187 Views)
Hello Skittleme1,

As mentioned in the previous post, you should not wire the output of the 'Wait' function to the 'IMAQ Create' VI. If you want to snap an image in every iteration of the loop, you do not need to use the 'IMAQdx Configure Grab' VI. You will just have to use the 'IMAQdx Open Camera' and 'IMAQdx Close Camera' VIs outside the loop. You do not have to place multiple 'IMAQdx Snap' functions within the loop - you could use a shift register.

I have attached an example to demonstrate this. This is just one way to implement your application. I hope this helps.
Vivek Nath
National Instruments
Applications Engineer

Machine Vision
Message 10 of 31
(5,186 Views)