A method and system for measuring pupil diameter under infrared light

Through the pupil diameter measurement method under infrared light irradiation, using image processing and digital graphics technology, the problem of large error in existing pupil diameter measurement is solved, and high-precision and fast pupil diameter measurement is achieved, which is suitable for medical and industrial applications.

CN114926620BActive Publication Date: 2025-10-21XIAN STAR EYE MEDICAL TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210579405.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-26
Publication Date
2025-10-21
Estimated Expiration
2042-05-26

AI Technical Summary

Technical Problem

Existing pupil diameter measurement methods, such as visual inspection with a ruler or pupil comparison ruler, have large measurement errors and are greatly affected by human readings, resulting in inaccurate measurements.

Method used

The pupil diameter measurement method under infrared light is adopted. Through grayscale conversion, image processing and digital graphics operations, the pupil area is extracted and the pupil diameter is calculated. The reflection difference between the iris and pupil under infrared light is utilized, combined with the closing and opening operations of digital graphics to remove interference and improve the accuracy of pupil contour acquisition.

Benefits of technology

The objective and precise measurement of pupil diameter is achieved, human error is reduced, and the accuracy and speed of measurement are improved. It is suitable for real-time calculation and display of embedded devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114926620B_ABST
    Figure CN114926620B_ABST
Patent Text Reader

Abstract

The application discloses an infrared light irradiation pupil diameter measurement method and system, which performs gray-scale processing on an eye orthovision original image under infrared light irradiation to obtain an eye orthovision gray-scale image; extracts a pupil area from the eye orthovision gray-scale image; calculates a distance average of a center of a minimum circumscribed circle of a pupil contour to a contour point, takes the distance average as a pupil radius, multiplies the pupil radius by two to obtain a pupil pixel diameter; obtains a pixel-millimeter ratio according to a standard circle with equal distances, multiplies the pixel-millimeter ratio by the pupil pixel diameter to obtain a fitted pupil circle real diameter. The pupil area is extracted from the eye orthovision gray-scale image, which comprises the following steps: performing binary threshold segmentation, close operation, open operation and contour searching on the eye orthovision gray-scale image; screening a minimum circumscribed rectangle width-height ratio of a contour of dark tissues of the eye obtained by the contour searching, screening a contour area, screening a standard deviation of a distance of a center of a minimum circumscribed circle of the contour to a contour point, and removing various interference matters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of optical pupil diameter measurement, and relates to a pupil diameter measurement method and system under infrared light. Background Art

[0002] The pupil is the circular hole in the center of the iris, the passageway for light to enter the eye. Contraction and contraction of the smooth muscles of the iris expand or contract the pupil's diameter, controlling the amount of light entering. Research has shown that objective, quantitative pupillary measurement is increasingly being used in various fields. In medicine, measuring pupil size can provide a preliminary assessment of changes in a patient's intracranial pressure, indirectly reflecting the severity and prognosis of neurological disorders. In industries such as industry, transportation, and shipping, pupil diameter meters can effectively assess worker or driver fatigue (fatigue driving) or the presence of drunk driving, helping to reduce related accidents and drunk-driving crashes, while also improving workplace safety and increasing work efficiency. Currently, pupil diameter is often measured visually using a ruler or pupil comparison ruler. This results in significant measurement errors and is significantly affected by human error, resulting in low accuracy. Therefore, there is an urgent need for a more accurate and rapid method to measure or calculate pupil diameter and its changes for both daily and medical use. Summary of the Invention

[0003] In order to solve the above problems, the present invention provides a method and system for measuring pupil diameter under infrared light, so as to solve the problem that the existing method of measuring pupil diameter by visual ruler or pupil comparison ruler has large measurement errors and is greatly affected by human readings, resulting in inaccurate measurements.

[0004] The technical solution adopted by the present invention is a method for measuring pupil diameter under infrared light, which is carried out according to the following steps:

[0005] Grayscale the original image of the eyeball facing forward under infrared light to obtain an eyeball facing forward grayscale image;

[0006] Extract the pupil area from the grayscale image of the eyeball;

