LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview Program to adjust the exposure time of the smart camera

Hey there, I'm pretty new to the world of labview as I have to do a Project in my university now. 

In this project I am supposed to the following: We have a denso robot arm which can be programmed with labview. Additionally we have a smart camera on the ceiling of the robot cell to take some pictures of the ground. On the ground we have a light table with some workpieces like cylinders or cubes. The camera has to take a picture of the light table and to detect the workpieces, so the robot arm knows where which workpiece lies to grab and put them to another place. 

So in the end we have 2 programs running, labview and vision assistant. The problem now is, that the camera is already taking pictures, but the exposure time is too long, so the pictures a way too bright. We now have to implement some labview codes in the exisitng program in order to adjust the exposure time with a controller in the front panel. 

Do you guys have any idea how we can do that?

0 Kudos
Message 1 of 3
(3,773 Views)

Do you know how to use NI MAX (the Measurement and Automation Explorer, whose icon should be on your desktop if you are running on a Windows PC)?  If you open MAX and look at your camera's properties, you might find a setting called something like Exposure (my Logitech Web Cam, in MAX, has such a setting).  On mine, there's a Mode (currently Auto) and a Value, which I think is the exposure time in seconds (I'm using Auto).

 

Setting the Attributes in LabVIEW is a little trickier (and, as far as I know, there is no good description or tutorial on it -- we "learned by doing").  The following Snippet shows how you can get IMAQdx to give you a text file containing all of the Attributes of your camera.

Camera Attributes.png

This has the form of a .ini file, so you can modify it with LabVIEW's Config File VIs to set it up the way you want.  In fact, when we wrote our imaging routines in LabVIEW 2012, we just created the file's contents as a string and fed that directly into the corresponding Read Attribute function (in place of the filename).  Seemed to work, but we may have been fooling ourselves ...

 

Just so you have something to think about, I'm attaching the Attributes.txt file.  You can see that one line says  CameraAttributes::Exposure::Mode = "Auto" -- I think if we changed Mode to "Manual" and added an Exposure::Value, that would work.  I think you can get a sense of the Attributes and whether they are readable, writable, and what "type" they are by replacing Write Attributes with Enumerate Attributes -- this gives you an array of Clusters that provides information on each attribute.  What I'm less certain of is how to manipulate them -- possibly Property Nodes come into play, but I haven't tried playing with doing this ...

 

Bob Schor

0 Kudos
Message 2 of 3
(3,754 Views)

Oops, I forgot to attach the Attributes file ...

 

BS

0 Kudos
Message 3 of 3
(3,746 Views)