Pupil radius detection method and device, computer equipment and storage medium

文档序号:1695348 发布日期:2019-12-10 浏览:22次 中文

阅读说明:本技术 瞳孔半径的检测方法、装置、计算机设备和存储介质 (Pupil radius detection method and device, computer equipment and storage medium ) 是由 满康瑞 于 2019-07-25 设计创作,主要内容包括:本申请涉及人工智能技术领域,应用于金融行业,特别是涉及一种瞳孔半径的检测方法、装置、计算机设备和存储介质。一个实施例中的方法包括:获取瞳孔半径待测图像,提取瞳孔半径待测图像中的感兴趣区域图像;对感兴趣区域图像进行像素处理,得到瞳孔区域图像;通过边界跟踪算法从瞳孔区域图像中提取多个瞳孔轮廓;获取感兴趣区域图像的中心、多个瞳孔轮廓的最小包围圆集合以及最小包围圆集合中各个最小包围圆的圆心;获取中心与各圆心的距离,筛选与中心距离最近的圆心,将最近的圆心对应的最小包围圆作为目标圆,以目标圆的半径作为瞳孔半径。(the application relates to the technical field of artificial intelligence, is applied to the financial industry, and particularly relates to a pupil radius detection method, a pupil radius detection device, computer equipment and a storage medium. The method in one embodiment comprises: acquiring an image to be measured of the pupil radius, and extracting an image of an interested area in the image to be measured of the pupil radius; performing pixel processing on the image of the region of interest to obtain an image of a pupil region; extracting a plurality of pupil contours from the pupil area image through a boundary tracking algorithm; acquiring the center of an image of the region of interest, a minimum enclosing circle set of a plurality of pupil outlines and the circle center of each minimum enclosing circle in the minimum enclosing circle set; the distance between the center and each circle center is obtained, the circle center closest to the center is screened, the minimum enclosing circle corresponding to the closest circle center is used as a target circle, and the radius of the target circle is used as the radius of the pupil.)

1. a method of detecting a pupil radius, the method comprising:

Acquiring an image to be measured of the pupil radius, and extracting an image of an interested area in the image to be measured of the pupil radius;

Performing pixel processing on the region-of-interest image to obtain a pupil region image;

Extracting a plurality of pupil contours from the pupil area image through a boundary tracking algorithm;

acquiring the center of the region-of-interest image, the minimum enclosing circle set of the pupil outlines and the circle center of each minimum enclosing circle in the minimum enclosing circle set;

And acquiring the distance between the center and each circle center, screening the circle center closest to the center, taking the minimum enclosing circle corresponding to the closest circle center as a target circle, and taking the radius of the target circle as the radius of the pupil.

2. The method of claim 1, wherein the pixel processing the region of interest image to obtain a pupil region image comprises:

Acquiring each pixel value of the image of the region of interest, carrying out bitwise non-processing on each pixel value, and acquiring each pixel value of the processed image of the region of interest;

and setting the pixel value lower than a preset threshold value in each pixel value of the processed region-of-interest image to zero to obtain a pupil region image.

3. The method of claim 1, wherein after extracting a plurality of pupil profiles from the pupil region image by a boundary tracking algorithm, further comprising:

acquiring a pixel point set of each pupil contour in the plurality of pupil contours;

sorting the pixel points in the pixel point set from small to large according to the polar angles, wherein the pixel points with the same polar angles are sorted from small to large according to the distance from the pixel point to the leftmost pixel point in the pixel point set;

storing the sorted pixel points through a structure array, traversing the sorted pixel points, and removing non-vertex pixel points to obtain a vertex pixel point set;

performing corner judgment on each vertex pixel point in the vertex pixel point set, and removing vertex pixel points which are not turned according to a preset direction to obtain a pupil contour after convex hull processing;

The acquiring a minimal enclosing circle set of the plurality of pupil profiles comprises:

and acquiring a minimum enclosing circle set of the pupil contour after the convex hull processing.

4. The method of claim 1, wherein the obtaining the set of minimum bounding circles for the plurality of pupil profiles comprises:

Acquiring a minimum enclosing circle and the radius of the minimum enclosing circle corresponding to the pupil outlines respectively;

and removing the smallest enclosing circle with the radius larger than a preset value from the smallest enclosing circles to obtain a smallest enclosing circle set of the pupil contour.