[0007] Calculate the average distance from the center of the minimum circumscribed circle of the pupil outline to the outline point, use the average distance as the pupil radius, and multiply the pupil radius by two to obtain the pupil pixel diameter;

[0008] The pixel-millimeter ratio is obtained according to the equal distance of the standard circle, and the pixel-millimeter ratio is multiplied by the pupil pixel diameter to obtain the true diameter of the fitted pupil circle.

[0009] Furthermore, the pupil area is extracted from the grayscale image of the eyeball, including:

[0010] Performing binarization threshold segmentation on the emmetropia grayscale image of the eyeball or performing histogram matching on the emmetropia grayscale image of the eyeball using a standard circle, and setting the light-colored tissue of the eyeball to black and the dark-colored tissue of the eyeball to white to remove the light-colored tissue of the eyeball, thereby obtaining a binary image of the eyeball;

[0011] Performing a closing operation of digital graphics on the binary image of the eyeball to close the illumination spot and obtain a closed operation image;

[0012] Performing digital graphics opening operation on the closed operation image to remove tiny eyelashes and obtain the open operation image;

[0013] The outline of all objects in the image is found by bisection operation to obtain the outline of the dark tissue of the eyeball.

[0014] Furthermore, the pupil area is extracted from the grayscale image of the eyeball, including:

[0015] The minimum circumscribed rectangle aspect ratio of the dark tissue of the eyeball is screened to remove long eyelashes.

[0016] Screen the remaining dark tissue contour area after removing the long eyelashes, remove the remaining light spots, and dot the eyelashes;

[0017] Determine the empirical maximum standard deviation of the distance from the center of the minimum circumscribed circle of the dark tissue outline remaining after removing the remaining light spots and eyelashes to its outline points, and calculate the standard deviation of the distance from the center of the minimum circumscribed circle of each dark tissue outline to the outline points. Based on the empirical maximum distance standard deviation, screen the pupil area and remove continuous eyelash blocks.

[0018] Furthermore, the minimum circumscribed rectangle aspect ratio of the dark tissue of the eyeball is screened to remove long eyelashes. The specific process is as follows:

[0019] Use the minAreaRect() function to calculate the minimum enclosing rectangle of the dark tissue outline, obtain the width and height of the minimum enclosing rectangle, and calculate the aspect ratio of the minimum enclosing rectangle. Then set the minimum enclosing rectangle aspect ratio filtering condition and use the minimum enclosing rectangle aspect ratio filtering condition to remove long eyelashes.

[0020] Furthermore, the remaining dark tissue contour area after removing the long eyelashes is screened, and the specific process of removing the remaining light spots and dotting the eyelashes is as follows:

[0021] The contourArea() function is used to calculate the remaining dark tissue contour area after removing the long eyelashes. The non-pupil contour area screening condition is obtained based on prior experience, and the remaining light spots and eyelashes are eliminated using the non-pupil contour area screening condition.

[0022] Furthermore, the specific process of calculating the standard deviation of the distance from the center of the minimum circumscribed circle of each dark tissue to the contour point is as follows:

[0023] Use the minEnclosingCircle() function to obtain the minimum circumscribed circle of the contour and the center of the minimum circumscribed circle. From the center of the circle, obtain the distance set from the center of the circle to the contour points, and then calculate the distance standard deviation corresponding to the distance set.

[0024] Furthermore, the pupil area is extracted from the grayscale image of the eyeball, including:

[0025] The minimum circumscribed rectangle aspect ratio of the dark tissue of the eyeball is screened to remove long eyelashes.

[0026] Screen the remaining dark tissue contour area after removing the long eyelashes, remove the remaining light spots, and dot the eyelashes;

[0027] The HU moment distance between the standard circle and each contour area is calculated. The contour area with the smallest HU moment distance to the standard circle is the pupil area, and continuous eyelash blocks are removed.

[0028] Furthermore, the Hu moment distance D(A, B) between the contour area A and the standard circle B is calculated by the following formula:

[0029]

