abstract arxiv:1709.06366v1 [cs.cv] 19 sep...

17
An Adaptive Algorithm for Precise Pupil Boundary Detection using Entropy of Contour Gradients Cihan Topal a , Halil Ibrahim Cakir b , Cuneyt Akinlar b a Department of Electrical and Electronics Engineering, Anadolu University, 26470 Eskisehir, Turkey b Department of Computer Engineering, Anadolu University, 26470 Eskisehir, Turkey ,✩✩ Abstract Eye tracking spreads through a vast area of applications from ophthalmology, assistive technologies to gaming and virtual reality. Detection of pupil is the most critical step in many of these tasks hence needs to be performed accurately. Although detection of pupil is a smooth task in clear sight, possible occlusions and odd viewpoints complicate the problem. We present an adaptive pupil boundary detection method that is able to infer whether entire pupil is in clearly visible by a modal heuristic. Thus, a faster detection is performed with the assumption of no occlusions. If the heuristic fails, a deeper search among extracted image features is executed to maintain accuracy. Furthermore, the algorithm can find out if there is no pupil as an aidful information for many applications. We prepare a dataset containing 1509 high resolution eye images collected from five subjects and perform an extensive set of experiments to obtain quantitative results in terms of accuracy, localization and timing. The proposed method outperforms three other state of the art algorithms and can run up to 140 Hz in single-thread on a standard laptop computer. Keywords: Pupil detection, eye tracking, elliptical arc detection, ellipse detection, gaze estimation, shape recognition. 1. Introduction Eye tracking (ET) has emerged as an important research area with a diverse set of applications in- cluding human computer interaction, diagnosis of psychological, neurological and ophthalmologic in- dividuals, assistive systems for drivers and disabled people, marketing research, and biometrics. In ad- dition, there are efforts to integrate ET technology in virtual reality (VR) studies to increase the feel- ing of immersion via rendering virtual environment with a depth of field effect similar to human vision. Pupil boundary detection and center estimation is an essential step in all eye tracking systems and This work is supported by The Scientific and Tech- nological Research Council of Turkey (TUBITAK) and Anadolu University Commission of Scientific Research Projects (BAP) under the grant numbers 111E053 and 1207F113, respectively. ✩✩ Cuneyt Akinlar was with Department of Computer En- gineering, Anadolu University during the time of this study. Email addresses: [email protected] (Cihan Topal), [email protected] (Halil Ibrahim Cakir), [email protected] (Cuneyt Akinlar) has to be performed precisely. In point-of -gaze (PoG) detection, the extraction of pupil center is required to estimate the location of gaze. In such applications, even loss of a single pixel precision in pupil center may cause an error of a few degrees in the gaze direction vector, which would result in a significant drift in the estimated gaze point. Pupil boundary detection is a more difficult prob- lem which has to be performed accurately for bio- metric applications and medical studies. Another emerging application area of eye track- ing is virtual reality (VR) technologies which re- cently have a significant leap in popularity. VR technology renders a 3D scene from two different point of views, ie. from the views of left and right eyes of a user. To prevent problems like motions sickness, these rendering 3D locations should match the interpupillary distance of the user. Moreover, developers integrate eye tracking into VR systems to better simulate the human visual system. They render locations where the user focuses sharper and blur other regions to boost immersion effect and en- hance the VR experience. Preprint submitted to Elsevier September 20, 2017 arXiv:1709.06366v1 [cs.CV] 19 Sep 2017

Upload: others

Post on 11-Jul-2020

19 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Abstract arXiv:1709.06366v1 [cs.CV] 19 Sep 2017c-viz.eskisehir.edu.tr/pdfs/PupilDetector2017Arxiv.pdfCihan Topala, Halil Ibrahim Cakir b, Cuneyt Akinlar aDepartment of Electrical and

An Adaptive Algorithm for Precise Pupil Boundary Detectionusing Entropy of Contour GradientsI

Cihan Topala, Halil Ibrahim Cakirb, Cuneyt Akinlarb

aDepartment of Electrical and Electronics Engineering, Anadolu University, 26470 Eskisehir, TurkeybDepartment of Computer Engineering, Anadolu University, 26470 Eskisehir, Turkey,II

Abstract

Eye tracking spreads through a vast area of applications from ophthalmology, assistive technologies togaming and virtual reality. Detection of pupil is the most critical step in many of these tasks hence needsto be performed accurately. Although detection of pupil is a smooth task in clear sight, possible occlusionsand odd viewpoints complicate the problem. We present an adaptive pupil boundary detection method thatis able to infer whether entire pupil is in clearly visible by a modal heuristic. Thus, a faster detection isperformed with the assumption of no occlusions. If the heuristic fails, a deeper search among extractedimage features is executed to maintain accuracy. Furthermore, the algorithm can find out if there is nopupil as an aidful information for many applications. We prepare a dataset containing 1509 high resolutioneye images collected from five subjects and perform an extensive set of experiments to obtain quantitativeresults in terms of accuracy, localization and timing. The proposed method outperforms three other stateof the art algorithms and can run up to 140 Hz in single-thread on a standard laptop computer.

Keywords:Pupil detection, eye tracking, elliptical arc detection, ellipse detection, gaze estimation, shape recognition.

1. Introduction

Eye tracking (ET) has emerged as an importantresearch area with a diverse set of applications in-cluding human computer interaction, diagnosis ofpsychological, neurological and ophthalmologic in-dividuals, assistive systems for drivers and disabledpeople, marketing research, and biometrics. In ad-dition, there are efforts to integrate ET technologyin virtual reality (VR) studies to increase the feel-ing of immersion via rendering virtual environmentwith a depth of field effect similar to human vision.

Pupil boundary detection and center estimationis an essential step in all eye tracking systems and

IThis work is supported by The Scientific and Tech-nological Research Council of Turkey (TUBITAK) andAnadolu University Commission of Scientific ResearchProjects (BAP) under the grant numbers 111E053 and1207F113, respectively.

IICuneyt Akinlar was with Department of Computer En-gineering, Anadolu University during the time of this study.

Email addresses: [email protected] (CihanTopal), [email protected] (Halil IbrahimCakir), [email protected] (Cuneyt Akinlar)

has to be performed precisely. In point-of -gaze(PoG) detection, the extraction of pupil center isrequired to estimate the location of gaze. In suchapplications, even loss of a single pixel precision inpupil center may cause an error of a few degreesin the gaze direction vector, which would resultin a significant drift in the estimated gaze point.Pupil boundary detection is a more difficult prob-lem which has to be performed accurately for bio-metric applications and medical studies.

Another emerging application area of eye track-ing is virtual reality (VR) technologies which re-cently have a significant leap in popularity. VRtechnology renders a 3D scene from two differentpoint of views, ie. from the views of left and righteyes of a user. To prevent problems like motionssickness, these rendering 3D locations should matchthe interpupillary distance of the user. Moreover,developers integrate eye tracking into VR systemsto better simulate the human visual system. Theyrender locations where the user focuses sharper andblur other regions to boost immersion effect and en-hance the VR experience.

Preprint submitted to Elsevier September 20, 2017

arX

iv:1

709.

0636

6v1

[cs

.CV

] 1

9 Se

p 20

17

Page 2: Abstract arXiv:1709.06366v1 [cs.CV] 19 Sep 2017c-viz.eskisehir.edu.tr/pdfs/PupilDetector2017Arxiv.pdfCihan Topala, Halil Ibrahim Cakir b, Cuneyt Akinlar aDepartment of Electrical and

In this study, we propose a novel adaptive pupilboundary detection method from eye images, whichworks by extracting arcs from the edge segmentsof the image and joining them to find the pupilboundary, hence the center. Organization of thepaper is as follows; we give a comprehensive re-lated work on pupil boundary and center detectionin section 2, we explain our method with fine detailin section 3, analysis of the method in terms of ac-curacy (F-measure), localization and running timeare presented in section 4, and we finalize the paperwith concluding remarks.

