Iris positioning method and computer readable storage medium

By performing pixel clustering and Hough transformation on the human eye detection area and combining clustering areas, the problem of insufficient robustness of the existing iris positioning method is solved, the detection accuracy and efficiency are improved, and the integrity of iris positioning is ensured. and accuracy.

CN111144413BActive Publication Date: 2024-12-13FUJIAN TQ DIGITAL
3 Cites 0 Cited by

Patent Information

Application Number
CN201911396394.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-12-30
Publication Date
2024-12-13
Estimated Expiration
2039-12-30

Smart Images

  • Figure CN111144413B_ABST
    Figure CN111144413B_ABST
Patent Text Reader

Abstract

The present invention discloses an iris positioning method and a computer-readable storage medium, the method comprising: acquiring an infrared image, the infrared image comprising a human face or a human eye; performing human eye detection on the infrared image to obtain a human eye detection area; performing pixel clustering on the human eye detection area according to a preset number of clusters to obtain a clustering graph; performing Hough transform on the clustering graph according to a preset first radius range and a preset second radius range to obtain a first circle and a second circle; determining an annular area according to the first circle and the second circle; merging clustering areas with the largest number of pixels in the annular area before N to obtain a clustering merged area, wherein N is a preset number; obtaining an iris area according to the human eye detection area and the clustering merged area. The present invention improves the efficiency of the Hough transform on the basis of ensuring the accuracy of the Hough transform, and enhances the robustness of the iris positioning algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to an iris positioning method and a computer-readable storage medium. Background Art

[0002] Iris recognition is an identity authentication technology that uses biological features and has been used in some scenarios with high security requirements, such as safes, unlocking high-end mobile phones, etc. Iris recognition technology is generally divided into four steps: iris positioning, iris normalization, iris feature extraction, and feature matching.

[0003] Among them, the mainstream algorithm for iris positioning uses two Hough transforms for circle detection, and detects the outer edge of the iris (the boundary between the iris and the white of the eye) and the inner edge of the iris (the boundary between the iris and the pupil) in turn. However, it is time-consuming to directly perform Hough transform on the iris image, and the detected circle may not completely fit the boundary of the iris (the iris texture sometimes presents a dotted dotted circle, which is mistakenly detected as the iris boundary).

