Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

ELLIPSE FITTING

Hi! I'm trying to get the Ellipse fitting for a scattered data using the NonLinear Curve Fit, but I'm trying to use the general equation :A*x^2+B*x*y +C*y^2+D*x+E*Y+F=0 because the data present rotation from the original axes, but  when I changed the Model, the parameters that I got were almost zero everytime that I've tried. I was wondering if there is another way to introduce the model to the VI or if there is another way to do that. Unfortunatelly I don't have NI Visual Detection module or the IMAQ, so I'm stuck in here. Can somebody help me please? 

0 Kudos
Message 1 of 12
(8,058 Views)

Hello Andrea. I recommend you to check the Fit ellipse VI: labview\examples\math\curvefit.llb. This example was developed for non rotated ellipsed. But you can try to implement your own model and modify the parameters to include an angle.

 

An general equation for an ellipse can be found in this page:

http://www.maa.org/joma/Volume8/Kalman/General.html

 

 

This is a good start point.

 

Regards.

 

José Manuel Vólquez Rodríguez

Applications Engineer, National Instruments México.

0 Kudos
Message 2 of 12
(8,045 Views)

Hello Andrea,

 

I have a vi from 8.6 maybe you can use it.

Please let me know if you improved it.

In the diagram are some pictures which formular i used.

 

Regards,

Toine

0 Kudos
Message 3 of 12
(8,025 Views)

why your examples of Ellipse_X_Y_Length.vi  can run?

0 Kudos
Message 4 of 12
(7,547 Views)

I added the 2 missing vi's.

 

 

 

Toine

 

0 Kudos
Message 5 of 12
(7,534 Views)

Thank you.

I want to ask your ellipse can use to detect mango in picture?

0 Kudos
Message 6 of 12
(7,528 Views)

leon,

 

can you attach a picture? I can have a look.

 

Toine

0 Kudos
Message 7 of 12
(7,510 Views)

Toine,

 

These are the mango picture.

Download All
0 Kudos
Message 8 of 12
(7,493 Views)

Toine,

 

How? Can detect the mango picture?

0 Kudos
Message 9 of 12
(7,430 Views)

Hello Leon,

There are several ways in machine vision to detect the mango.

Main key is that there is a difference between the mango and the background.

Overlapping mango’s is more difficult then a single one.

If other light source or filter will enhance the difference between the mango and background it will help a lot.

 

Possible methods:

- Curve extraction

- Morphology

   * Texture detection

   * Object

- Shape matching

 

I think shape matching will work the best in this case. I do not have experience with that. So look around on the forum.

I added a morphology example to test your mango. Only the first picture this will work.

 

With kind regards, Toine

0 Kudos
Message 10 of 12
(7,411 Views)