[0030] in, is the i-th transformation Hu moment of the standard circle B, is the i-th transformation Hu moment of the contour area A:

[0031]

[0032] in, h0~h6 are obtained by substituting the second-order normalized center distance and the third-order normalized center distance of the standard circle B into the following formula: h0 to h6 are calculated by substituting the second-order center distance and third-order center distance of the contour area A into the following formula:

[0033]

[0034] Among them, η 20 ,η 02 and η 11 is the three second-order normalized center distances of the standard circle B or the contour area A, η 03 ,η 12 ,η 21 ,η 30 are the four third-order normalized center distances of the standard circle B or the contour area A.

[0035] Furthermore, the pixel-to-millimeter ratio is obtained based on the same distance of the standard circle. The standard circle is photographed at the same distance using the same lens and the same resolution to obtain the pixel diameter of the standard circle at the same distance. The pixel-to-millimeter ratio is then calculated using the following formula:

[0036]

[0037] Another technical solution adopted by the present invention is a pupil diameter measurement system under infrared light, comprising:

[0038] a memory for storing instructions executable by the processor; and

[0039] The processor is used to execute the instructions to implement the pupil diameter measurement method under infrared light as described above.

[0040] The beneficial effects of the present invention are as follows: pupil diameter is measured using an original image of the eyeball facing forward under infrared light, achieving objective measurement of pupil diameter. This solves the problem of large measurement errors and inaccurate measurements caused by existing methods of measuring pupil diameter using a visual ruler or a pupil comparison ruler. The pupil is separated from the iris by utilizing the different intensities of light reflected by the pupil and the iris under infrared light, and various different interferences are effectively eliminated through digital graphics using prior knowledge, thereby improving the accuracy of pupil contour acquisition compared to traditional methods. At the same time, compared to segmentation models based on deep learning, the computational effort is reduced and the detection speed is increased. The requirements for real-time computing and display of embedded devices can be met. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0042] Figure 1 This is a flow chart of a method for measuring pupil diameter under infrared light according to an embodiment of the present invention.

[0043] Figure 2 It is a grayscale image of the eyeball facing forward under infrared light.

[0044] Figure 3 Yes Figure 2 The enhanced image after bilateral filtering enhancement.

[0045] Figure 4 Yes Figure 3 The binary image of the eyeball is obtained after binarization threshold segmentation.

[0046] Figure 5 Yes Figure 4 The closed image obtained after performing a closing operation in digital graphics.

[0047] Figure 6 Yes Figure 5 The open image obtained after performing the opening operation of digital graphics.

[0048] Figure 7 Yes Figure 6 The contour is found and the obtained features are superimposed on the original image to obtain the superimposed image.

[0049] Figure 8 is an overlay image with the minimum bounding rectangle aspect ratio of the object outline.

[0050] Figure 9 It is a diagram of the minimum enclosing rectangle.

[0051] Figure 10 It is an area-filtered image obtained by performing contour area filtering on the aspect ratio-filtered image.

[0052] Figure 11 It is the standard deviation filtered image obtained by performing distance standard deviation filtering on the aspect ratio filtered image and the area filtered image.

[0053] Figure 12 is the fitted pupil circle image with the pupil pixel diameter.

[0054] Figure 13 is the fitted pupil circle image with the true value of the fitted pupil circle diameter.

[0055] Figure 14 It is a standard circle diagram. DETAILED DESCRIPTION

[0056] The following will be combined with the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0057] Example 1

[0058] The embodiment of the present invention provides a method for measuring pupil diameter under infrared light. Figure 1 As shown, follow these steps:

[0059] S1: Grayscale the original eyeball emmetropia image obtained by the image detection unit under infrared light irradiation. The obtained eyeball emmetropia grayscale image is as follows: Figure 2 As shown;

[0060] The pupil has a different refractive index from the iris under infrared light, so infrared illumination can easily distinguish the iris from the pupil. Therefore, the image acquisition unit uses a narrow-band infrared distortion-free camera to eliminate interference from other visible light and the acquisition lens, thereby improving recognition accuracy.