[0004] Researchers have proposed some improvements to this problem, such as image smoothing to reduce the influence of iris texture, performing edge detection first to accelerate the solution, etc. However, the robustness of these improved iris positioning methods is often not very good, especially the edge detection operation, which often causes false detection of circles (refer to OpenCV's Hough transform, which can only accurately detect circles when they are relatively regular). Summary of the invention

[0005] The technical problem to be solved by the present invention is to provide an iris positioning method and a computer-readable storage medium, which improve the effect of iris positioning and enhance the robustness.

[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is: a method for iris positioning, comprising:

[0007] Acquire an infrared image, wherein the infrared image includes a human face or a human eye;

[0008] Performing human eye detection on the infrared image to obtain a human eye detection area;

[0009] According to a preset number of clusters, pixel clustering is performed on the human eye detection area to obtain a clustering graph;

[0010] According to a preset first radius range and a preset second radius range, respectively, the clustering graph is subjected to Hough transformation to obtain a first circle and a second circle;

[0011] Determine an annular area based on the first circle and the second circle;

[0012] Merge the cluster regions with the largest number of pixels in the annular region to obtain a cluster merged region, where N is a preset number;

[0013] An iris region is obtained according to the human eye detection region and the clustering merging region.

[0014] The present invention also relates to a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps described above are implemented.

[0015] The beneficial effects of the present invention are: by first clustering pixels in the human eye detection area, and then performing Hough transform on the clustering graph to detect the outer edge and inner edge of the iris, the detection accuracy and efficiency of the Hough transform can be improved; by merging the clustering area between the inner and outer edges of the iris, the influence of external illumination can be eliminated to obtain a complete iris area. Based on the Hough transform circular detection, the present invention introduces a clustering algorithm, which effectively improves the detection effect and efficiency of the subsequent Hough transform and enhances the robustness of the iris positioning algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 is a flow chart of an iris positioning method of the present invention;

[0017] Figure 2 This is a flow chart of a method according to Embodiment 1 of the present invention;

[0018] Figure 3 is a schematic diagram of an infrared image according to the first embodiment of the present invention;

[0019] Figure 4 For Figure 3 Performing human eye detection to obtain a human eye detection area;

[0020] Figure 5 For Figure 4 The human eye detection area image is obtained by normalizing the human eye detection area;

[0021] Figure 6 This is a clustering diagram after the first Hough transform in the first embodiment of the present invention;

[0022] Figure 7 This is a clustering diagram after the second Hough transform in the first embodiment of the present invention;

[0023] Figure 8 This is a schematic diagram of cluster regions after merging in Embodiment 1 of the present invention;

[0024] Fig. 9 for Figure 8 The mask image obtained after binarization processing;

[0025] Fig.10 for Figure 5 and Fig. 9 The iris map obtained after dot product. DETAILED DESCRIPTION

[0026] In order to explain the technical content, achieved objectives and effects of the present invention in detail, the following is a detailed description in conjunction with the implementation methods and the accompanying drawings.

[0027] The key concept of the present invention is to first cluster pixels in the human eye detection area, then detect the outer edge and the inner edge of the iris through two Hough transforms, and then merge the clustered areas to obtain a complete iris area.

[0028] See also Figure 1 , a method for iris positioning, comprising:

[0029] Acquire an infrared image, wherein the infrared image includes a human face or a human eye;

[0030] Performing human eye detection on the infrared image to obtain a human eye detection area;

[0031] According to a preset number of clusters, pixel clustering is performed on the human eye detection area to obtain a clustering graph;

[0032] According to a preset first radius range and a preset second radius range, respectively, the clustering graph is subjected to Hough transformation to obtain a first circle and a second circle;

[0033] Determine an annular area based on the first circle and the second circle;

[0034] Merge the cluster regions with the largest number of pixels in the annular region to obtain a cluster merged region, where N is a preset number;

[0035] An iris region is obtained according to the human eye detection region and the clustering merging region.

[0036] It can be seen from the above description that the beneficial effect of the present invention is that the robustness of iris positioning is improved on the basis of ensuring the detection accuracy of Hough transform.

[0037] Furthermore, the clustering graph is subjected to Hough transformation according to the preset first radius range and the second radius range respectively, and the first circle and the second circle are obtained as follows:

[0038] According to a preset first radius range, performing Hough transform on the cluster graph to obtain a first circle;

[0039] According to a preset second radius range, a Hough transform is performed on the clustering graph to obtain a second circle.

[0040] From the above description, it can be seen that through two Hough transforms, the inner edge and outer edge of the iris can be obtained, thereby determining the iris area.

[0041] Furthermore, after performing Hough transformation on the clustering graph according to the preset first radius range to obtain the first circle, the method further includes:

[0042] The pixel values ​​of the pixel points outside the first circle in the clustering diagram are set to 0.

[0043] From the above description, it can be seen that by setting the pixel values ​​of the pixels outside the first circle in the clustering diagram to 0, that is, setting the pixel values ​​of the pixels in the white area to 0, the influence of the white area on the subsequent iris positioning can be eliminated.

[0044] Furthermore, after performing Hough transform on the cluster graph according to the preset second radius range to obtain the second circle, the method further includes:

[0045] The pixel values ​​of the pixel points in the second circle in the clustering diagram are set to 0.

[0046] It can be seen from the above description that by setting the pixel values ​​of the pixels in the second circle to 0, that is, setting the pixel values ​​of the pixels in the pupil area to 0, the influence of the pupil area on the subsequent iris positioning can be eliminated.

[0047] Furthermore, after performing Hough transformation on the clustering graph according to the preset first radius range to obtain the first circle, the method further includes:

[0048] Edge detection is performed on the cluster graph.

[0049] It can be seen from the above description that edge detection is performed on the cluster graph so that the edge detection does not generate false edges and can reduce the noise of the image.

[0050] Furthermore, the pixel clustering of the human eye detection area image is performed according to a preset number of clusters to obtain a clustering diagram specifically as follows:

[0051] Upsampling or downsampling the human eye detection area to obtain a human eye detection image, wherein the length of the human eye detection image is a preset length;

[0052] Performing fuzzy processing on the human eye detection image;

[0053] According to a preset number of clusters, pixel clustering is performed on the fuzzy human eye detection image to obtain a clustering graph.

[0054] From the above description, it can be seen that by normalizing the human eye detection area, the length of the scaled human eye detection image is kept consistent, which is convenient for the subsequent dot multiplication operation with the mask image; by blurring the image, the influence of noise on pixel clustering can be reduced.

[0055] Furthermore, the top N largest clusters of elements in the annular region are merged to obtain a cluster merged region map as follows:

[0056] Counting the number of pixels of each cluster in the annular area respectively;

[0057] Determine the clusters with the largest number of pixels, and merge the cluster regions of the determined clusters in the annular region to obtain a cluster merge region;

[0058] The pixel values ​​of the pixels in the clustering merge area in the clustering map are set to 1, and the pixel values ​​of other pixels are set to 0, so as to obtain a mask map.

[0059] From the above description, it can be seen that since the brightness of the human iris will vary depending on the position of the light, the pixels in the iris area may be divided into different classes when performing pixel clustering. Therefore, by performing clustering merging, the integrity of the iris area can be guaranteed; by obtaining the mask image, the interference of the eyelids and eyelashes can be removed to obtain a complete iris area map.

[0060] Furthermore, the iris region obtained according to the human eye detection region and the clustering merged region is specifically:

[0061] The human eye detection image is dot-multiplied with the mask image to obtain the iris area.

[0062] From the above description, it can be known that by performing dot multiplication between the mask image with the marked iris area and the human eye detection image, the pixel values ​​of the pixels in the iris area in the original image are restored, thereby achieving iris positioning.

[0063] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the above steps are implemented.

[0064] Embodiment 1

[0065] Please refer to Figure 2-10 , Embodiment 1 of the present invention is: an iris positioning method, which can be applied to identity authentication, such as Figure 2 As shown, the following steps are included:

[0066] S1: Acquire an infrared image, wherein the infrared image includes a face or an eye. Specifically, use an infrared camera to capture a face image or an eye image of a user. Figure 3 As shown, Figure 3 is an infrared image containing human eyes. Since the irises of Asians are mostly black and the iris texture is not clear on the RGB image, the infrared image is used to locate the iris area.

[0067] S2: Perform eye detection on the infrared image to obtain an eye detection area. Specifically, use an eye detection operator to detect the infrared image to obtain an eye detection area, wherein the eye detection operator can be obtained by extracting HOG features of a training image and combining it with SVM for feature learning and training, and the training image data is a manually labeled infrared image of the human eye. For example, Figure 4 As shown, Figure 4 The boxed part in the Figure 3 The extracted eye detection area.

[0068] Furthermore, in this step, when performing human eye detection, it is determined whether the human eye can be detected. If the human eye can be detected, step S3 is continued to be executed. If the human eye is not detected, the infrared image is reacquired, that is, step S1 is returned to be executed.

[0069] S3: Normalize the eye detection area. Specifically, upsample or downsample the eye detection area to obtain an eye detection image, the length of which is a preset length; that is, scale the eye detection area, the length of the scaled area is a fixed value W, and the scaling ratio is recorded. The scaled image can be Figure 5 shown.

[0070] Furthermore, the eye detection image is copied and blurred. Preferably, the eye detection image can be blurred by a related function in OpenCV, for example, the eye detection image is convolved with a convolution kernel to obtain a blurred image, wherein the convolution kernel can select a two-dimensional Gaussian distribution. Blurring can reduce noise and avoid false edges in subsequent edge detection.

[0071] S4: Pixel clustering of the human eye detection image is performed to obtain a clustering map. Specifically, according to the preset clustering number k, pixel clustering is performed on the blurred human eye detection image to obtain a clustering map. Preferably, the clustering number k=5, that is, all pixels in the human eye detection image are divided into 5 classes, and the pixels in each class correspond to the same pixel value. By performing pixel clustering on the blurred image, the noise of the image can be reduced, the clustering effect can be improved, and the efficiency of the subsequent Hough transform can be improved.

[0072] S5: According to the preset first radius range, perform Hough transform on the clustering graph to obtain the first circle. That is, detect the circle on the clustering graph through the first Hough transform, record the center and radius of the first circle detected, and the first circle detected is the outer edge of the iris (which may include eyelashes, eyelids and other areas). Preferably, the preset first radius range is [3W / 8, W / 2], and the W value in the range is the length preset in step S3, that is, the length value after upsampling and downsampling. For example, Figure 6 As shown, Figure 6 The image after the first Hough transform of the clustering graph is: Figure 6 The circle in the middle is the first circle.

[0073] After obtaining the first circle, further, the pixel values ​​of the pixels outside the first circle in the clustering map are set to 0. By setting the pixel values ​​of the pixels outside the first circle to 0, that is, setting the pixel values ​​of the pixels in the white area of ​​the eye to 0, the influence of the white area of ​​the eye on the subsequent iris positioning can be eliminated. And edge detection is performed on the clustering map, preferably, the Canny operator is used for detection. Edge detection is to obtain the edge of the object in the clustering map, and to avoid the generation of false edges by performing edge detection on the clustered image. Using edge detection, the inner edge of the iris in the clustering map is easier to detect.

[0074] S6: According to the preset second radius range, perform Hough transform on the cluster graph to obtain a second circle. This step is to perform the second Hough transform, and the second circle detected is the inner edge of the iris. Preferably, the second radius range is [W / 20, W / 3], and the W value in the range is the length value after upsampling and downsampling in step S3. Figure 7 As shown, Figure 7 That is the image after the second Hough transform. Figure 7 The circle with the smaller radius is the second circle.

[0075] After obtaining the second circle, further, the pixel values ​​of the pixels in the cluster map within the second circle are set to 0. By setting the pixel values ​​of the pixels in the second circle to 0, that is, setting the pixel values ​​of the pixels in the pupil area to 0, the influence of the pupil area on subsequent iris positioning can be eliminated.

[0076] S7: determining an annular area by using the first circle and the second circle, and the obtained annular area is the preliminary iris area.

[0077] S8: merging cluster regions with the largest number of pixels in the annular region to obtain a cluster merged region, where N is a preset number and N≤k.

[0078] Specifically, in this embodiment, the following steps are used to merge cluster regions:

[0079] S801: Count the number of pixel points of each cluster in the annular area respectively; that is, count the number of pixel points of each cluster in the annular area formed by the first circle and the second circle, and arrange them in ascending or descending order according to the number.

[0080] S802: According to the arrangement order of the clusters, select the cluster with the largest number of pixels before N, merge the cluster regions of the determined clusters in the annular region, and obtain a cluster merge region; preferably, N is 2, for example, from Figure 6-7 It can be seen from the figure that after pixel clustering, the iris region is divided into two connected regions, both of which occupy a relatively large area. Therefore, in this embodiment, the two cluster regions with the largest number of pixels are merged to form the iris region. Furthermore, the pixel values ​​of the pixels in the cluster merged region are set to the same pixel value. Figure 8 As shown, Figure 8 This is the image after clustering regions are merged.

[0081] S803: Set the pixel values ​​of the pixels in the clustering merge area in the clustering map to 1, and set the pixel values ​​of other pixels to 0, to obtain a mask map. By generating a mask map, the interference of eyelids and eyelashes on the image can be removed. For example, Fig. 9 As shown, Fig. 9 for Figure 8 The mask image after binarization.

[0082] S9: Obtain an iris region based on the human eye detection region and the clustering merged region. Specifically, the human eye detection image obtained by the normalization process in step S3 is dot-multiplied with the mask image obtained in step S8 to obtain the iris region. Fig.10 As shown, Fig.10 That is Figure 5 and Fig. 9 The iris map obtained after dot product.

[0083] In this embodiment, by first clustering pixels in the human eye detection area, and then performing Hough transform on the clustering graph to detect the outer edge and inner edge of the iris, the detection accuracy and efficiency of the Hough transform can be improved; further, by performing edge detection on the first circle obtained after the first Hough transform, the generation of false edges can be avoided; by merging the clustering areas between the inner and outer edges of the iris, the influence of external illumination can be eliminated to obtain a complete iris area. Based on the Hough transform circle detection, the present invention introduces a clustering algorithm, which effectively improves the detection effect and efficiency of the subsequent Hough transform and enhances the robustness of the iris positioning algorithm.

[0084] Embodiment 2

[0085] This embodiment is a computer-readable storage medium corresponding to the above embodiment, on which a computer program is stored. When the program is executed by a processor, the following steps are implemented:

[0086] Acquire an infrared image, wherein the infrared image includes a human face or a human eye;

[0087] Performing human eye detection on the infrared image to obtain a human eye detection area;

[0088] According to a preset number of clusters, pixel clustering is performed on the human eye detection area to obtain a clustering graph;

[0089] According to a preset first radius range and a preset second radius range, respectively, the clustering graph is subjected to Hough transformation to obtain a first circle and a second circle;

[0090] Determine an annular area based on the first circle and the second circle;

[0091] Merge the cluster regions with the largest number of pixels in the annular region to obtain a cluster merged region, where N is a preset number;

[0092] An iris region is obtained according to the human eye detection region and the clustering merging region.

[0093] Furthermore, the clustering graph is subjected to Hough transformation according to the preset first radius range and the second radius range respectively, and the first circle and the second circle are obtained as follows:

[0094] According to a preset first radius range, performing Hough transform on the cluster graph to obtain a first circle;

[0095] According to a preset second radius range, a Hough transform is performed on the clustering graph to obtain a second circle.

[0096] Furthermore, after performing Hough transformation on the clustering graph according to the preset first radius range to obtain the first circle, the method further includes:

[0097] The pixel values ​​of the pixel points outside the first circle in the clustering diagram are set to 0.

[0098] Furthermore, after performing Hough transform on the cluster graph according to the preset second radius range to obtain the second circle, the method further includes:

[0099] The pixel values ​​of the pixel points in the second circle in the clustering diagram are set to 0.

[0100] Furthermore, after performing Hough transformation on the clustering graph according to the preset first radius range to obtain the first circle, the method further includes:

[0101] Edge detection is performed on the cluster graph.

[0102] Furthermore, the pixel clustering of the human eye detection area image is performed according to a preset number of clusters to obtain a clustering diagram specifically as follows:

[0103] Upsampling or downsampling the human eye detection area to obtain a human eye detection image, wherein the length of the human eye detection image is a preset length;

[0104] Performing fuzzy processing on the human eye detection image;

[0105] According to a preset number of clusters, pixel clustering is performed on the fuzzy human eye detection image to obtain a clustering graph.

[0106] Furthermore, the top N largest clusters of elements in the annular region are merged to obtain a cluster merged region map as follows:

[0107] Counting the number of pixels of each cluster in the annular area respectively;

[0108] Determine the clusters with the largest number of pixels, and merge the cluster regions of the determined clusters in the annular region to obtain a cluster merge region;

[0109] The pixel values ​​of the pixels in the clustering merge area in the clustering map are set to 1, and the pixel values ​​of other pixels are set to 0, so as to obtain a mask map.

[0110] Furthermore, the iris region obtained according to the human eye detection region and the clustering merged region is specifically:

[0111] The human eye detection image is dot-multiplied with the mask image to obtain the iris area.

[0112] In summary, the iris positioning method and computer-readable storage medium provided by the present invention can improve the detection accuracy and efficiency of the Hough transform by first clustering pixels in the human eye detection area and then performing Hough transform on the clustering graph to detect the outer edge and inner edge of the iris; by merging the clustering area between the inner and outer edges of the iris, the influence of external illumination can be eliminated to obtain a complete iris area. Based on the Hough transform circular detection, the present invention introduces a clustering algorithm, which effectively improves the detection effect and efficiency of the subsequent Hough transform and enhances the robustness of the iris positioning algorithm.

[0113] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. An iris positioning method, characterized in that: include: Acquire an infrared image, wherein the infrared image includes a human face or a human eye; Performing human eye detection on the infrared image to obtain a human eye detection area; According to a preset number of clusters, pixel clustering is performed on the human eye detection area to obtain a clustering graph; According to a preset first radius range and a preset second radius range, respectively, the clustering graph is subjected to Hough transformation to obtain a first circle and a second circle; Determine an annular area based on the first circle and the second circle; Merge the cluster regions with the largest number of pixels in the annular region to obtain a cluster merged region, where N is a preset number; Obtaining an iris region according to the human eye detection region and the clustering merged region; The pixel clustering of the human eye detection area image is performed according to the preset clustering number to obtain a clustering diagram as follows: Upsampling or downsampling the human eye detection area to obtain a human eye detection image, wherein the length of the human eye detection image is a preset length; Performing fuzzy processing on the human eye detection image; According to a preset number of clusters, pixel clustering is performed on the fuzzy processed human eye detection image to obtain a clustering graph; The clustering graph is subjected to Hough transformation according to the preset first radius range and second radius range respectively, so as to obtain the first circle and the second circle as follows: According to a preset first radius range, performing Hough transform on the clustering graph to obtain a first circle; According to a preset second radius range, performing Hough transform on the clustering graph to obtain a second circle; After performing Hough transformation on the clustering graph according to the preset first radius range to obtain the first circle, the method further includes: Edge detection is performed on the cluster graph.

2. The iris positioning method according to claim 1, characterized in that: After performing Hough transformation on the clustering graph according to the preset first radius range to obtain the first circle, the method further includes: The pixel values ​​of the pixels outside the first circle in the clustering diagram are set to 0.

3. The iris positioning method according to claim 1, characterized in that: After performing Hough transformation on the cluster graph according to the preset second radius range to obtain the second circle, the method further includes: The pixel values ​​of the pixels in the second circle in the clustering diagram are set to 0.

4. The iris positioning method according to claim 1, characterized in that: The clusters with the largest N elements in the annular region are merged to obtain a cluster merged region map as follows: Counting the number of pixels of each cluster in the annular area respectively; Determine the clusters with the largest number of pixels, and merge the cluster regions of the determined clusters in the annular region to obtain a cluster merge region; The pixel values ​​of the pixels in the clustering merge area in the clustering map are set to 1, and the pixel values ​​of other pixels are set to 0, so as to obtain a mask map.

5. The iris positioning method according to claim 4, characterized in that: The iris region obtained according to the human eye detection region and the clustering merged region is specifically: The human eye detection image is dot-multiplied with the mask image to obtain an iris area.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Iris location method

    CN102521576A

  • Human iris image segmentation method

    CN103632137A

  • Method of segmentation and annotation of images

    CN110276343A