03-17-2011 04:14 AM
How can I get "IMAQ Line Fit" stable (with the same points)
I my vision applications I use a lot off times "IMAQ Line Fit"
some times the results are not Stable.
See vi and word document attached.
When I take the same points but in a other order (sort)
then suddenly all points are used.
In this case I was looking for a edge in vertical direction (Y).
I found the points but "IMAQ Line Fit" did not function well.
I tried changing all settings like pixel radius and minimum score and
also threshold and so on. But no result.
Then I sorted the points reversed and that worked. See vi.
I use labview Labview 8.6.0 and IMAQ machine vision.
Maybe this problem is solved in a newer version.
Please let me know.
Thanks
04-27-2011 04:09 AM
A other sample off How can I get "IMAQ Line Fit" stable (with the same 5 points , one outlier !!)
I my vision applications I use a lot off times "IMAQ Line Fit"
some times the results are not Stable.
See vi and word document attached.
There are only 5 points used from my application.
When I take the same points but in a other order (sort)
then suddenly all points are used.
In this case I was looking for a edge in vertical direction (X).
I found the points but "IMAQ Line Fit" did not function well.
I tried changing all settings like pixel radius and minimum score and
also threshold and so on.
with pixel radius i got different results (not all good !!)
Then I sorted the points another way and that worked. See vi.
I use labview Labview 8.6.0 and IMAQ machine vision.
Maybe this problem is solved in a newer version.
Please let me know.
Thanks
08-15-2011 04:27 AM
08-24-2011 04:19 AM
Thank You for your reaction Hossein,
This "one application" uses "Line fit" about 20 000 000 times a day.
about 200 will go wrong. With your setting the the "Line fit" for this occasion will work but others will go wrong.
A algorithm should be:
1e Stable, when using the same points and settings the result MUST be the same. How the points are sorted should not matter.
2e Accuracy
3e Speed
4e Testing. Is very difficult but al least close points and the same points and sorting ... should be done
NI now as made a " IMAQ Line Fit" Problem CAR (Corrective Action request) 298016.
so in the future there will be a update.
In the mean while a made a line fit which uses Bisquare option from Linear Fit.vi :
from C:\Program Files\National Instruments\LabVIEW 8.6\vi.lib\analysis\6fits.llb
This is a temporary fix because "IMAQ Fit Line VI" is not so stable.
Because outliers should be rejected only Bisquare does this reasonable.
This program does NOT USE "Minimum Score" and "Pixel Radius"
Valid fit = When there are enough points within Outlier_Distance.
Algorithm steps:
- Determine if line is more horizontal then vertical, Compare DeltaX with DeltaY
- If DeltaX <= DeltaY then SWAP X Y and later Swap back
- Sort Points at on X value
- First : Bisquare Linear Fit
- Calculate distances to the found line for all points
- Inliers: Points within Outlier_distance
- Outliers: Points outside Outlier_Distance
- Only use Inlier Points
- Check again if DeltaX < DeltaY then SWAP X Y later SWAP back again
- Second : Bisquare Linear Fit only with the Inlier Points
- Results are from the second fit
Warning : This Program is Not so accurate and Not so fast
See attachments it is in labview 8.6
If some has a improvement please let me know.
Thanks
09-01-2011
04:27 AM
- last edited on
02-05-2025
10:58 AM
by
Content Cleaner
Hello,
As you mentioned in your feedback, this problem is solved in LabVIEW 2010 SP1 which is explained in the CAR that you gave it to me. Last month we released the 2011 version of LabVIEW with more stability and functionality. To make your system stronger and more powerful we advise you to upgrade your system to version 2011. With this version beside solving your problem you prevent happening another problems which maybe will happened in the future.
Good luck
Beste regards,
Hossein
09-02-2011
03:38 AM
- last edited on
02-05-2025
10:59 AM
by
Content Cleaner
Thank You for your reaction Hossein,
But I did not mention that the problem is solved.
There is a CAR (298016) for this problem but till now it is not solved.
For bug fixes 2010: https://www.ni.com/en/support/documentation/bugs/10/archived--labview-2010-bug-fixes.html
For bug fixes 2011: https://www.ni.com/en/support/documentation/bugs/11/archived--labview-2011-bug-fixes.html
Maybe you saw it somewhere then please let me know.
Kind Regards,
Toine Roetman
09-05-2011
03:12 AM
- last edited on
02-05-2025
11:00 AM
by
Content Cleaner
You are correct. You didn't mentioned that the problem is solved in CAR 298016 but I have an access to this CAR and I could see that this bug is fixed in LabVIIEW 2010 SP1.
Besides I tested your vi with LabVIEW 2010 and 2011 both and it seems to work. You could check and test your vi by going to link below and download the evaluation version of new version of LabVIEW for free.
https://www.ni.com/en/support/downloads/software-products/download.labview.html
I hope that it will be useful.
Best regards,
Hossein
09-05-2011 05:14 AM
Thanks Hossein,
I can not find anywhere this CAR is solved. I did not have mail from NI that it is solved so :
Please send me the link.
I tried "IMAQ Line Fit" in labview 2010 SP1 and it still has the same problem.
So please send me the vi from 2010 SP1 from you use.
With Kind Regards,
Toine Roetman
09-05-2011 09:30 AM
Hi Toine,
I used your vi's that you posted before and I attached them below with estra TEST.vi. I made that TEST.vi to itrate your vi more than 300 times and you can runhowmany you will. If you want you can send me all your vi's that you tested with LV2010 that I can check it for you too.
The Link of that CAR is just for the NI employees and I think that you don't have an access to it. But its link is given below.
http://nippm.natinst.com/itg/web/knta/crt/RequestDetail.jsp?REQUEST_ID=298016
Good luck and hear from you.
Regards,
Hossein
09-07-2011 01:17 AM
Hi Hossein,
I tested labview2010 sp1 with the vi's a attached.
The "IMAQ Line Fit" is still NOT STABLE (with the same points).
In fact there is no change at all.
I do not have access to the link you posted
I think the Cold-war is over so please copy the text from the link here so everyone can read it.
With kind regards,
Toine Roetman