[0061] S2: Perform bilateral filtering image enhancement on the grayscale image of the eyeball, smooth and denoise it, and keep the pupil contour edge information. The resulting enhanced image is as follows: Figure 3 As shown:

[0062] Bilateral filtering is a nonlinear filtering method that can achieve the effects of preserving edges, reducing noise and smoothing. Bilateral filtering uses a weighted averaging method, representing the intensity of a pixel with the weighted average of the brightness values ​​of surrounding pixels. The weighted average used is based on a Gaussian distribution. Most importantly, the weights of bilateral filtering take into account not only the Euclidean distance of pixels, but also the radiation differences in the pixel range domain. Both weights are considered simultaneously when calculating the center pixel. The kernel function of bilateral filtering is the combined result of the spatial domain kernel and the pixel range domain kernel: in flat areas of the image, the pixel value changes very little, which is equivalent to a Gaussian blur; at the edge of the image, the pixel value changes greatly, and the pixel range domain weight becomes larger, thereby preserving the edge information.

[0063] S3: Perform binary threshold segmentation or histogram matching on the enhanced image to remove light-colored tissues such as the iris, set the light-colored tissues such as the iris to white, and set the dark-colored tissues such as the pupil to black. The resulting eyeball binary image is as follows: Figure 4 As shown;

[0064] Binarization can convert a grayscale image into a binary image. In this example, through binarization threshold segmentation processing, dark areas such as the pupil are set to white, and the remaining light areas are uniformly set to black to facilitate subsequent operations.

[0065] Histogram matching is to match the histogram of a certain image or a certain area to another image. In the embodiment of the present invention, the eye grayscale image is matched with the histogram of a certain image or a certain area. Figure 14 By performing histogram matching on the standard circle shown in the figure, light-colored tissues such as the iris can be removed and dark-colored tissue areas such as the pupil can be obtained. Figure 14 The diameter of the standard circle shown is empirically chosen to be 6 to 8 mm. To facilitate subsequent calculations, the resulting image is inverted, with dark tissue areas such as the pupil set to white and other light tissue areas set to black. The image obtained by histogram matching has less interference, but the calculation time is slightly longer.

[0066] S4: Perform a digital graphics closing operation on the binary image of the eyeball to close the illumination spot. The resulting closed operation image is as follows: Figure 5 As shown;

[0067] The closing operation, which first dilates and then erodes, can fill small cracks and holes within foreground objects while preserving their overall position and shape. Dilation dilates the highlights in the image, expanding the area and resulting in a larger highlight region than the original. During this operation, the adjacent regions are replaced with their maximum values, increasing the highlight region. Erosion erodes the highlights in the image, reducing the area and resulting in a smaller highlight region than the original. During this operation, the adjacent regions are replaced with their minimum values, decreasing the highlight region.

[0068] S5: Perform digital graphics opening operation on the closed operation image to remove the tiny eyelashes. The resulting open operation image is as follows Figure 6 As shown;

[0069] The opening operation first erodes and then expands. The opening operation can remove isolated small points, burrs and small bridges while keeping the overall position and shape unchanged.

[0070] S6: Search for the outlines of all objects in the image and obtain the outlines of dark tissues such as pupils and eyelashes. In order to more intuitively view the objects for which the outlines are found, the outlines of the dark tissues are superimposed on the grayscale image of the eyeball. The superimposed image is as follows: Figure 7 As shown;

[0071] Use the findContours() function to find contours. The input parameters are OutputArrayimage, OutputArrayOfArrays contours, OutputArray hierarchy, int mode, int method, and Point offset = Point().

[0072] The parameter image is a single-channel image matrix, which can be a grayscale image, but is more commonly a binary image, generally a binary image processed by an edge detection operator such as Canny or Laplace. In this embodiment of the present invention, it is an open operation image matrix;

[0073] Parameter contours, each element in the vector stores a set of vectors consisting of a set of continuous Point points. Each set of Point points is a contour. There are as many elements in the vector contours as there are object contours.

[0074] The int type mode defines the retrieval mode of the contour:

