Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Make line fit in vbai based on match pattern

Hi
 
1. How can I make a line fit based on multiple coordinates I have found based on Match Pattern?
 
I have got 2 problems doing this. 1) First of all I am finding about 40 points (with X,Y), and if I use Geometry >>Line Fit then it sometimes seems like it doesn't use all the points, the line is not drawn along all the points. 2) Secondly if I tell it to use the 40 points found, then if it only finds, lets say 38 point, the next time than it fails, or the other way arround, if it finds 42 points, the last 2 points will not be used in the Line Fit.
How do I tell it to use all coordinates it finds in Match Pattern to do a Line Fit?
 
Best regards
Simon
LabVIEW 8.6 / 2009 / 2010
Vision Development Module 8.6 / 2009 / 2010
VBAI 3.6 / 2010
0 Kudos
Message 1 of 2
(2,949 Views)
Hi Simon,
 
Unfortunately, you can only use predefined points with this function in VBAI. The best way to get around this will be to use Vision Assistant to setup the same steps for finding all of your points and then convert that script into a LabVIEW VI.  Once in LabVIEW you can easily determine how many points are found each time and then pass them manually into the Curve Fit VI.  In VBAI then you could simply use a "Run LabVIEW VI" step and return the correct line.
 
Best regards,
Peter Porsman | Applications Engineer | National Instruments
0 Kudos
Message 2 of 2
(2,925 Views)