2. Related Work

The literature on pupil detection is very rich, andmany different techniques have been proposed. Inthis section, our goal is to give a high-level picture ofthe proposed solutions for pupil boundary detectionand/or pupil center estimation.

Many early methods in the literature utilize dis-criminative visual structure of human eye to de-tect the pupil. Dark intensity of pupil region andits high contrast between bright sclera region of-fers a relatively easy way to solve the problem.In this manner, many algorithms extracts pupil(or iris in some studies) center with combinationsof several methods like thresholding, morphologi-cal operations, connected component analysis andcenter of mass algorithms with various additionalsteps [1, 2, 3, 4, 5]. In addition, there are meth-ods which also benefit model fitting approachesto find pupil or iris boundary as a circle or el-lipse [6, 7, 8, 9]. In these studies, edge and con-tour extraction is employed and followed by Houghtransform or RANSAC algorithm to accurately es-timate the boundary [10, 11].

Dark/bright pupil differencing is another ap-proach to roughly detect eye locations in a remotelytaken image [12, 13, 14]. It works by differencingtwo successive frames that captured with on-axisand off-axis illumination, respectively. Due to thephysical structure of human eye, on-axis illumina-tion causes a significant brightness inside the pupil.Therefore, pupil regions become more salient in thedifference image.

Along with the feature-based methods, thereare also purely model-based approaches which aremostly utilized in iris recognition studies in theliterature. Daugman [15] proposes an integro-differential operator for detecting the pupil and iris

boundaries aiming to maximize the contour integralvalue on the smoothed image derivative (Eq. 1).

max(r,x0,y0)

∣∣∣∣∣Gσ(r) ∗ ∂

∂r

∮(r,x0,y0)

I(x, y)

2πrds

∣∣∣∣∣ (1)

Arvacheh and Tizhoosh [16] developed an iterativealgorithm based on an active counter model whichis also capable of detecting near-circular shapes.These methods work fine; however, they requirea full search of the image plane in order to findr, x0, y0 parameters that maximize the response tothe given model. Model-based search approach iscomputationally expensive and therefore, cannot beemployed in real-time eye tracking applications.

In [17] authors use curvature of pupil contour tosort out boundary pixels which belong to prospec-tive occlusions. They detect blobs in the binarizedimage and extract contour of the biggest blob. Fi-nally, edge pixels of the pupil boundary are selectedby employing a set of heuristics (e.g. eyelids havepositive curvature, etc.) and ellipse fit applied tochosen pixels.

Another interesting approach on pupil detectionis proposed and utilized in EyeSeeCam project [18].The algorithm extracts edge segments, then re-moves glints and other unfavourable artefacts by asequence of morphological operations based on sev-eral assumptions. Finally, Delaunay Triangulationis applied to remaining pixels and pupil boundaryis detected assuming it is a convex hull.

Starburst algorithm [19] estimates the pupil cen-ter by an iterative radial feature detection tech-nique instead of finding all edges. It starts by locat-ing and removing glints if any exists. Then, rays arecast from an initial point within a 20◦ of radial step.Each ray stops where image derivative is greaterthan a threshold value, i.e., when a sharp intensitychange occurs. This operation is iterated with anupdated starting point and a set of feature pointsare collected at each step. Finally, ellipse fit is ap-plied to the collected points with RANSAC [11].In another study, authors aim to adapt the Star-burst algorithm to elliptical iris segmentation prob-lem [20].

In [21], Swirski et al. approximately detectspupil region by a Haar-like feature [23, 11]. Sec-ondly, they apply a k -means segmentation to de-termine a proper pupil threshold. Then a modifiedRANSAC-based ellipse fitting method is employedwhich utilizes gradient information as well as the

2

Page 3: Abstract arXiv:1709.06366v1 [cs.CV] 19 Sep 2017c-viz.eskisehir.edu.tr/pdfs/PupilDetector2017Arxiv.pdfCihan Topala, Halil Ibrahim Cakir b, Cuneyt Akinlar aDepartment of Electrical and

Table 1: A brief taxonomy for pupil boundary detection / center estimation algorithms.

Algorithms Dow

nsa

mp

lin

g

Bri

ght/

Dar

kP

up

ilD

iffer

enci

ng

Imag

eT

hre

shol

din

g/

Bin

ariz

atio

n

Mor

ph

olog

ical

Op

erat

ion

s

Ed

geD

etec

tion

Blo

bD

etec

tion

/C

onn

ecte

dC

omp

.A

nal

ysi

s

Cir

cle

/E

llip

seF

itti

ng

Cen

ter

ofM

ass

Alg

orit

hm

Use

ofT

emp

oral

Info

rmati

on

Oth

er/

Com

men

ts

Goni et al. [1] adaptive • modified • ∅

Maenpaa [2] • • • 4Long et al. [3] • • symmetric �, ∅

Keil et al. [4] • for glint • �, ∅, 1

Lin et al. [5] • • • • parallelogram �, ∅

Wang and Sun [6] • • vertical ellipse 4Ma et al. [7] adaptive • Hough

Dey and Samanta [8] • • for edges circle 1

Agustin et al. [9] • ellipse

Ebisawa [12] • • • • ∅

Hiley et al. [13] • • iterative • ∅

Morimoto et al. [14] • • • ∅

Zhu et al. [17] • • ellipse 2

Kumar et al. [18] • • for edges �,3

Li et al. [19] radial ellipse 4

Swirski et al. [21] k-means • • iterative �,5

Fuhl et al [22] • • • ellipse 6

∅ does not detect the pupil boundary, only estimates its center. 4 performs iris detection. � performs ROI detection.1 applies histogram back-projection or non-linear power transform on the image to make the pupil more salient.2 before ellipse fitting, tries to determine the false pupil contour pixels w.r.t. their curvature values by a set of heuristics.4 requires removal of glints. Assumes that the initial point for ray casting is inside the pupil. Iterative algorithm.3 performs Fast Radial Symmetry detection and Delaunay Triangulation. Removes glints and artefacts by a set of morphological assumptions.5 tries to find an ellipse that matches the edge image points and is orthogonal to the gradients of the image.6 detects and filter edges. Uses two different approaches, i.e. algorithmic and morphological. Rescales image if it fails in the first attempt.

spatial coordinates to find the pupil boundary.

In a more recent study Fuhl et al. detect edges onthe eye image and filter them with respect to severalmorphological criteria [22]. Later, edge segmentsare constructed from the remaining edge pixels andsome of the edge segments (i.e. straight lines) areeliminated by various heuristics. Finally remainingcontours evaluated by ellipse fitting and the bestellipse is selected by a cost function which utilizeinner gray value and the roundest shape.

Table 1 gives a brief taxonomy of the above-mentioned pupil detection algorithms. As seen inthe table, thresholding is a common technique inthe literature. Despite thresholding can quickly dis-criminate image regions having different intensityvalues, it is highly vulnerable to lighting conditionsand parameter configuration. Consequently, it failson finding the exact location where intensity changeoccurs and can easily causes a decrease on the ac-

curacy. Another frequently employed technique ismorphological operations which are applied on thethresholded binary image to suppress remaining un-desired pixel sets and improve modal structure ofthe image. However, morphological operations mayalso degrade the actual information on the imageand cause significant errors on the result. Simi-larly, algorithms that utilize thresholding and blobdetection to find a center point for pupil are obvi-ously not capable of detecting the boundary. Hence,they cannot be applied on most biometrics or med-ical studies which requires precise detection of theboundaries of pupil and iris.

Downsampling the image to save computationaltime has an obvious cost as it decreases the ac-curacy by wasting spatial resolution. Bright/darkpupil differencing requires a little amount of compu-tation and eases roughly locating the pupil, howeverit has important drawbacks. First, it needs addi-

3

Page 4: Abstract arXiv:1709.06366v1 [cs.CV] 19 Sep 2017c-viz.eskisehir.edu.tr/pdfs/PupilDetector2017Arxiv.pdfCihan Topala, Halil Ibrahim Cakir b, Cuneyt Akinlar aDepartment of Electrical and

