CPC G06V 40/193 (2022.01) [G06T 7/80 (2017.01); G06V 40/171 (2022.01); G06V 40/19 (2022.01)] | 13 Claims |
1. A system of calculating coordinates of a pupil center point, comprising a first camera, a second camera, a storage and a processor, wherein the first camera is configured to capture a first image comprising a face and output the first image to the processor, the second camera is configured to capture a second image comprising a pupil and output the second image to the processor, a resolution of the first camera is smaller than a resolution of the second camera, the storage is configured to store processing data, and the processor is configured to:
acquire the first image and the second image;
extract a first eye region corresponding to an eye from the first image;
convert the first eye region into the second image, to acquire a second eye region corresponding to the eye in the second image; and
detect a pupil in the second eye region and acquire the coordinates of the pupil center point,
wherein the processor is configured to: convert the second image in the second eye region into a grayscale image; calculate and acquire an image gradient matrix of the grayscale image; and calculate the coordinates of the pupil center point in accordance with the image gradient matrix,
wherein the processor is configured to:
select any point in the image gradient matrix as a target point;
calculate a sum of vector dot products between the target point and remaining points in the image gradient matrix;
select a next target point and calculate a sum of vector dot products between the next target point and remaining points in the image gradient matrix until all points in the image gradient matrix are selected, to acquire a plurality of sums of vector dot products; and
compare all the sums of the vector dot products and take coordinates of the target point corresponding to a minimum sum of vector dot products as the coordinates of the pupil center point.
|