You are on page 1of 16

2520 IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL.

32, 2023

Robust Ellipse Fitting Based on Maximum


Correntropy Criterion With Variable Center
Wei Wang, Gang Wang , Senior Member, IEEE, Chenlong Hu , and K. C. Ho , Fellow, IEEE

Abstract— The presence of radically irregular data points Pupil recognition technology, which has been popular in
(RIDPs), which are referred to as the subset of measurements recent years, also relies on ellipse fitting [3]. Indeed, pupil
that represents no or little information, can significantly degrade tracking through ellipse fitting has been extensively used in
the performance of ellipse fitting methods. We develop an human-computer interactive eye tracker, and has achieved
ellipse fitting method that is robust to RIDPs based on the considerable success in consumer electronics industry [4].
maximum correntropy criterion with variable center (MCC-
VC), where an adaptable Laplacian kernel is used. For single
A traditional method for ellipse fitting is based on the
ellipse fitting, we formulate a non-convex optimization problem Hough transform (HT) [5]. It can achieve high-precision
and divide it into two subproblems, one to estimate the kernel fitting through a voting mechanism in a five dimensional
bandwidth and the other the kernel center. We design sufficiently parameter space, but it takes a huge computational load.
accurate convex approximation to each subproblem that will Owing to this drawback, more computationally efficient
lead to computationally efficient closed-form solutions. The two methods based on least squares (LS) were proposed [6], [7],
subproblems are solved in an alternate manner until convergence [8], [9], [10], [11], [12], [13]. These methods typically work
is reached. We also investigate coupled ellipses fitting. While there well for clean or simple instances. However, the performance
exist multiple ellipses fitting methods in the literature, we develop
a coupled ellipses fitting method by exploiting the underlying
of the LS based methods may degrade significantly in the
special structure, where the associations between the data points presence of radically irregular data points (RIDPs). RIDPs
and ellipses are absent in the problem. The proposed method first appear very often in the extracted data points and they deviate
introduces an association vector for each data point and then significantly from the underlying ellipse for fitting. Robust
formulates a non-convex mixed-integer optimization problem to ellipse fitting methods that are resilient against RIDPs were
establish the data associations, which is approximately solved by thus proposed, see e.g., [14], [15], [16], [17], [18], [19].
relaxing it into a second-order cone program. Using the estimated An example of such methods is the least median squares
data associations, we then extend the proposed single ellipse (LMS) method [14]. The motivation behind this approach is
fitting method to accomplish the final coupled ellipses fitting. The that the optimal solution should embrace the lowest median of
proposed method is shown to perform significantly better than
the existing methods using both simulated data and real images.
squared residuals. Another approach is to use a portion of the
sample points instead of the whole to resist the degradation
Index Terms— Ellipse fitting, radically irregular data point from RIDPs in the fitting performance. For instance, Fischler
(RIDP), maximum correntropy criterion with variable center et al. proposed a method using the random sample consensus
(MCC-VC), data association. (RANSAC) [15], which achieves the fitting by estimating a
mathematical model from a collection of random subsets of
I. I NTRODUCTION the entire amount of data.

A S A basic function of computer vision, ellipse fitting


has been extensively studied over the years. The task of
ellipse fitting is to fit a series of data points to an ellipse, which
Alternatively, the ellipse fitting problem can be formulated
as an optimization problem that can provide robustness. The
papers [16] and [17] solved the ellipse fitting problem by
finds wide applications in the fields of aerospace industry, using the maximum correntropy criterion (MCC), where the
medical imaging, pupil recognition, biometrics, and many Gaussian and Laplacian kernels were used, respectively. The
others [1], [2], [3], [4]. For example, ellipse fitting can detect MCC method in [16] iteratively solved a number of semidef-
effectively the rocky and other dangerous areas to ensure a inite programs (SDPs) by applying semidefinite relaxation
stable and smooth landing of the lunar lander [1]. Techniques (SDR) to the original problem. The relaxation may lead
based on ellipse fitting can accurately detect whether a patient to divergence of the iterations and cause performance loss.
has glaucoma symptoms in the medical related fields [2]. By contrast, the MCC method in [17] iteratively solved a set
of more computationally efficient second-order cone programs
Manuscript received 20 May 2022; revised 10 January 2023, 23 February (SOCPs), in which no relaxation was introduced. This, in turn,
2023, and 3 April 2023; accepted 14 April 2023. Date of publication
28 April 2023; date of current version 4 May 2023. The work of Wei
ensures convergence of the iterations. Generally speaking, the
Wang, Gang Wang, and Chenlong Hu was supported in part by the National MCC ellipse fitting methods have great robustness to RIDPs
Natural Science Foundation of China (NSFC) under Grant 62222109. The in maintaining good performance. Recently, Zhao et al. [18]
associate editor coordinating the review of this manuscript and approving it for proposed the hierarchical Gaussian mixture model (HGMM)
publication was Dr. Laura Boucheron. (Corresponding author: Gang Wang.) for ellipse fitting in noisy, RIDPs-contaminated, and occluded
Wei Wang, Gang Wang, and Chenlong Hu are with the Faculty of Elec-
trical Engineering and Computer Science and the Zhejiang Key Laboratory scenarios. This method has high robustness against RIDPs
of Mobile Network Application Technology, Ningbo University, Ningbo and noise when the parameters for the algorithm are chosen
315211, China (e-mail: 2011082136@nbu.edu.cn; wanggang@nbu.edu.cn; properly. However, the results can be unsatisfactory when
huchenlong1223@163.com). using one particular set of parameters for fitting ellipses with
K. C. Ho is with the Electrical Engineering and Computer Science
Department, University of Missouri, Columbia, MO 65211 USA (e-mail:
different variations in size and orientation. More recently,
hod@missouri.edu). Thurnhofer-Hemsi et al. [19] proposed a novel ellipse fitting
Digital Object Identifier 10.1109/TIP.2023.3270026 method based on the spatial median consensus. The idea
1941-0042 © 2023 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.
See https://www.ieee.org/publications/rights/index.html for more information.
Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR. Downloaded on April 08,2024 at 02:31:03 UTC from IEEE Xplore. Restrictions apply.
WANG et al.: ROBUST ELLIPSE FITTING BASED ON MCC-VC 2521

behind is to combine the outputs of an ensemble of ellipse computationally efficient solution. Specifically, we propose a
fitting methods so that the deleterious effect of suboptimal fits fourth-order polynomial approximation by applying the Taylor
is alleviated. expansion to the objective function for the estimation of kernel
At present, most works in this research area address the bandwidth. The approximate convex subproblem has a closed-
fitting of single ellipse. However, multiple ellipses with some form solution, thereby obtaining it has a very low computa-
commonality can be fitted together by exploiting the underly- tional complexity. The approximation is improved by updating
ing special structure to improve performance. An example is with the kernel bandwidth estimate until convergence. For the
the case of coupled ellipses. Coupled ellipses refer to ellipses subproblem of estimating the kernel center, we design a linear
that are concentric and have the same rotation angle; their programming (LP) problem, whose solution turns out to be the
semi-minor and semi-major axes are different but related by median of the error samples, and thus is also in closed-form.
a proportional factor. A typical example of coupled ellipses is Using the LP solution as a starting point, we further propose
the inner and outer boundaries of a transmission pipe, or the a bisection method for refining the kernel center estimate.
inner and outer edges of an iris image. More applications Armed with the estimated kernel bandwidth and center, the
related to coupled ellipses can be found in [20] and the estimation of ellipse parameters reduces to an optimization
references therein. problem by MCC with the Laplacian kernel, which can be
Compared with single ellipse fitting, coupled ellipses fitting solved by using the iterative method in [17]. It is worth noting
is more challenging since it has one additional parameter that this work formulates a different second-order cone (SOC)
for estimation. To our best knowledge, the available methods constraint from the one in [17] to ensure that the fitting results
for coupled ellipses fitting are very limited in the literature. in an ellipse, which enables us to solve the SOCP problem
Ma and Ho [20] proposed a weighted least squares (WLS) only once in each iteration, instead of twice in the previous
method for the fitting problem that can reach the Kanatani- MCC method [17]. Hence, the new SOC constraint reduces
Cramer-Rao (KCR) lower bound accuracy when the data do the computational complexity of solving the MCC problem.
not have RIDPs. However, the performance degrades signifi- The estimated ellipse parameters are used to form better error
cantly when RIDPs occur. To improve the robustness against samples for updating the estimates of the kernel bandwidth and
RIDPs, the work [17] applied MCC with the Laplacian kernel center. The estimation of the kernel and ellipse parameters are
and found the solution by alternately solving two subproblems. repeated alternately until convergence.
The method works well even when a large number of RIDPs Coupled ellipses can be viewed as multiple ellipses with
are present. some special structure, and hence, the multiple ellipses fit-
It has been shown that MCC is very powerful in solving ting methods, e.g., those in [5], [15], [18], [26], [27], [28],
some signal processing problems when the data are corrupted [29] are applicable to coupled ellipses fitting. However, the
by heavy-tailed impulsive noise [21], [22]. It has also been inherent special structure of coupled ellipses is not exploited
successfully applied to the ellipse fitting problem [16], [17]. in these methods, which leads to sub-optimal performance.
However, the existing methods use zero-center kernel func- Furthermore, existing methods for coupled ellipses fitting [17],
tions, which may not match well for the data with non- [20] require the prior knowledge of the associations between
zero-mean error distributions, leading to unsatisfactory fitting the data points and the ellipses, which is not straightforward
performance. Moreover, the kernel bandwidths in [16] and [17] or impossible to obtain in practice. To alleviate this issue,
were computed according to the Silverman’s rule [23]. The we introduce a length 2 association vector, one for each data
resulting kernel bandwidths may not be accurate, which is point having elements equal to 0 or 1, for indicating the
particularly true for the case of small data size. Moreover, association of every data point to either ellipse, and formulate
the Silverman’s rule is designed for the Gaussian kernel a mixed integer optimization problem to jointly estimate the
and provides the optimal parameter values only when the ellipse parameters and the association vectors. It is commonly
data samples are Gaussian distributed [24]. As such, Chen known that the mixed integer problem is very difficult to solve.
et al. [25] proposed the MCC with variable center (MCC-VC) To make the problem tractable, we relax each association vec-
to improve the performance of MCC, in which both the kernel tor to a probability vector, yielding a convex SOCP. The esti-
bandwidth and center can vary to best model the data. MCC- mate of each association vector can be deduced from the SOCP
VC is a generalization of MCC and can be used to handle a solution. Using the estimated association vectors, the proposed
broader class of problems. single ellipse MCC-VC fitting method is extended to coupled
In this paper, we propose an MCC-VC based ellipse fitting ellipses fitting. It is worth noting that the incorrectly associated
method that is robust against RIDPs, in which the Laplacian data points can be interpreted as RIDPs during the fitting,
kernel is used. In the proposed MCC-VC method, the kernel implying the fitting method needs to be robust to RIDPs.
bandwidth and center are estimated using the error samples The contributions are summarized as follows, including:
derived from the data. The original work [25] that proposed 1) We propose a robust ellipse fitting method based on
MCC-VC has neither explained how to obtain the objective MCC-VC, in which the kernel bandwidth and center
function, nor provided an efficient method to find the kernel are estimated by a well explained and properly for-
bandwidth and center in the objective function. We first mulated optimization problem through KDE. Moreover,
develop a new explanation based on the kernel density estima- this problem is efficiently solved by accurate convex
tion (KDE) and then formulate an optimization problem for approximations.
the estimation of the kernel bandwidth and center parameters 2) We formulate a new SOC constraint to guarantee the
in MCC-VC. The proposed optimization problem is shown to fitting result is an ellipse, which greatly improves the
be equivalent to that in [25]. We then propose to solve the opti- computational efficiency of the proposed method.
mization problem by dividing it into two subproblems, each 3) We propose a data association method for the coupled
estimating one parameter. Rather than using iterative method ellipses fitting problem when the associations between
that requires good initialization, we design sufficiently accu- the data points and the ellipses are not known. With
rate convex approximation to each subproblem that results in a the estimated data associations, we extend the proposed
Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR. Downloaded on April 08,2024 at 02:31:03 UTC from IEEE Xplore. Restrictions apply.
2522 IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 32, 2023