Elliptical Arc

Extraction

Pupil Candidate

Generation

Pupil

Detection

YES

NO

Near-circular segment

All segments

ROI

Detection

Edge

Segment Detection

Near-circular

Segment Search

? Near-Circular Segment

Input Frame

Corner Detection

Ellipse Fitting

Figure 1: Processing pipeline of the proposed algorithm.

tional hardware to obtain bright and dark pupil im-ages consecutively in a synchronous manner. Fur-thermore, it reduces temporal resolution since itneeds two frames to perform a single detection. Dueto the same reason it is very sensitive to motion andit fails if a large pupil displacement occurs betweentwo consecutive images. Ebisawa specifically ad-dresses this problem in [24], and proposes variousmethods for positional compensation.

In this section we presented an overview of re-lated studies covering both biometrics and eyetracking areas from the viewpoint of pupil detec-tion problem. For interested readers, there are alsocomprehensive surveys that review the gaze estima-tion literature; in particular [25, 26].

3. Proposed Method

In this study, we propose an adaptive methodfor pupil boundary detection which is able to savecomputation by inferring whether an occlusion isthe case or not. In this manner, the computationtakes very little time if the pupil is in clear sight bythe camera. On the contrary, algorithm infers if thepupil is severely occluded, and spends more effortto detect the pupil without compromising real-timeapplicability. The main strategy which improvesthe algorithm against occlusions is extracting theelliptical arcs from input image and finding one arcor a group of arcs representing the pupil contour.In this way, relevant features from a partially vis-ible pupil can be extracted and detection can beperformed by fusion of separate features. Besidesdetecting the pupil boundary and center precisely,the algorithm can also identify if there is no pupil

in the image as a very aidful information for manyapplications.

The proposed method has a simple flow and con-sists of the processing pipeline shown in Fig. 1. Theprocessing starts by detection of region of interest(ROI) by convolving eye image with a Haar-like fea-ture. Then, we extract edge segments each of whichis a contiguous array of pixels. The next step isto determine whether a near-circular segment ex-ists that traces the entire boundary of the pupil.Such an edge segment would be found if the pupilis clearly visible with no or very little occlusion. Tofind whether an edge segment has a circular geome-try, we devise a fast heuristic method which utilizesgradient distribution of an edge segments. On thecondition that a near-circular segment is found, weextract elliptical arcs from only that segment. If nonear-circular segment is found, which would be thecase if the pupil is severely occluded by the eyelidsor eyelashes, then arcs from all edge segments inthe ROI are extracted.

Following the extraction of the elliptical arcs, wejoin them in every possible combination to gener-ate a set of ellipse candidates that at least one ofthem traces the pupil boundary. Candidates are fi-nally evaluated for their relevance to be the actualpupil contour and the best one, if it exists, is cho-sen among the candidate ellipses. In the followingsubsections we elaborate each step of the proposedalgorithm in fine detail to make the discussion clear.

3.1. ROI Estimation

In the first step of the proposed method weroughly estimate the pupil area in the entire eyeimage. For this purpose, we utilize pupil’s geomet-

4

Page 5: Abstract arXiv:1709.06366v1 [cs.CV] 19 Sep 2017c-viz.eskisehir.edu.tr/pdfs/PupilDetector2017Arxiv.pdfCihan Topala, Halil Ibrahim Cakir b, Cuneyt Akinlar aDepartment of Electrical and

= *

external r = 4x

internal r = 3x

5R

3R

factor:

3x

(a)

(b)

Figure 2: (a) ROI detection by means of a convolution op-eration with a Haar-like feature. (b) Detected ROIs of twoeye images having different size of pupils.

ric and intensity attributes in a similar vein as themethod [21]. A pupil can be described as a darkand compact blob since it consists of darker inten-sity levels than its surrounding iris, and it has usu-ally a low-eccentric elliptical shape. To locate pupilregion we convolve input image with a Haar-like fea-ture and find the maximum response on the imageas shown in Fig. 2(a) [23].

Pupil size can vary in real life due to the reasonslike physiological differences and pupil dilation inlight changes. For this reason, the Haar-like fea-ture kernel is applied in various aperture sizes andthe maximum response per unit is picked at theend. In Fig. 2(b) results of ROI estimation processfor two eye images from two individuals having dif-ferent pupil sizes are presented.

3.2. Edge Segment Detection

To detect all edge segments inside the ROI, weemploy Edge Drawing (ED) edge segment detec-tor1 [27, 28]. Unlike traditional edge detectorswhich work by identifying a set of potential edgepixels in an image and eliminating non-edge pix-els through operations such as morphological oper-ations, non-maximal suppression, hysteresis thresh-olding etc., ED follows a proactive approach. TheED algorithm works by first identifying a set ofpoints in the image, called the anchors, and thenjoins these anchors in a way which maximizes thegradient response of edge paths, hence ensures good

1Online: http://c-viz.anadolu.edu.tr/EdgeDrawing

Figure 3: Sample eye image in which detected ROI is in-dicated (left), edge segments obtained by EDPF algorithmwithin the ROI are indicated in different colors (right).

edge localization. ED outputs not only a binaryedge map similar to those output by conventionaledge detectors, but it also outputs the result as aset of edge segments each of which is a contiguousand connected pixel chain [29]. This property of EDextremely eases the application of the algorithm tofurther detection and recognition problems.

Similar to other edge detectors, ED has severalparameters that must be tuned by the user for dif-ferent tasks. Ideally, one would want to have anedge detector which runs with a fixed set of param-eters for any type of image. To achieve this goal,we have incorporated ED with the a contrario edgevalidation mechanism due to the Helmholtz princi-ple [30, 31], and obtained a fast parameter-free edgesegment detector, i.e. EDPF2 [32].

EDPF works by running ED with all ED’s pa-rameters at their extremes, which detects all possi-ble edge segments in a given image with many falsepositives. It then validates the extracted edge seg-ments by the Helmholtz principle, which eliminatesfalse detections leaving only perceptually meaning-ful segments with respect to the a contrario ap-proach with very little overhead of computation.Fig. 3 illustrates detected edge segments for an ex-ample eye image. In the figure, each color repre-sents a different edge segment, which is one-pixelwidth, contiguous array of pixels.

3.3. Near-Circular Segment Search

The main goal of this step is detecting the pupilin an easy and computation efficient way when itscircumference is entirely visible in case of no oc-clusion. Once we have the edge segments detected,we need to find the one that traverses the pupil

2Demo page: http://c-viz.anadolu.edu.tr/EDPF

5

Page 6: Abstract arXiv:1709.06366v1 [cs.CV] 19 Sep 2017c-viz.eskisehir.edu.tr/pdfs/PupilDetector2017Arxiv.pdfCihan Topala, Halil Ibrahim Cakir b, Cuneyt Akinlar aDepartment of Electrical and

x

y

22.5°

45°

67.5°

-90° -67.5°

-45°

-22.5°

(a) (b)

Gx

Gy

Gradient operator

|G|

α

= −

x

y

G

G1

tanα

Figure 4: (a) Gradient computation with image derivatives,(b) Quantization of computed gradient directions.

boundary. The most intuitive solution is to apply abrute force search as follows: fit an ellipse to eachedge segment, compute the fitting error, and pickthe edge segment that has the smallest fitting er-ror. This method might work only when the pupilis clearly visible, i.e., when it is not occluded byIR-LED glints or eyelashes, however, fitting an el-lipse and calculating fitting error for each segmentrequires too much computation.

