Starting from:
$35

$29

Lab. 5 Ellipse Fitting (Least square fit; multivariate linear regression) Solution

1. In this practical you are given two sets of data points Xi = (xi , yi)n (2 dimensional vectors) in files “ellipse-data.csv” and “ellipse-data_large.csv”. In this practical we will fit ellipse in a least square sense to these data points with and without the constraint. General equation for ellipse can be given as

ax2 + bxy + cy2 + dx + ey + f = 0 . Constraint we will apply is b2 - 4ac < 0.

    1. Visualize the geometric point datasets and verify that the two data files have points for two different ellipses.

    2. Fit the ellipse to each data points using SVD (Singular value decomposition) algorithm as discussed in the class. Plot the fitted ellipse along with the data points. Compute and report the RMSE (Root Mean Square Error) for the two fits.

    3. Formulate the constraint matrix and convert the problem into a generalized eigenvalue problem as discussed in the class. Now again fit ellipse to the two data sets. This time use eigen decomposition instead of SVD. Plot the ellipse along with the data points. Also compute and report the RMSE errors for each ellipse fit.

You may use Python/R for this exercises….

























1

More products