MCC-VC single ellipse fitting method to achieve the final where δi is the measurement error induced by noise and
coupled ellipses fitting. RIDPs. For simplicity, we introduce the following vectors:
In this paper, Section II gives the measurement models for v = [A, B, C, D, E, F]T , q = [g, h, a, b, θ]T ,
single ellipse, and coupled ellipses without the knowledge of
data association. In Section III, we present the optimization ui = [xi2 , xi yi , yi2 , xi , yi , 1]T . (4)
problems for single ellipse fitting based on MCC-VC, and The model (3) can be expressed in the vector form
derive an iterative method to solve the optimization problems.
Section IV develops the data association method and presents v T ui = δi , i = 1, . . . , N . (5)
the MCC-VC method for coupled ellipses fitting. Section V
demonstrates the performance of the proposed fitting methods To guarantee that the model (3) represents an ellipse but not a
by several experiments using both simulated data and real hyperbola, the condition B 2 −4AC < 0, i.e., v(2)2 −4v v
(1) (3) <
images. Section VI concludes the paper. Regarding notations, 0, must be satisfied. The objective is to solve the ellipse
vectors and matrices are represented by boldface lowercase fitting problem by obtaining an optimal estimate of v with the
and boldface uppercase letters, respectively. (∗)o is the true
2 −4v v
condition v(2) (1) (3) < 0 being satisfied. From the estimate
value of (∗). E[∗] is the mathematical expectation of the vector of v, we can deduce the estimate of the ellipse parameter
(∗). (∗)(k) is the kth element of (∗). | ∗ | and ∥ ∗ ∥ are the ℓ1 - vector q by the common conversion formulas [17].
norm and ℓ2 -norm, respectively. Other mathematical symbols
are defined when they first appear. B. Coupled Ellipses
The equations for the outer and inner coupled ellipses can
II. S YSTEM M ODELS be expressed as [20]
A. Single Ellipse [(x o − g) cos θ + (y o − h) sin θ]2
In the 2D Euclidean space, an ellipse can be uniquely a 2j
determined by five parameters: the center (g, h), semi-major
axis a, semi-minor axis b and counter-clockwise rotation angle [−(x o − g) sin θ + (y o − h) cos θ]2
+ = 1,
θ. The ellipse constructed by these five parameters is [17] b2j
[(x o − g) cos θ + (y o − h) sin θ]2 (6)
a2 where a j and b j for j = 1, 2 are the semi-major and semi-
[−(x o − g) sin θ + (y o − h) cos θ]2 minor axes, respectively. Their lengths satisfy a2 = µa1 and
+
b2
= 1, b2 = µb1 with µ ∈ (0, 1) being the proportional factor.
(1) To seek the relationship between the parameters of inner
ellipse and those of the outer, we first multiply an arbitrary
where (x o , y o ) denotes a regular point on the ellipse. positive factor β to both sides of (6):
The available data points, including RIDPs, can be modeled
[(x − g) cos θ + (y o − h) sin θ]2
 o
by β
y y
a 2j
xi = xio + vix + n ix , yi = yio + vi + n i , (2)
[−(x o − g) sin θ + (y o − h) cos θ]2

y + = β, j = 1, 2.
where n ix and n i are the measurement noise, and vix and b2j
y
vi are zero if the pair is a noise only contaminated point
and have larger values if it is an RIDP. We assume that the (7)
measurement noise follows a zero-mean Gaussian distribution,
y
Assume that we have collected N noisy data points (xi , yi ),
but the distributions of vix and vi are difficult to model. i = 1, 2, · · · , N , where the associations between the data
Indeed, RIDPs in the ellipse fitting problem are referred to points and the ellipses are not known. After substituting
as the subset of measurements that represents no or much less (xi , yi ) to both equations of the outer and inner ellipses in
information compared to the rest for the underlying estimation (7), the model equations become [17]
problem. Such a definition of RIDPs inherently assumes we
know what are the parameters of interest for modeling the Axi2 + Bxi yi + C yi2 + Dxi + E yi + F = δi,1 , (8a)
shape of an object, in particular, ellipse in this work. RIDPs Axi2 + Bxi yi + C yi2 + Dxi + E yi + F + η = δi,2 , (8b)
typically come from corruption or the presence of other objects
in the image that we extract the data points for ellipse fitting. where η = β(1 − µ2 ) and δi, j for j = 1, 2 are the equation
RIDPs can appear as outliers that occur sparsely and randomly errors of the ith data point (xi , yi ) corresponding to the outer
in the data, or it can emerge as anomalies that are grouped and inner ellipses. Typically, |δi,1 | < |δi,2 | if the ith point
together, or both. Hence, the forms of RIDPs are problem belongs to the outer ellipse, and |δi,1 | > |δi,2 | otherwise.
y
specific, and the distributions of vix and vi cannot be described The equations in (8a) and (8b) can be further represented
by generic models. by the following vector form:
Substituting (2) into (1) and after simple manipulations, [v T ui v T ui ]T + τ = δ i , i = 1, . . . , N , (9)
we can rewrite (1) as the following implicit second-order
polynomial equation [8], [16], [17]: where
Axi2 + Bxi yi + C yi2 + Dxi + E yi + F = δi , i = 1, . . . , N , v = [A, B, C, D, E, F]T , τ = [0 η]T
(3) ui = [xi2 , xi yi , yi2 , xi , yi , 1]T , δ i = [δi,1 δi,2 ]T . (10)

Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR. Downloaded on April 08,2024 at 02:31:03 UTC from IEEE Xplore. Restrictions apply.
WANG et al.: ROBUST ELLIPSE FITTING BASED ON MCC-VC 2523

To explicitly express the model equation for coupled ellipses c), where c is the an unknown representative sample. c is often
fitting that includes data association, we introduce an asso- called as the center of the kernel function [25].
ciation vector φ i to represent the association between either Finally, we seek the optimal c and σ by minimizing the
ISE. The term ( p(δ))2 dδ is independent of c and σ , hence
R
ellipse and the ith noisy data point. It will take the value
of φ i = [1, 0]T if the ith data point is associated with the Z
outer ellipse and φ i = [0, 1]T if it is associated with the inner
2
c∗ , σ ∗ = arg min κσ (δ − c) − p(δ) dδ
 
ellipse. φ i is not known and to be estimated. The model for c,σ
Z 
coupled ellipses fitting after data association is obtained by
multiplying the association vector φ i to both sides of (9): = arg min [κσ (δ − c)] dδ − 2E [κσ (δ − c)] .
2
c,σ

φ iT δ i = v T ui + φ iT τ , i = 1, . . . , N , (11) (15)
where the left term is the model error of the ith data point. The mathematical expectation in problem (15) is approximated
by sample averaging over the N samples {δi }i=1 N . In this

III. S INGLE E LLIPSE F ITTING BASED ON MCC-VC paper, the kernel function is Laplacian for its robustness to
RIDPs. Substituting the Laplacian kernel function κσ (δ −c) =
In this section, we propose a robust formulation for single 1 − |δ−c|
σ into problem (15) gives
ellipse fitting by MCC-VC, to achieve better robustness against 2σ e
RIDPs. Moreover, we propose a more efficient procedure than ( N
)
the one in [17], to guarantee the condition for forming an 1 1 X − |δi −c|
c , σ = arg min
∗ ∗
.

− e σ (16)
2 − 4v v
ellipse, i.e., v(2) (1) (3) < 0, is fulfilled. c,σ 4σ Nσ
i=1

A. MCC-VC With Laplacian Kernel It is worth noting that problem (16) is obtained differently
from [25] although the final form is exactly the same as that
MCC can be utilized for robust estimation of unknowns. in [25] when the Laplacian kernel function is used.
According to [17], the unknown vector α, which is related to With the estimated c∗ and σ ∗ by problem (16), MCC
the error vector δ, can be estimated using the MCC by follows to estimate the unknown parameters in the model by
max E[κσ (δ(α))], (12) N
α 1 X
arg min − κσ ∗ (δi (α) − c∗ )
where κσ (•) is the kernel function with bandwidth σ . α N
The value of σ is usually determined according to the i=1
N
Silverman’s rule [23]. Such an obtained value may not be 1 X − |δi (α)−c ∗|

accurate especially when the number of samples used for = arg min − e σ∗ , (17)
α σ ∗
evaluating the expectation is small or the kernel function is not i=1
Gaussian. For this reason, we propose an MCC with adaptive 1
kernel bandwidth σ , which involves KDE. where is discarded as it is a constant. To summarize, the
2N
In statistics, KDE can be considered as using a MCC-VC method consists of solving problems (16) and (17).
non-parametric approach to estimate the probability density
function of a random variable. Given a finite number of data B. Single Ellipse Fitting Based on MCC-VC
samples, KDE is a fundamental data smoothing problem.
N
Specifically, let {δi }i=1 be the independent and identically In the ellipse fitting problem, v is the unknown vector to
distributed samples drawn from some univariate distribution be estimated. We shall deduce an optimization problem to
of an unknown density p. The kernel density estimator p̂σ (δ) estimate v based on MCC-VC.
for a given sample point δ can be expressed as It is seen from (5) that δi is related to the unknown vector
v. Thus, we express δi as δi (v) = v T ui for i = 1, . . . , N .
N
1 X Using an estimate of v, denoted by v̂, we can construct the
p̂σ (δ) = κσ (δ − δi ). (13) samples δi (v̂). Problem (16) becomes
N
i=1
N
( )
In KDE, the kernel bandwidth estimation is key to the 1 1 X − |v̂ T ui −c|
ĉ, σ̂ = arg min .

