Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Finding a moving target

Group,
I am struggling with using LV7/Vision Assistant to track the center of a circle. The location of the circle is unknown a priori and will vary widely from image to image. I suspect I need to use pattern or geometric matching to find the circle in the image before attempting to measure it using "Find Circular Edges", however I am not sure how to link the FCE ROI to a pattern match. In my previous attempts, the "FCE" ROI is static as the circle hops around.

Can anyone point me in the direction of a relevant example code or simply guide a newbie?

Thanks,
Matt


Message Edited by mepausle on 06-20-2006 04:26 PM

Message Edited by mepausle on 06-20-2006 04:26 PM

Matthew Pausley
NC State University
Raleigh,NC
0 Kudos
Message 1 of 5
(3,843 Views)
You may have looked at this one already.  But the "Battery" example that ships with the toolkit illustrates finding a circle on a moving object.  You can find it in the Example Finder under Toolkits and Modules->Vision->Applications->Battery Clamp Inspection Example.vi

This example uses a pattern matching coordinate system.  But that method may work for you as well. 
---------------------
Patrick Allen: FunctionalityUnlimited.ca
Message 2 of 5
(3,827 Views)
Pallen,
That's just what I was looking for. I now having a VI that will update the coordinate system based on finding a reference image of the circle (anywhere in the FOV). I then link the FCE tool to the updated CS and make sure it always looks relative to the new CS. Works like a champ.

Maybe you can help me with question #2. Is there a way to track the circularity of the circle as it hops around? It is anticipated that the circle may be distorted in some images and I'll need a way to determine how "out of whack" it is? Thoughts?


Thanks again!

Matthew Pausley
NC State University
Raleigh,NC
0 Kudos
Message 3 of 5
(3,819 Views)
Is there a way to track the circularity of the circle as it hops around?


I'm pretty new with NI Vision myself, so you'll have to take my answers for what they're worth.  

I had a look around both Vision Assitant and Vision Builder to see if there was a tool for this.  Frankly I'm surprised that the Best Circle output from the Find Circular Edge.vi doesn't give you something to that effect.  (DVT would report any deviation away from a perfect circle as a value less than 1)

I suppose you could use either shape matching or pattern matching to gain a "score" for your circle.  I tried using the help to find some information.  But I'm finding a lot of holes in the documentation for NI Vision.  

Good luck.

---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 4 of 5
(3,801 Views)
Just my quick 2c...
 
If you use blob analysis (IMAQ Particle Analysis.vi) you can find the center and get a measure of circularity by using some of the blob measurements, eg, we have previously used the ratio between the blob area and the area of a circle with diameter equal to the max feret diameter to do this. If the blob is perfectly circular the result is 1.
If the blob analysis picks up more than one blob you may need to filter the blobs using the blob measurements to isolate your circle.
 
Cheers,
Mike
0 Kudos
Message 5 of 5
(3,784 Views)