Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

fitline initial set

Using Vision Dev Mod 8.2

I have a set of points. Almost all points are on a line within a couple pixels.
If I call FitLine with a small value for PixelRadius then fairly often it will only fit to one end of the line, which isn't good enough for my application.
If I use a large value for PixelRadius, then the initial line can say go perpendicular (especially if there happens to be one or two outliers) to the desired line and pick up enough points to continue.

Is there any way to force more then 50% of the points to be used for the initial line estimate for FitLine? Or to hand the FitLine routine the Initial Line to use?
Or is there access to a Standard Line Fit routine?

0 Kudos
Message 1 of 2
(3,377 Views)
Hello storm135,

I am not too sure about what exactly you observe when you change the 'pixel radius' input to the 'IMAQ Fit Line' function. Could you post screenshots of the lines that you see in comparison to the expected line? Also, if you could post a screenshot of your VI, I will be able to take a closer look at it.

You can also take a look at the 'Linear Fit' function, which is available in all development systems of LabVIEW except for the Base Package. This is under Mathematics >> Fitting in the Functions palette. This VI returns the linear fit of a data set (X, Y) using the Least Square, Least Absolute Residual, or Bisquare method. I hope this helps.


Vivek Nath
National Instruments
Applications Engineer
Machine Vision
0 Kudos
Message 2 of 2
(3,351 Views)