− e σ (18)
performance. The commonly used criterion for selecting σ is c,σ 4σ Nσ
i=1
to minimize the mean integrated squared error (MISE) [30]:
Z Using the estimated c and σ , denoted by ĉ and σ̂ , the ellipse
MISE(σ ) = E[ ( p̂σ (δ) − p(δ))2 dδ], (14) parameter vector can be estimated by solving
N
where p(δ) is the probability density function (PDF) of the 1 X − |v T ui −ĉ|
true error distribution. However, minimizing the MISE is v̂ = arg min − e σ̂
v σ̂
generally not feasible since p(δ) is not available. To make the i=1
problem tractable, we make approximations in the following. s.t. v(2)
2
− 4v(1) v(3) < 0, (19)
Since there is only one set of samples, we first remove the
expectation operation, i.e., we minimize the integrated squared where the condition v(2)2 − 4v v
(1) (3) < 0 is included as a
error (ISE) instead of the MISE. It is not difficult to observe constraint to ensure the solution is an ellipse.
from (13) and (14) that minimizing ISE is still an intractable In the following, we develop specific methods to solve
problem owing the square of the summation. Thus, we further problems (18) and (19) iteratively for estimating the unknown
approximate p̂σ (δ) by using one sample, i.e., p̂σ (δ) ≈ κσ (δ − parameters c, σ , and v in an alternate manner.

Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR. Downloaded on April 08,2024 at 02:31:03 UTC from IEEE Xplore. Restrictions apply.
2524 IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 32, 2023

1) Estimation of the Kernel Bandwidth and Center: Joint a lower computational complexity than the gradient based
estimation of the kernel bandwidth and center in problem (18) methods to solve problem (20). Finally, the optimal estimation
may lead to local convergence owing to the non-convex nature of σ can be obtained by taking the reciprocal of r .
of the problem. To avoid the local convergence issue, we pro- b) Estimation of the kernel center: We will present
pose to estimate the two parameters by dividing problem (18) the procedure to estimate the kernel center c when fixing
into two subproblems, with one parameter estimated by one bandwidth σ to its estimates σ̂ from the previous iteration.
subproblem. The subproblems are not solved using the routine Problem (16) now becomes
gradient based method, such as the gradient decent method
or the Newton’s method. Instead, we design a sufficiently N
X |δ̂i −c|
accurate convex problem for each subproblem, and the solution min − e− σ̂ , (23)
c
of the convex problem is used as the starting point to obtain i=1
the optimal solution of the corresponding subproblem by local
search. Since the designed convex problems are sufficiently which can be used to obtain the kernel center c.
accurate to provide good starting points, we expect to be able However, problem (23) is non-convex owing to the
to obtain the optimal solutions of the original non-convex non-convex objective function. To simplify the problem,
subproblems, although global convergence is not guaranteed. we shall approximate the objective function of problem (23)
a) Estimation of the kernel bandwidth: We first present by a convex function. Specifically, we keep only the first-order
|δ̂i −c| |δ̂i −c|
a procedure to estimate the kernel bandwidth σ when fixing Taylor expansion of e− σ̂ , i.e., e− σ̂ ≈ 1 − |δ̂iσ̂−c| . As a
v and c to their estimates v̂ and ĉ from the previous iteration. result, we can approximate problem (23) by the LP problem
For notational simplicity, let δ̂i = v̂ T ui for i = 1, . . . , N .
Using δ̂i and ĉ, we can estimate σ by solving N N
!
X |δ̂i − c| X
min − 1− = min |δ̂i − c|. (24)
N c σ̂ c
( )
1 1 X − |δ̂i −ĉ| i=1 i=1
min − e σ . (20)
σ 4σ Nσ
i=1 In fact, problem (24) is the maximum likelihood estimation
of the center of the Laplacian distribution from the samples
By letting r = σ1 , problem (20) can be written into an
that follow the Laplacian distribution [32], and its solution
optimization problem with r as the variable:
is the median of the samples. Hence, the solution would
N be a reasonably approximated one even when the samples
( )
r r X −|δ̂i −ĉ|r
min h(r ) := − e . (21) are not Laplacian distributed, although it is not optimal to
r 4 N the original problem (23). On the other hand, the optimal
i=1
solution of problem (23) can be obtained through a simple
Once the optimal solution of problem (21) is obtained, the procedure using the LP solution as the starting point. Noting
optimal solution of problem (20) is also readily available. that the objective of problem (23) is non-differentiable, the
By computing the second-order derivative of h(r ), it can gradient based method is not applicable. We propose a simple
be proven that problem (21) is non-convex [31], which may bisection method to solve problem (23). To this end, we first
lead to possible local convergence if it is solved by an iterative determine an appropriate interval of c for the bisection method,
algorithm. We shall approximate (21) as a sufficiently accurate containing the LP solution and the sample around the LP
convex problem through truncating the Taylor expansion. For solution having smallest objective value, and then perform the
brevity, we denote âi = |δˆi − ĉ| for i = 1, . . . , N . After bisection method. When the LP solution is accurate enough,
introducing a known positive constant r0 , Appendix A shows the bisection method will give the optimal solution of problem
that h(r ) can be approximated by the following fourth order (23).
polynomial function, i.e., 2) Estimation of the Ellipse Parameters: When keeping c
b4 b3 and σ to the values ĉ and σ̂ , the MCC-VC problem reduces
h(r ) ≈ f (r ) = (r − r0 )4 − (r − r0 )3 + b2 (r − r0 )2 to the following MCC problem:
6 2
1 1
+ (b2r0 − b1 + )(r − r0 ) + ( r0 − b1r0 ), N
X |v T ui −ĉ|
4 4 min − e− σ̂ , s.t. v(2)
2
− 4v(1) v(3) < 0, (25)
(22) v
i=1
where b1 , b2 , b3 , and b4 are defined in Appendix A. The
where the constant scaling parameter 1/σ̂ has been dropped.
approximation is typically accurate around r0 .
The previous work [17] presented a method for solving
It is straightforward to see that the optimal solution of
problem (25). Specifically, the solution to (25) is obtained by
problem (20) can be obtained by sequentially minimizing
solving the following two subproblems iteratively:
f (r ). In particular, starting from r0 = 0, we can minimize
a) Subproblem 1: Assuming that an estimate of the
f (r ) to obtain an updated r0 , then we minimize f (r ) again
weight vector w is available, denoted by w̄, the first subprob-
using the updated r0 and repeat the process until convergence.
lem is:
It turns out that the problem of minimizing f (r ) has a
closed-form solution. According to the Karush-Kuhn-Tucker N
(KKT) condition, the solution of minimizing f (r ) can be
X
min (−w̄i ζi )
obtained by solving the univariate cubic equation f ′ (r ) = 0, v,ζi
i=1
whose real root has a closed-form expression. Appendix B
shows the existence, uniqueness, and the expression of the s.t. |v ui − ĉ| ≤ ζi , i = 1, . . . , N ,
T
(26a)
closed-form solution. The solution in closed-form implies v(2)
2
− 4v(1) v(3) < 0. (26b)

Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR. Downloaded on April 08,2024 at 02:31:03 UTC from IEEE Xplore. Restrictions apply.
WANG et al.: ROBUST ELLIPSE FITTING BASED ON MCC-VC 2525

b) Subproblem 2: If an estimate of v, denoted by v̄, Algorithm 1 The MCC-VC Method for Single Ellipse Fitting
is available, we can obtain the optimal estimate of the weight
vector w = [w1 , . . . , w N ]T by the property of convex conju-
|v̄ T ui −ĉ|
gate functions: wi = −e− σ̂ .
The solution method typically takes the “<” as “≤” when
solving Subproblem 1. A procedure was proposed to guarantee
the sign “<” in [17], where an SOCP problem was solved
twice in one iteration. Different from [17], we propose here a
more efficient procedure for the condition v(2) 2 − 4v v
(1) (3) <
0 to be fulfilled. Specifically, we replace the constraint in (26b)
2 + ε 2 ≤ 4v v , where ε is an arbitrary constant.
by v(2) (1) (3)
It is straightforward to write the constraint (26b) as the
following SOC constraint:
T
v(2) , ε, v(1) − v(3) ≤ v(1) + v(3) .

(27)
Replacing the constraint in (26b) by that in (27), Subproblem
1 becomes the following SOCP:
N In the estimation of kernel center c and bandwidth σ , com-
putations of exponential values are involved when evaluating
X
min (−w̄i ζi )
v,ζi the values of the objective functions. The complexity of the
i=1
estimation of c comes mainly from the bisection method,
s.t. |v ui − ĉ| ≤ ζi , i = 1, . . . , N , (27).
T
(28) and it is on the order of Jc = O (3L 1l N ), where N is
Different from [17], in which an SOCP problem was solved the number of data points, l is the highest order of the
twice in one iteration, the procedure proposed in this work polynomial for approximating the exponential function (l =
solves the SOCP problem (28) only once. 10 is typically sufficient), and L 1 is the number iterations when
After obtaining the estimate of v by solving problem (25), implementing the bisection method.1 The estimation of σ
the kernel center and bandwidth estimates can be updated involves iteratively solving a problem having the closed-form
using the procedure in Section III-B1. The process repeats solution expressed in (48). Computing the closed-form solu-
until the stopping criterion is reached. From the estimate of v, tion requires O ((3l + 5)N ) multiplications. Assuming that
we can recover the estimate of q according to the relationship the number of iterations required to solve the minimum of
between v and q [17]. f (r ) defined in (22) is L 2 (with a typical value 20), the
The entire MCC-VC method for single ellipse fitting is computational complexity of estimating the kernel bandwidth
given in Algorithm 1. It is worth noting that the MCC fitting is Jσ = O (L 2 (3l + 5)N ). Thus, the complexity of estimating
method in [17] cannot fit the ellipse correctly in some cases (c, σ ) is Jc + Jσ .
owing to the predefined kernel center and bandwidth. There- Next, let us detail the complexity required in each iteration
fore, a clustering technique is used in [17] to detect the failed of the inner loop. In each iteration, two subproblems are
fitting. Once the failed fitting is detected, the iterations will be solved in an alternate manner, one for the weight vector
restarted by setting a different initialization, which obviously w and the other for the ellipse parameter vector v. The
increases the computational load. By contrast, the proposed subproblem w.r.t. w has a closed-form solution, and hence,
MCC-VC method has very rare failed fittings when the number its complexity relative to the overall is negligible. Thus, the
of data points is sufficiently large and the proportion of RIDPs complexity of the MCC problem comes mainly from solving
is relatively low, and hence the clustering procedure [17] is an SOCP to obtain the estimate of the ellipse parameters.
generally not needed. Thus, the proposed method is easier to Generally, the worst-case complexity of solving an SOCP is
√  P Nsoc soc 2 
use. On the other hand, the proposed method may benefit from on the order of λ m i=1 ni + m 3 × ln(1/ϵ) [33],
the clustering step if the number of data points is small or the where m is the number of equality constraints, Nsoc is the
proportion of RIDP is large. number of second-order cone constraints, n isoc is the dimension
Before closing this section, we would like to discuss the of the ith second-order cone, λ = 2Nsoc is the barrier
weaknesses of the proposed method. First, the proposed parameter that measures the geometric complexities of the
method is iterative, which implies that local convergence or cones involved, and ϵ > 0 is the solution precision. If we
divergence, although rarely occurs under typical conditions, write the SOCP problem (28) into the standard primal form,
can happen. Another weakness is the approximations used in there are N + 3 equality constraints, N second-order cone
the proposed solution method, which may cause performance constraints of size 2, and one second-order cone constraint of
loss especially when the proportion of RIDPs is high or the size 4. Hence,√ its worst-case complexity is on the order of
number of data points is small.

2N (4N + 16)(N + 3) + (N + 3) ln(1/ϵ) .
3