To reduce this computational burden, we devise afaster method based on the analysis of gradient di-rections to find the near-circular segment, if one ex-ists. Gradients of the segments contain substantialinformation about the geometrical structure and isused in shape matching, retrieval and recognitionproblems [33, 34]. Since we already have the ver-tical and horizontal derivatives of eye image com-puted during the edge detection scheme, we can findthe gradient directions by very little amount of com-putation (see Fig. 4.a). The arctan function obvi-ously results angle values in an interval [−π/2, π/2],providing an angle range of 180◦. Before examiningthe distribution of gradients, we quantize the angleswith 22.5◦ to obtain discrete symbols, thus we di-vide the unit circle into 16 regions into 8 differentdirections (see Fig. 4.b).

Once we get quantized gradient directions for allpixels in a segment, we infer the modal characteris-tics of that segment by analyzing their gradient dis-tributions. It is easy to observe that any segment innear-circular form would have an even gradient dis-tribution if the tangential gradients on its perimeteris sampled with a fixed angular step. Intuitively,circular edge segments would have relatively uni-form gradient distribution; whereas, straight edgesegments have an unbalanced distribution where

a few values dominate. Thus, we can distinguishedge segments in circular shapes by picking theones which result in plain gradient distribution. Toachieve this, we use the entropy function (Eq. 2)on the quantized gradient distributions of the seg-ments.

E = −n∑i

pi. log(pi) (2)

Since entropy function maximizes for flat distribu-tions where the frequency of each symbol is equal,we compute the entropy of gradient distribution foreach separate edge segments as follows:

arg max

∣∣∣∣∣8∑i

fGi. log(fGi

)

∣∣∣∣∣ (3)

where fGiis the frequency of the ith gradient di-

rection. The entropy values for edge segments aremaximized for a perfect circle and gets lower as thesegment shape differs from being a circle (elliptic,etc.), and finally entropy becomes zero for straightlines since a straight line has only one gradient di-rection along its trajectory. Since we quantize theunit circle into 8 direction (see Fig. 4.b), the numberof different symbols is 8 and the maximum entropyvalue is log2 8 = 3 in our case. Fig. 5 shows edgesegments of an input eye image and gradient distri-butions, lengths and entropy values for 10 samplesegments. It is easy to observe that circular edgesegments have higher gradient entropy values re-gardless their size, whereas straight edge segmentshave lower values as expected. With this heuris-tic, we can discard the segments producing smallentropy values than a certain threshold in an ex-tremely fast manner. When examining speed of thismethod, we measure that computing the gradiententropy of an edge segment with available imagederivatives is faster than ellipse fitting and errorcomputation up to 200 times. In this way, we avoidspending computation time on the segments whichhave irrelevant geometries than ellipticals.

Following the computation of gradient entropiesof edge segments, one segment is chosen to be thenear-circular segment to extract elliptical arcs if itsatisfies the following three criteria:

i) must have a high gradient entropy. The theo-retical entropy upper-bound for 8 different gra-dient directions is log2 8 = 3. Accordingly, wechoose the segments which have 2.9 or moregradient entropy.

6

Page 7: Abstract arXiv:1709.06366v1 [cs.CV] 19 Sep 2017c-viz.eskisehir.edu.tr/pdfs/PupilDetector2017Arxiv.pdfCihan Topala, Halil Ibrahim Cakir b, Cuneyt Akinlar aDepartment of Electrical and

Edge Segment

Gradient Distr. Length Entropy

512 2.96

348 0.95

186 1.35

246 2.89

314 2.86

88 2.03

63 2.82

71 2.61

73 1.38

86 1.04

Figure 5: Two sample eye ROI with and without occlusionand detected edge segments (top), List of gradient distri-butions, lengths ans entropy value of several edge segmentsselected from above sample images (bottom).

ii) must have a small ellipse fitting error, e.g., 2pixels, when an ellipse is fit to the pixels whichform the segment.

iii) must be a closed segment. To avoid problems

due to the small occlusions such as glints, weconsider a 15 pixels threshold for the distancebetween the start and end points of the seg-ment.

Along with the second criterion, ellipse fittingis an essential tool employed in various steps ofthe proposed method. Through a crowd litera-ture, there are two renowned ellipse fitting methodswhich are known to be fast and robust [35], [36].Among these two algorithms, Taubin’s method [35]results a better ellipse contour with slightly lowererror, however, it does not guarantee that theresulted conic is an ellipse, rather it can returna hyperbola as well. In addition, Fitzgibbon’smethod [36] always ensures that the resulted conicis an ellipse, but it tends to extract more eccen-tric ellipses with higher fitting errors. To benefitadvantages of both methods, we follow a simpleTaubin-prior procedure as the following. First, weuse Taubin’s method and examine the coefficientsof resulted conic to understand whether its an el-lipse or hyperbola. If it turns out that we get ahyperbola, then we use Fitzgibbon’s method andget an ellipse. Due to the fact that we apply el-lipse fit to consecutive edge elements rather thanscattered pixel data, we usually end up with a validellipse with Taubin’s method.

In both ellipse fitting methods, we need to com-pute a fitting error to quantitatively evaluate thesuccess. For this purpose, there is no straightfor-ward method in the literature except numerical ap-proximations [37]. Since inaccurate approximationseasily cause misjudgements of elliptical features, wedeveloped a more quantitative fitting error compu-tation method based on [38]. We estimate the dis-tance between the ellipse and each point by solv-ing the equations described in [38] with Newton-Raphson method in a couple of iterations. Oncewe estimate all distance values between each pointand the ellipse, we calculate the normalized rms dis-tance to obtain a single scalar to represent the fit-ting error. For ellipse perimeter calculation, whichalso does not have an exact solution, hence we em-ploy Ramanujan’s second approximation [39]. Inthe event that more than one edge segment satis-fies all three conditions given above, the one hav-ing the minimum ellipse fitting error is chosen tobe the near-circular segment. While existence of anear-circular segment speeds up the computation,its not compulsory for the detection of pupil.

It is important to note that shape of a segment

7

Page 8: Abstract arXiv:1709.06366v1 [cs.CV] 19 Sep 2017c-viz.eskisehir.edu.tr/pdfs/PupilDetector2017Arxiv.pdfCihan Topala, Halil Ibrahim Cakir b, Cuneyt Akinlar aDepartment of Electrical and

Figure 6: ROI detection, arc extraction, pupil candidate generation and pupil detection steps. The first two rows consist ofexamples where the pupil is completely in clear sight; there are examples with occlusions in the rows 2-to-5, and there is nopupil in the last one. (a) Input image with detected ROI, (b) Detected edge segments within the ROI. Near-circular segmentis indicated in red, if exists. High entropy segments which are subjected to arc extraction if a near-circular segment couldbe found indicated in green. Short and low gradient entropy segments which are not omitted indicated in blue. (c) Detectedcorners (green boxes) and ellipses which are fit to pixels lying in between two consecutive corners. Only successful (i.e. havinglow fitting error) ellipses are indicated. (d) Extracted elliptical arcs. (e) 2n − 1 pupil candidates are generated by joining allpossible arc combinations, (f) the selected ellipse representing the pupil contour using the argument in Eq. 5 (Best viewed incolor)

does not necessarily have to be near-circular togive high entropy values. In addition to segmentswith near-circular geometry, gradient distributionsof segments which have concave shapes or followcomplex trajectories can also end up with high en-tropy values. Therefore, we use entropy test as aprerequisite to accelerate the algorithm and makefinal decision about a segment by ellipse fitting.

3.4. Elliptical Arc Extraction

The next step of the algorithm is extracting theelliptical arcs (which will be referred to as arc here-after) from edge segments obtained in the previ-ous step. If a near-circular segment could be foundat the previous step, arcs are extracted only fromthat segment. If no near-circular segment is found,

then all segments which have high gradient entropy(i.e., > 2) are subjected to arc extraction process.In this manner, the algorithm adapts itself and re-quires less computation when there is no occlusionsand pupil contour is entirely visible. Due to thefact that their straight geometry rarely contains el-liptical arcs, we omit segments having low gradiententropy and short segments (i.e., < 25 pixels) tosave further computation time.

In a previous work, we extract circular arcs bycombining consecutive line segments to detect cir-cles in an image3 [27]. However, pupil’s projectiononto the camera plane can be more elliptic, hencewe need to detect the elliptical arcs in this study.