[0075] Value: CV_RETR_EXTERNAL only detects the outermost contour, and the inner contour contained in the outer contour is ignored;

[0076] The int type method defines the approximation method of the contour:

[0077] Value: CV_CHAIN_APPROX_NONE saves all continuous contour points on the object boundary into the contours vector;

[0078] S7: The minimum circumscribed rectangle aspect ratio of the dark tissue obtained by searching for the contour is filtered to remove the long eyelashes. The obtained aspect ratio filtered image is as follows: Figure 10 As shown;

[0079] Use the minAreaRect() function to calculate the minimum enclosing rectangle of the dark tissue outline, get the width and height of the minimum enclosing rectangle, and calculate the aspect ratio / height-to-width ratio. The resulting superimposed image with the minimum enclosing rectangle aspect ratio is as follows: Figure 8 As shown, then set the aspect ratio filtering condition. The aspect ratio filtering condition is related to shooting distance, camera used, and resolution. It can be determined based on the current shooting distance, camera used, and resolution. For example, under the shooting conditions of 2cm object distance, 5-megapixel infrared narrowband camera, and 640×480 resolution, set the aspect ratio filtering condition to less than 0.8 or greater than 1.2 to remove long eyelashes and obtain the aspect ratio filtered image. When calculating the bounding rectangle of the minimum area of ​​the specified point set, the rectangle may be rotated to ensure the minimum area, such as Figure 9 shown.

[0080] S8: Screen the remaining dark tissue contour area after removing the long eyelashes, remove the remaining light spots and eyelashes, and the resulting area screening image is as follows: Figure 11 As shown;

[0081] Use the contourArea() function to calculate the remaining dark tissue contour area after removing the long eyelashes. The remaining light spots and small eyelashes are significantly different from the pupil area, such as Figure 10 As shown, the non-pupil contour area screening condition is obtained based on prior experience, and non-pupil tissues such as residual light spots and eyelashes are eliminated. The non-pupil contour area screening condition is determined based on prior experience and is related to shooting conditions such as shooting distance, camera used, and resolution. It can be specifically determined according to the current shooting distance, camera used, and resolution. For example, under the shooting conditions of object distance 2 cm, 5-megapixel infrared narrow-band camera, and resolution 640×480, the non-pupil contour area screening condition can be set to 10000 based on prior experience.

[0082] S9: Determine the empirical maximum standard deviation of the distance from the center of the minimum circumscribed circle of the dark tissue contour remaining after removing the remaining light spots and eyelashes to the contour points, and calculate the standard deviation of the distance from the center of the minimum circumscribed circle of each dark tissue contour to its contour points. Filter the pupil area based on the empirical maximum distance standard deviation and remove the continuous eyelash blocks. The obtained standard deviation filter image is as follows: Figure 12 As shown;

[0083] The size and aspect ratio of the continuous eyelash mass are similar to those of the pupil. However, analysis revealed that the standard deviation of the distance from the center of the minimum circumscribed circle of the pupil to the contour point of the continuous eyelash mass is quite different from that of the continuous eyelash mass. Therefore, through a large number of comparisons, the empirical maximum distance standard deviation was determined. Objects where the standard deviation of the distance from the center of the minimum circumscribed circle of each dark tissue to the contour point was greater than the empirical maximum distance standard deviation were deleted. In other words, the continuous eyelash mass was removed. Under the same shooting conditions, the inventors obtained an empirical maximum distance standard deviation of 2 through a large number of experimental comparisons.

[0084] Use the minEnclosingCircle() function to obtain the minimum circumscribed circle of the object contour and the center of the minimum circumscribed circle. Starting from the center of the circle, obtain the distance set from the center of the circle to the contour points, and calculate the distance standard deviation corresponding to the distance set. If the distance standard deviation is less than or equal to the empirical maximum distance standard deviation, it is the pupil contour.

[0085] The human eye is not actually a perfect circle, but medicine fits it into a circle for ease of cognition. The present invention uses digital graphics opening and closing operations to smooth out pupil edge burrs, and selects pupils based on the distance variance from the center of the circumscribed circle of the pupil edge contour. This further verifies the claim that the pupil is an approximate perfect circle. The resulting mean distance is the pupil diameter that best fits the concept of fitting a circle.