Jsocp = O
Note that this is the worst-case complexity, and the actual
C. Complexity Analysis complexity can be significantly less by exploiting the special
The proposed MCC-VC method contains an outer loop and structure, e.g., the sparsity of the problem [34].
an inner loop, where the outer loop determines the kernel
center c and bandwidth σ while the inner loop solves the 1L
1 is related to the search interval and it satisfies L 1 >
MCC problem that iteratively estimates the ellipse parameter log2 ((max(δ̂1 , . . . , δ̂ N ) − min(δ̂1 , . . . , δ̂ N ))/γ ), where γ is solution precision
vector v. and δ̂i for i = 1, . . . , N are the error samples to start the iteration.

Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR. Downloaded on April 08,2024 at 02:31:03 UTC from IEEE Xplore. Restrictions apply.
2526 IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 32, 2023

Furthermore, let the numbers of iterations in the inner large range, without affecting the estimation accuracy of the
and outer loops when solving the MCC-VC problem be association vectors.
L 3 and L 4 , respectively. The complexity of solving
 the entire Even after setting η = 1, problem (29) is still a mixed
MCC-VC problem is O L 4 Jc + Jσ + L 3 Jsocp . From their integer problem and very difficult to solve. It will become more
expressions, Jc and Jσ are relatively insignificant compared tractable if we relax each association vector φP i into a proba-
2
to L 3 Jsocp . L 3 and L 4 have no explicit expressions and are bility vector characterized by 0 ≤ φi, j ≤ 1, j=1 φi, j = 1,
problem specific. From our simulations, their typical values where φi, j is the jth element of φ i .
are both 4. By doing so, problem (29) can be relaxed to the form
N
X
IV. C OUPLED E LLIPSES F ITTING W ITH U NKNOWN min βi
{φ i }, v, {βi }
DATA A SSOCIATION i=1
2
In this section, we investigate the coupled ellipses fitting X
problem, where the associations between the ellipses and the s.t. 0 ≤ φi, j ≤ 1, φi, j = 1, i = 1, . . . , N ,
data points are not available, i.e., we do not know which data j=1
point belongs to which ellipse. To overcome this difficulty, (27), |v T ui + φ i T τ | ≤ βi . (30)
we propose a practical approach consisting of two steps: Step
1: Associations of the data points to the ellipses, and Step 2: Problem (30) is a convex SOCP problem, which can be solved
Fitting of the associated data points to the coupled ellipses. using off-the-shelf software. Let us represent the solution of
The task of Step 1 is to estimate the association vectors φ i problem (30) as φ̃ i . An estimate of the association vector,
for i = 1, . . . , N , and Step 2 extends the proposed MCC-VC denoted by φ̂ i , can be obtained by setting the larger element of
method to coupled ellipses fitting by using the estimated asso- the vector φ̃ i to 1 and the smaller element to 0. It is possible
ciation vectors in Step 1. In Step 2, the incorrectly associated that the case of φ i equal to [0.5, 0.5]T occurs, which may
data points in Step 1 are treated as RIDPs. lead to wrong data association for the corresponding point.
Nonetheless, these points tend to be those located in the middle
between the inner and outer ellipses, and the number of such
A. Data Association points is typically very small. On the other hand, if wrong
According to (11) and imposing the condition v(2) 2 + ε2 −
data association occurs, the incorrectly associated data points
4v(1) v(3) < 0 to ensure the result is an ellipse, we formulate can be interpreted as RIDPs. Owing to the robustness of
the following optimization problem to estimate the association the proposed MCC-VC method, the effect of the wrong
vectors, where the coupled ellipses parameters are estimated associations is minor.
in conjunction as well: After obtaining φ̂ i , the robust ellipse fitting methods can be
used to obtain the ellipse parameters. In the next subsection,
N
X we shall present a new coupled ellipse fitting method by
min |v T ui + φ iT τ | extending the proposed MCC-VC method.
2×1
}, v,τ i=1
Q
{φ i ∈
s.t. τ(1) = 0, (27), (29)
B. Coupled Ellipses Fitting Based on MCC-VC
Q2×1
where is the set of all possible 2×1 association vectors. Replacing φ i with φ̂ i in (11), the model equation becomes:
Problem (29) is very difficult to solve owing to the integer T T
variables and the inner product of the unknown vectors φ i and φ̂ i δ i = v T ui + φ̂ i τ , i = 1, . . . , N . (31)
τ . It should be emphasized that the main purpose of problem
(29) is to estimate the association vectors but not for coupled The model in (31) may not be ideal owing to the fact that φ̂
ellipses fitting, because the final coupled ellipses will be may not be equal to the true value φ.
obtained in the second step. Keeping this in mind, we may still By introducing ṽ = [v T η]T and
be able to correctly estimate the association vectors by making ( T
some approximations, even though the ellipse parameters may uT 0 if φ̂ i = [1, 0]T ;
ũi =  iT T (32)
not be accurate owing to these approximations. The idea is ui 1 if φ̂ i = [0, 1]T ,
to make the fitted inner and outer ellipses be located between
T
the true inner and outer ellipses, which will generate correct the model (31) becomes the concise form that φ̂ i δ i =
associations for most noisy data points. To this end, we set η ṽ T ũi , i = 1, . . . , N .
that is defined below (8) to unity such that τ shown in (10) is By letting δ̃i = ṽ T ũi be the error vector and ṽ be
a constant vector. By doing so, the inner product of the two the unknown variable vector, respectively, we can similarly
unknown vectors becomes the product with only one unknown formulate the optimization problems based on MCC-VC, and
vector φ i and problem (29) is partially simplified. the resulting problems can be solved in a similar manner as the
The value of ε in (29) cannot be arbitrarily chosen any more single ellipse fitting case. The parameter estimates of the two
since η is fixed to 1. Let us imagine that the association vectors ellipses can be recovered from the solution of the MCC-VC
can be accurately estimated when the estimated ellipses by problem as in [17].
(29) are located between the true inner and outer ellipses,
i.e., the corresponding µ should be greater than its true value.
It follows from η = β(1 − µ2 ) = 1 that β should be large. V. N UMERICAL R ESULTS
To make this happen, we can intentionally choose a larger This section verifies the robustness of the proposed
ε2 . Our simulation shows that ε can be chosen from a very MCC-VC method for single ellipse and coupled ellipses

Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR. Downloaded on April 08,2024 at 02:31:03 UTC from IEEE Xplore. Restrictions apply.
WANG et al.: ROBUST ELLIPSE FITTING BASED ON MCC-VC 2527

fittings using both simulated data and real images. In order to TABLE I
test the single ellipse fitting performance, we compare the pro- R ATE (%) OF S UCCESSFUL F ITTINGS FOR S INGLE E LLIPSE (F ROM 50000
posed MCC-VC method using the Laplacian kernel (denoted MC RUNS ): O UTLIERS O NLY
by “MCC-VC-Laplacian”) with the RANSAC method having
LS as the fitting algorithm (denoted by “RANSAC+LS”) [15],
and the RANSAC method having MCC-VC-Laplacian as the
fitting algorithm (denoted by “RANSAC+(MCC-VC)”). The
maximum number of iterations for both RANSAC methods
is set to 1000. The other methods included for comparison
are the SAREfit method (denoted by “SAREfit”) [35], the
MCC method using the Gaussian kernel (denoted by “MCC-
Gaussian”) [16], the MCC method using the Laplacian kernel
(denoted by “MCC-Laplacian”) [17], the HGMM method
(denoted by “HGMM”) [18], the Szpak method (denoted by the simulated scenarios. Figs. 1(a)-(c) show the NRMSE,
“Szpak”) [36], the least median squares method (denoted Hausdorff distance, and EECM performance as the proportion
by “LMS”) [14], and the spatial median consensus based of outliers increases, respectively. Generally speaking, the
fitting method (denoted by “SMC”) [19]. For coupled ellipses proposed MCC-VC-Laplacian method performs better than
fitting, we first test the data association performance using the other methods, including the MCC-Laplacian method,
the percentage of successful data associations, and then fur- especially when the proportion of outliers increases from 10%
ther compare the fitting performance of the proposed MCC- to 20%. Correspondingly, Table I shows the rates of successful
VC-Laplacian and the MCC-Laplacian [17] methods. The fittings for different methods. In this simulation scenario, the
associated SOCP problems in MCC-Laplacian and MCC-VC- proposed MCC-VC-Laplacian method almost always success-
Laplacian are solved using the toolbox “ECOS” [37] and the fully fits the ellipse even when the proportion of outliers is
SDP problem in MCC-Gaussian is solved using the Matlab 20%. By contrast, the other methods may fail, especially when
toolbox “CVX” [38], where the solver is SeDuMi [39]. the proportion of outliers is large. As an illustration, Fig. 1(d)
shows the ellipses fitted by the ten methods in a typical MC run
when the proportion of RIDPs is 20%. It can be seen that the
A. Single Ellipse Fitting: Simulated Data ellipse generated by MCC-VC-Laplacian fits the true ellipse
In the following, we randomly generate the simulated very well, and better than the other methods. MCC-Gaussian
ellipses for fitting as in [17]. The true five ellipse parameters performs much worse than the other two MCC based methods.
are set according to the following distributions: g ∼ U[0, 20], It is likely resulting from the fact that the subproblem w.r.t.
h ∼ U[0, 20], b ∼ U[10, 50], a ∼ U[b + 5, 55], and the ellipse parameters in MCC-Gaussian is approximately
θ ∼ U[−90◦ , 90◦ ]. The noise follows the zero-mean Gaussian solved by applying SDR, which may cause divergence since
distribution with variance (0.005b)2 . We use three metrics the relaxed SDP by applying SDR cannot reach the optimal
for performance evaluation, i.e., the normalized root mean solution of the original subproblem. This, in turn, causes
square error (NRMSE), the Hausdorff distance [40], and significant performance loss. Interestingly, after replacing the
the Euclidean ellipse comparison metric (EECM) [41]. The fitting algorithm in the RANSAC method with MCC-VC-
definitions of the Hausdorff distance and EECM are given Laplacian (RANSAC+(MCC-VC), it is clear from in Fig. 1
in [40] and [41], and Table I that its performance is significantly improved com-
q respectively,
PK PM
and the NRMSE is defined
pared with the original RANSAC method (RANSAC+LS),
by NRMSE = K1M k=1 2
m=1 ∥q̂ mk − q k ∥ , where K and which even completely fails when the proportion of outliers
M are the numbers of the generated ellipses and the Monte is 20%. This further indicates that the good performance of
Carlo (MC) runs for each ellipse, and q̂ mk and q k represent the proposed method. Same observations can be found in the
the estimated and true parameters of the kth ellipse in the mth following experiments.
MC run. In the following, we set K = 100 and M = 500 to 2) Scenario 2 - Grouped Noise Contaminated RIDPs:
compute the NRMSE. In this scenario, we assume that RIDPs are contaminated
Due to the existence of RIDPs, the fitting possibly fails in a by grouped noise, and these points are randomly distributed
few runs. To obtain meaningful NRMSE, Hausdorff distance, around the true ellipse. Specifically, we generate five set of
and EECM, they are computed by discarding the results of grouped noise contaminated RIDPs. The center for each set
these runs. Several conditions are used to identify the failed is first generated similarly to the outliers in Scenario 1, and
runs. Here, we adopt the same rule2 as in [17] to identify the other points of this set are then randomly generated in
a failed fitting. In the following, we assume that RIDPs are the 15 × 15 square area located at the center. Each set has
originated from outliers, grouped noise, or both. the same number of RIDPs. The grouped noise pattern varies
1) Scenario 1 - Outliers Only RIDPs: In this scenario, for each of the 100 randomly generated ellipses and in each
we assume that RIDPs are outliers only. The total number MC run. Considering the characteristics of grouped noise in
of data points is N = 100, and the proportion of outliers practice, we vary the proportion of grouped noise contam-
y
varies from 5% to 20%. The values vix and vi for the inated points from 20% to 50%. The NRMSE, Hausdorff
outliers are uniformly generated according to U(−2b, 2a) for distance, and EECM are shown in Figs. 2(a), (b), and (c),
respectively, and the rates of successful fittings are given
2 We regard that the fitting fails if the estimation error of the semi-major
in Table II. Although HGMM has better fitting performance
axis, semi-minor axis or their proportional factor is greater than 25% of the
true value, the Euclidean distance between the estimated center and the true
than MCC-VC-Laplacian in NRMSE, Hausdorff distance, and
center is greater than 5, or the absolute estimation error of the rotation angle EECM when the proportion of RIDPs is 50%, its successful
is greater than π/6 rad. fitting rate is far from satisfactory. In general, the proposed

Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR. Downloaded on April 08,2024 at 02:31:03 UTC from IEEE Xplore. Restrictions apply.
2528 IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 32, 2023

Fig. 1. Performance comparison for different fitting methods as the proportion of outliers varies.

TABLE II Fig. 3 includes the performance of MCC-VC-Grid Search for


R ATE (%) OF S UCCESSFUL F ITTINGS FOR S INGLE E LLIPSE (F ROM 50000 comparison, which shows that the proposed solution method
MC RUNS ): G ROUPED N OISE C ONTAMINATED RIDP S performs very closely to the grid search method unless the
proportion of RIDPs is very high, implying the approximations
in the proposed solution method are sufficiently accurate. The
grid search method, however, uses the brute force approach
that is very computationally intensive. Furthermore, it operates
much less efficiently and its accuracy is closely related to the
grid size.
Furthermore, to validate the theoretical complexity analysis
in Section III-C, we record the average run time of each
sub-module in one outer-loop iteration, where the average run
times3 for the estimations of the kernel center c, the kernel
MCC-VC-Laplacian still significantly outperforms the other bandwidth σ , and the ellipse parameter vector v are 0.0005 s,
methods. Comparison between the results for the outliers and 0.0007 s, and 0.0085 s, respectively. Clearly, the computational
the cluster-like grouped noise contaminated RIDPs reveals that cost of estimating c and σ is very minor as compared to
the latter will result in larger fitting errors and higher rate of estimating v by MCC, which is consistent with the theoretical
failed fittings, indicating that the ellipse is more difficult to analysis. Moreover, we also record the average run times of all
fit in this scenario. Fig. 2(d) illustrates the fitting results in a the compared methods to show the computational efficiency
typical MC run when the proportion of RIDPs is 40%, which of the proposed method.
also shows the distribution of RIDPs. It clearly illustrates the Table IV lists the average run times of the compared meth-
better fitting performance of the proposed method. ods when the proportion of RIDPs is 30%. Evidently, the pro-
3) Scenario 3 - Mixed RIDPs: In this scenario, we simulate posed MCC-VC-Laplacian method is computationally compet-
a more general case in real applications, where both outliers itive. Among the nine other algorithms tested, only SAREfit,
and grouped noise contaminated RIDPs are present. The RANSAC+LS, and LMS have lower complexities but they
two kinds of RIDPs are generated in similar manners as in also have worse fitting accuracy. Note that MCC-Laplacian
Scenarios 1 and 2. We vary the proportion of RIDPs from consumes more time than MCC-VC-Laplacian owing to the
10% to 80%, where the ratio of outliers to grouped noise fact that the SOCP problem is solved twice and the clustering
contaminated RIDPs is 2:3 when the proportion is below procedure is included in MCC-Laplacian.
50%, and the proportion of outliers does not increase when it 4) Scenario 4 - Number of Data Points: In this scenario,
reaches 20%. The NRMSEs, Hausdorff distance, and EECM we vary the number of data points from 10 to 90 in the
are shown in Figs. 3(a), (b), and (c), respectively, and the rates presence of 30% RIDPs to test the effect of the number of data
of successful fittings are given in Table III. It is seen from the points on the performance of various fitting methods. The ratio
figure that the fitting performance of the proposed method still of outliers to group noise contaminated RIDPs is set to 2:3.
performs better than the other methods. Moreover, Table III It is demonstrated in Figs. 4(a)-(c) that the proposed MCC-
demonstrates that when the proportion of RIDPs is as high VC-Laplacian method remains to have best fitting accuracy.
as 70%, the rate of successful fittings drops quickly to below Fig. 4(d) illustrates the fitting results in a typical MC run when
50% as 44.17%. Hence, the proportion of 70% RIDPs can the number of data points is 10. The performance of MCC-
be regarded as the breakdown point of MCC-VC-Laplacian. VC-Grid Search is also included in Fig. 4 for comparison,
Fig. 3(d) illustrates the fitting results in a typical MC run and it shows that the proposed solution method has slight
when the proportion of RIDPs is 45%, which also shows the performance loss when the number of data points is small.
distribution of RIDPs. It clearly demonstrates the better fitting Except MCC-VC-Grid Search, Table V indicates that the
performance of the proposed method. proposed method has a higher successful fitting rate than the
In order to gain some insight about the accuracy of the other methods. Although RANSAC+(MCC-VC) has a higher
approximations applied to the proposed solution method when successful fitting rate as well, its estimation accuracy is far
estimating the kernel bandwidth and center, we include the less satisfactory in Fig. 4. The proposed method is able to
performance of the proposed method when solving the sub- have more than 50% successful fittings with as few as 30 data
problems w.r.t. the kernel bandwidth and center by grid search points at 30% RIDPs. This demonstrates the applicability of
(denoted by “MCC-VC-Grid Search”). It is well known that the proposed method when a very small number of data points
the grid search method is able to reach the global solution is available.
of a non-convex problem when the grid size is sufficiently
small. Hence, its performance can be used as a benchmark.
The search intervals for the kernel center c and the ker- 3 The proposed method is implemented using Matlab R2014b on a PC with
nel bandwidth σ are [−10, 10] and [0.01, 20], respectively. a 3.6 GHz Intel CPU and 16 GB RAM.

Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR. Downloaded on April 08,2024 at 02:31:03 UTC from IEEE Xplore. Restrictions apply.
WANG et al.: ROBUST ELLIPSE FITTING BASED ON MCC-VC 2529