5. The method according to claim 4, wherein the obtaining of the minimum enclosing circles corresponding to the plurality of pupil contours comprises:

respectively obtaining four pixel points of the leftmost edge, the rightmost edge, the uppermost edge and the lowermost edge of each pupil contour in the plurality of pupil contours, and obtaining a minimum circle surrounding the four pixel points according to the four pixel points;

and traversing all pixel points of the pupil contour, and when no pixel point outside the boundary of the minimum circle exists in all the pixel points, obtaining the minimum circle as the minimum enclosing circle of the pupil contour.

6. The method of claim 5, further comprising:

When the pixel points outside the boundary of the minimum circle exist in all the pixel points, obtaining a minimum enclosing circle of which the minimum circle is not the pupil outline;

Screening pixel points farthest from the circle center of the smallest circle from pixel points located outside the boundary of the smallest circle, and arranging and combining the screened pixel points with any three of the four pixel points at the leftmost side, the rightmost side, the uppermost side and the lowermost side;

acquiring four pixel points after arrangement and combination, and obtaining a candidate minimum circle surrounding the four pixel points according to the four pixel points after arrangement and combination;

and traversing other pixel points of the pupil outline when the pixel points which are not selected into the permutation and combination are not outside the boundary of the candidate minimum circle, and obtaining the candidate minimum circle as the minimum enclosing circle of the pupil outline when no pixel point outside the boundary of the candidate minimum circle exists in the other pixel points.

7. The method of claim 1, further comprising:

Acquiring four pixel points for determining a minimum enclosing circle, randomly selecting two pixel points from the four pixel points to obtain two groups of different pixel point combinations, and obtaining two straight lines through the two groups of different pixel point combinations;

Respectively solving the vertical average lines of the two straight lines, and obtaining the center of the minimum enclosing circle by solving the intersection point of the two vertical average lines;

and obtaining the radius of the minimum enclosing circle by calculating the distance between the circle center and any point of the four pixel points.

8. A device for detecting a pupil radius, the device comprising:

the image extraction module is used for acquiring an image to be measured for the pupil radius and extracting an image of an area of interest in the image to be measured for the pupil radius;

the pupil image acquisition module is used for carrying out pixel processing on the region-of-interest image to obtain a pupil region image;

The pupil contour acquisition module is used for extracting a plurality of pupil contours from the pupil area image through a boundary tracking algorithm;

a center circle center obtaining module, configured to obtain a center of the region of interest image, a minimum enclosing circle set of the pupil outlines, and a circle center of each minimum enclosing circle in the minimum enclosing circle set;

and the pupil radius acquisition module is used for acquiring the distance between the center and each circle center, screening the circle center closest to the center, taking the minimum enclosing circle corresponding to the closest circle center as a target circle, and taking the radius of the target circle as the pupil radius.

9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.

10. a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.

Technical Field

The present application relates to the field of artificial intelligence technologies, and in particular, to a method and an apparatus for detecting a pupil radius, a computer device, and a storage medium.

background

With the development of science and technology, sight tracking is more and more widely applied to the fields of medical treatment, man-machine interaction, aviation and military, face examination and the like. Taking the loan audit as an example, in this stage, the reaction of the subject to be audited can be automatically obtained through sight tracking in the communication process, so as to assist in making a judgment on the overall qualification of the subject.

Pupil radius detection is an important part of the gaze tracking technology, and is important for the gaze tracking system. In the traditional pupil radius detection method, the geometric characteristics of the pupil are considered, the pupil is seen as a circle or an ellipse, and fitting is performed by a least square method, so that the accuracy of the obtained pupil radius is low.

Disclosure of Invention

in view of the above, it is necessary to provide a pupil radius detection method, apparatus, computer device, and storage medium capable of improving accuracy.

A method of detecting a pupil radius, the method comprising:

acquiring an image to be measured of the pupil radius, and extracting an image of an interested area in the image to be measured of the pupil radius;

Performing pixel processing on the region-of-interest image to obtain a pupil region image;

Extracting a plurality of pupil contours from the pupil area image through a boundary tracking algorithm;

acquiring the center of the region-of-interest image, the minimum enclosing circle set of the pupil outlines and the circle center of each minimum enclosing circle in the minimum enclosing circle set;