[0086] Calculate as Figure 14 The HU moment distance between the standard circle and the contour of each dark tissue is shown. The smaller the HU moment distance, the closer the contour is to the circle. Therefore, in an embodiment of the present invention, the HU moment distance is calculated between each dark tissue and the standard circle. The contour area with the smallest HU moment distance is the pupil area. This method does not require an empirical value and has good versatility.

[0087] The Hu moment is a set of seven center distances. The center distance is the weighted average of the pixel intensities of an image pixel relative to its center of mass. The Hu moment remains unchanged when the image is translated, rotated, and scaled, so it can be used for shape comparison. In this embodiment of the present invention, the Hu moment distance D(A, B) between the contour area A and the standard circle B is calculated using the following formula:

[0088]

[0089] in, is the i-th transformation Hu moment of the standard circle B, is the i-th transformation Hu moment of the contour area A:

[0090]

[0091] in, The seven invariant moments h0~h6 are calculated by substituting the second-order normalized center distance and the third-order normalized center distance of the standard circle B into the following formula: The seven invariant moments h0 to h6 are calculated by substituting the second-order center distance and third-order center distance of the contour area A into the following formula:

[0092]

[0093] Among them, η 20 ,η 02 and η 11 is the three second-order normalized center distances of the standard circle B or the contour area A, η 03 ,η 12 ,η 21 ,η 30 are the four third-order normalized center distances of the standard circle B or the contour area A. The center distance calculation formula of the standard circle B or the contour area A is:

[0094]

[0095] Among them, η pq is the p+q order normalized center distance of the standard circle B or the contour area A, p+q=2,3,L, ρ=(p+q) / 2+1, μ 00 is the 0th order central moment of the standard circle B or the contour area A; η 20 That is, η is obtained when p = 2 and q = 0. pq , η 02 That is, η is obtained when p = 0 and q = 2 pq , η 11 That is, η is obtained when p=q=1 pq , η 03 That is, η is obtained when p = 0 and q = 3 pq , η 12 That is, η is obtained when p = 1 and q = 2 pq , η 21 That is, η is obtained when p = 2 and q = 1 pq , η 30 That is, η is obtained when p = 3 and q = 0. pq .

[0096] The p+q order central moment μ of the standard circle B or contour area A of size M×N pq for:

[0097]

[0098] Where f(x,y) is the grayscale distribution function of the standard circle B or the contour area A, p,q=0,1,2L, and the centroid of the standard circle B or the contour area A is

[0099]

[0100] Among them, m 00 is the 0th order common moment of the standard circle B or the contour area A; m 10 is the first-order common moment of the standard circle B or the contour area A, that is, the p+q-order common moment m of the standard circle B or the contour area A pq p=1、q=0;

[0101] The p+q order common moment m of the standard circle B or contour area A of size M×N pq for:

[0102]

[0103] S10: Calculate the average distance from the center of the remaining minimum circumscribed circle of the pupil contour to the contour point, take the average distance as the pupil radius, multiply the pupil radius by two to obtain the pupil pixel diameter, and obtain the fitted pupil circle with the center of the minimum circumscribed circle. The obtained fitted pupil circle image with the pupil pixel diameter is as follows: Figure 12 As shown, Figure 12 The current pupil pixel diameter is 68.67; the pixel-millimeter ratio is obtained according to the same distance of the standard circle. The pixel-millimeter ratio is multiplied by the pupil pixel diameter to obtain the true diameter of the fitted pupil circle. The obtained fitted pupil circle image with the true diameter of the fitted pupil circle is as follows: Figure 13 As shown, Figure 13 The actual diameter of the currently fitted pupil circle shown in is 4.37 mm.

[0104] To obtain the pixel-to-millimeter ratio at the same distance from the standard circle, use the same lens, the same resolution, and the same distance to shoot the standard circle, obtain the pixel diameter at the same distance from the standard circle, and then calculate the pixel-to-millimeter ratio using the following formula:

[0105]

[0106] The product of the pixel diameter of the fitted pupil circle and the pixel-millimeter ratio is the true value of the fitted pupil circle diameter.

[0107] Example 2

[0108] An embodiment of the present invention provides a pupil diameter measurement system under infrared light, comprising: a memory for storing instructions executable by a processor; and a processor for executing the instructions to implement a pupil diameter measurement method under infrared light as described in Example 1 above.

[0109] A system for measuring pupil diameter under infrared illumination may include an internal communication bus, a processor, read-only memory (ROM), random access memory (RAM), a communication port, and a hard disk. The internal communication bus enables data communication between components of the system. The processor can make judgments and issue prompts. In some embodiments, the processor can be composed of one or more processors. The communication port enables data communication external to the system. In some embodiments, the system can also send and receive information and data from a network via the communication port. The system can also include various forms of program storage units and data storage units, such as a hard disk, read-only memory (ROM), and random access memory (RAM), capable of storing various data files used for computer processing and / or communication, as well as possible program instructions executed by the processor. The processor executes these instructions to implement the main part of the method. The results of the processor processing are transmitted to the subject's device via the communication port and displayed on the subject's interface.

[0110] The aforementioned method for measuring pupil diameter under infrared illumination can be implemented as a computer program, stored on a hard disk, and recorded to a processor for execution. Therefore, an embodiment of the present invention also provides a computer-readable medium storing computer program code. When executed by a processor, the computer program code implements the aforementioned method for measuring pupil diameter under infrared illumination.

[0111] When a method for measuring pupil diameter under infrared light is implemented as a computer program, it can also be stored in a computer-readable storage medium as a product. For example, a computer-readable storage medium may include, but is not limited to, magnetic storage devices (e.g., hard disks, floppy disks, magnetic strips), optical disks (e.g., compact disks (CDs), digital versatile disks (DVDs)), smart cards, and flash memory devices (e.g., electrically erasable programmable read-only memories (EPROMs), cards, sticks, key drives). In addition, the various storage media described in the embodiments of the present invention can represent one or more devices and / or other machine-readable media for storing information. The term "machine-readable medium" may include, but is not limited to, wireless channels and various other media (and / or storage media) that can store, contain, and / or carry code and / or instructions and / or data.

[0112] The above description is only a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention are included in the scope of protection of the present invention.

Claims

1. A method for measuring pupil diameter under infrared light, characterized in that: Follow these steps: Grayscale the original image of the eyeball facing forward under infrared light to obtain an eyeball facing forward grayscale image; Extract the pupil area from the grayscale image of the eyeball emmetropia, perform bilateral filtering image enhancement on the grayscale image of the eyeball emmetropia, smooth and remove noise while maintaining the pupil contour edge information; Calculate the average distance from the center of the minimum circumscribed circle of the pupil outline to the outline point, use the average distance as the pupil radius, and multiply the pupil radius by two to obtain the pupil pixel diameter; The pixel-millimeter ratio is obtained based on the same distance of the standard circle, and the pixel-millimeter ratio is multiplied by the pupil pixel diameter to obtain the true diameter of the fitted pupil circle; Extract the pupil area from the grayscale image of the eyeball, including: Performing binarization threshold segmentation on the emmetropia grayscale image of the eyeball or performing histogram matching on the emmetropia grayscale image of the eyeball using a standard circle, and setting the light-colored tissue of the eyeball to black and the dark-colored tissue of the eyeball to white to remove the light-colored tissue of the eyeball, thereby obtaining a binary image of the eyeball; Performing a closing operation of digital graphics on the binary image of the eyeball to close the illumination spot and obtain a closed operation image; Performing digital graphics opening operation on the closed operation image to remove tiny eyelashes and obtain the open operation image; Perform a bisection operation to find the outlines of all objects in the image and obtain the outline of the dark tissue of the eyeball; The minimum circumscribed rectangle aspect ratio of the dark tissue of the eyeball is screened to remove long eyelashes. Screen the remaining dark tissue contour area after removing the long eyelashes, remove the remaining light spots, and dot the eyelashes; Determine the empirical maximum standard deviation of the distance from the center of the minimum circumscribed circle of the dark tissue outline remaining after removing the remaining light spots and eyelashes to the outline points, and calculate the standard deviation of the distance from the center of the minimum circumscribed circle of each dark tissue outline to its outline points. Based on the empirical maximum distance standard deviation, screen the pupil area and remove continuous eyelash blocks.