Fig. 2. Performance comparison for different fitting methods as the proportion of grouped noise contaminated RIDPs varies.

TABLE III
R ATE (%) OF S UCCESSFUL F ITTINGS FOR S INGLE E LLIPSE (F ROM 50000 MC RUNS ): M IXED RIDP S

Fig. 3. Performance comparison for different fitting methods as the proportion of RIDPs varies.

TABLE IV
AVERAGE RUN T IMES OF D IFFERENT M ETHODS (F ROM THE AVERAGE OF 50000 MC RUNS ): 30% RIDP S

Fig. 4. Performance comparison for different fitting methods as the number of data points varies.

5) Scenario 5 - Occlusion Level: In practice, the ellipse B. Coupled Ellipses Fitting: Simulated Data
can be occluded and only the data points of one or several
segments appear. Here, occlusion refers to the situation where In the coupled ellipses fitting, the ellipse parameters
some portions of the true ellipse are missing and the data {g, h, a, b, θ} are generated in the same way as the single
points are extracted from the remaining ellipse segments. ellipse fitting case. The proportional parameter µ is created
In this scenario, we test the effect of occlusion on the fitting randomly according to the uniform distribution µ ∼ U(0, 1).
methods, where the occlusion level is defined as the proportion 100 data points are collected for each ellipse and hence, the
of missing arc segments to the complete ellipse. We change number of total data points is N = 200, with RIDPs possibly
the occlusion level from 30% to 60% in the presence of included. The edge data points are generated by uniformly
30% RIDPs where the ratio of outliers to grouped noise sampling over the ellipses, and RIDPs are simulated according
contaminated RIDPs is 2:3. The results as the occlusion to the uniform distribution U(−b, b). The associations between
level varies are given in Fig. 5 and Table VI. Fig. 5(d) the data points and the coupled ellipses are not available to
illustrates the fitting results in a typical MC run when the the fitting.
occlusion level is 40%. It is seen from the results that the Due to the possible incorrect association of data points
proposed method still performs better than the compared in Step 1 and the presence of RIDPs, we take the same
methods in terms of the four performance measures, indi- measures as mentioned before to discard the failed fitting
cating its good performance in dealing with this difficult results when obtaining the performance metrics NRMSE,
scenario. Hausdorff distance and EECM.
Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR. Downloaded on April 08,2024 at 02:31:03 UTC from IEEE Xplore. Restrictions apply.
2530 IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 32, 2023

Fig. 5. Performance comparison for different fitting methods as the occlusion level varies.

TABLE V TABLE VII


R ATE (%) OF S UCCESSFUL F ITTINGS FOR S INGLE E LLIPSE (F ROM 50000 P ERFORMANCE OF C OUPLED E LLIPSES F ITTING BY VARYING
MC RUNS ): N UMBER OF DATA P OINTS THE P ROPORTION OF RIDP S

of outliers to group noise contaminated RIDPs is still set to


2:3. The results are given in Table VII.
TABLE VI The results remain encouraging. Let us take the last column
R ATE (%) OF S UCCESSFUL F ITTINGS FOR S INGLE E LLIPSE (F ROM 50000 as an example. Taking the incorrectly associated points into
MC RUNS ): O CCLUSION L EVEL account, the actual proportion of RIDPs is greater than 40%
under this setting. Even in this challenging case, the rate of
successful fitting is still greater than 97.7%, implying that
the proposed data association method is quite effective for
use in a practical harsh environment. Moreover, the proposed
MCC-VC method outperforms MCC in terms of the three
fitting accuracy metrics, where the kernel is Laplacian for both.

C. Single Ellipse Fitting: Real Data


