Dry eye iris detection method based on image processing
By using an image processing-based approach, utilizing four supplementary white light projections and image processing technology, the problem of inaccurate iris detection in dry eye detection was solved, achieving faster and more accurate iris detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-13
- Publication Date
- 2026-04-14
AI Technical Summary
Existing iris detection technologies are not accurate or stable enough for dry eye detection, making it difficult to meet the detection requirements.
An image processing-based method is used to project four supplementary white lights onto the iris surface, detect and calculate the relative positional relationship of the white lights in real time, extract the iris position and white light position using image processing technology, and use variance and threshold to determine image clarity and calibrate the iris diameter.
It improves the accuracy and efficiency of iris detection, enhances robustness to factors such as light and noise, and provides more stable detection results.
Smart Images

Figure CN116189273B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of dry eye detection technology, and more specifically to a dry eye iris detection method based on image processing. Background Technology
[0002] The iris, a flattened, circular membrane in the middle layer of the eyeball wall, lies between the cornea and the lens. It can be seen through the cornea and is commonly known as the "black of the eye." In the center is a small round opening called the pupil, through which light enters the eye.
[0003] Most current iris detection technologies are based on face models, which are not well-suited for dry eye detection. In dry eye detection, existing iris measurement techniques are generally inaccurate and inconsistent. Therefore, this paper proposes an image processing-based method for dry eye iris detection. Summary of the Invention
[0004] The purpose of this invention is to overcome the aforementioned problems in the prior art and provide a dry eye iris detection method based on image processing, which has a fast detection speed and more accurate detection results.
[0005] To achieve the above-mentioned technical objectives and effects, the present invention is implemented through the following technical solution:
[0006] A method for dry eye iris detection based on image processing includes the following detection steps:
[0007] Step 1: During the process of acquiring the iris projection image of the human eye, turn on four supplementary white lights to project the white lights onto the iris surface;
[0008] Step 2: During the data acquisition process, keep the four points projected onto the iris within the defined green circle, and continuously monitor and calculate the relative positional relationship of the four points.
[0009] Step 3: Before comparing the threshold, first determine whether the four white light projection images of the image are within the set clear range. When they are within the clear range, then determine whether the relative positional relationship of the four points is less than the threshold value set by the preset value. When it is less than the preset threshold, the iris image is acquired.
[0010] Step 4: Then, image processing technology is applied to extract the iris position and the positions of the four LED projection white lights from the acquired image;
[0011] Step 5: Finally, determine the iris diameter by observing the relative positions and sizes of the white lights.
[0012] Preferably, in step 1, the four supplementary white lights used for iris projection are spaced 90 degrees apart and evenly distributed in 360 degrees, wherein the intensity of the white light is adjusted to a comfortable range acceptable to the human eye.
[0013] Preferably, in step 2, when acquiring the iris image, a circle with a size of 200 pixels is pre-drawn in the center of the interface to ensure that the images of the four projected white LEDs are within the circle. Then, the image is segmented into regions of interest, the smallest tangent rectangle of the circle is extracted, and the relative positional relationship of the four white lights within this region is calculated in real time. The specific steps are as follows:
[0014] a. First, process the region of interest with grayscale values to convert the color 3D image into a grayscale 1D image;
[0015] b. Perform binarization thresholding. Since the white light projection on the iris has a relatively large grayscale value, set the threshold to 250.
[0016] c. Perform contour searching on the binarized image, searching for the contour size and position of the four white lights; select contour index values in the range of 20-100 for the four white light contour values respectively. When the number of contours that meet the search conditions is exactly four, the search is correct; otherwise, the search has detected four white lights, and then the search and detection is repeated.
[0017] d. After finding the outlines of four white lights, calculate the outline coordinates of the point center in the middle of the four lights. The formulas for its horizontal and vertical coordinates are as follows:
[0018] center x =(P1) x +P2 x +P3 x +P4 x ) / 4 (1)
[0019] center y =(P1) y +P2 y +P3 y +P4 y ) / 4 (2)
[0020] Wherein, P1, P2, P3, and P4 are the real-time detection coordinates of the four points;
[0021] e. Then calculate the distances from each of the four white lights to the center, denoted by d1, d2, d3, and d4 respectively; the specific formulas are as follows:
[0022]
[0023]
[0024]
[0025]
[0026] f. Finally, calculate the average value (avgvalue) of d1, d2, d3, and d4 using the following formula:
[0027] avgvalue=(d1+d2+d3+d4) / 4 (7)
[0028] This formula is compared with a set threshold value. If the average value is less than the set value, an iris image is captured.
[0029] Preferably, in step 3, before comparing the threshold, it is first determined whether the four white light projection images of the image reach the set clear range. This paper uses variance, which is a probability theory method used to examine the degree of dispersion between a set of discrete data and the expectation. The larger the variance, the greater the deviation between this set of data, and the data within the group are of different sizes and unevenly distributed. The smaller the variance, the smaller the deviation between this set of data, and the data within the group are evenly distributed and similar in size.
[0030] Compared to a blurry image, a sharp image should have a greater difference in grayscale values, meaning it should have a larger variance. The sharpness of an image can be measured by the variance of its grayscale data; the larger the variance, the better the sharpness. The specific steps are as follows:
[0031] a. First, perform grayscale value processing on the region of interest to convert the color 3D image into a grayscale 1D image.
[0032] b. To calculate the standard deviation of grayscale values, first calculate the mean u, using the following formula:
[0033]
[0034] In the formula, m and n represent the image row and column, respectively, and f(x,y) represents the pixel gray value at position (x,y) in the image. Then, the standard deviation SD is calculated, which mainly reflects the dispersion of the image gray values relative to the gray mean. The expression is as follows:
[0035]
[0036] When the SD value is less than the set threshold, it means that the projected images of the four lights are in sharp focus.
[0037] Preferably, in step 4, image processing technology is used to extract the iris position and the positions of the four LED projection white lights from the acquired image, with the iris and the four white lights measured separately;
[0038] The specific steps for iris measurement are as follows:
[0039] a. Perform grayscale processing on the image;
[0040] b. Take the threshold yizhi1 = h / 2.1, where h is the height pixel value of the image. When the height value of the image is less than yizhi1, the pixel value is set to 255 to eliminate the interference of eyelashes.
[0041] c. Perform binarization on the image;
[0042] d. Perform an opening operation to remove small areas;
[0043] e. Perform contour finding on the binarized image to search for the iris location; select contour index values with a contour size in the range of 1000-3500 as the iris contour value. If the number of contours that meet the search conditions is exactly 1, the search is correct; otherwise, the detection fails.
[0044] f. Find the smallest circumcircle and calculate its diameter, which is the pixel diameter of the iris (irisvalue).
[0045] The specific steps for measuring four lights are as follows:
[0046] a. Perform grayscale processing on the image;
[0047] b. Perform binarization on the image;
[0048] c. Perform contour searching on the binarized image, identifying the locations of the four white lights; selection criteria are as follows:
[0049] ① The outline size is an outline index value within the range of 15-200;
[0050] ② The x-coordinate of the center point of the smallest bounding rectangle of the outline satisfies: 800 > x > 300 and |x - x1| < 110, where x1 is the x-coordinate of the center of the iris;
[0051] ③ The ordinate y of the center point of the smallest bounding rectangle of the outline satisfies: 800>y>300 and |y-y1|<110, where y1 is the ordinate of the center of the iris.
[0052] d. Calculate the average value of the relative positions of the four white lights;
[0053] If the search meets all three of the above conditions and the number of results is exactly four, the search is successful; otherwise, the search fails.
[0054] Preferably, in step 5, the iris diameter is determined by the relative positions of the white lights. Once the iris value (iris value) and the average value (average value) of the relative positions of the four white lights are detected, the true iris diameter is calculated as follows:
[0055]
[0056] Where realvalue is a fixed value representing the calibrated positional relationship of the white lights.
[0057] In summary, this invention offers at least one of the following advantages: This invention utilizes LED white lights projected onto the iris surface to calibrate iris size. When acquiring iris images, the iris is first placed in the center of the image, four LED white lights are turned on and projected onto the center of the iris, and then the eye measurement position is calibrated. The relative positional relationship of the four white lights is compared in real-time with a pre-set threshold; if the relative position is less than the threshold, an image is captured. Image processing is then applied to detect the position and pixel size of the iris and the four white lights, and the calibration result is determined based on the positional relationship of the white lights. This invention provides a dry eye iris detection method based on image processing. Compared to traditional digital image processing methods, this method is more robust to lighting conditions, noise, and distortion, resulting in more accurate detection and improved detection efficiency. Attached Figure Description
[0058] Figure 1 This is a flowchart of the iris detection process of the present invention;
[0059] Figure 2 This is a diagram showing the clarity detection of the four lights in this invention;
[0060] Figure 4 This is an iris detection diagram of the present invention;
[0061] Figure 5 This is a white light detection diagram of the present invention;
[0062] Figure 6 This is an image showing the iris detection results of the present invention. Detailed Implementation
[0063] The following is in conjunction with the appendix Figure 1-6 The present invention will be described in further detail below.
[0064] One embodiment provided by the present invention: as follows Figure 1 As shown, a dry eye iris detection method based on image processing includes the following detection steps:
[0065] Step 1: During the process of acquiring the iris projection image of the human eye, turn on four supplementary white lights and project them onto the iris surface; the four supplementary white lights used for iris projection are spaced 90 degrees apart and evenly distributed in 360 degrees, with the intensity of the white light adjusted to a comfortable range acceptable to the human eye.
[0066] Step 2: During the acquisition process, keep the four points projected onto the iris within the defined green circle, and detect and calculate the relative positional relationship of the four points in real time.
[0067] When acquiring iris images, a circle with a size of 200 pixels is pre-drawn in the center of the interface to ensure that the images of the four projected white LEDs are within the circle. Then, the image is segmented into regions of interest, and the smallest tangent rectangle of the circle is extracted. The relative positional relationship of the four white LEDs within this region is calculated in real time. The specific steps are as follows:
[0068] a. First, perform grayscale value processing on the region of interest to convert the color 3D image into a grayscale 1D image.
[0069] b. Perform binarization thresholding. Since the white light projection on the iris has a relatively large grayscale value, set the threshold to 250.
[0070] c. Perform contour searching on the binarized image, searching for the contour size and position of the four white lights. Select contour index values in the range of 20-100 for the four white light contour values respectively. If the number of contours that meet the search conditions is exactly four, the search is correct; otherwise, the search has detected four white lights, and the search and detection are repeated.
[0071] d. After finding the outlines of four white lights, calculate the outline coordinates of the point center in the middle of the four lights. The formulas for its horizontal and vertical coordinates are as follows:
[0072] center x =(P1) x +P2 x +P3 x +P4 x ) / 4 (1)
[0073] center y =(P1) y +P2 y +P3 y +P4 y ) / 4 (2)
[0074] Among them, P1, P2, P3, and P4 are the real-time detection coordinates of the four points.
[0075] e. Then calculate the distances from each of the four white lights to the center, denoted by d1, d2, d3, and d4 respectively. The specific formulas are as follows:
[0076]
[0077]
[0078]
[0079]
[0080] f. Finally, calculate the average value (avgvalue) of d1, d2, d3, and d4 using the following formula:
[0081] avgvalue=(d1+d2+d3+d4) / 4 (7)
[0082] This formula is compared with a set threshold value. If the average value is less than the set threshold value, an iris image is captured. Detection is as follows: Figure 3 As shown.
[0083] Step 3: Before comparing the threshold, first determine whether the four white light projection images of the image are within the set clear range. When they are within the clear range, then determine whether the relative positional relationship of the four points is less than the preset threshold. When it is less than the preset threshold, the iris image is acquired.
[0084] Before comparing thresholds, it is first determined whether the four white light projection images of the image reach the set sharpness range. This paper uses variance, a probability theory method to measure the degree of dispersion (deviation) between a set of discrete data and its expected value (i.e., the data mean). The larger the variance, the greater the deviation between the data in this set; some data within the set are larger, and some are smaller, indicating an uneven distribution. The smaller the variance, the smaller the deviation between the data in this set; the data within the set are more evenly distributed and of similar magnitude.
[0085] A sharp image, compared to a blurry image, should have a greater difference in grayscale values, meaning its variance should be larger. The sharpness of an image can be measured by the variance of its grayscale data; the larger the variance, the better the sharpness. The specific steps are as follows:
[0086] a. First, perform grayscale value processing on the region of interest to convert the color 3D image into a grayscale 1D image.
[0087] b. To calculate the standard deviation of grayscale values, first calculate the mean u, using the following formula:
[0088]
[0089] In the formula, m and n represent the image row and column, respectively, and f(x,y) represents the pixel gray value at position (x,y) in the image. Then, the standard deviation (SD) is calculated, primarily reflecting the dispersion of the image gray values relative to the gray mean. The expression is as follows:
[0090]
[0091] When the SD value is less than the set threshold, it means that the projected images of the four lights are in sharp focus.
[0092] Step 4: Next, image processing techniques are applied to extract the iris position and the positions of the four LED projection lights from the acquired image. The iris and the four white lights are measured separately. Iris detection is as follows: Figure 4 As shown, the white light detection is as follows: Figure 5 As shown.
[0093] The specific steps for iris measurement are as follows:
[0094] a. Perform grayscale processing on the image.
[0095] b. Take the threshold yizhi1 = h / 2.1, where h is the height pixel value of the image. When the height value of the image is less than yizhi1, the pixel value is set to 255 to eliminate the interference of eyelashes.
[0096] c. Perform binarization on the image.
[0097] d. Perform an opening operation to remove small areas.
[0098] e. Perform contour searching on the binarized image to locate the iris. Select contour index values within the range of 1000-3500 for the iris contour value. If the number of matching contours is exactly one, the search is successful; otherwise, the detection fails.
[0099] f. Find the smallest circumcircle and calculate its diameter, which is the pixel diameter of the iris (irisvalue).
[0100] The specific steps for measuring four lights are as follows:
[0101] a. Perform grayscale processing on the image.
[0102] b. Perform binarization on the image.
[0103] c. Perform contour searching on the binarized image, identifying the locations of the four white lights. The selection criteria are as follows:
[0104] ① The outline size is an outline index value within the range of 15-200.
[0105] ② The x-coordinate of the center point of the smallest bounding rectangle of the outline satisfies: 800 > x > 300 and |x - x1| < 110 (where x1 is the x-coordinate of the center of the iris).
[0106] ③ The ordinate y of the center point of the smallest bounding rectangle of the outline satisfies: 800>y>300 and |y-y1|<110 (where y1 is the ordinate of the center of the iris).
[0107] d. Calculate the avgvalue of the relative positions of the four white lights.
[0108] If the search meets all three of the above conditions and the number of results is exactly four, the search is successful; otherwise, the search fails.
[0109] Step 5: Finally, the iris diameter is determined by the relative positions and sizes of the white lights. The test results are as follows: Figure 6 As shown, when the iris value (iris diameter) and the average value (avg value) of the relative positions of the four white lights are detected, the true iris diameter is calculated as follows:
[0110]
[0111] Where realvalue is a fixed value representing the calibrated positional relationship of the white lights.
[0112] All descriptions presented above represent the basic principles, main features, and advantages of this invention. This invention is not limited to the above embodiments; the descriptions of the embodiments in the foregoing specification are merely preferred examples of the invention, providing a clearer illustration of its specific content, and are not intended to limit the invention. Without departing from the principles and scope of this invention, subsequent changes and modifications may be made, all of which should be included within the scope of this invention. The scope of protection claimed in this application is defined by the appended claims and their equivalents.
Claims
1. A dry eye iris detection method based on image processing, characterized in that: The following testing steps are included: Step 1: During the process of acquiring the iris projection image of the human eye, turn on four supplementary white lights to project the white lights onto the iris surface; Step 2: During the data acquisition process, keep the four points projected onto the iris within the defined green circle, and continuously monitor and calculate the relative positional relationship of the four points. Step 3: Before comparing the threshold, first determine whether the four white light projection images of the image are within the set clear range. When they are within the clear range, then determine whether the relative positional relationship of the four points is less than the threshold value set by the preset value. When it is less than the preset threshold, the iris image is acquired. Step 4: Then, image processing technology is applied to extract the iris position and the positions of the four LED projection white lights from the acquired image; Step 5: Finally, determine the iris diameter by observing the relative positions and sizes of the white lights; When the iris diameter is detected The relative positions of the four white lights The actual iris diameter is calculated as follows: (10) in The positional relationship of the white lights is a fixed value for calibration.
2. The dry eye iris detection method based on image processing according to claim 1, characterized in that: In step 1, the four supplementary white lights used for iris projection are spaced 90 degrees apart and evenly distributed in 360 degrees, with the intensity of the white light adjusted to a comfortable range acceptable to the human eye.
3. The dry eye iris detection method based on image processing according to claim 1, characterized in that: In step 2, when acquiring the iris image, a circle with a size of 200 pixels is pre-drawn in the center of the interface to ensure that the images of the four projected white LEDs are within the circle. Then, the image is segmented into regions of interest, and the smallest tangent rectangle of the circle is extracted. The relative positional relationship of the four white LEDs within this region is calculated in real time. The specific steps are as follows: a. First, process the region of interest with grayscale values to convert the color 3D image into a grayscale 1D image; b. Perform binarization thresholding. Since the white light projection on the iris has a relatively large grayscale value, set the threshold to 250. c. Perform contour searching on the binarized image, searching for the contour size and position of the four white lights; select contour index values in the range of 20-100 for the four white light contour values respectively. When the number of contours that meet the search conditions is exactly four, the search is correct; otherwise, the search has detected four white lights, and then the search and detection is repeated. d. After finding the outlines of four white lights, calculate the outline coordinates of the point center in the middle of the four lights. The formulas for its horizontal and vertical coordinates are as follows: (1) (2) Wherein, P1, P2, P3, and P4 are the real-time detection coordinates of the four points; e. Then calculate the distance from each of the four white lights to the center, using... , , , This will be represented by the following formula: (3) (4) (5) (6) f. Final calculation , , , average The formula is as follows: (7) Use this formula and the set threshold When comparing, Smaller than the set value If the value is positive, then an iris image will be captured.
4. The dry eye iris detection method based on image processing according to claim 1, characterized in that: In step 3, before comparing the threshold, it is first determined whether the four white light projection images of the image have reached the set clear range. This paper uses variance, which is a probability theory method to examine the degree of dispersion between a set of discrete data and the expectation. The larger the variance, the greater the deviation between the data in this group; some data in the group are larger and some are smaller, indicating an uneven distribution. The smaller the variance, the smaller the deviation between the data in this group, and the more evenly distributed and similar the data are within the group. Compared to a blurry image, a sharp image should have a greater difference in grayscale values, meaning it should have a larger variance. The sharpness of an image can be measured by the variance of its grayscale data; the larger the variance, the better the sharpness. The specific steps are as follows: a. First, process the region of interest with grayscale values to convert the color 3D image into a grayscale 1D image; b. Calculate the standard deviation of the grayscale values, first calculating their mean. The formula is as follows: (8) In the formula, m and n represent the image row and column, respectively, and f(x,y) represents the pixel gray value at position (x,y) in the image. Then, the standard deviation SD is calculated, which mainly reflects the dispersion of the image gray values relative to the gray mean. The expression is as follows: (9) When the SD value is less than the set threshold, it means that the projected images of the four lights are in sharp focus.
5. The dry eye iris detection method based on image processing according to claim 1, characterized in that: In step 4, image processing technology is used to extract the iris position and the positions of the four LED projection white lights from the acquired image. The iris and the four white lights are measured separately. The specific steps for iris measurement are as follows: a. Perform grayscale processing on the image; b. Take the threshold yizhi1=h / 2.1, where h is the height pixel value of the image. When the height value of the image is less than yizhi1, the pixel value is set to 255 to eliminate the interference of eyelashes. c. Perform binarization on the image; d. Perform an opening operation to remove small areas; e. Perform contour finding on the binarized image to search for the iris location; select contour index values with a contour size in the range of 1000-3500 as the iris contour value. If the number of contours that meet the search conditions is exactly 1, the search is correct; otherwise, the detection fails. f. Find the smallest circumcircle and calculate its diameter, which is the pixel diameter of the iris. ; The specific steps for measuring four lights are as follows: a. Perform grayscale processing on the image; b. Perform binarization on the image; c. Perform contour searching on the binarized image, identifying the locations of the four white lights; selection criteria are as follows: ① The outline size is an outline index value within the range of 15-200; ② The x-coordinate of the center point of the smallest bounding rectangle of the outline satisfies: 800 > x > 300 and |x - x1| < 110, where x1 is the x-coordinate of the center of the iris; ③ The ordinate y of the center point of the smallest bounding rectangle of the outline satisfies: 800>y>300 and |y-y1|<110, where y1 is the ordinate of the iris center; d. Calculate the relative positions of the four white lights. ; If the search meets all three of the above conditions and the number of results is exactly four, the search is successful; otherwise, the search fails.
Citation Information
Patent Citations
Iris recognizing preprocessing method based on grey level information
CN101201893A
Iris positioning method based on Maximum between-Cluster Variance and gray scale information
CN101359365A