Algorithm of ellipse fitting in OpenCV

时间:2016-04-25 08:51:46

标签: algorithm opencv curve-fitting ellipse

I read the code of ellipse fitting in OpenCV, the following link gives the source code of ellipse fitting in OpenCV: http://lpaste.net/161378.

I want to know some details about ellipse fitting in OpenCV, but I can not find any documents of the algorithm. In the comments, it said " New fitellipse algorithm, contributed by Dr. Daniel Weiss". But I can not find any paper about ellipse fitting of Dr. Daniel Weiss.

I have some questions of the algorithm:

  1. Why does the algorithm need re-fit. It first fit for parameters A - E, and then re-fit for parameters A - C with those center coordinates.
  2. Ellipse need the satisfy the constraint of 4*a*b - c^2 > 0, how does the algorithm satisfy it?

3 个答案:

答案 0 :(得分:2)

我自己也在想这个问题,因为我发现算法被窃听了。请参阅此错误报告:https://github.com/Itseez/opencv/issues/6544

我试图找到Daniel Weiss博士的任何相关论文并且失败了。

答案 1 :(得分:0)

答案 2 :(得分:0)

您可能会发现此回购很有用(通过点子设置):

https://github.com/bdhammel/least-squares-ellipse-fitting

这是从Halir在此处撰写的Fitzgibbon算法升级(作为起点)的工作原理:

https://github.com/bdhammel/least-squares-ellipse-fitting/blob/master/media/WSCG98.pdf

此后,我对此进行了一些测试,似乎非常有效。请注意,回购主页面上的“示例”已过时,请查看代码本身中的example.py模块以了解其在模块导入等方面的用法。