In this subsection, we apply ten methods to fit the ellipses
in real images, including the Voyager aircraft, Mars, globe,
basketball rim, and butterfly frame images. Before the fitting,
the data points of these images are extracted through a series
of preprocessing steps including the image segmentation, the
morphological operations, and the edge detection. It is not
difficult to imagine there are a large number of RIDPs in the
extracted data points, and RIDPs do not necessarily follow a
zero-mean distribution.
Fig. 6. Sensitivity of the value of ε on the association accuracy. 1) Voyager Aircraft: The Voyager aircraft image [42] fitting
process and results are shown in row (a) of Fig. 7, in which
the proportion of RIDPs4 is about 21.47%. The proportion is
1) Effect of ε on Association: As aforementioned, ε cannot
larger than that in [17], which is generated by setting the Sobel
be arbitrarily chosen owing by fixing η to 1 during the
operator parameter to a smaller value of 0.17 as compared
data association step. In this experiment, we study the effect
to 0.2 in [17]. The fitting results of the MCC-VC-Laplacian
of choosing different values of ε on data association. The
method and the other methods are shown in the third column
percentages of incorrect associations of both edge data points
and fourth column of row (a), respectively. Obviously, MCC-
and RIDPs are examined, as the proportion of RIDPs increases
Laplacian [17] fails to fit the ellipse but MCC-VC-Laplacian
from 0 to 40%, when ε takes the values of 1, 10, 100, 1000 or
is still successful and more robust to larger amount of RIDPs.
10000. Again, the ratio of outliers to group noise contaminated
2) Mars: The Mars image is selected from the Caltech
RIDPs is set to 2:3. The results are shown in Fig. 6, which
indicates that the choice of ε has nearly no effect on the 256 dataset [43], labeled as 137_0008. The fitting process and
association vector estimation, although the ellipse parameter results are shown in row (b) of Fig. 7. The Sobel operator
vector may not be accurately estimated. In the following, ε is parameter is set to 0.042 for this image to include more RIDPs
set to 1. as compared to [17] for performance evaluation purpose. The
proportion of RIDPs is about 54.51%. The fitting results of
2) Performance of Coupled Ellipses Fitting by Varying the
MCC-VC-Laplacian and the other methods are shown in the
Proportion of RIDPs: In this experiment, we consider the
scenario that RIDPs are present inherently in the data points. 4 RIDPs are recognized in the following way. First, the true ellipse parame-
The noise standard deviation is fixed at 0.005b, and the ters are obtained through a manual measurement tool. The points with errors
proportion of RIDPs varies from 10% to 40%, where the ratio greater than 0.1 in all data points are regarded as RIDPs.
Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR. Downloaded on April 08,2024 at 02:31:03 UTC from IEEE Xplore. Restrictions apply.
WANG et al.: ROBUST ELLIPSE FITTING BASED ON MCC-VC 2531

Fig. 8. Coupled ellipses fitting for iris image, scenario without RIDPs (first
row), scenario with RIDPs (second row). Left to right columns: data points,
association results attained by our method, and fitting results attained by our
method.

robustness of the proposed method, two scenarios without and


with RIDPs in the data points are investigated. The data points
extracted from the iris image in both scenarios are shown in
Figs. 8 (a)&(d). In the case of having RIDPs, RIDPs account
for 24.98% of the total data points. The results of the data
association and the fitting are illustrated in Figs. 8 (b)&(e)
Fig. 7. Left to right columns: input images, data points, fitting results attained
and Figs. 8 (c)&(f), respectively. In Figs. 8 (b)&(e), the blue
by our method, and fitting results attained by all compared methods: row (a): dots and the red stars represent the data points associated with
Voyager aircraft; row (b): mars; row (c): globe; row (d): basketball rim; row the inner and outer ellipses, respectively. Clearly, there exist
(e): butterfly frame. some incorrectly associated points, and they are regarded as
third column and fourth column, of row (b), respectively, RIDPs. Hence, the percentage of actual RIDPs5 is greater than
we see that the proposed method successfully fits the ellipse 24.98% when doing the fitting. Nonetheless, the fitting is still
but the others fail. successful, indicating the incorrectly associated data points are
3) Globe: The globe image is selected from [43], labeled handled without difficulty by the fitting method in Step 2.
as 053_0080. The fitting performance is shown in row (c) of
Fig. 7. Different from the previous two images, the Canny E. Multiple Ellipses Fitting
detector is used for edge extraction of this image, where the In this subsection, we show that the proposed method has
correlation coefficient is set to 0.5. RIDPs in the extracted data the ability of accurately fitting multiple ellipses, with the help
points form a one-sided distribution, due to the base holding of ellipse detection. Most ellipse detection methods [26], [27],
the globe. The proportion of RIDPs is about 33.27%. For [28], [29] involve ellipse fitting of sampled data points. Specif-
this image, the proposed MCC-VC-Laplacian method remains ically, the principle of many detection methods is to detect
to have the best fitting performance compared to the other arcs by the position relationship among pixel points. After
methods, as shown in the third column and fourth column of grouping or deleting the arcs through basic fitting methods
row (c), confirming the robustness of the proposed method to such as the direct LS method [8], the candidate ellipses are
one-sided RIDPs. formed, and then the qualified ellipses are selected from the
4) Basketball Rim: The basketball rim image is selected candidates through screening. The detection methods focus
from the Caltech 256 dataset [43], labeled as 006_0033. on the detection performance, and their fitting performance
The performance is shown in row (d) of Fig. 7. The Canny may not be satisfactory. Our aim is to first apply the ellipse
detector is also used for edge extraction of this image, where detection method to find the ellipses in a given image, and
the correlation coefficient is set to 0.5. The presence of the then further improve the fitting performance based on the
damaged basketball net not only introduces a large amount coarse position and size information of the detected ellipses.
of grouped noise contaminated RIDPs that are distributed More specifically, the idea is to divide the data points into
in one side of the ellipse, but also causes a missing arc groups, each corresponding to one detected ellipse. To this end,
segment, resulting in a more difficult case for ellipse fitting. we first form the equations of the detected ellipses using the
The proportion of RIDPs in this fitting scenario is about parameters of the detected ellipses obtained from the detection
31.44%. For this image, the proposed method also has the methods. We then apply the coordinates of each data point to
best fitting performance compared to the other methods. the equations and compute the errors of each data point relative
5) Butterfly Frame: The butterfly frame image is also to all ellipse equations. For each ellipse, we can extract the
selected from the Caltech 256 dataset [43], labeled as data points with relatively small errors by setting a threshold.
024_0103. The fitting process and results are shown in By doing so, the extracted points belong to the ellipse with a
row (e) of Fig. 7. The correlation coefficient of the Canny high probability. This process can be regarded as association,
detector is set to 0.3. The presence of the butterfly and flower i.e., associate the data points to particular ellipses. Apparently,
inside the frame introduces a large number of concentrated RIDPs may be introduced in the association process, and the
RIDPs, whose proportion is about 39.64%. From the fitting value of the threshold determines the number of RIDPs. The
results, in the third column and fourth column of row (e), the smaller the threshold, the less the number of RIDPs, which,
proposed method fits the ellipse very well. However, all of however, may filter out useful points.
the other methods have more or less fitting performance loss To validate the fitting performance improvement by the
caused by RIDPs. proposed method, we select several images, each containing
D. Coupled Ellipses Fitting: Real Data multiple ellipses. We first use Lu’s detection method pro-
posed recently in [27] to detect the ellipses and then apply
In this subsection, the proposed method is applied to fit
the coupled ellipses in an iris image. To demonstrate the 5 RIDPs are recognized by comparing the data points of Figs. 8 (b)&(e).
Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR. Downloaded on April 08,2024 at 02:31:03 UTC from IEEE Xplore. Restrictions apply.
2532 IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 32, 2023

Fig. 10. Illustration of the advantage of the proposed coupled ellipses fitting.
(1) The first column of images are synthetic images; (2) The second column
shows the detection results of Lu’s method; (3) The last column shows the
fitting results of the proposed coupled ellipses fitting method.

Fig. 9. Fitting performance comparison for multiple ellipses fitting after


ellipse detection. (1) The first row of images are the original images from
the Caltech 256 dataset [43]; (2) The second row shows the fitting results Fig. 11. Illustration of the better performance of the proposed coupled ellipses
from Lu’s detection method; (3) The third, fourth, and fifth rows show the fitting than Lu’s method through the owl’s iris image.
fitting results obtained by the other methods; (4) The last row shows the fitting
results of the proposed MCC-VC-Laplacian method. that the fitting significantly depends on the detection perfor-
TABLE VIII mance since it follows after the detection. For ellipses lacking
F ITTING P ERFORMANCE OF D IFFERENT M ETHODS U SING P RASAD R EAL
of arc segments, the detection method may fail, implying that
DATASET (390 I MAGES IN T OTAL ) the detection method cannot be used for grouping the data
points from different arc segments of the same ellipse. In such
a case, the proposed coupled ellipses fitting method offers
better results when the image is known to contain coupled
ellipses. Fig. 10 and Fig. 11 illustrate the advantage of the
proposed coupled ellipses fitting through two synthetic images
and a real image, respectively. It is seen from the second
column of Fig. 10 that Lu’s method cannot detect the ellipses
owing to some losing portions. In comparison, the proposed
coupled ellipses fitting method successfully fits the coupled
ellipses. Fig. 11(a) shows an owl’s iris image containing
ellipse fitting methods to further fit the ellipses. We conducted coupled ellipses. For this image, Lu’s detection method is
corresponding comparative experiments, from the data points only able to detect the inner ellipse; see Fig. 11(c). The data
extracted after detection as input, by using the proposed MCC- points associated to the inner ellipse can be determined using
VC-Laplacian, MCC-Laplacian [17], HGMM [18], SAREfit the detected inner ellipse, and the remaining data points are
[35], for fitting. All of them use the same set of data points associated to the outer ellipse. The association results based on
from ellipse detection. The results are shown in Fig. 9, where detection and using the proposed SOCP method are given in
the threshold is set to 1.5. For comparison, the original fitting Figs. 11(e)&(g), respectively. The proposed MCC-VC coupled
results from Lu’s detector are also included in the second ellipses fitting method follows after the association, and the
row. Although most ellipses are successfully detected by fitting results are shown in Figs. 11(f)&(h), respectively.
Lu’s method, the fitting accuracy seems unsatisfactory. The Clearly, the proposed SOCP method for association has better
proposed MCC-VC method has notable fitting performance fitting performance.
improvement over Lu’s method and it has the best fitting Before closing this subsection, we would like to make the
performance owing to its robustness. following discussion about the use of the ellipse detection
Furthermore, we test the ellipse fitting performance in method in multiple ellipses fitting. When there are multiple
terms of NRMSE, Hausdorff distance, EECM, and successful ellipses in the image, we need to resort to some other tech-
fitting rate using the publicly available real dataset, the Prasad niques to roughly divide the overall data points into several
dataset [26]. It contains 390 images of sizes from 107 × subsets, each subset of data points corresponding to one
138 to 800 × 540 chosen from 48 categories of the Caltech ellipse. Ellipse detection is one of such techniques. It should
256 dataset. Each image in this dataset contains one or multi- be noted that ellipse detection is not the only technique that
ple ellipses. Here, we also first apply Lu’s detection method to can complete this task. Hence, to be exact, the proposed
each image to extract the data points. They are then separated method does not depend on ellipse detection, but requires a
for different ellipses and ellipse fitting follows afterward. The pre-processing step of dividing the data points into subsets
results are given in Table VIII below. In general, all ellipse for different ellipses. Besides ellipse detection, the traditional
fitting methods further improve the fitting accuracy from Lu’s k-means method and the machine learning method are able to
detection method. In addition, the proposed MCC-VC method complete the data pre-processing task. The k-means method
has the best performance among the compared methods. has been used in [44], and an example of machine learning
As a special case of multiple ellipses fitting, the cou- method can be found in [45]. Moreover, we would like to
pled ellipses fitting can also be done through the procedure clarify that the proposed ellipse fitting method does not require
described above, where the association is accomplished based ellipse detection when there is only one ellipse or there are
on ellipse detection. Nonetheless, it is straightforward to see only coupled ellipses in the image. For example, the fittings
Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR. Downloaded on April 08,2024 at 02:31:03 UTC from IEEE Xplore. Restrictions apply.
WANG et al.: ROBUST ELLIPSE FITTING BASED ON MCC-VC 2533