And acquiring the distance between the center and each circle center, screening the circle center closest to the center, taking the minimum enclosing circle corresponding to the closest circle center as a target circle, and taking the radius of the target circle as the radius of the pupil.

in one embodiment, the performing pixel processing on the region of interest image to obtain a pupil region image includes:

acquiring each pixel value of the image of the region of interest, carrying out bitwise non-processing on each pixel value, and acquiring each pixel value of the processed image of the region of interest;

and setting the pixel value lower than a preset threshold value in each pixel value of the processed region-of-interest image to zero to obtain a pupil region image.

In one embodiment, after extracting a plurality of pupil contours from the pupil region image by the boundary tracking algorithm, the method further includes:

Acquiring a pixel point set of each pupil contour in the plurality of pupil contours;

sorting the pixel points in the pixel point set from small to large according to the polar angles, wherein the pixel points with the same polar angles are sorted from small to large according to the distance from the pixel point to the leftmost pixel point in the pixel point set;

storing the sorted pixel points through a structure array, traversing the sorted pixel points, and removing non-vertex pixel points to obtain a vertex pixel point set;

Performing corner judgment on each vertex pixel point in the vertex pixel point set, and removing vertex pixel points which are not turned according to a preset direction to obtain a pupil contour after convex hull processing;

the acquiring a minimal enclosing circle set of the plurality of pupil profiles comprises:

And acquiring a minimum enclosing circle set of the pupil contour after the convex hull processing.

in one embodiment, the acquiring the minimum enclosing circle set of the plurality of pupil profiles comprises:

Acquiring a minimum enclosing circle and the radius of the minimum enclosing circle corresponding to the pupil outlines respectively;

and removing the smallest enclosing circle with the radius larger than a preset value from the smallest enclosing circles to obtain a smallest enclosing circle set of the pupil contour.

in one embodiment, acquiring minimum enclosing circles corresponding to the plurality of pupil profiles respectively comprises:

Respectively obtaining four pixel points of the leftmost edge, the rightmost edge, the uppermost edge and the lowermost edge of each pupil contour in the plurality of pupil contours, and obtaining a minimum circle surrounding the four pixel points according to the four pixel points;

and traversing all pixel points of the pupil contour, and when no pixel point outside the boundary of the minimum circle exists in all the pixel points, obtaining the minimum circle as the minimum enclosing circle of the pupil contour.

In one embodiment, the method further comprises:

When the pixel points outside the boundary of the minimum circle exist in all the pixel points, obtaining a minimum enclosing circle of which the minimum circle is not the pupil outline;

Screening pixel points farthest from the circle center of the smallest circle from pixel points located outside the boundary of the smallest circle, and arranging and combining the screened pixel points with any three of the four pixel points at the leftmost side, the rightmost side, the uppermost side and the lowermost side;

Acquiring four pixel points after arrangement and combination, and obtaining a candidate minimum circle surrounding the four pixel points according to the four pixel points after arrangement and combination;

And traversing other pixel points of the pupil outline when the pixel points which are not selected into the permutation and combination are not outside the boundary of the candidate minimum circle, and obtaining the candidate minimum circle as the minimum enclosing circle of the pupil outline when no pixel point outside the boundary of the candidate minimum circle exists in the other pixel points.

In one embodiment, the method further comprises:

acquiring four pixel points for determining a minimum enclosing circle, randomly selecting two pixel points from the four pixel points to obtain two groups of different pixel point combinations, and obtaining two straight lines through the two groups of different pixel point combinations;

respectively solving the vertical average lines of the two straight lines, and obtaining the center of the minimum enclosing circle by solving the intersection point of the two vertical average lines;

and obtaining the radius of the minimum enclosing circle by calculating the distance between the circle center and any point of the four pixel points.

A device for detecting a pupil radius, the device comprising:

The image extraction module is used for acquiring an image to be measured for the pupil radius and extracting an image of an area of interest in the image to be measured for the pupil radius;

the pupil image acquisition module is used for carrying out pixel processing on the region-of-interest image to obtain a pupil region image;

the pupil contour acquisition module is used for extracting a plurality of pupil contours from the pupil area image through a boundary tracking algorithm;

