LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I process realtime images to generate a control signal

Hi, hopefully someone can help get me started on this problem...
 
My ultimate goal is to be able to:
1.  Capture an image
2.  Process it to locate the position and orientation of an object within the image (I am using 2 different size circles drawn on the object which should be easy to locate.  The center of the large circle is the center of the object.  Drawing a line through the centers of the two objects gives the orientation)
3.  Determine the error from this data to a required final position and orientation
4.  Output a callibrated control signal to manipute the object one step closer to the desired position and orientation
5.  Repeat steps 1-4 until I get to the final position and orientation
 
Sounds simple.
 
But I am new to Labview and NI Vision assistant, and haven't yet been able to integrate the two.  Does anyone have an example Labview vi that would create a loop that captures an image, processes it in some fashion to extract some positional data, outputs a control signal and repeats the loop until the user stops it.  If I can use this as a model, hopefully I can figure out the finer details.
 
(Note: for test purposes I am using a USB camera, with drivers that are allowing me to capture images in Vision Assistant for processing.)
 
Any information that can be thown my way would be appreciated!
 
Neil
 
0 Kudos
Message 1 of 3
(2,324 Views)
Use the initialize command and cloase command outside the while loop.For the acquire u need to define a buffer do that but place the imaq create out side the loop.Now if u have connected the camera properly u should be able to continously acquire the image.If u need further details let me know the camera u r using.
Now for the next part of your programming u can do 2 simple things.One is to go with pattern matching where u need to define the template and most importantly the the output will give u a cluster specifying the orientation.U can use it for further processign or u can use a co-ordinate system which is similar to pattern matching.Start acquiring images first the rest is pretty easy.
Message 2 of 3
(2,274 Views)
Muks,
 
Thanks for the quick reply.  Your advice was helpful.  I was able to enumerate the two cameras that I have, and can select between them with the image aquired within the loop.  Works well.
 
Over the coming days, I will work on the image processing to see if I can extract the positional information.
 
Neil
 
 
 
 
 
0 Kudos
Message 3 of 3
(2,247 Views)