Vous êtes sur la page 1sur 12

Hussein Ali*, Dr.

Attila Fazekas *
Faculty of Informatics, University of Debrecen
Kassai ut 26, 4028 Debrecen, Hungary
E-mail: smart_programer@yahoo.com , attila.fazekas@unideb.hu

Abstract : Purpose of this paper is to tracking the gaze and plot a normally diagram that will give us information about the
Patient situation for example if (she/he) is angry or may have some stress so we can postponed giving the medicine for a while
and we could wait until (her/his) situation will be better and then we can give (her/him) the medicine . This system can help the
doctors a lot and make it easy to deals with patients without any problem and also make the health condition for the patents be
better . We are using regular low resolution web camera to get the results of system which benefits in economical way for
development. To achieve the systems goal we are using OpenCV (Open Source Computer Vision) library which is open source
library which makes system very economical.

Keywords: Haar-Like Features, Gaze Detection, Voila Jones Algorithm , ROI.

INTRDOUTION

Gaze estimation is the process of measuring either the point of gaze or the motion of an eye relative to the head. The device to
measure gaze is called eye tracker [1]. Tracking eye gaze of an individual has numerous applications in many domains. Gaze
tracking is a powerful tool for the study of real time cognitive processing and information transfer-as human attention can be
deduced in many cases by following gaze to the object of interest. Latest human-computer interacting devices use persons gaze
as input to the computer in the same way as using a mouse. Gaze estimation has also found usage in the auto industry for
monitoring driver vigilance, based on drivers gaze patterns [2]. Eye gaze also has applications in the medical field, for example
studying the behaviors of patients suffering from neurological, communication and vision disorders like pervasive developmental
disorder and autism spectrum disorder. Studies show that during a typical interaction with another person, rather than focusing on
the eyes, children with ASD (Autism Spectrum Disorder) tend to focus more on mouth, bodies and other objects at the scene [3-
5]. Thus the gaze pattern could serve as a useful tool for early detection of ASD. Most of the accurate eye tracking devices
available today are expensive because they require high quality cameras and specially designed equipments like wearing custom
designed glasses, high speed machines etc. Some of the devices require trained individuals in collecting the raw data and for
conducting experiments. The techniques they use mostly concentrate on the reflection of the IR light on the pupil and track its
position using mathematical analysis. In our paper, we tried to show that the iris and sclera can also be used for gaze estimation
and they can be detected easily. The objective of this paper is to devise a simple web-cam based eye tracking algorithm that can
provide reasonably good accuracy.

. Gaze tracking has been widely used in a variety of applications from tracking consumers gaze fixation on advertisements,
controlling human computer devices, to understanding behaviors of patients with various types of visual and/or neurological
disorders such as autism So we solve this problem by using simple and cheap hardware that Affordable every person to create
and make gaze tracking systems. In our system we try to say and prove that is not impossible to create a gaze tracking system by
using a regular web camera and the free open source Computer Vision library OpenCV.

Previous work :

The most effect methods to detect and locate and tracking the gaze precisely involve expensive tools .The method mention in (1)
the Author used contact lens that is put and fix in place on the eye. This will make us tracking something attached to the lens
and then reduce the problem . There is problem in this method while it is accurate, it is invasive and uncomfortable to use and
this make it impractical as a solution to this program . The goal of our research is to do and create and easily medical program
that can tracking the gaze and plot it diagram for the gaze movement. And this method is expensive and uncomfortable for the
Patient.
Fig (1) smart lens eye

The other Authors used (EOG) Electronic Oculography In this method some skin around the eyes are electrodes , These
electrodes are measure the changes in the electrical field as the eyes move, eye movements can be calculate from these data .
This method performs better when measuring relative eye movements rather than absolute movements. This method is limited in
accuracy and very susceptible for noise.

Fig (2)EOG(Electronic Oculography )

And the third method is Video Image Analysis A video camera is used in these methods to observe the users eyes. Image
processing techniques are then used to analyze the image and track the eye features. Based on calibration, the system determines
where the user is currently looking. The following figure show for us our important point in our paper

Webcam Image Draw


input processing diagram

inm
Fig (3)High level Design of the system
IMPLEMENTATION:

Webcam Image Draw Diagram


input processing