A center circle center obtaining module, configured to obtain a center of the region of interest image, a minimum enclosing circle set of the pupil outlines, and a circle center of each minimum enclosing circle in the minimum enclosing circle set;

And the pupil radius acquisition module is used for acquiring the distance between the center and each circle center, screening the circle center closest to the center, taking the minimum enclosing circle corresponding to the closest circle center as a target circle, and taking the radius of the target circle as the pupil radius.

A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:

acquiring an image to be measured of the pupil radius, and extracting an image of an interested area in the image to be measured of the pupil radius;

performing pixel processing on the region-of-interest image to obtain a pupil region image;

extracting a plurality of pupil contours from the pupil area image through a boundary tracking algorithm;

acquiring the center of the region-of-interest image, the minimum enclosing circle set of the pupil outlines and the circle center of each minimum enclosing circle in the minimum enclosing circle set;

and acquiring the distance between the center and each circle center, screening the circle center closest to the center, taking the minimum enclosing circle corresponding to the closest circle center as a target circle, and taking the radius of the target circle as the radius of the pupil.

A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:

Acquiring an image to be measured of the pupil radius, and extracting an image of an interested area in the image to be measured of the pupil radius;

Performing pixel processing on the region-of-interest image to obtain a pupil region image;

Extracting a plurality of pupil contours from the pupil area image through a boundary tracking algorithm;

Acquiring the center of the region-of-interest image, the minimum enclosing circle set of the pupil outlines and the circle center of each minimum enclosing circle in the minimum enclosing circle set;

and acquiring the distance between the center and each circle center, screening the circle center closest to the center, taking the minimum enclosing circle corresponding to the closest circle center as a target circle, and taking the radius of the target circle as the radius of the pupil.

According to the pupil radius detection method, the pupil radius detection device, the computer equipment and the storage medium, the image of the region of interest is extracted from the image to be detected of the pupil radius, the image of the region of interest is subjected to pixel processing to obtain the image of the pupil region, a plurality of pupil outlines are extracted from the image of the pupil region through a boundary tracking algorithm to obtain the circle centers of the minimum enclosing circles of the plurality of pupil outlines and the distances between the center of the image of the region of interest and each circle center, the radius of the minimum enclosing circle corresponding to the circle center closest to the center is used as the pupil radius, the pupil is positioned in a mode that the minimum enclosing circle with the circle center closest to the center of the image of the region of interest is positioned, the obtained pupil is positioned more accurately, and the accuracy of the obtained.

drawings

FIG. 1 is a diagram of an exemplary embodiment of a method for detecting pupil radius;

FIG. 2 is a schematic flow chart illustrating a method for detecting pupil radius according to an embodiment;

FIG. 3 is a flowchart illustrating a minimum bounding circle set obtaining step in one embodiment;

FIG. 4 is a flowchart illustrating a minimum bounding circle obtaining step in one embodiment;

FIG. 5 is a block diagram of a pupil radius detection device according to an embodiment;

FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.

Detailed Description

in order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.

the method for detecting the pupil radius can be applied to the application environment shown in fig. 1. The target object wears an HMD102(Head-mounted display) with an eye-tracking function, and the eye-tracking HMD102 has a built-in eye-tracking camera and adjusts the wearing position. At the beginning, the eye-tracking camera collects the image to be measured of the pupil radius of the target object, and transmits the image to be measured of the pupil radius to the control terminal 104 in real time. The control terminal 104 extracts an image of interest from the image to be measured of the pupil radius by analyzing the image to be measured of the pupil radius, performs pixel processing on the image of interest to obtain an image of the pupil radius, extracts a plurality of pupil outlines from the image of the pupil radius by a boundary tracking algorithm, obtains the centers of the minimum enclosing circles of the plurality of pupil outlines and the distances between the center of the image of the interest and each center of the circles, and takes the radius of the minimum enclosing circle corresponding to the center closest to the center as the pupil radius. The control terminal 104 may be, but is not limited to, various personal computers, notebook computers, smart phones, and tablet computers.

in one embodiment, as shown in fig. 2, a method for detecting a pupil radius is provided, which is described by taking the method as an example for being applied to the control terminal in fig. 1, and includes the following steps:

step 202, obtaining an image to be measured of the pupil radius, and extracting an image of an area of interest in the image to be measured of the pupil radius.