2. The method for measuring pupil diameter under infrared light according to claim 1, wherein: The specific process of filtering the minimum circumscribed rectangle aspect ratio of the dark tissue of the eyeball and removing long eyelashes is as follows: Use the minAreaRect() function to calculate the minimum enclosing rectangle of the dark tissue outline, obtain the width and height of the minimum enclosing rectangle, and calculate the aspect ratio of the minimum enclosing rectangle. Then set the minimum enclosing rectangle aspect ratio filtering condition and use the minimum enclosing rectangle aspect ratio filtering condition to remove long eyelashes.

3. The method for measuring pupil diameter under infrared light according to claim 1, wherein: The specific process of screening the remaining dark tissue contour area after removing the long eyelashes, removing the remaining light spots, and dotting the eyelashes is as follows: The contourArea() function is used to calculate the remaining dark tissue contour area after removing the long eyelashes. The non-pupil contour area screening condition is obtained based on prior experience, and the remaining light spots and eyelashes are eliminated using the non-pupil contour area screening condition.

4. The method for measuring pupil diameter under infrared light according to claim 1, wherein: The specific process of calculating the standard deviation of the distance from the center of the minimum circumscribed circle of each dark tissue to the contour point is: Use the minEnclosingCircle() function to obtain the minimum circumscribed circle of the contour and the center of the minimum circumscribed circle. From the center of the circle, obtain the distance set from the center of the circle to the contour points, and then calculate the distance standard deviation corresponding to the distance set.

5. The method for measuring pupil diameter under infrared light according to claim 1, wherein: Extract the pupil area from the grayscale image of the eyeball, including: The minimum circumscribed rectangle aspect ratio of the dark tissue of the eyeball is screened to remove long eyelashes. Screen the remaining dark tissue contour area after removing the long eyelashes, remove the remaining light spots, and dot the eyelashes; Calculate the Hu moment distance between the standard circle and each contour area. The contour area with the smallest Hu moment distance to the standard circle is the pupil area, and remove the continuous eyelash blocks.

6. The method for measuring pupil diameter under infrared light according to claim 5, characterized in that: The Hu moment distance D(A,B) between the contour area A and the standard circle B is calculated using the following formula: in, is the i-th transformation Hu moment of the standard circle B, is the i-th transformation Hu moment of the contour area A: in, h0~h6 are obtained by substituting the second-order normalized center distance and the third-order normalized center distance of the standard circle B into the following formula: h0 to h6 are calculated by substituting the second-order center distance and third-order center distance of the contour area A into the following formula: Among them, η 20 ,η 02 and η 11 is the three second-order normalized center distances of the standard circle B or the contour area A, η 03 ,η 12 ,η 21 ,η 30 are the four third-order normalized center distances of the standard circle B or the contour area A.

7. The method for measuring pupil diameter under infrared light according to any one of claims 1 to 6, characterized in that: To obtain the pixel-to-millimeter ratio at the same distance from the standard circle, use the same lens, the same resolution, and the same distance to shoot the standard circle, obtain the pixel diameter at the same distance from the standard circle, and then calculate the pixel-to-millimeter ratio using the following formula:

8. A pupil diameter measurement system under infrared light, characterized in that: include: a memory for storing instructions executable by the processor; as well as A processor is used to execute the instructions to implement the method for measuring pupil diameter under infrared light as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Measurement method, measurement device, storage medium and terminal equipment for infrared pupil identification

    CN110786823A

  • Real-time pupil positioning method based on circumscribed rectangles

    CN112162629A

  • Sight tracking method based on near-to-eye camera

    CN113342161A