3Demo page: http://c-viz.anadolu.edu.tr/EDCircles

8

Page 9: Abstract arXiv:1709.06366v1 [cs.CV] 19 Sep 2017c-viz.eskisehir.edu.tr/pdfs/PupilDetector2017Arxiv.pdfCihan Topala, Halil Ibrahim Cakir b, Cuneyt Akinlar aDepartment of Electrical and

0.01

0.1

1

10

100

1000

Cost Function vs. Frames

Cost Function

Threshold

Figure 7: Output of our cost function for a set of exampleframes. It is seen that the result of cost function increasesproportional to the pupil occlusion. If the occlusion is dra-matic or there is no pupil in the image, the value of thefunction overshoots. (Note that the plot is in logarithmicscale.)

To solve this problem, we devise another strategythat finds the start and end points of a potential el-liptical arc within an edge segment by locating thecorners along the segment [40]. We detect cornerson the segments with a fast curvature scale-space(CSS) method which utilize image gradient infor-mation to compute turning angle curvature [41].Afterwards, we apply ellipse fit to the points ly-ing in between two consecutive corners along eachsegment and obtain elliptical arcs.

In Fig. 6.b-d we present the results of arc extrac-tion process for several test images. In the firsttwo rows, the pupil is completely visible; hence, thenear-circular segment (indicated in red) is detected.Therefore, arc extraction is applied to only this seg-ment. When no near-circular segment is found dueto occlusions, arcs are extracted from all segmentshaving high gradient entropy to avoid missing anycritical information (see 3rd, 4th and 5th rows ofFig. 6).

We should note that even if the pupil is in clearsight, it may appear highly elliptical because of theview angle. In such cases, pupil’s segment may re-sult a low gradient entropy and near-circular seg-ment would not be detected. As a consequence,elliptical arc extraction would be applied to all seg-ments even though there is no occlusion.

3.5. Generation of the Pupil Candidates

In this step, we generate candidate ellipses bygrouping the extracted arcs. Thus we aim to detectthe pupil boundary completely even if its boundaryis partially visible. To generate pupil candidates,

Figure 8: Images of apparatus that we collect database videosequences.

we try to fit ellipse to each subset of all extractedarcs. Excluding the empty set, there are 2n− 1 dif-ferent arc combinations for n arcs. Fig. 6.e showsall generated pupil candidates generated from ex-tracted arcs in Fig. 6.d.

Since the pupil candidate generation process con-siders all subsets of selected arcs, groups of unre-lated arcs which do not form a valid elliptic struc-ture are also subjected to be eliminated after el-lipse fit. Therefore, we eliminate those candidateswhich result in high fitting error due to the fact hatthey cannot belong to the pupil boundary. Afterwe eliminate candidates which result high fittingerror, one of the remaining candidates is going tobe selected as the final pupil by utilization of a costfunction in the final step. Or, the algorithm endsup with the decision that there is no pupil in theimage, if the output of the cost function diverges.

3.6. Detection of The Pupil

In the previous step, we get a number of pupilcandidates each of which is a subset of elliptical arcsconsisting several arcs. Accordingly, we still needto select one candidate ellipse to be the final pupilcontour. To make the decision, we define a costfunction Jc which considers the following propertiesof a candidate ellipse:

i. the ellipse fitting error (ε),

ii. the eccentricity (e),

iii. the ratio of the arc pixels to the perimeter ofresulting ellipse (φ).

Each of the pupil candidates is formed by one ormore arcs. If the pupil boundary is detected frommultiple arcs, the fitting error should be reasonablebecause we expect the arcs to be parts of the same

9

Page 10: Abstract arXiv:1709.06366v1 [cs.CV] 19 Sep 2017c-viz.eskisehir.edu.tr/pdfs/PupilDetector2017Arxiv.pdfCihan Topala, Halil Ibrahim Cakir b, Cuneyt Akinlar aDepartment of Electrical and

elliptic contour. Thus we need to minimize the fit-ting error ε.

The eccentricity (e) indicates the compactness ofan ellipse, or in other words, diversity of an ellipsefrom a circle and it is computed as

e =

√1− b2

a2, 0 < e < 1 (4)

where a and b are semi-major and semi-minor axes,respectively. The eccentricity is 0 for a circle and1 for a parabola. Among the pupil candidates eachof which is a subset of elliptical arcs, there are alsodiverse ellipses whose eccentricities can get close to1. However, pupil’s projection onto the image planeis usually closer to a circle rather than a skewedellipse in majority of the applications. Therefore,we tend to select a candidate having an eccentricityclose to 0.

The parameter φ is the ratio of the number of pix-els involved in ellipse fitting to the perimeter of theresulting ellipse. In some circumstances, one singleand short arc may result in a large pupil candidateellipse that may lead to inconsistency. Therefore,we look for the pupil candidates which are formedby consensus of more arc pixels and have a greaterφ.

During our experiments, we observed that the ef-fect of the eccentricity (e) is less than the effect ofε and φ due to the possibility of true pupil not be-ing the most compact ellipse among the candidates.Accordingly, we take squares of ε and φ to increasetheir effect on the cost function. Finally, we needto minimize ε and e and maximize φ in our formu-lation, and select the candidate that minimizes thefollowing argument:

Jc(pi) = arg min(ε,e,φ)

∣∣∣∣ε2i . πeiφ2i

∣∣∣∣ (5)

where pi is the ith pupil candidate and π is constant.Fig. 6.f shows the pupil detection results for sam-

ple images. Among the pupil candidates shown inFig. 6.e, the one that minimizes the Jc in Eq. 5 isselected as the pupil.

3.7. Detection of True Negatives

In many applications, having the informationthat there is no pupil in the image is importantas much as detecting it. This information can pro-vide very useful extensions to eye tracking applica-tions such as blink detection. In the proposed al-

Figure 9: A snapshot of our pupil annotation tool. Twodifferent ellipse fitting algorithms are utilized to find the bestconic to represent the pupil GT. After clicking a locationinside the pupil, a guide is displayed in order to help user toequally sample contour points.

gorithm, it is still possible to obtain arcs and pupilcandidates although there is actually no pupil. Weobserve that the cost function overshoots in thesecircumstances due to large ε and small φ values.Therefore, we can easily find if there is no pupil byquantifying output of Jc. In Fig. 7 we present aplot of the cost function versus a number of framessampled from an eye blink operation.

It is clearly seen that the Jc’s output rapidly in-creases as the visible part of the pupil peripherygets smaller due to occlusions. Similarly, the algo-rithm ends up that there is no pupil in the imagebecause the cost function overshoots for all of pupilcandidates in the last row of Fig. 6. By examiningseveral frames, we find out that a stable thresh-old value can provide promising results on decidingwhether there is no pupil. We provide more detailon this topic in the next section with quantitativeexperimental results.

4. Experimental Results

In this section, we present results of a compre-hensive set of experiments in both quantitative andqualitative manner. We compare the proposed al-gorithm to three state of the art pupil detectionalgorithms, i.e. Starburst [19], Swirski et al. [21]and ElSe [22]. We quantitatively assess algorithmsin terms of pupil detection accuracy (by means of F-measure), pupil localization and running time. Wealso provide qualitative results which provide usefulinsight to readers about the performance of algo-rithms. In addition to the content that we presentin the paper, we also provide more supplementary

10

Page 11: Abstract arXiv:1709.06366v1 [cs.CV] 19 Sep 2017c-viz.eskisehir.edu.tr/pdfs/PupilDetector2017Arxiv.pdfCihan Topala, Halil Ibrahim Cakir b, Cuneyt Akinlar aDepartment of Electrical and

(a) (b) (c) (d)

Subject4_0022.png (Swirski)

Other Candidates

Subject1_0074.png (Starburst)

Subject1_0075.png (Starburst)

