Fitting Ellipse Model

Hi, I am trying to understand how measure.EllipseModel is working. Following is the snippet. x1, y1, a1, b1 = 3, 3, 20, 40 rr1, cc1 = draw.ellipse_perimeter(x1, y1, a1, b1) # some ellipse # Estimate ellipse model with the above points model = EllipseModel() model.estimate(np.array([rr1,cc1]).T) x2, y2, a2, b2, theta = np.array(model.params, dtype=int) rr2, cc2 = draw.ellipse_perimeter(x2, y2, a2, b2, orientation=theta) # estimated ellipse ax.scatter(rr1, cc1, s=5, label="actual") ax.scatter(rr2, cc2, s=5, label="estimated") The below is output. Shouldn’t both ellipses in the image overlap since I’m using data points of a perfect ellipse to estimate a new ellipse? Thanks Surya

Hi Surya On Sun, Jun 11, 2017, at 20:59, Surya Kasturi wrote:
The below is output. Shouldn’t both ellipses in the image overlap since I’m using data points of a perfect ellipse to estimate a new ellipse? I believe you've uncovered a bug. Ellipse fitting and ellipse drawing seem to use different coordinate conventions. Please continue the discussion here: https://github.com/scikit-image/scikit-image/issues/2646
Best regards Stéfan
participants (2)
-
Stefan van der Walt
-
Surya Kasturi