LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ fit Ellipse 2

Solved!
Go to solution

Hi,

 

when triing IMAQ Fit Ellipse 2.vi, from LV2010SP,( create a ellipse array then fit it) I found that the Valid Fit flag will alwys==F if the Reject Outliers==T.

 

also, change Reject Outliers=T or F will casue the output Ellipse to swap its Major Axis Point1 and Point2.

 

 

has anyone noticed this ?  is it a bug ?

 

 

cheers

 

 

xg

 

0 Kudos
Message 1 of 8
(4,807 Views)

Hi,

 

Valid or not - it depends from Minimum Score parameter.

With axis swap - unable to reproduce described behavior (see attachment)

 

Andrey.

 

0 Kudos
Message 2 of 8
(4,802 Views)

Hi,

 

thanks

 

I could not figure out why you set the minumimscore==0.  if you set it !=0, thing will be different. I added my test code, see the attached.

 

by changing the Reject Outliers, you will see the behavior I mentioned.

 

 

 

cheers

 

 

xg  

0 Kudos
Message 3 of 8
(4,793 Views)

Yes, you're right, with "ideal ellipse" it looks as described. This might be a bug. I don't see big problems with "swapped" points (it depends how algorithm perform the best fit), but for ideal ellipse we should get valid fit anyway.

0 Kudos
Message 4 of 8
(4,791 Views)

thanks, Andrey

 

I am interested in how you created the contours. can you eloborate  a bit?

 

 

cheers

 

xg

0 Kudos
Message 5 of 8
(4,787 Views)
Solution
Accepted by topic author xgatc

@xgatc wrote:

thanks, Andrey

 

I am interested in how you created the contours. can you eloborate  a bit?

 

 

cheers

 

xg


1. Create IMAQ Image, set size, connect it to Image indicator on the front panel, run VI once.

2. Draw ROI manually on image indicator (Closed freehand tool was used)

3. Use ROI property (read access) for obtain contour (connected to Indicator on the front panel) Run VI again - you will get ROI.

4. Convert indicator to constant, set ROI property to write.

 

Profit!

 

Message 6 of 8
(4,784 Views)

many thanks

0 Kudos
Message 7 of 8
(4,782 Views)

Hi,

 

could me anyone please describe the algorithm IMAQ fit Ellipse is using?

 

Thanks for reply in advance.

 

Dan

 

0 Kudos
Message 8 of 8
(4,063 Views)