The image with the pupil radius to be measured is collected by the eye movement tracking camera and is sent to the control terminal. The eye-tracking camera is an IR-sensitive camera with IR (Infrared) band-pass filtering function, which allows only Infrared light to enter the camera and provides Infrared illumination. The infrared illumination means is typically an infrared light emitting diode for illuminating the area around the eye. The pupil is generally located in the center region of the eye image, and thus the region of interest is specifically the image corresponding to the center region of the eye image output by the eye-tracking camera.

and 204, carrying out pixel processing on the image of the region of interest to obtain an image of the pupil region.

Since the area of the pupil position in the image captured by the IR illumination and IR band pass filter is most likely the darkest area, the image corresponding to the darkest area is not convenient for subsequent processing. The darkest areas are converted to the lightest areas by bitwise non-processing, which are easier to process later than the darkest areas.

Carrying out pixel processing on the image of the region of interest to obtain an image of a pupil region, comprising: acquiring each pixel value of the region-of-interest image, performing bitwise non-processing on each pixel value, and acquiring each pixel value of the processed region-of-interest image; and setting the pixel value lower than the preset threshold value in each pixel value of the processed region-of-interest image to zero to obtain the pupil region image. And comparing the pixel value of the processed region-of-interest image with a preset threshold value, and dividing the pupil region and the non-pupil region. And when the pixel value corresponding to the image in a certain area is lower than a preset threshold value, the area is a non-pupil area. The removal of the non-pupillary region from the region of interest may be accomplished by zeroing the pixel values corresponding to the non-pupillary region in the region of interest, so that only the pupillary region remains in the region of interest.

step 206, extracting a plurality of pupil contours from the pupil area image by a boundary tracking algorithm.

In the digital binary image processing, boundary tracking extracts a series of coordinate points or chain codes of a boundary contour, wherein the boundary refers to the boundary between a 1-pixel connected domain and a 0-pixel connected domain. For example, to convert a binary image into a boundary description, the information to be extracted is the surrounding relationship between the boundary of the outer layer and the boundary of the hole. There is a one-to-one correspondence between the outer layer boundaries and the 1-connected domain, and between the hole boundaries and the 0-connected domain, from which the topology of a given binary image can be determined.

The boundary tracking algorithm can distinguish the surrounding relation between binary image boundaries, and the outer boundary and the hole boundary respectively have one-to-one correspondence with a connected domain with a pixel value of 1 and a hole with a pixel value of 0. By means of the representation method of the binary image, some features are extracted without reconstructing the image. The boundary tracking algorithm can also track only the outermost contour, i.e. no hole boundary surrounding it outside the outer boundary, which can be used for region counting and topology analysis of binary images.

step 208, the center of the region of interest image, the minimum enclosing circle set of the pupil outlines and the center of each minimum enclosing circle in the minimum enclosing circle set are obtained.

The region of interest may specifically be a central region of the eye image, and when the central region is a geometric region, the center of the region of interest image is the geometric center of the geometric region. Obtaining the circle center and the radius of the minimum enclosing circle, comprising the following steps: acquiring four pixel points for determining the minimum enclosing circle, randomly selecting two pixel points from the four pixel points to obtain two groups of different pixel point combinations, and obtaining two straight lines through the two groups of different pixel point combinations; respectively solving vertical average lines of the two straight lines, and obtaining the center of a minimum enclosing circle by solving the intersection point of the two vertical average lines; and obtaining the radius of the minimum enclosing circle by calculating the distance between the circle center and any point in the four pixel points.

step 210, obtaining the distance between the center and each circle center, screening the circle center closest to the center, taking the minimum enclosing circle corresponding to the closest circle center as the target circle, and taking the radius of the target circle as the pupil radius.

the distance between the center and the circle center can be obtained by obtaining a pixel point corresponding to the center and the circle center and then obtaining the distance between the two points through a distance formula.

according to the pupil radius detection method, the image of the region of interest is extracted from the image to be detected of the pupil radius, the image of the region of interest is subjected to pixel processing to obtain the image of the pupil region, a plurality of pupil outlines are extracted from the image of the pupil region through a boundary tracking algorithm, the circle center of the minimum enclosing circle of the plurality of pupil outlines and the distance between the center of the image of the region of interest and each circle center are obtained, the radius of the minimum enclosing circle corresponding to the circle center closest to the center is used as the pupil radius, the pupil is positioned more accurately through the mode that the minimum enclosing circle with the circle center closest to the center of the image of the region of interest positions the pupil, and the accuracy of the obtained pupil radius can be improved.