Gray scale Histogram


image Equalization

Eye detection using


Haar- like features

Center of the eye(Actual ROI


position)

Transforming to
Window Coordinates

Fig (4)Low Level design of our system

Input Webcam

The first step of our project is get a signal frame from the camera .The camera is input stream which consist of a group of frames,
the system deals with each frame separately and scan it for a special and important features that define a face based on the
function that will be define in our project .The system deals with every image that capture from the webcam as array od data , the
more details the system has and more exact details the computer can synthesize from the image , also there is another duty for the
webcam that determine the number of frames per second which is a especially important in our system ,because it determines
how much the computer legs from the users movement .
Fig(5) take the frame from the cam

IMAGE PROCCESSING

The video that we get it from the webcam he need to filtering to get exactly and accurate position from it this done by the next
image processing secondary steps :

1-Get a Grey image scale from transformation the colored image

We put the colored image that we captured from the webcam through the first step of image processing to get grey scale image
(gray frame ). The gray frame has only one channel (8bit) when the colored image had three channels representing the three
major colors (RGB) , so its making it easier to process and manipulate . An example of the transformation of the color image
show in the following figure .

Fig (6)Transformation color image to Gray image

2-Histogram Equalization

In this chapter we will equalization the grayscale image that we gained from the last step to enhancement equality of the picture
using a histogram , by making use of all the pixel intensities equally and we can do this by we suppose a discrete grayscale image
{x} and let ni will be the number of appearance of gray level (i) . we can calculate the probability of an appearance of a pixel
of level( i) in the image by the following equation
() = ( == ) == , 0 < (1)

L is the total number of gray levels in the image (typically 256), n is the total number of pixels in the image, and (i) being in
x

fact the image's histogram for pixel value(i), normalized to [0,1].

Fig (7) Histogram Equalization picture take from


(https://www.packtpub.com/mapt/book/hardware_and_creative/9781849697200/2/ch02lvl1sec24/histogram-equalization-for-
contrast-enhancement)

Face and Eye detection

In order to conduct face detection we chose a haar object detection as opposed to other methods like sips (spatial interest pixels )
its reliability and speed .
A haar object detection acts as a funnel where is every region of an image is analyzed using a set of classifiers called Haar
classifier that acts as a funnel called haar cascade .

the classifiers at the top of the cascade are extremely fast and have extremely low false negative rates to immodestly to remove
regions of an image that do not contain the face, the haar features become more and more complex , for the down further down
the cascade as an optimization images are rejected as soon as possible , if the features do not resemble a face . The haar object
detector works by calculating an integral image over function is calculus every pixel of an integral image contains the sum of the
intensities of every pixel above it and to the left in the original image .

(, ) = (, )

Allowing the average intensity of an rectangle portion of an image to be obtained by accessing only four pixel values rather than
hundreds at a time .

a haar object detector takes advantage .three different types of rectangle features , edges , lines and combination of four rectangle
in order to detect a single object , a haar object detector defines a thousands of these rectangle features in different region and
combines these features in order to define an object and detect it Efficiently.

(, , ) = (, , )

each of these features is recognized extremely quickly in an integral image , since thousands of features are verified thousands of
times for every single frame of video , the integral image of the frame allows the software to be more efficient by effectively
calculating the image intensities in advantage
for face detection specifically we using an XML file contains a cascade with thousands of rectangle features that are present the
face .For example the cascade contained definitions. For the cheek being brighter than the eye socket and the nose being brighter
than the eye socket and forehead being brightest portion of the face .overall thousands of these comparisons are conduct in real
time to ensure that the single region of a single frame of video contains the face

Haar Face classifier

The face is detected by the Haar classifier function that uses Haar-like features . The classifier uses built in standers for detect
and identifying the face and start tracking while he stay in the range of the webcam

The following figure show the face detection using Haar classifier

Fig (11)Haar Face classifier


Haar Eye classifier

In our project we use the same algorithm that we used for detect the face to detect the eye (Haar-like features ) as shown the
following figure