in Fig. 7 do not apply ellipse detection first since there is no Regarding the convexity of f 1 (r ), we have the following
need to divide the data points into subsets. proposition.
Proposition 1: f 1 (r ) is a strictly convex function in the
VI. C ONCLUSION domain (0, +∞).
In this paper, we have presented a new ellipse fitting Proof: By letting t = r − r0 , we form a function f 1 (t).
method based on MCC-VC, which offers strong robustness To prove the convexity of f 1 (r ), we first prove that f 1 (t) is
against RIDPs. By the iterative optimization of the kernel strictly convex. f 1 (t) is a strictly convex function if and only if
center, kernel bandwidth and ellipse parameter vector, one at a the second derivative is strictly greater than zero, i.e., f 1′′ (t) >
time through convex approximations, the proposed MCC-VC 0 [31]. It follows from the expression of f 1 (t) that
method is computationally efficient and more flexible, and
is applicable to more challenging scenarios. Furthermore, f 1′′ (t) = 2b4 t 2 − 3b3 t + 2b2 , (38)
we have proposed a data association method for coupled
ellipses fitting without knowing the data association between which is a quadratic function. Since b4 > 0, f 1′′ (t) is convex
the ellipses and the data points, and extended the proposed and has a minimum. The minimum value of f 1′′ (t) is
MCC-VC single ellipse fitting method to coupled ellipses
9 2
fitting. Both simulated data and real images have confirmed b2 b4 − 16 b3
the superior fitting performance of the proposed methods over min f 1′′ (t) = 1
, (39)
t>−r0
2 b4
several competitive fitting methods in the literature.
3b3
and it is reached at t = 4b .
A PPENDIX A b4
4

A PPROXIMATE C ONVEX F UNCTION OF h(r ) Since 2 > 0, we only need to show the numerator term
By introducing a known positive constant r0 , we can rewrite b2 b4 − 16 b3 > 0. Using the expressions of b2 , b3 , b4 in (36),
9 2

h(r ) as h(r ) = h 1 (r ) + h 2 (r ), where


9 2
N N b2 b4 −
b
r − r0 X −âi r r r0 X −âi r 16 3
h 1 (r ) = − e , h 2 (r ) = − e . (33) N N N
!2
N 4 N 1X 9
i=1 i=1
X X
= 2 (âi e−âi r0 )· (âi3 e−âi r0 ) − âi2 e−âi r0 .
To approximate h(r ) by a convex function, we approximate N 16N 2
i=1 i=1 i=1
the two non-convex functions h 1 (r ) and h 2 (r ) to convex (40)
functions through appropriate Taylor expansions, respectively.
For the function h 1 (r ), we perform the Taylor expansion to According to the Cauchy-Schwarz inequality, we have
e−âi r up to the third order at r0 , giving
N N
âi2 −âi r0 1 1 3 1
e−âi r ≈ e−âi r0 − âi e−âi r0 (r − r0 ) + (r − r0 )2
X X
e (âi2 e− 2 âi r0 )2 · (âi2 e− 2 âi r0 )2
2
i=1 i=1
â 3
− i e−âi r0 (r − r0 )3 . N
!2
1 3
6 ≥
X
(âi e
2 − 12 âi r0
) · (âi e
2 − 12 âi r0
)
(34)
i=1
The value of âi may be large in the presence of RIDPs, and N
!2 N
!2
keeping up to the third-order in the expansion is to guarantee
X 9 X 2 −âi r0
= âi2 e−âi r0 > âi e . (41)
a sufficiently accurate approximation. 16
i=1 i=1
Using (34) in h 1 (r ) yields the approximate function f 1 (r ):
N
P 2
N 2 −âi r0
r − r0 X −âi r0 The last inequality holds when i=1 âi e ̸ = 0, which
f 1 (r ) = − [e − âi e−âi r0 (r − r0 )
N
i=1 obviously is the case since âi = |δˆi − ĉ|, and δ̂i (i = 1,. . . , N )
are random samples and cannot have the same value of ĉ.
âi2 −âi r0 âi3 −âi r0
+ e (r − r0 )2 − e (r − r0 )3 ]. We conclude from (41) that f 1′′ (t) > 0 holds, indicating
2 6 that f 1 (t) is a strictly convex function. Since f 1 (r ) is the
(35) composition of the convex function f 1 (t) and the affine
For notational simplicity, we further define function t = r − r0 , it is also strictly convex.
Next, we will focus on the approximation of function h 2 (r ).
N N
1 X −âi r0 1 X −âi r0 For e−âi r in h 2 (r ), we only perform the first-order Taylor
b1 = e , b2 = âi e , expansion at r0 , since it is difficult to prove the convexity
N N
i=1 i=1 of the higher order approximations. By doing so, we obtain
1 XN N
1 X 3 −âi r0 the approximate function f 2 (r ) of h 2 (r ):
b3 = âi2 e−âi r0 , b4 = âi e , (36)
N N N
i=1 i=1 r r0 X −âi r0
which are known constants. With these notations, f 1 (r ) can f 2 (r ) = − [e − âi e−âi r0 (r − r0 )]
4 N
be rewritten as i=1
r
b4 b3 = − r0 b1 + r0 b2 (r − r0 ), (42)
f 1 (r ) = (r − r0 )4 − (r − r0 )3 +b2 (r − r0 )2 − b1 (r − r0 ). 4
6 2
(37) which is an affine function of r and thus convex.
Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR. Downloaded on April 08,2024 at 02:31:03 UTC from IEEE Xplore. Restrictions apply.
2534 IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 32, 2023

Finally, the approximate convex function of h(r ) is R EFERENCES

f (r ) = f 1 (r ) + f 2 (r ) [1] X. Jiang, X. Huang, M. Jie, and H. Yin, “Rock detection based on


2D maximum entropy thresholding segmentation and ellipse fitting,”
b4 b3 in Proc. IEEE Int. Conf. Robot. Biomimetics (ROBIO), Sanya, China,
= (r − r0 )4 − (r − r0 )3 + b2 (r − r0 )2 Dec. 2007, pp. 1143–1147.
6 2
1 1 [2] B. N. Kumar, R. P. Chauhan, and N. Dahiya, “Detection of glaucoma
+ (b2r0 − b1 + )(r − r0 ) + ( r0 − b1r0 ). (43) using image processing techniques: A review,” in Proc. Int. Conf.
4 4 Microelectron., Comput. Commun. (MicroCom), Jan. 2016, pp. 1–6.
[3] J.-H. Wu, W.-L. Ou, and C.-P. Fan, “NIR-based gaze tracking with fast
pupil ellipse fitting for real-time wearable eye trackers,” in Proc. IEEE
A PPENDIX B Conf. Dependable Secure Comput., Aug. 2017, pp. 93–97.
C LOSED -F ORM S OLUTION OF f ′ (r ) = 0 [4] S. Chen and J. Epps, “Efficient and robust pupil size and blink estimation
from near-field video sequences for human–machine interaction,” IEEE
In this appendix, we show the existence and uniqueness of Trans. Cybern., vol. 44, no. 12, pp. 2356–2367, Dec. 2014.
the real root of f ′ (r ) = 0, and give the expression of the [5] A. Goneid, S. El-Gindi, and A. Sewisy, “A method for the Hough trans-
form detection of circles and ellipses using a 1-dimensional array,” in
closed-form solution. Proc. IEEE Int. Conf. Syst., Man, Cybern., Comput. Cybern. Simulation,
Similar to Appendix A, we first obtain the function f (t) by Orlando, FL, USA, Oct. 1997, pp. 3154–3157.
letting t = r − r0 . f ′ (t) can be expressed as [6] S. J. Ahn, W. Rauh, and H.-J. Warnecke, “Least-squares orthogonal
distances fitting of circle, sphere, ellipse, hyperbola, and parabola,”
2b4 3 3b3 2 1 Pattern Recognit., vol. 34, no. 12, pp. 2283–2303, Dec. 2001.
f ′ (t) = t − t + 2b2 t + (b2r0 − b1 + ). (44) [7] Y. He, L. Ran, and Z. Shen, “Comparative analysis on orthogonal
3 2 4 geometry ellipse fitting,” in Proc. IEEE Int. Conf. Comput. Sci. Autom.
Eng., Shanghai, China, Jun. 2011, pp. 300–303.
By defining the following notations,
[8] A. Fitzgibbon, M. Pilu, and R. B. Fisher, “Direct least square fitting
of ellipses,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 21, no. 5,
2b4 3b3 1
d1 = , d2 = − , d3 = 2b2 , d4 = b2r0 − b1 + , pp. 476–480, May 1999.
3 2 4 [9] R. Halir and J. Flusser, “Numerically stable direct least squares fitting of
3d1 d3 − d22 27d12 d4 − 9d1 d2 d3 + 2d23 ellipses,” in Proc. 6th Int. Conf. Central Eur. Comput. Graph. (CECG),
p= , q = , (45) Bory, Feb. 1998, pp. 125–132.
3d12 27d13 [10] W. Gander, G. H. Golub, and R. Strebel, “Least-squares fitting of circles
and ellipses,” BIT Numer. Math., vol. 34, no. 4, pp. 558–578, Dec. 1994.
the equation f ′ (t) = 0 can be transformed into t¯3 + p t¯ + [11] P. L. Rosin, “A note on the least squares fitting of ellipses,” Pattern
d2 Recognit. Lett., vol. 14, no. 10, pp. 799–808, Oct. 1993.
q = 0 by letting t¯ = t − 3d 1
. According to the Cardano’s [12] D. S. Barwick, “Very fast best-fit circular and elliptical boundaries by
formula [46], the discriminant of the root is 1 = ( q2 )2 + ( 3p )3 , chord data,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 31, no. 6,
which can be used to verify the existence and uniqueness of the pp. 1147–1152, Jun. 2009.
[13] E. S. Maini, “Enhanced direct least squares fitting of ellipses,” Int.
solution. Similar to proving the non-negativity of (40), we can J. Pattern Recogn. Artif. Intell., vol. 20, no. 6, pp. 939–953, Sep. 2006.
validate the non-negativity of p, which means 1 > 0, and the [14] P. J. Rousseeuw, “Least median of squares regression,” J. Amer. Statist.
equation t¯3 + p t¯ + q = 0 has only one real root, so does Assoc., vol. 79, no. 388, pp. 871–880, 1984.
the equation f ′ (t) = 0. The real root of f ′ (t) = 0 can be [15] M. A. Fischler and R. Bolles, “Random sample consensus: A paradigm
expressed as [47] for model fitting with applications to image analysis and automated
cartography,” Commun. ACM, vol. 24, no. 6, pp. 381–395, 1981.
1 1 [16] J. Liang, Y. Wang, and X. Zeng, “Robust ellipse fitting via half-quadratic
−d2 − (k13 + k23 ) and semidefinite relaxation optimization,” IEEE Trans. Image Process.,
t= , (46) vol. 24, no. 11, pp. 4276–4286, Nov. 2015.
3d1 [17] C. Hu, G. Wang, K. C. Ho, and J. Liang, “Robust ellipse fitting with
Laplacian kernel based maximum correntropy criterion,” IEEE Trans.
where Image Process., vol. 30, pp. 3127–3141, 2021.
" 1 # [18] M. Zhao, X. Jia, L. Fan, Y. Liang, and D.-M. Yan, “Robust ellipse
−e2 + (e22 − 4e1 e3 ) 2 fitting using hierarchical Gaussian mixture models,” IEEE Trans. Image
k1 = e1 d2 + 3d1 , Process., vol. 30, pp. 3828–3843, 2021.
2 [19] K. Thurnhofer-Hemsi, E. López-Rubio, E. B. Blázquez-Parra,
" 1 # M. C. Ladrón-de-Guevara-Muñoz, and Ó. D. de-Cózar-Macías, “Ensem-
−e2 − (e22 − 4e1 e3 ) 2 ble ellipse fitting by spatial median consensus,” Inf. Sci., vol. 579,
k2 = e1 d2 + 3d1 , (47) pp. 310–324, Nov. 2021.
2
[20] Z. Ma and K. C. Ho, “Asymptotically efficient estimators for the
fittings of coupled circles and ellipses,” Digit. Signal Process., vol. 25,
with e1 = d22 −3d1 d3 , e2 = d2 d3 −9d1 d4 , and e3 = d32 −3d2 d4 . pp. 28–40, Feb. 2014.
Finally, the solution of the equation f ′ (r ) = 0 can be obtained [21] R. He, B.-G. Hu, W.-S. Zheng, and X.-W. Kong, “Robust principal
from (46) as follows: component analysis based on maximum correntropy criterion,” IEEE
Trans. Image Process., vol. 20, no. 6, pp. 1485–1494, Jun. 2011.
1 1 [22] W. Liu, P. P. Pokharel, and J. C. Principe, “Correntropy: Properties
−d2 − (k13 + k23 ) and applications in non-Gaussian signal processing,” IEEE Trans. Signal
r= + r0 . (48) Process., vol. 55, no. 11, pp. 5286–5298, Nov. 2007.
3d1 [23] B. W. Silverman, Density Estimation for Statistics and Data Analysis.
London, U.K.: Chapman & Hall, 1986.
[24] S. Weglarczyk, “Kernel density estimation and its application,” in Proc.
ACKNOWLEDGMENT ITM Web Conf., vol. 23, 2018, pp. 1–12.
[25] B. Chen, X. Wang, Y. Li, and J. C. Principe, “Maximum correntropy
The MATLAB source code for this work can be downloaded criterion with variable center,” IEEE Signal Process. Lett., vol. 26, no. 8,
from https://github.com/nbgwang/MCC-VC-for-ellipse-fitting. pp. 1212–1216, Jun. 2019.

Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR. Downloaded on April 08,2024 at 02:31:03 UTC from IEEE Xplore. Restrictions apply.
WANG et al.: ROBUST ELLIPSE FITTING BASED ON MCC-VC 2535

