To compute the glint-pupil vector it is necessary to extract the centers
of the pupil and the glint. Since the field of view is very narrow, the
pupil is the biggest round blob obtained after the labeling algorithm.
To estimate the center the pupil a window slightly larger than the enclosing
box of the pupil is created. Then gray scale pixels in the difference image
are summed horizontally and vertically (Radon transform). The x, y center
is computed as the center of mass of the horizontal and vertical projections
(sums). A search procedure for very bright pixels around the pupil is used
to detect the glint and compute its center of mass. Ideally all coordinates
are computed with sub-pixel repeatability. Figure 6 shows the
bright, dark, and the dark pupil image with two crosses superimposed, that
correspond to the computed centers of the pupil and glint.
Figure 6: (a) Bright and (b) dark pupil images. (c) Dark
pupil image superimposed by two crosses, marking the center of the pupil
and the glint (for monitoring and debugging purposes).
Carlos H. Morimoto