Figure 10: Illustration of localization test. (a) Input image, (b) Pupil ground truth pupil (GT), (c) Detected pupil (Det), (d)Overlapping (indicated in blue) and non-overlapping (indicated in red and green) pixels.

material (e.g. codes, videos, etc.) on our web-site [42].

4.1. Pupil Detection Dataset

In order to perform experiments, we first pre-pare a dataset containing 1509 high resolution(1280×720) eye frames collected from 5 subjects.We used a simple head-mounted eye tracking appa-ratus (see Fig. 8) consisting of two HD cameras (forscene & eye) that we built for 3D gaze estimationstudy. To our knowledge, this is the only availablepupil detection dataset in resolution higher thanVGA (640×480) in the literature.

During collection of the frames, we ask all sub-jects to move their eyes different directions in a cer-tain order. In this way, we obtain eye images aspupil is viewed in diverse angles with and withoutocclusions by camera. Furthermore, we also wantusers to blink several times to obtain negative im-age samples that pupil does not exist. Eventually,in 57% of the frames pupil is in clear sight, in 16%of them there are severe occlusions and in 27% ofthem there is no pupil in the dataset. We count apupil positive sample if more than half of its pe-riphery is visible, otherwise it is considered as anegative sample.

After we collect the test frames, we implement anefficient annotation tool which eases rigorous anno-tation procedure (see Fig. 9). Our annotation tooloverlays a grid in polar form to ease the selectionof pixels from pupil boundary in an equal angularresolution. In addition, to ensure localization ofground truth (GT) conics, it does not collect theexact pixel coordinates that users click. Instead, itsearches a local pixel neighborhood of clicked loca-tion to find the maximum image gradient responseand picks that location. In this way, we guaranteethe selection of exact edge pixels in between pupiland iris in high resolution images precisely.

Even though having 5 points is sufficient to fitan ellipse hence its degree of freedom, we picked 10points in average from each pupil’s boundary to bet-ter reduce the effect of perspective distortion. Notethat a circle’s projection onto image may not be aperfect ellipse due to the perspective distortion andlens distortion. Once all points are set along thepupil’s boundary, then we fit ellipse to them withtwo different algorithms [36, 35] and select the pa-rameters which provides lower fitting error. There-fore, we obtain the best possible conic to representthe pupil GT in each eye image.

4.2. Localization Assessment

The first quantitative test we perform is localiza-tion assessment of pupil detection algorithms. Inthis evaluation, we quantify success of algorithmsfor how precisely they detect pupils with respectto ground truth data. We apply this test only theframes in which the pupil is truly detected by eachalgorithm in the dataset. Source codes of all algo-rithms were downloaded from websites that authorsprovided in corresponding papers [43, 44, 45]. Weset all parameters of all algorithms according to cor-responding publications, or use the best performingvalues if it is not explicitly indicated in the paper orcode. For each algorithm, we used a single parame-ter set for all images in the dataset which providesthe best overall result.

In order to quantify the localization performance,we compute overlap ratio OR between the detectedpupil and ground truth by counting number of cor-responding pixels as follows:

OR(EDet, EGT ) =Area(EDet) ∩Area(EGT )

Area(EDet) ∪Area(EGT )(6)

where EDet and EGT are ellipse of detected pupiland ground truth ellipse, respectively [46]. In thismanner we calculate the ratio of the number of over-

11

Page 12: Abstract arXiv:1709.06366v1 [cs.CV] 19 Sep 2017c-viz.eskisehir.edu.tr/pdfs/PupilDetector2017Arxiv.pdfCihan Topala, Halil Ibrahim Cakir b, Cuneyt Akinlar aDepartment of Electrical and

0.83

0.70

0.77

0.67

0.760.75

0.95 0.96

0.860.85

0.97

0.92

0.94

0.90

0.92 0.92

0.95

0.93

0.97 0.980.96

0.95

0.980.97

0.60

0.70

0.80

0.90

1.00

Lo

ca

liza

tio

n

Starburst Swirski ElSe Proposed

Subject 1 Subject 2 Subject 3 Subject 4 Subject 5 Overall

Figure 11: Localization test results of each algorithm for each subject.

lapping pixels to total number of overlapping andnon-overlapping pixels as seen in Fig. 10.

Once the number of overlapping and non-overlapping pixels are determined, we calculate ORand take the average for all images for each al-gorithm. Higher OR indicates better localization,hence provides higher accuracy in the applicationwhich pupil detection is utilized, obviously. InFig. 11 we present average localization results forindividual subjects and overall for each algorithm.Although ElSe and Swirski also give prospering re-sults, the proposed algorithm performs the bestwith a 4% improvement over the runner up in over-all results.

4.3. Accuracy Assessment

In the previous experiment we assess the local-ization performance of algorithms by consideringonly the images that they detect pupil correctly. Inthis step, we evaluate the accuracy of algorithmsby counting the number of images that the pupilis correctly detected in the entire frame sequences.To consider a pupil image as a correct detection(TP), we calculate overlap error (εO) as in Eq. 7and compare the result with a threshold value [47].

εO(EDet, EGT ) = 1−OR (7)

The range of εO is in between 0 and 1, and its valueobviously increases as the intersection area betweendetected ellipse and GT decreases. We compare εOwith a threshold value to make a decision on thedetected pupil on whether it is a true positive (TP)or a false positive (FP). Likewise, we also evaluateimages in which algorithms do not detect a pupilas true negative (TN) if there is no actual pupil inthe image; or false negative (FN) vice versa. After

we count TP, FP, TN ve FN samples, we calculatePrecision (Eq. 8) and Recall (Eq. 9) values in orderto compute F-Measure (Eq. 10).

We present F-Measure results in Fig. 12 with re-spect to a range of εO in between 0.0 to 0.2 whichcorresponds to OR varying from a perfectly alignedellipses at 80% overlap. We do not evaluate pupilsas TP if they are detected with a OR lower than80%. From the sketches in Fig. 12 it is clearly seenthat accuracy tests are less contentious than local-ization experiments where the competition amongthe algorithms are tighter. In this experiment, pro-posed method outperforms others as its accuracyrapidly increases even in very small εO errors andfollows a very stable path regardless the subject.We also see that Swirski and ElSe algorithms per-forms very closely with a significant success overStarburst algorithm.

Precision =count(TP Pupils)

cellipsest(TP Pupils + FP Pupils)(8)

Recall =count(TP Pupils)

count(TP Pupils + FN Pupils)(9)

F-Measure =2× Precision× Recall

Precision + Recall(10)

4.4. Qualitative Results

Along with quantitative accuracy and localiza-tion results, we also present qualitative results inFig. 13. In the figure, we provide two results fromeach of five subjects from top to bottom. It is alsoclearly shown that the algorithm can successfully

12

Page 13: Abstract arXiv:1709.06366v1 [cs.CV] 19 Sep 2017c-viz.eskisehir.edu.tr/pdfs/PupilDetector2017Arxiv.pdfCihan Topala, Halil Ibrahim Cakir b, Cuneyt Akinlar aDepartment of Electrical and

0.0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1.0

0.00 0.02 0.04 0.06 0.08 0.10 0.12 0.14 0.16 0.18 0.20

F-M

ea

su

re

Overlap Error

Overall

0.0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1.0

0.00 0.02 0.04 0.06 0.08 0.10 0.12 0.14 0.16 0.18 0.20

F-M

ea

su

re

Overlap Error

Subject 1

0.0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1.0

0.00 0.02 0.04 0.06 0.08 0.10 0.12 0.14 0.16 0.18 0.20

F-M

ea

su

reOverlap Error

Subject 2

0.0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1.0

0.00 0.02 0.04 0.06 0.08 0.10 0.12 0.14 0.16 0.18 0.20

F-M

ea

su

re

Overlap Error

Subject 3

0.0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1.0

0.00 0.02 0.04 0.06 0.08 0.10 0.12 0.14 0.16 0.18 0.20

F-M

ea

su

re

Overlap Error

Subject 4