[26] D. K. Prasad, M. K. Leung, and S.-Y. Cho, “Edge curvature and Gang Wang (Senior Member, IEEE) received
convexity based ellipse detection method,” Pattern Recognit., vol. 45, the B.Eng. degree in electronic engineering from
no. 9, pp. 3204–3221, Sep. 2012. Shandong University, Jinan, China, in 2006, and the
[27] C. Lu, S. Xia, M. Shao, and Y. Fu, “Arc-support line segments revisited: Ph.D. degree from Xidian University, Xi’an, China,
An efficient high-quality ellipse detection,” IEEE Trans. Image Process., in 2011.
vol. 29, pp. 768–781, 2020. He joined Ningbo University, Ningbo, China,
[28] P. K. Das, S. Meher, R. Panda, and A. Abraham, “An efficient blood-cell in January 2012, where he is currently a Full Pro-
segmentation for the detection of hematological disorders,” IEEE Trans. fessor. From June 2018 to June 2019, he was a
Cybern., vol. 52, no. 10, pp. 1–12, Oct. 2022. Visiting Scholar with the University of Missouri,
[29] C. Meng, Z. Li, X. Bai, and F. Zhou, “Arc adjacency matrix-based fast Columbia, MO, USA. His research interests include
ellipse detection,” IEEE Trans. Image Process., vol. 29, pp. 4406–4420, target localization and tracking in wireless networks.
2020. He is elected as a member of the Sensor Array and Multichannel (SAM)
[30] J. S. Marron and M. P. Wand, “Exact mean integrated squared error,” Technical Committee of the IEEE Signal Processing Society. He was a
Ann. Statist., vol. 20, no. 2, pp. 712–736, 1992. recipient of the Natural Science Funds for Outstanding Young Scholars from
[31] S. Boyd and L. Vandenberghe, Convex Optimization, Cambridge, U.K.: the National Natural Science Foundation of China and the Natural Science
Cambridge Univ. Press, 2004. Funds for Distinguished Young Scholars from Zhejiang Provincial Natural
[32] N. C. Schwertman, A. J. Gilks, and J. Cameron, “A simple noncalculus Science Foundation. He was the Handling Editor of Digital Signal Processing
proof that the median minimizes the sum of the absolute deviations,” (Elsevier) from September 2019 to October 2022. He serves as an Associate
Amer. Statistician, vol. 44, no. 1, pp. 38–39, Feb. 1990. Editor for IEEE T RANSACTIONS ON A EROSPACE AND E LECTRONIC S YS -
TEMS and the Handling Editor for Signal Processing (Elsevier).
[33] A. Ben-Tal and A. Nemirovski, Lectures on Modern Convex Optimiza-
tion: Analysis, Algorithms, and Engineering Applications (MPS-SIAM
Series on Optimization). Philadelphia, PA, USA: SIAM, 2001.
[34] M. S. Lobo, L. Vandenberghe, S. Boyd, and H. Lebret, “Applications
of second-order cone programming,” Linear Algebra Appl., vol. 284, Chenlong Hu received the B.Eng. degree in elec-
nos. 1–3, pp. 193–228, Nov. 1998. tronic and information engineering from the Ningbo
[35] K. Thurnhofer-Hemsi et al., “Ellipse fitting by spatial averaging of University of Technology, Ningbo, China, in 2018,
random ensembles,” Pattern Recogn., vol. 106, pp. 1–15, Oct. 2020. and the master’s degree in electronics and com-
[36] Z. L. Szpak, W. Chojnacki, and A. van den Hengel, “Guaranteed ellipse munications engineering from Ningbo University,
fitting with a confidence region and an uncertainty measure for centre, Ningbo, in 2021. His research interests include
axes, and orientation,” J. Math. Imag. Vis., vol. 52, no. 2, pp. 173–199, robust ellipse fitting.
Jun. 2015.
[37] A. Domahidi, E. Chu, and S. Boyd, “ECOS: An embedded conic solver,”
in Proc. Eur. Control Conf. (ECC), Jul. 2013, pp. 3071–3076.
[38] G. Michael and S. Boyd. CVX: MATLAB Software for Disci-
plined Convex Programming. Accessed: Jan. 2020. [Online]. Available:
http://cvxr.com/cvx/
[39] J. F. Sturm, “Using SeDuMi 1.02, a MATLAB toolbox for optimization
over symmetric cones,” Optim. Methods Softw., vol. 11, nos. 1–4, K. C. Ho (Fellow, IEEE) was born in Hong Kong.
pp. 625–653, 1999. He received the B.Sc. degree (Hons.) in electronics
[40] D. P. Huttenlocher, G. A. Klanderman, and W. J. Rucklidge, “Comparing and the Ph.D. degree in electronic engineering from
images using the Hausdorff distance,” IEEE Trans. Pattern Anal. Mach. The Chinese University of Hong Kong, Hong Kong,
Intell., vol. 15, no. 9, pp. 850–863, Sep. 1993. in 1988 and 1991, respectively.
[41] H. I. Cakir and C. Topal, “An Euclidean ellipse comparison metric for He was a Research Associate with the Royal
quantitative evaluation,” in Proc. IEEE Int. Conf. Acoust. Speech Signal Military College of Canada from 1991 to 1994.
Process. (ICASSP), Apr. 2018, pp. 1263–1267. He joined Bell-Northern Research, Montreal, QC,
[42] Voyager-2. Accessed: Nov. 1, 2020. [Online]. Available: http://mobile Canada, as a member of Scientific Staff, in 1995.
mag.com/2013/06/28/voyager-1-space-zone/ He was a Faculty Member with the Department of
[43] G. Griffin, A. Holub, and P. Perona. (Mar. 2007). Caltech-256 Electrical Engineering, University of Saskatchewan,
Object Category Dataset. CalTech. [Online]. Available: https://authors. Saskatoon, SK, Canada, from September 1996 to August 1997. Since Septem-
library.caltech.edu/7694/1/CNS-TR-2007-001.pdf ber 1997, he has been with the University of Missouri, Columbia, MO,
[44] T. Marosević and R. Scitovski, “Multiple ellipse fitting by center-based USA, where he is currently a Professor with the Electrical Engineering and
clustering,” Croatian Oper. Res. Rev., vol. 6, no. 1, pp. 43–53, Mar. 2015. Computer Science Department. He was active in the development of the ITU-T
[45] Z. Dang, K. M. Yi, Y. Hu, F. Wang, P. Fua, and M. Salzmann, Standard Recommendations from 1995 to 2012. He was the Rapporteur of
“Eigendecomposition-free training of deep networks for linear least- ITU-T Q15/SG16: Voice Gateway Signal Processing Functions and Circuit
square problems,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 43, no. 9, Multiplication Equipment/Systems (during 2009–2012) and the Associate
pp. 3167–3182, Sep. 2021. Rapporteur of ITU-T Q16/SG16: Speech Enhancement Functions in Signal
[46] R. Witula and D. Slota, “Cardanos formula, square roots, Chebyshev Processing Network Equipment in 2012. His research interests include sensor
polynomials and radicals,” J. Math. Anal. Appl., vol. 363, no. 2, 2010, array processing, source localization, subsurface object detection, wireless
Art. no. 639647. communications, and adaptive processing.
[47] S. Fan, “A new extracting formula and a new distinguishing means on the Dr. Ho was a recipient of the Senior Faculty Research Award, the Junior
one variable cubic equation,” Natural Sci. J. Hainan Teachers College, Faculty Research Award, and the Teaching Award from the College of
vol. 2, no. 2, pp. 91–98, Dec. 1989. Engineering, University of Missouri. He was the Technical Chair of the
IEEE International Conference on Acoustics, Speech and Signal Processing
in 2016. He was the Past Chair (2015), the Chair (during 2013–2014), and
the Vice-Chair (during 2011–2012) of the Sensor Array and Multichannel
Wei Wang received the B.Eng. degree in elec- Technical Committee of the IEEE Signal Processing Society. He was in the
tronic and information engineering from West Anhui organizing committees of several IEEE sponsored conferences and workshops,
University, Luan, China, in 2020. He is currently including the VCIP 2020, APSIPA 2015, CAMSAP 2011, and SAM 2008.
pursuing the master’s degree in electronics and com- He was an Associate Editor of the IEEE T RANSACTIONS ON S IGNAL
munications engineering with Ningbo University, P ROCESSING (during 2009–2013 and during 2003–2006) and the IEEE
Ningbo, China. His research interests include robust S IGNAL P ROCESSING L ETTERS (during 2004–2008). He was the Editor of
ellipse fitting and robust localization under non-line- the ITU-T Recommendations G.160: Voice Enhancement Devices (during
of-sight (NLOS) conditions. 2006–2012), the G.168: Digital Network Echo Cancellers (during 2000–2012),
and the G.799.2: Mechanism for Dynamic Coordination of Signal Processing
Network Equipment (during 2004–2009).

Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR. Downloaded on April 08,2024 at 02:31:03 UTC from IEEE Xplore. Restrictions apply.

You might also like