in one embodiment, after extracting a plurality of pupil contours from the pupil area image by the boundary tracking algorithm, the method further includes: acquiring a pixel point set of each pupil contour in a plurality of pupil contours; sorting the pixel points in the pixel point set from small to large according to the polar angles, wherein the pixel points with the same polar angles are sorted from small to large according to the distance from the pixel point to the leftmost pixel point in the pixel point set; storing the sorted pixel points through the structure array, traversing the sorted pixel points, and removing non-vertex pixel points to obtain a vertex pixel point set; performing corner judgment on each vertex pixel point in the vertex pixel point set, removing the vertex pixel points which are not turned according to a preset direction, and obtaining the pupil contour after convex hull processing; acquiring a set of minimum bounding circles of a plurality of pupil profiles, comprising: and acquiring a minimum enclosing circle set of the pupil contour after convex hull processing. And finding out the pixel points at the leftmost lower part in the pixel points forming the pupil outline, and sequencing the pixel points forming the pupil outline. And sequencing according to the polar angle from small to large, and sequencing the pixel points with the same polar angle from small to large according to the distance from the pixel point at the leftmost lower part. The outermost pixels of the convex hull are stored by the array of constructs, and pixels that are not the vertices of the convex hull are removed by while looping because each vertex should be turned left when traversing the convex hull counter-clockwise. Thus, when a while loop finds that there is no left turn at a vertex, it can be removed, where the direction of the turn can be determined to be left or right based on the cross product. Convex hull processing helps to eliminate distortion in the image due to infrared led reflection.

In one embodiment, as shown in fig. 3, acquiring a plurality of minimum enclosing circle sets of pupil contours includes: step 302, acquiring the minimum enclosing circle and the radius of the minimum enclosing circle corresponding to the pupil outlines respectively; and step 304, removing the smallest enclosing circle with the radius larger than the preset value from the smallest enclosing circles to obtain a smallest enclosing circle set of the pupil contour. This possibility of too large a radius to belong to the pupil can be reduced by excluding the smallest enclosing circle with a radius exceeding a preset value. The range of preset values can be calculated by the resolution of the image, by detecting several possible circles, for example the iris or the shell against which the eye tracking device rests on the face.

in one embodiment, as shown in fig. 4, acquiring minimum enclosing circles corresponding to a plurality of pupil profiles respectively includes: step 402, respectively obtaining four pixel points of the leftmost edge, the rightmost edge, the uppermost edge and the lowermost edge of each pupil contour in a plurality of pupil contours, and obtaining a minimum circle surrounding the four pixel points according to the four pixel points; and step 404, traversing all pixel points of the pupil contour, and when no pixel point outside the boundary of the smallest circle exists in all the pixel points, obtaining the smallest circle as the smallest enclosing circle of the pupil contour.

In one embodiment, the method for detecting the pupil radius further comprises: when the pixel points outside the boundary of the smallest circle exist in all the pixel points, the smallest enclosing circle of which the smallest circle is not the pupil outline is obtained; screening pixel points farthest from the circle center of the smallest circle from the pixel points outside the boundary of the smallest circle, and arranging and combining the screened pixel points with any three of the four pixel points at the leftmost side, the rightmost side, the uppermost side and the lowermost side; acquiring four arranged and combined pixel points, and acquiring a candidate minimum circle surrounding the four pixel points according to the four arranged and combined pixel points; and when the pixel points which are not selected into the permutation combination are not outside the boundary of the candidate minimum circle, traversing other pixel points of the pupil outline, and when no pixel point outside the boundary of the candidate minimum circle exists in other pixel points, obtaining the candidate minimum circle as the minimum enclosing circle of the pupil outline.