0.0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1.0

0.00 0.02 0.04 0.06 0.08 0.10 0.12 0.14 0.16 0.18 0.20

F-M

ea

su

re

Overlap Error

Subject 5

Starburst Swirski ElSe Proposed

Figure 12: F-Measure results of each algorithm for each subject.

determine true negatives, i.e. in 2nd and 9th rows.In Fig. 14 we present several examples where theproposed algorithm fails. The most common rea-son for fail cases is motion blur where the algo-rithm cannot extract edges from the pupil contour.Therefore, elliptical arcs, hence the pupil contourcannot be detected. Besides the images presentedhere, we also provide video sequences of all algo-rithms in [42] for interested readers.

4.5. Running Time Assessment

We run all experiments on a laptop computerwith Intel i7 2.40 GHz CPU. To be able to make afair comparison, we take implementation platforms

Table 2: Average running times of algorithms for each sub-ject in milliseconds. Best timings are indicated in bold.

Algorithm

Subject Starburst Swirski ElSe Proposed

Subject 1 113.36 81.34 9.79 5.58Subject 2 56.36 79.63 9.51 6.39Subject 3 55.89 74.62 9.72 5.04Subject 4 66.89 70.34 10.14 10.77Subject 5 183.71 92.35 9.88 6.51Average 93.79 79.48 9.81 7.25

into consideration. All algorithm implementationsare in C++ except Starburst which is in MATLAB.According to a study [48], a typical execution inMATLAB is 50 times slower than a C++ basedapplication, therefore we divide timing results ofStarburst by 50. Swirski’s implementation was im-plemented in order to benefit from parallel comput-ing libraries in order to utilize multi-core CPUs. Toable to make a fair comparison, we assign the appli-cation to a specific core and measure running times.The running times of all algorithms in average forall images are summarized in Table 2.

According to average running times in Table 2,proposed method is the fastest one among all algo-rithms. It can be seen that the proposed algorithmcan run up to 140 Hz in single thread for HD im-ages in 1280×720 resolution. In per subject analysiswe see that the proposed method is slightly slowerthan the ElSe algorithm for subject 4. When weinvestigate the reason behind the longer executionof subject 4, we see that there are too many oc-clusions which cause algorithm to fail on detectinga near-circular segment and extract arcs from alledge segments.

Table 3 gives a dissection of running times of theproposed algorithm for separate steps. ROI detec-tion is obviously the most computation demanding

13

Page 14: Abstract arXiv:1709.06366v1 [cs.CV] 19 Sep 2017c-viz.eskisehir.edu.tr/pdfs/PupilDetector2017Arxiv.pdfCihan Topala, Halil Ibrahim Cakir b, Cuneyt Akinlar aDepartment of Electrical and

Figure 13: Qualitative results from all algorithms and all subjects (images in every two-rows from the beginning belong to adifferent subject).

step of the algorithm which takes roughly half ofthe entire execution due to the computation of in-

tegral images and convolution of Haar-like featuresat several scales. Another time-consuming step -

14

Page 15: Abstract arXiv:1709.06366v1 [cs.CV] 19 Sep 2017c-viz.eskisehir.edu.tr/pdfs/PupilDetector2017Arxiv.pdfCihan Topala, Halil Ibrahim Cakir b, Cuneyt Akinlar aDepartment of Electrical and

(a) (b) (c) (d) (e)

Figure 14: Several examples in which the proposed algorithm fails. The algorithm could detect no pupil in the last two images.

especially when a near-circular segment could notbe detected- is the last step, i.e. pupil detection,which is the main reason behind the algorithm’sfall back at subject 4. Since this step contains toomany computationally expensive ellipse fitting anderror calculation routines, it significantly stretchsout the execution time if absence of a near-circularsegment is the case.

5. Conclusions

Pupil detection is an indispensable step in manyeye tracking applications and have to be performedprecisely. In most studies, pupil detection is han-dled with straightforward methods which lack ac-curacy and fail in occlusive cases. In this study wefocused on developing an efficient feature-based al-gorithm for pupil boundary detection by using theentropy of edge segments. We basically find ellipti-cal arcs in an input image and try to obtain a finalellipse encircling the pupil with the consensus of allobtained features.

Because the edge segment detection method weemployed provide optimum localization, ellipticalarcs we extract from edge segments accuratelyencircle pupil boundary and estimates its center.Moreover, by means of the gradient distribution

Table 3: Detailed average timing results of proposed algo-rithm for different subjects

Step

Dataset RO

ID

etec

tion

Ed

geS

egm

ent

Det

ecti

on

Gra

die

nt

Entr

opy

Com

p.

Cor

ner

Det

ecti

on

Arc

Extr

acti

on

Pu

pil

Det

ecti

on

TO

TA

L(m

s)

Subject 1 3.47 1.46 0.07 0.06 0.25 0.27 5.58Subject 2 3.31 1.51 0.21 0.09 0.43 0.83 6.39Subject 3 2.81 1.28 0.20 0.06 0.29 0.39 5.04Subject 4 3.91 1.96 0.17 0.14 0.62 3.97 10.77Subject 5 3.52 1.71 0.27 0.08 0.41 0.52 6.51Overall 3.49 1.68 0.23 0.09 0.46 1.30 7.25

analysis, we boost the execution of algorithm andpave the way for real-time applications for high res-olution images.

We performed a comprehensive set of experi-ments by comparing the proposed method withthree state of the art algorithms and provided bothquantitative and qualitative results. Experimentalevaluations show that the proposed algorithm candetect the pupil even in tough occlusive cases with-out compromising the real-time applicability con-straints.

References

References

[1] S. Goni, J. Echeto, A. Villanueva, R. Cabeza, Robustalgorithm for pupil-glint vector detection in a video-oculography eyetracking system, in: Int’l Conf. PatternRecognition (ICPR), 2004, pp. 941–944.

[2] T. Maenpaa, An iterative algorithm for fast iris detec-tion, in: Advances in Biometric Person Authentication,Springer, Berlin, Heidelberg, 2005, pp. 127–134.

[3] X. Long, O. K. Tonguz, A. Kiderman, A high speedeye tracking system with robust pupil center estimationalgorithm, in: IEEE Int’l Conf. Engineering in Medicineand Biology, 2007, pp. 3331–3334.

[4] A. Keil, G. Albuquerque, K. Berger, M. A. Magnor,Real-time gaze tracking with a consumer-grade videocamera, Vaclav Skala-UNION Agency, 2010.

[5] L. Lin, L. Pan, L. Wei, L. Yu, A robust and accuratedetection of pupil images, in: Int’l Conf. BiomedicalEngineering and Informatics, Vol. 1, 2010, pp. 70–74.

[6] J.-G. Wang, E. Sung, Study on eye gaze estimation,IEEE Trans. Systems, Man, and Cybernetics, Part B(Cybernetics) 32 (3) (2002) 332–350.

[7] L. Ma, T. Tan, Y. Wang, D. Zhang, Efficient irisrecognition by characterizing key local variations, IEEETransactions on Image Processing 13 (6) (2004) 739–750.

[8] S. Dey, D. Samanta, An efficient approach for pupildetection in iris images, in: Int’l Conf. Advanced Com-puting and Communications, 2007, pp. 382–389.

[9] J. San Agustin, H. Skovsgaard, E. Mollenbach, M. Bar-ret, M. Tall, D. W. Hansen, J. P. Hansen, Evaluationof a low-cost open-source gaze tracker, in: ACM Int’lSymposium on Eye-Tracking Research & Applications(ETRA), New York, NY, USA, 2010, pp. 77–80.

[10] D. Ballard, Generalizing the hough transform to detectarbitrary shapes, Pattern Recognition 13 (2) (1981) 111– 122.

15

Page 16: Abstract arXiv:1709.06366v1 [cs.CV] 19 Sep 2017c-viz.eskisehir.edu.tr/pdfs/PupilDetector2017Arxiv.pdfCihan Topala, Halil Ibrahim Cakir b, Cuneyt Akinlar aDepartment of Electrical and

