Traditional methods mainly rely on the least-squares principle for ellipse fitting, however, as the Gauss-Markov theorem pointed, they are sensitive or susceptible to outliers. To solve this problem, we propose a novel method for robust ellipse fitting using hierarchical Gaussian mixture models. The method consists of two layers, where the first layer aims to locating ellipses through a distance-density-based region growing, and the second one further improves the fitting accuracy. Since we combine distance and density to decide correct ellipses, the method is quite robust against noise and outliers. Moreover, due to the hierarchical structure, our proposed method greatly narrows down the iterative scope of the kernel bandwidth, thereby accelerating the fitting process.
For easy use, the code is implemented by MATLAB R2019a.
Download the code by "git clone https://github.com/zikai1/HGMMEllFit"
Complie the cpp files in the HGMM_make directory in MATLAB to generate mex files.
Add the mex files by "addpath(genpath('.\HGMMEllFit\HGMM_make'))" .
Run the demo file "demo.m" to generate ellipse fitting results in outlier-contained cases.
There are mainly three parameters used in our algorithm, to get better performance, we provide some suggestions for these parameters.
We are pleased to announce the publication of our recent work on multidimensional ellipsoid-specific fitting in T-PAMI. This comprehensive study (https://github.com/zikai1/BayFit) extends from 2D ellipse fitting, 3D ellipsoid fitting, to N-dimensional ellipsoid fitting. We encourage you to utilize our newly released code to achieve enhanced fitting results in your research.
If you have any questions, please send me e-mail: zhaomingyang16@mails.ucas.ac.cn, or put the questions at the "Issues".
If you find our work useful in your research, please cite our paper:
@article{zhao2021robust,
title={Robust ellipse fitting using hierarchical Gaussian mixture models},
author={Zhao, Mingyang and Jia, Xiaohong and Fan, Lubin and Liang, Yuan and Yan, Dong-Ming},
journal={IEEE Transactions on Image Processing},
volume={30},
pages={3828--3843},
year={2021},
publisher={IEEE}
}
@article{zhao2024bayesian, title={A Bayesian Approach Toward Robust Multidimensional Ellipsoid-Specific Fitting}, author={Zhao, Mingyang and Jia, Xiaohong and Ma, Lei and Shi, Yuke and Jiang, Jingen and Li, Qizhai and Yan, Dong-Ming and Huang, Tiejun}, journal={IEEE Transactions on Pattern Analysis and Machine Intelligence}, year={2024}, publisher={IEEE} }