the minimum enclosing circle of the pupil profile can be obtained by: (1) traversing all pixel points of the pupil outline, finding four pixel points at the leftmost side, the rightmost side, the uppermost side and the lowermost side, and solving a minimum circle which surrounds the four pixel points at the leftmost side, the rightmost side, the uppermost side and the lowermost side, wherein the minimum circle specifically comprises the circle center and the radius of the minimum circle. (2) Then, all pixel points of the pupil contour are traversed, and whether some pixel points are out of the boundary of the minimum circle is judged. If some pixel points are not located outside the boundary of the minimum circle, the minimum circle is the minimum enclosing circle of the pupil outline. If there are some points outside the boundary of the minimum circle, then the minimum circle is not the minimum bounding circle of the pupil profile. (3) When the minimum circle obtained is not the minimum enclosing circle of the pupil contour, the pixel point farthest from the center of the minimum circle is screened out from the points outside the minimum circle boundary, the pixel point farthest from the center of the minimum circle is arranged and combined with any three points of the four points of the leftmost, rightmost, uppermost and lowermost points of the pupil contour found before, the minimum circle enclosing the four points is determined according to the four points after rearrangement and combination, namely, the minimum circle 1 enclosing the farthest point, the leftmost point, the rightmost point and the uppermost point, the minimum circle 2 enclosing the farthest point, the leftmost point, the rightmost point and the lowermost point, the minimum circle 3 enclosing the farthest point, the leftmost point, the uppermost point and the uppermost point, and the minimum circle 4 enclosing the farthest, rightmost, the uppermost and the lowermost points. (4) And when the lowest point is not outside the boundary of the minimum circle 1, traversing all points of the pupil contour and judging whether some points are outside the boundary of the minimum circle 1. If there are no points outside the boundary of the minimum circle 1, then the minimum circle 1 is the minimum bounding circle of the pupil profile. If there are some points outside the boundary of the minimum circle, then this minimum circle 1 is not the minimum bounding circle of the candidate pupil profile. (5) When the minimum circle 1 is not the minimum enclosing circle of the pupil outline, screening out the points which are farthest away from the circle center of the minimum circle 1 from the points outside the boundary of the minimum circle 1, arranging and combining the points which are farthest away from the circle center of the minimum circle 1 with any three points of the four points for determining the minimum circle 1, and repeating the steps (3) and (4) until all the points of the pupil outline are traversed, no points exist outside the boundary of the solved minimum circle, and the solved minimum circle is the minimum enclosing circle of the pupil outline.

In one embodiment, taking loan screening as an example, the control terminal may store historical pupil radius data of a screening object when answering a specific question in advance, for example, using an average value of the historical pupil radius data as a pupil radius reference value of the screening object. In the actual loan face examination process, an eye tracking (HMD) with an eye movement tracking function is worn by a face examination object, the eye movement tracking (HMD) is provided with a built-in eye movement tracking camera, the eye movement tracking camera collects a real-time pupil radius image to be detected of the face examination object when the face examination starts, and the real-time pupil radius image to be detected is transmitted to the control terminal in real time. The control terminal extracts an interested area image from the real-time pupil radius image to be detected by analyzing the real-time pupil radius image to be detected, performs pixel processing on the interested area image to obtain a pupil area image, extracts a plurality of pupil outlines from the pupil area image by a boundary tracking algorithm, obtains the circle centers of the minimum enclosing circles of the plurality of pupil outlines and the distances between the center of the interested area image and each circle center, and takes the radius of the minimum enclosing circle corresponding to the circle center closest to the center distance as the real-time pupil radius. And comparing the real-time pupil radius with the reference value of the pupil radius of the trial object to obtain a lie detection result of the trial object when answering the question. For example, when the real-time pupil radius when a specific question is answered is greater than the reference value of the corresponding pupil radius, it is determined that the trial object lies when answering the question.

it should be understood that although the various steps in the flow charts of fig. 2-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-4 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.

In one embodiment, as shown in fig. 5, there is provided a pupil radius detection apparatus, including: an image extraction module 502, a pupil image acquisition module 504, a pupil contour acquisition module 506, a center and circle center acquisition module 508, and a pupil radius acquisition module 510. The image extraction module is used for acquiring a pupil radius to be detected and extracting an interested area image in the pupil radius to be detected; the pupil image acquisition module is used for carrying out pixel processing on the image of the region of interest to obtain a pupil region image; the pupil contour acquisition module is used for extracting a plurality of pupil contours from the pupil area image through a boundary tracking algorithm; the center circle center acquisition module is used for acquiring the center of the image of the region of interest, the minimum enclosing circle set of the pupil outlines and the circle center of each minimum enclosing circle in the minimum enclosing circle set; and the pupil radius acquisition module is used for acquiring the distance between the center and each circle center, screening the circle center closest to the center, taking the minimum enclosing circle corresponding to the closest circle center as a target circle, and taking the radius of the target circle as the pupil radius.

