# Ellipse fitting of planar points with outliers by fitting quality

## Description

The repository includes the source files of the algorithms used in Ellipse fitting of planar points with outliers using random samples filtered by fitting qualities, along with the selected synthetic dataset and the real-world image dataset used in the comparison experiments. Please refer to the README file in the directory for more information.

## Files

## Steps to reproduce

The main executable to repeat the experiments is 'comparisons.m'. Please run it in MATLAB (tested on R2022b) using the following command: comparisons(CODE); To repeat the experiments on the synthetic dataset, set CODE = 'synthetic'; to repeat on the image dataset, set CODE = 'image'. Please note that for the synthetic dataset, though it is selected from the original one, there are nevertheless more than 6000 point sets. To repeat the experiments over the whole dataset is quite lengthy. So the user can furthermore use a fraction of the point sets randomly chosen. This fraction can be set as the second input of the function. For example, to use just 1% of the point sets, one can run the following command: comparisons('synthetic', 0.01); The execution of the function makes use of a MEX-function, ci_mex, which is the implementation of the orthogonal contact point computation method given in S. Guo, P. Hu, Z. Ling, H. Wen, M. Liu, L. Tang, Exact and convergent iterative methods to compute the orthogonal point-to-ellipse distance, in: ICPR 2020, 2021, pp. 5076-5082. This MEX-function is built on a Win64 platform (Windows 11 Family Edition) using MATLAB R2022b. If the MEX-function is not compatible with the user's system, please built it locally from the CPP source ci_mex.cpp in this directory.