A kind of method that eye state is judged based on pupil feature
Technical field
The present invention relates to Eye Tracking Technique, more particularly to a kind of method that eye state is judged based on pupil feature.
Background technology
Eye Tracking Technique is the man-machine interaction mode of rising in recent years.Eye-controlling focus is also referred to as the dynamic tracking of eye military, residual
The directions such as disease people auxiliary, psychological study and web page analysis play the role of important.The method experience that Eye Tracking Technique is realized
The development of last 100 yearses, mechanical recorder technique, electric current writing-method, electromagnetic recording method and the optical recording in the present age are successively employed,
It is less and less to the human eye of experimenter intrusion degree, precision also more and more higher.
In practical application, the eyes of people have the blink activity of randomness, when the eyes are occluded, can not obtain in pupil
The accurate location of the heart, lead to not accurately position the position of fixation point.Therefore, Eye-controlling focus may interrupt, nothing
Method completes normal interaction.In addition, in sight line tracking system, it usually needs stare a certain specific objective it is certain when
Between, subsequent operation could be carried out.If during this period, there is situation about blinking, the position of fixation point will produce skew, then have
The action of mistake may be caused.Therefore, it is necessary to which that identifies eyes in present image opens closed state, maloperation is avoided.
Eyes detection method common at present can be divided into two major classes:Method based on image and the side based on study
Method.When method based on image makes full use of eye opening eye closing, the difference of eye feature, such as whether iris edge, eye can be detected
Whether the direction of eyelid is identical, distance of upper palpebra inferior etc..This kind of method easily by eyelid, eyelashes and the minute surface interference such as reflective,
Accuracy rate is not high.A kind of classification problem is assigned the detection of eye state as to handle based on the method for study, by extracting feature,
Learnt using grader, the detection of eye state is realized according to learning outcome.This kind of method needs to select effective feature,
And select substantial amounts of sample to be trained, it can just obtain ideal result.
The content of the invention
Therefore, to solve technological deficiency and deficiency existing for above-mentioned prior art, the present invention provides a kind of special based on pupil
The method that sign judges eye state.
Specifically, the embodiment of the present invention provides a kind of method that eye state is judged based on pupil feature, it is characterised in that
Including:
Obtain eyes image hum pattern;
According to the eyes image hum pattern, pupil center's point is determined;
According to pupil center's point, pupil edge point is extracted;
The symmetry of the pupil edge point is judged, to determine the state of eye state.
On the basis of above-described embodiment, according to the eyes image hum pattern, before determining pupil center's point, also wrap
Include:
Grey-scale contrast enhancing pretreatment is carried out to the eyes image hum pattern;
Laplce's filtering process is carried out to the eyes image hum pattern.
On the basis of above-described embodiment, the grey-scale contrast enhancing pretreatment formula is:
F=c*log (1+double (f0))
Wherein, c is constant coefficient, f0Original eyes image hum pattern is represented, f represents that grey-scale contrast enhancing is pretreated
Eyes image hum pattern.
On the basis of above-described embodiment, according to the eyes image hum pattern, pupil center's point is determined, including:
According to the grey-scale contrast of the eyes image hum pattern, pupil center point coordinates (xmin, ymin) conduct is estimated
Pupil center's point.
On the basis of above-described embodiment, according to pupil center's point, pupil edge point is extracted, including:
Using pupil center's point as starting point, lesser ring of Merkel is calculated on the eyes image hum pattern along specified directions of rays
The shade of gray value in domain, and the position where when the shade of gray value is reached into maximum is defined as pupil edge point.
On the basis of above-described embodiment, the specified ray includes a plurality of first ray and the second ray;Wherein, it is described
First ray is using pupil center's point as starting point, sends ray along y-axis positive axis direction, second ray is with institute
It is starting point to state pupil center's point, and the ray opposite with first directions of rays is sent along minus half direction of principal axis of y-axis..
On the basis of above-described embodiment, the symmetry of the pupil edge point is judged, including:
Center circle coordinates (the x of multiple pupil edge points is determined using averaging method0, y0);
With the center circle coordinates (x0, y0) it is that origin establishes plane coordinate system;
Using the Y-axis of the plane coordinate system as symmetry axis, the horizontal symmetrical degree of the pupil edge point is calculated;
Using the X-axis of the plane coordinate system as symmetry axis, the vertically symmetrical degree of the pupil edge point is calculated.
On the basis of above-described embodiment, the calculation formula of the horizontal symmetrical degree is:
Wherein, N counts for total pupil edge, and Mx is to be counted along the pupil edge of Y-axis side.
On the basis of above-described embodiment, the calculation formula of the vertically symmetrical degree is:
Wherein, N counts for total pupil edge, and My is that the pupil edge of X-axis side is counted.
On the basis of above-described embodiment, determine that eyes open the state closed, including:
The horizontal symmetrical degree and horizontal symmetrical degree threshold value set in advance are compared, by the vertically symmetrical degree and in advance
The vertically symmetrical degree threshold value of setting compares, and judging that eyes are according to comparison result opens state either closure state or centre
State.
It is provided by the invention eye state is judged based on pupil feature method the advantages of have:
1) present invention is not higher by eyelid, eyelashes and the minute surface interference such as reflective, accuracy rate;
2) present invention is without a large amount of training samples, and algorithm is easy, and computational efficiency is high;
3) present invention is cheap without equipment costly, cost.
Brief description of the drawings
In order to more clearly illustrate the technical scheme of the present invention or prior art, embodiment or prior art will be retouched below
The required accompanying drawing used is briefly described in stating.It should be evident that drawings in the following description are some of the present invention
Embodiment, for those of ordinary skill in the art, on the premise of not paying creative work, can also be attached according to these
Figure obtains other accompanying drawings.Below in conjunction with accompanying drawing, the embodiment of the present invention is described in detail.
Fig. 1 is a kind of flow chart for the method that eye state is judged based on pupil feature provided in an embodiment of the present invention;
Fig. 2 is in for a kind of eyes provided in an embodiment of the present invention and opens state pupil feature schematic diagram;
Fig. 3 is that a kind of eyes provided in an embodiment of the present invention are in intermediateness pupil feature schematic diagram.
Embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with the accompanying drawing of the present invention, to this hair
Bright technical scheme carries out clear, complete description.Obviously, described embodiment is part of the embodiment of the present invention, without
It is whole embodiments.Based on embodiments of the invention, those of ordinary skill in the art are not making creative work premise
Lower obtained every other embodiment, belongs to protection scope of the present invention.
Embodiment one
The embodiment of the present invention provides a kind of method that Eye-controlling focus is realized based on pupil feature, refer to Fig. 1, and Fig. 1 is this
A kind of flow chart for method that eye state is judged based on pupil feature that inventive embodiments provide.This method includes:
Obtain eyes image hum pattern;
According to the eyes image hum pattern, pupil center's point is determined;
According to pupil center's point, pupil edge point is extracted;
The symmetry of the pupil edge point is judged, to determine the state of eye state.
Wherein, after obtaining eyes image hum pattern, eyes image hum pattern is handled, the eyes in hum pattern are adjusted
Whole is horizontal level.
Wherein, in the above-described embodiments, according to eyes image hum pattern, before determining pupil center's point, in addition to:
Grey-scale contrast enhancing pretreatment is carried out to eyes image hum pattern;
Laplce's filtering process is carried out to eyes image hum pattern.
Specifically, grey-scale contrast enhancing pretreatment formula is:
F=c*log (1+double (f0))
Wherein, c is constant coefficient, f0Original eyes image hum pattern is represented, f represents that grey-scale contrast enhancing is pretreated
Eyes image hum pattern.
Grey-scale contrast enhancing pretreatment is carried out to eyes image hum pattern to be advantageous to distinguish pupil and perimeter.To eye
Portion image information figure carries out Laplce's filtering process, be advantageous to carry out image all directions go it is dry.
Further, on the basis of above-described embodiment, according to the eyes image hum pattern, pupil center's point is determined,
Including:
According to the grey-scale contrast of the eyes image hum pattern, pupil center point coordinates (xmin, ymin) conduct is estimated
Pupil center's point.
Preferably, using the minimum region of gray scale in eyes image hum pattern as pupil region, the region is fitted to circle
Shape, using the center of circle as pupil center's point.
Further, on the basis of above-described embodiment, according to pupil center's point, pupil edge point is extracted, including:
Using pupil center's point as starting point, lesser ring of Merkel is calculated on the eyes image hum pattern along specified directions of rays
The shade of gray value in domain, and the position where when the shade of gray value is reached into maximum is defined as pupil edge point.
Specifically, with pupil center's point (xmin, ymin) for starting point, multiple rays are sent along y-axis positive axis direction;
Correspondingly, sent along minus half direction of principal axis of y-axis with y-axis positive axis direction using the pupil center as the symmetrical of reference
Corresponding ray.
It is that shade of gray change is most violent at pupil portion and white of the eye part alternating in marginal position, it is eye to make f (i, j)
In the gray value at coordinate (i, j) place, the partial differential of gray value is frame f
Then the shade of gray of the direction is:
Wherein D represents shade of gray.
The maximum points of D are extracted, are denoted as Dmax;Work as Dmax>Marginal point threshold value, then the point is pupil edge point.Wherein, edge
Point threshold value is chosen more than the shade of gray at pupil and skin interface and less than the spy of pupil and the shade of gray of white of the eye intersection
Definite value, according to individual difference self-defining.Pupil edge point is at pupil portion and white of the eye part alternating.
Further, on the basis of above-described embodiment, the symmetry of the pupil edge point is judged, including:
Center circle coordinates (the x of multiple pupil edge points is determined using averaging method0, y0);
Calculate in the center circle coordinates x-axis coordinate x0The horizontal symmetrical degree of the pupil edge point of both sides;
Calculate in the center circle coordinates y-axis coordinate y0The vertically symmetrical degree of the pupil edge point of both sides.
Specifically, the calculation formula of horizontal symmetrical degree is:
Wherein, N counts for total pupil edge, and Mx is to be counted along the pupil edge of Y-axis side.Mx is that x-axis is more than y0Coordinate
Pupil edge point
The calculation formula of vertically symmetrical degree is:
Wherein, N counts for total pupil edge, and My is that the pupil edge of X-axis side is counted.
Further, on the basis of above-described embodiment, determine that eyes open the state closed, including:
The horizontal symmetrical degree and horizontal symmetrical degree threshold value set in advance are compared, by the vertically symmetrical degree and in advance
The vertically symmetrical degree threshold value of setting compares, and judging that eyes are according to comparison result opens state either closure state or centre
State.
Specifically, horizontal symmetrical degree threshold value and vertically symmetrical degree threshold value are preset.For example, it is assumed that share N number of pupil
Marginal point, the center circle coordinates (X of N number of point is obtained by averaging method0, Y0), the ratio by calculating both sides point quantitatively calculates pair
Title degree.With center circle coordinates (x0, y0) it is that origin establishes plane coordinate system;Using the Y-axis of plane coordinate system as symmetry axis, pupil is calculated
The horizontal symmetrical degree of bore edges point;Using the X-axis of plane coordinate system as symmetry axis, the vertically symmetrical degree of pupil edge point is calculated.
Calculation formula is as follows:
Horizontal symmetrical degree:
Wherein, N counts for total pupil edge, and Mx is to be counted along the pupil edge of Y-axis side.
Vertically symmetrical degree:
Wherein, N counts for total pupil edge, and My is to be counted along the pupil edge of X-axis side.
Horizontal symmetrical degree and horizontal symmetrical degree threshold value set in advance are compared, vertically symmetrical degree is erected with set in advance
Straight symmetry threshold value compares, and makes Tx, Ty represent horizontal symmetrical degree threshold value and vertically symmetrical degree threshold value respectively, and judged result is as follows:
A), when
It may determine that pupil edge point-symmetry property is good, i.e., eyes are in and open state.
B), when
It may determine that pupil edge point-symmetry property is too poor, eyes are in closure state.
C), when
It may determine that pupil edge point horizontal symmetrical is bad, vertically symmetrical property is good, and eyes are in intermediate state.
The eye pupil of people is smaller, and gray scale is low, because of individual physiological factor pupil image will not be caused to be blocked by eyelid, when
Normal when opening state, pupil is complete, when being that through hole disappears in closure, when in open and close intermediate state when, pupil
Hole lower edges are blocked, therefore judge that eyes are opened using the symmetry for detecting pupil edge and close.
Embodiment two
Fig. 2 is refer to, Fig. 2 is in for eyes provided in an embodiment of the present invention and opens state pupil feature schematic diagram.
As shown in Fig. 2 some stains of the white of the eye and pupil intersection are pupil edge point.The point centered on pupil,
Pupil center's point top half draws five rays, correspondingly, five rays is symmetrically drawn in pupil center's point the latter half.
Pupil top half obtains 5 pupil edge points, obtains 5 pupil edge points in pupil the latter half, it is assumed that horizontal symmetrical degree
Threshold value Tx and vertical symmetry threshold value Ty is 0.3.
By formulaDraw,
Therefore pupil edge point horizontal symmetry and vertically symmetrical property it is good, it can be determined that go out eyes be in open shape
State.
Fig. 3 is refer to, Fig. 3 is that eyes provided in an embodiment of the present invention are in intermediateness pupil feature schematic diagram.
As shown in figure 3, some stains of the white of the eye and pupil intersection are pupil edge point.The point centered on pupil,
Pupil center's point top half draws five rays, correspondingly, five rays is symmetrically drawn in pupil center's point the latter half.
Pupil top half obtains 2 pupil edge points, and 5 pupil edge points are obtained in pupil the latter half.
By formulaDraw
Therefore the vertically symmetrical property of pupil edge point is good, and horizontal symmetry is bad, it can be determined that goes out eyes and is in middle shape
State.
Assuming that limiting case, eyes close completely, then pupil edge point is 0,
By formulaDraw
Eyes are in closure state.
To sum up, specific case used herein is set forth to the principle and embodiment of the present invention, and the above is implemented
The explanation of example is only intended to help the method and its core concept for understanding the present invention;Meanwhile for the general technology people of this area
Member, according to the thought of the present invention, there will be changes in specific embodiments and applications, to sum up, in this specification
Appearance be should not be construed as limiting the invention, and protection scope of the present invention should be defined by appended claim.