[11] M. A. Fischler, R. C. Bolles, Random sample consensus:A paradigm for model fitting with applications to imageanalysis and automated cartography, Communicationsof the ACM 24 (6) (1981) 381–395.

[12] Y. Ebisawa, Improved video-based eye-gaze detectionmethod, IEEE Transactions on Instrumentation andMeasurement 47 (4) (1998) 948–955.

[13] J. B. Hiley, A. H. Redekopp, R. Fazel-Rezai, A low costhuman computer interface based on eye tracking, in:Int’l Conf. IEEE Engineering in Medicine and BiologySociety (EMBS), 2006, pp. 3226–3229.

[14] C. Morimoto, D. Koons, A. Amir, M. Flickner, Pupildetection and tracking using multiple light sources, Im-age and Vision Computing 18 (4) (2000) 331 – 335.

[15] J. Daugman, How iris recognition works, in: IEEE Int’lConf. Image Processing (ICIP), Vol. 1, 2002, pp. I–33–I–36.

[16] E. M. Arvacheh, H. R. Tizhoosh, Iris segmentation: De-tecting pupil, limbus and eyelids, in: IEEE Int’ Conf.Image Processing (ICIP), 2006, pp. 2453–2456.

[17] D. Zhu, S. T. Moore, T. Raphan, Robust pupil centerdetection using a curvature algorithm, Computer Meth-ods and Programs in Biomedicine 59 (3) (1999) 145 –157.

[18] N. Kumar, S. Kohlbecher, E. Schneider, A novel ap-proach to video-based pupil tracking, in: IEEE Int’lConf. Systems, Man and Cybernetics (SMC 2009),2009, pp. 1255–1262.

[19] D. Li, D. Winfield, D. J. Parkhurst, Starburst: Ahybrid algorithm for video-based eye tracking com-bining feature-based and model-based approaches, in:IEEE Conf. Computer Vision and Pattern Recognition(CVPR) Workshops, 2005, pp. 79–79.

[20] W. J. Ryan, D. L. Woodard, A. T. Duchowski, S. T.Birchfield, Adapting starburst for elliptical iris segmen-tation, in: IEEE Int’l Conf. Biometrics: Theory, Appli-cations and Systems,, 2008, pp. 1–7.

[21] L. Swirski, A. Bulling, N. Dodgson, Robust real-timepupil tracking in highly off-axis images, in: ACM Int’lSymposium on Eye Tracking Research and Applications(ETRA), 2012, pp. 173–176.

[22] W. Fuhl, T. C. Santini, T. Kuebler, E. Kasneci, Else:Ellipse selection for robust pupil detection in real-worldenvironments, ACM Int’l Symp. Eye Tracking Researchand Applications (ETRA).

[23] P. Viola, M. Jones, Rapid object detection using aboosted cascade of simple features, in: IEEE Conf.Computer Vision and Pattern Recognition (CVPR),Vol. 1, 2001, pp. 511–518.

[24] Y. Ebisawa, Robust pupil detection by image differencewith positional compensation, in: IEEE Int’l Conf. Vir-tual Environments, Human-Computer Interfaces andMeasurements Systems, 2009, pp. 143–148.

[25] D. W. Hansen, Q. Ji, In the eye of the beholder: Asurvey of models for eyes and gaze, IEEE Trans. PatternAnalysis and Machine Intelligence (PAMI) 32 (3) (2010)478–500.

[26] C. H. Morimoto, M. R. Mimica, Eye gaze tracking tech-niques for interactive applications, Computer Visionand Image Understanding 98 (1) (2005) 4 – 24.

[27] C. Akinlar, C. Topal, EDCircles: A real-time circle de-tector with a false detection control, Pattern Recogni-tion 46 (3) (2013) 725 – 740.

[28] C. Topal, C. Akinlar, Edge Drawing: A combined real-time edge and segment detector, Journal of Visual Com-

munication and Image Representation 23 (6) (2012) 862– 872.

[29] C. Topal, O. Ozsen, C. Akinlar, Real-time edge segmentdetection with edge drawing algorithm, in: Int’l Symp.Image and Signal Processing and Analysis (ISPA), 2011,pp. 313–318.

[30] A. Desolneux, L. Moisan, J.-M. Morel, Edge detectionby helmholtz principle, Journal of Mathematical Imag-ing and Vision 14 (3) (2001) 271–284.

[31] A. Desolneux, L. Moisan, J. M. Morel, From GestaltTheory to Image Analysis: A Probabilistic Approach,Springer Publishing Company, Incorporated, 2007.

[32] C. Akinlar, C. Topal, EDPF: A Real-time Parameter-free Edge Segment Detector with a False Detection Con-trol, Int’l Journal of Pattern Recognition and ArtificialIntelligence 26 (1).

[33] L. Jia, L. Kitchen, Object-based image similarity com-putation using inductive learning of contour-segmentrelations, IEEE Transactions on Image Processing 9 (1)(2000) 80–87.

[34] C. Martinez-Ortiz, J. Zunic, Curvature weighted gradi-ent based shape orientation, Pattern Recognition 43 (9)(2010) 3035 – 3041.

[35] G. Taubin, Estimation of planar curves, surfaces, andnonplanar space curves defined by implicit equationswith applications to edge and range image segmenta-tion, IEEE Trans. Pattern Anal. Mach. Intell. 13 (11)(1991) 1115–1138.

[36] A. Fitzgibbon, M. Pilu, R. B. Fisher, Direct least squarefitting of ellipses, IEEE Trans. Pattern Anal. Mach. In-tell. (PAMI) 21 (5) (1999) 476–480.

[37] P. L. Rosin, Assessing error of fit functions for ellipses,Graphical models and image processing 58 (5) (1996)494–502.

[38] R. Nurnberg, Distance from a point to an ellipse,wwwf.imperial.ac.uk/~rn/distance2ellipse.pdf, ac-cessed September 15, 2017 (2006).

[39] S. Ramanujan, Collected papers of srinivasa ramanujan,Chelsea Publishing, New York.

[40] H. I. Cakir, C. Topal, C. Akinlar, An occlusion-resistantellipse detection method by joining coelliptic arcs, in:European Conference on Computer Vision (ECCV),2016, pp. 492–507.

[41] C. Topal, K. Ozkan, B. Benligiray, C. Akinlar, A ro-bust CSS corner detector based on the turning anglecurvature of image gradients, in: ICASSP, 2013, pp.1444–1448.

[42] Pupil detector supplementary webpage, http://c-viz.anadolu.edu.tr/PupilDetector, accessed on Septem-ber 15, 2017.

[43] Starburst source codes page., https://github.com/

thirtysixthspan/Starburst, accessed on September15, 2017.

[44] Swirski’s source codes page., https://github.com/

LeszekSwirski/pupiltracker/, accessed on September15, 2017.

[45] ElSe source codes page., ftp://messor.informatik.

uni-tuebingen.de/, accessed on September 15, 2017.[46] D. K. Prasad, M. K. H. Leung, S. Y. Cho, Edge cur-

vature and convexity based ellipse detection method,Pattern Recognition 45 (9) (2012) 3204–3221.

[47] A. Y. S. Chia, S. Rahardja, D. Rajan, M. K. Le-ung, A split and merge based ellipse detector with self-correcting capability, IEEE Transactions on Image Pro-cessing 20 (7) (2011) 1991–2006.

16

Page 17: Abstract arXiv:1709.06366v1 [cs.CV] 19 Sep 2017c-viz.eskisehir.edu.tr/pdfs/PupilDetector2017Arxiv.pdfCihan Topala, Halil Ibrahim Cakir b, Cuneyt Akinlar aDepartment of Electrical and

[48] M. Fornaciari, A. Prati, R. Cucchiara, A fast and effec-tive ellipse detector for embedded vision applications,Pattern Recognition 47 (2014) 3693–3708.

17