Summary of the invention
At existing two light source sight tracing calculation of complex, to the restricted big problem of head range of movement, the invention provides a kind of computation complexity low, to little, the practical sight tracing of head limit movement based on two light sources.
According to the image-forming principle of watching characteristic and camera attentively of human eye, as shown in Figure 4, two light source L on the screen
1, L
2The reflection spot V that on eye cornea form corresponding with it
01, V
02Line and blinkpunkt Q on the screen and the P of pupil center
0Line meet at the corneal curvature center C of human eye; And, according to the refraction at spherical surface principle, the reflection spot V of two infrared light supplies on cornea
01, V
02And the P of pupil center
0With they picture V after the cornea refraction at spherical surface
1, V
2And therefore P in same footpath upwards, uses V
1, V
2And P replaces V respectively
01, V
02And P
0Can not influence the blinkpunkt results estimated.
Set up in the process in mapping, because people's eyeball is a spheroidite, so the reflection spot V that two infrared light supplies form in human eye
1, V
2Though and pupil center is inequality, of slight difference at the coordinate figure of the refraction point on the cornea on Z-direction.Calculate by analysis: these 3 coordinate figures on the Z axle can think approximate identical, the blinkpunkt result is estimated that the error that is caused is 0.9887cm to the maximum on X-axis, on Y-axis, be 0.7852cm to the maximum, and the trend of error presents compartmentalization and distributes, therefore can calibrate in conjunction with secondary and reduce because the approximate error that produces, the error of the feasible blinkpunkt that finally estimates is within the tolerance interval in actual applications.
Sight tracing based on two light sources of the present invention, concrete steps are as follows:
(1) image pre-service: the principle of utilizing pupil and reflection spot gray scale difference, the facial image that collects is carried out pre-service, extract in the eye image two reflection spots and pupil region, and calculate two reflection spots and the pupil center coordinate in image coordinate system, wherein image coordinate system is a true origin with the upper left corner of image, horizontal direction is an X-axis, and vertical direction is a Y-axis;
(2) blinkpunkt is estimated: the triangle of blinkpunkt and two infrared light supply formations is approximately the apparent position that a pair of similar triangles are determined blinkpunkt on the screen on triangle that constitutes according to pupil center in the image and two reflection spots and the screen.
(3) blinkpunkt is proofreaied and correct: the method for utilization secondary calibration is proofreaied and correct the intrinsic deviation of human eye's visual axis and optical axis and because of being similar to the evaluated error that produces, is obtained final blinkpunkt position.
The specific implementation step that described step (2) blinkpunkt is estimated is:
A. draw blinkpunkt and two leg-of-mutton approximate similarity sexual intercourse that infrared light supply constitutes on triangle that pupil center and two reflection spots constitute and the screen according to the image-forming principle of watching characteristic and camera attentively of human eye;
B. estimate the apparent position of blinkpunkt on the screen according to the triangle similarity.
The specific implementation step that described step (3) blinkpunkt is proofreaied and correct is:
The a-quadrant is divided: number and distribution according to scaling point are five zones with whole screen divider;
1 calibration of B: the scaling point by the screen centre position carries out some calibration;
C zone location: according to the position of some calibration back blinkpunkt and the zone at the definite blinkpunkt place of relation, the position between each scaling point;
D secondary calibration: according to the zone at blinkpunkt place, the blinkpunkt after once calibrating is carried out the secondary calibration, obtain final blinkpunkt position with the scaling point in the blinkpunkt region.
The triangle that blinkpunkt and two infrared light supplies constitute on triangle that the present invention constitutes according to the pupil center in the image and two reflection spots and the screen is approximately the apparent position that a pair of similar triangles are determined blinkpunkt on the screen, calibrate by secondary again and proofread and correct inherent variability and the approximate evaluated error that is caused of algorithm between human eye's visual axis and the optical axis, obtain comparatively accurate blinkpunkt estimated value.This method need not to measure the distance of head distance screen, and computation complexity is low, and to the head movement strong robustness, experimentation is comfortable naturally, is easy to realize, is convenient to integrated actual product.
Embodiment
Realization the present invention is based on two light sources sight tracing hardware system as shown in Figure 1, comprise a gray scale video camera, two infrared light supplies and a personal computer.Personal computer adopts the 2.60GHZ Pentium Dual Core, computer screen size 34 * 27cm (wide * height), it is 694 * 1040 gray scale video camera that a resolution is adorned in computing machine below, it is motionless that camera position keeps in experimentation, and one 1 watt infrared light supply L is equipped with in the lower left corner of display and the lower right corner respectively
1And L
2The tester is sitting in apart from the position of screen 60--70cm, and head can move in the scope of 20 * 20 * 10cm (wide * length * degree of depth).
Fig. 2 has provided the process flow diagram of the sight tracing based on two light sources of the present invention, and according to this flow process, concrete implementation step is as follows:
1. determine reflection spot center and the pupil center coordinate in image coordinate system in the image by the image pre-service, its process as shown in Figure 3.According to the gray scale difference of pupil and corneal reflection point, extract pupil and corneal reflection point zone, and obtain their the coordinate position p of center in image coordinate system respectively
i(p
x, p
y), v
1i(v
1ix, v
1iy), v
2i(v
2ix, v
2iy).Wherein image coordinate system is a true origin with the upper left corner of image, and horizontal direction is an X-axis, and vertical direction is a Y-axis.
2. blinkpunkt is estimated.The triangle that blinkpunkt and two infrared light supplies constitute on triangle that constitutes according to the pupil center in the image and two reflection spots and the screen is approximately a pair of similar triangles and determines blinkpunkt apparent position on the screen.Its specific implementation step is:
(1), draws blinkpunkt and two leg-of-mutton approximate similarity sexual intercourse that infrared light supply constitutes on triangle that pupil center and two reflection spots constitute and the screen according to the image-forming principle of watching characteristic and camera attentively of human eye shown in Figure 4.Its concrete steps are as follows:
(a) according to the image-forming principle of camera, with corneal reflection point in the facial image and pupil center the coordinate conversion in camera coordinates system in world coordinate system, its transformational relation as shown in the formula:
p
i(p
ix,p
iy)→p(p
x,p
y,p
z)=p(pixelpitch
c(p
ix-c
certer)+O
x,pixelpitch
r(p
iy-r
center)+O
y,-λ+O
z)
v
1i(v
1ix,v
1iy)→v
1(v
1x,v
1y,v
1z)=v
1(pixelpitch
c(v
1ix-c
certer)+O
x,pixelpitch
r(v
1iy-r
center)+O
y,-λ+O
z)
v
2i(v
2ix,v
2iy)→v
2(v
2x,v
2y,v
2z)=v
2(pixelpitch
c(v
2ix-c
center)+O
x,pixelpitch
r(v
2iy-r
center)+O
y,-λ+O
z)
Wherein, space coordinates are initial point with the lower left corner of television screen, are the x axle with the axle of the horizontal direction that is parallel to television screen, are y with the axle of the vertical direction that is parallel to television screen, are the z axle with the axle perpendicular to the direction of television screen directed towards user.Pixe; Pitch
c, pixelpitch
r, c
Center, r
CenterAll are intrinsic parameters of camera, O
x, O
y, O
zBe the coordinate figure of camera light node on a world coordinate system coordinate axis.λ is the constant relevant with camera focus, focal length and object distance.From above-mentioned conversion relational expression as can be seen, by a p (p
x, p
y, p
z), v
1(v
1x, v
1y, v
1z) and v
2(v
2x, v
2y, v
2z) plane parallel that constitutes is in screen and Δ pv
1v
2Similar in appearance to Δ p
iv
1iv
2i
(b) according to the image-forming principle of camera, the P (P of pupil center
x, P
y, P
z) on the line of pO, the reflection spot V of infrared light supply on cornea
1(V
1x, V
1y, V
1z), V
2(V
2x, V
2y, V
2z) respectively at v
1O and v
2On the line of O.Strictly speaking, P
z, V
2zAnd V
2zBe unequal, but they are more or less the same, so let us can think P
z=V
2z=V
1z, promptly put P and V
2Use straight line OP and plane Z=V respectively
2zIntersection point P " and straight line OV
2With plane Z=V
2zIntersection point V
2" replace, as shown in Figure 6, and Δ P " V
1V
2" similar in appearance to triangle Δ pv
1v
2If human eye center of curvature C and P " line and the intersection point of screen be Q, then Q is approximate blinkpunkt estimated value, and Δ QL
1L
2Similar in appearance to Δ P " V
1V
2", so Δ QL
1L
2Similar in appearance to Δ pv
1v
2And similar in appearance to Δ p
iv
1iv
2i
(2) be respectively L through measuring the coordinate that can obtain two infrared light supplies
1(0,0) and L
2(0,34), L
1xAnd L
2xBe positioned at same horizontal line.By Δ QL
1L
2Similar in appearance to Δ p
iv
1iv
2i, as shown in Figure 5, utilize the character of similar triangle, can obtain blinkpunkt coordinate Q (Q approximate on the screen according to following equation
x, Q
y).
L wherein
1xAnd L
2xBe respectively infrared light supply L
1And L
2Coordinate figure on X-axis.
3,,, the position of the blinkpunkt that is calculated in the step 2 watches the position attentively so need being only accurately human eye through the calibration correction because vision optical axis and the intrinsic deviation of the optical axis.Adopt the secondary calibration mode, also can reduce the error that produces owing to the approximate substitution in the algorithm when proofreading and correct the optical axis and optical axis inherent variability, concrete steps are as follows:
(1) area dividing.Number and distribution according to scaling point in the system are A with whole screen divider
0, A
1, A
2, A
3And A
4Five zones, as shown in Figure 7.
(2) some calibration.Scaling point by the screen centre position carries out some calibration.Its concrete grammar is as follows:
If the true coordinate value of scaling point a is (x_real_a, y_real_a), and utilize coordinate figure that algorithm estimates for (x_gaze_a, y_gaze_a), then scaling point a is at the poor x_error_a between actual value and the estimated value on X-axis and the Y-axis, and y_error_a can be represented by the formula:
x_error_a=x_gaze_a-x_real_a
y_error_a=y_gaze_a-y_real_a
Suppose the blinkpunkt Q that the algorithm with this pair light source estimates
i(i=1,2,3, L) with all the other four scaling point b, c, d, the coordinate position of e is respectively (x_gaze_Q
i, y_gaze_Q
i) (i=1,2,3, L), (x_gaze_b, y_gaze_b), (x_gaze_c, y_gaze_c), (x_gaze_d, y_gaze_d) and (x_gaze_e, y_gaze_e), then through the coordinate (x_gazel_Q of center scaling point a after once calibrating
i, y_gazel_Q
i), (x_gazel_b, y_gazel_b), (x_gazel_c, y_gazel_c), (x_gazel_d, y_gazel_d), (x_gazel_e y_gazel_e) can be expressed as:
x_gazel_Q
i=x_gaze_Q
i+w
ix*x_error_a,y_gazel_Q
i=y_gaze_Q
i+w
iy*y_error_a
x_gazel_b=x_gaze_b+w
bx*x_error_a,y_gazel_b=y_gaze_b+w
by*y_error_a
x_gazel_c=x_gaze_c+w
cx*x_error_a,y_gazel_c=y_gaze_c+w
cy*y_error_a
x_gazel_d=x_gaze_d+w
dx*x_error_a,y_gazel_d=y_gaze_d+w
dy*y_error_a
x_gazel_e=x_gaze_e+w
ex*x_error_a,y_gazel_e=y_gaze_e+w
ey*y_error_a
Wherein, weight coefficient w
Ix, w
Bx, w
Cx, w
Dx, w
Ex, w
Iy, w
By, w
Cy, w
Dy, w
EyThe distance dependent on X-axis or Y-axis with corresponding point and centre coordinate point.
(3) zone location.According to the position of some calibration back blinkpunkt and the zone at the definite blinkpunkt place of relation, the position between each scaling point.
(4) secondary calibration.According to the zone at blinkpunkt place, with the scaling point in the blinkpunkt region blinkpunkt after once calibrating is carried out the secondary calibration, obtain final blinkpunkt position, its coordinate position can be expressed as:
X_gaze2_Q
i=x_gazel_Q
i, y_gaze2_Q
i=y_gazel_Q
i(at regional A
0)
X_gaze2_Q
i=x_gazel_Q
i+ x_error_b, y_gaze2_Q
i=y_gazel_Q
i+ y_error_b is (at regional A
1)
X_gaze2_Q
i=x_gazel_Q
i+ x_error_c, y_gaze2_Q
i=y_gazel_Q
i+ y_error_c is (at regional A
2)
X_gaze2_Q
i=x_gazel_Q
i+ x_error_d, y_gaze2_Q
i=y_gazel_Q
i+ y_error_d is (at regional A
3)
X_gaze2_Q
i=x_gazel_Q
i+ x_error_e, y_gaze2_Q
i=y_gazel_Q
i+ y_error_e is (in zone 4
4)
Should be based on two light source sight tracings of space similar triangles and secondary calibration, need not to measure the distance between head and the screen, computing method are simple, though exist approximate error can not surpass their maximal value 0.9887cm and 0.7852cm in algorithm on X-axis and Y-axis.And because the custom characteristic of people's eye fixation, the error of its blinkpunkt estimated result presents zonal distribution, as shown in Figure 8.Fig. 9 has provided blinkpunkt estimated accuracy analysis chart.The evaluated error result of the blinkpunkt that is used to test is as shown in the table:
Blinkpunkt |
X_error(cm) |
Yerror(cm) |
1 |
0.5050 |
0.3143 |
2 |
0.5132 |
0.8293 |
3 |
0.5299 |
0.3748 |
4 |
0.6994 |
0.0992 |
5 |
0.9113 |
0.2203 |
6 |
0.5349 |
0.3853 |
7 |
0.2769 |
0.0475 |
8 |
1.0562 |
0.1781 |
9 |
0.7784 |
0.4744 |
10 |
0.3104 |
0.6536 |
11 |
0.2331 |
0.3049 |
12 |
1.1230 |
0.1768 |
13 |
1.0073 |
0.2070 |
14 |
0.7716 |
0.5990 |
15 |
0.9398 |
0.6581 |
16 |
0.9398 |
0.5310 |
Average |
0.6956 |
0.3784 |
Its average error on X-axis and Y-axis is respectively 0.6956cm and 0.3784cm, so method of the present invention can be used for actual application fully.