in one embodiment, the pupil image acquisition module is further configured to acquire each pixel value of the region-of-interest image, perform bitwise non-processing on each pixel value, and acquire each pixel value of the processed region-of-interest image; and setting the pixel value lower than the preset threshold value in each pixel value of the processed region-of-interest image to zero to obtain the pupil region image.

In one embodiment, the pupil image obtaining module further includes a convex hull processing module configured to obtain a pixel point set of each of the plurality of pupil outlines; sorting the pixel points in the pixel point set from small to large according to the polar angles, wherein the pixel points with the same polar angles are sorted from small to large according to the distance from the pixel point to the leftmost pixel point in the pixel point set; storing the sorted pixel points through the structure array, traversing the sorted pixel points, and removing non-vertex pixel points to obtain a vertex pixel point set; performing corner judgment on each vertex pixel point in the vertex pixel point set, removing the vertex pixel points which are not turned according to a preset direction, and obtaining the pupil contour after convex hull processing; the central circle center acquisition module is used for acquiring a minimum enclosing circle set of the pupil outline after convex hull processing.

in one embodiment, the central circle center acquiring module is further configured to acquire a minimum enclosing circle and a radius of the minimum enclosing circle corresponding to each of the plurality of pupil outlines; and removing the smallest enclosing circle with the radius larger than the preset value in the smallest enclosing circle to obtain the smallest enclosing circle set of the pupil contour.

in one embodiment, the central circle center obtaining module is further configured to obtain four pixel points at the leftmost side, the rightmost side, the uppermost side and the lowermost side of each of the plurality of pupil profiles, respectively, and obtain a minimum circle enclosing the four pixel points according to the four pixel points; and traversing all pixel points of the pupil contour, and when no pixel point outside the boundary of the smallest circle exists in all the pixel points, obtaining the smallest circle as the smallest enclosing circle of the pupil contour.

in one embodiment, the central circle center obtaining module is further configured to obtain a minimum enclosing circle, where the minimum circle is not the pupil outline, when a pixel point located outside the boundary of the minimum circle exists among all pixel points; screening pixel points farthest from the circle center of the smallest circle from the pixel points outside the boundary of the smallest circle, and arranging and combining the screened pixel points with any three of the four pixel points at the leftmost side, the rightmost side, the uppermost side and the lowermost side; acquiring four arranged and combined pixel points, and acquiring a candidate minimum circle surrounding the four pixel points according to the four arranged and combined pixel points; and when the pixel points which are not selected into the permutation combination are not outside the boundary of the candidate minimum circle, traversing other pixel points of the pupil outline, and when no pixel point outside the boundary of the candidate minimum circle exists in other pixel points, obtaining the candidate minimum circle as the minimum enclosing circle of the pupil outline.

In one embodiment, the device for detecting the pupil radius further includes a circle center radius module, configured to obtain four pixel points that determine a minimum enclosing circle, arbitrarily select two of the four pixel points to obtain two different sets of pixel point combinations, and obtain two straight lines through the two different sets of pixel point combinations; respectively solving vertical average lines of the two straight lines, and obtaining the center of a minimum enclosing circle by solving the intersection point of the two vertical average lines; and obtaining the radius of the minimum enclosing circle by calculating the distance between the circle center and any point in the four pixel points.

For the specific definition of the pupil radius detection device, reference may be made to the above definition of the pupil radius detection method, which is not described herein again. All or part of the modules in the pupil radius detection device can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.

In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing data such as the center of the minimum enclosing circle, the radius of the minimum enclosing circle and the like. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of detecting a pupil radius.

Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.

In one embodiment, a computer device is provided, comprising a memory storing a computer program and a processor implementing the steps of the method for detecting a pupil radius in any of the embodiments when the processor executes the computer program.

In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, is adapted to carry out the steps of the method for detecting a pupil radius in any of the embodiments.

it will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

the technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.

The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:用于确定位置的方法和装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!