Fig (12)Haar eye classifier picture taken from (https://dzone.com/articles/face-and-eyes-detection-opencv)

Finding the region of Interest(ROI)

The region of interest in our paper we can find it by two steps sequentially("5) :

1-We find the faceROI From the face detected in the haar face classifier

2-The eyeROI will be detect from the faceROI using the Haar eyes classifier

The region of interest the eyes determine width and height of the ROI .

The first and second characteristic chosen by AdaBoost (during the teaching of the arc detector).Their value is calculated by
subtracting the amount of pixels within the white rectangle on the black of the total amount.

Measuring Center of the eye

In our paper we measured center of the eyes from the equalized ROI edges . It is set as to measure center of the eyes we will start
for the right eye from the left edge of the face and the left eye from the right edge of the face we starting with X-coordinates for
the both eyes moving to Y-coordinates for the bot left and right eye .The measurements used a common measurements for
people with average-sized face as shown in the following figure

Fig(13)Eye Center calculation

Calculation the Actual position

When the center of the eye was detected we considered this point to be the actual position of the eye for the first frame that we
captured from the cam , this point stored in an Matrix in which first element is the coordinates for the current position . The X-
coordinates of the point is considered to be the X-position of the pupil while Y- coordinates is considered to be the Y-position of
the pupil .

Transfer to screen coordinates


For each detected position ,the new position is must be compare with the previous one and stored in matrix .Its then subtracted
from the previous position if any difference was occurred , then this difference scaled to the screen dimension and added to the
previous stored position to get the actual mapping on the screen .

Gaze pointer for person like a test

Example for Patient diagram that show for us he was little nervous

Name Quality of program State


Patient(x) 90% Angry
Patient(y) 80% Nervous
Patient(z) 95% Calm
Patient(m) 70% Afraid
Patient(n) 80% Boring
Table1 show the test persons and them state
Quliaty of program

angry
calm
afraid
boring

Conclusion

Functionalities of eye tracking system is to detect the face and the eyes and tracking them , then getting the position of the gaze
and drawing diagram for these points to detect where is the user looking and were successfully , in our paper we detect and
tracking the gaze using low resolution camera using the cheap equipment and easy algorithm to get the nice and almost exactly
result that help the doctors to know in which situation the patient now to work with (his/her) smoothly, this save for us the time
and the cost with cheaper and easier pieces of equipment.

Acknowledgements

The work of H.AlHAMZAWI was supported by the Stipendium Hungaricum Scholarship.

Reference

[1] Linda G. Shapiro and George C. Stockman (2001). Computer Vision. Prentice Hall. ISBN 0-
13-030796-3.
[2] Tim Morris (2004). Computer Vision and Image Processing. Palgrave Macmillan. ISBN 0-
333-99451-5.
[3] Bernd Jhne and Horst Hauecker (2000). Computer Vision and Applications, A Guide for
Students and Practitioners. Academic Press. ISBN 0-13-085198-1.
[4] Computer Vision Introduction, http://www.ecse.rpi.edu/Homepages/qji/CV/3dvision_intro.pdf
, May 5, 2013.
[5] Introduction to Computer Vision I, http://cseweb.ucsd.edu/classes/wi04/cse291-c/lec1.pdf ,
July 16, 2013.
[6] Hewett, Baecker, Card, Carey, Gasen, Mantei, Perlman, Strong and Verplank, ACM SIGCHI
Curricula for Human-Computer Interaction, http://old.sigchi.org/cdg/cdg2.html, June 23, 2013.
[7] Eye Tracking Using Sensor Fixation, http://www.chronos-vision.de/scleral-search-coils, July
14, 2013.
[8] Electrooculography Method for Eye Tracking, http://www.metrovision.fr/mv-po-noticeim18.jpg, July 14, 2013.
[9] Robert Laganire (2011). OpenCV 2 Computer Vision Application Programming Cookbook.
Packt Publishing Ltd. ISBN 978-1-849513-24-1
[10] Haar-Like Features, http://en.wikipedia.org/wiki/Haar-like_features, June 23, 2013.
[11] Face Detection using OpenCV, http://opencv.willowgarage.com/wiki/FaceDetection, July 16,
2013.
[12] Paul Viola and Michael Jones, "Rapid Object Detection using a Boosted Cascade of Simple
Features," in ACCEPTED CONFERENCE ON COMPUTER VISION AND PATTERN
RECOGNITION, 2001.

Vous aimerez peut-être aussi