Iris positioning method, device, equipment and storage medium

By combining grayscale histogram and binarization with the Viterbi algorithm, the edge points and center of the iris are calculated to generate an iris mask, which solves the problems of low efficiency and poor accuracy of iris localization and achieves fast iris localization that is not easily affected by noise.

CN115984538BActive Publication Date: 2026-03-31BEIJING INST OF RADIO METROLOGY & MEASUREMENT
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-16
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing iris localization methods suffer from low efficiency and inaccurate positioning, especially when faced with factors such as eyelashes, reflections, and occlusions, making it difficult to accurately locate the iris boundary.

Method used

The pupil threshold is calculated using grayscale histograms, the pupil gradient image is obtained through binarization, the iris image is calculated by combining the pupil center and radius, the iris edge points and center are determined using the Viterbi algorithm, the mean and variance of the iris safe area are calculated, and finally the iris mask is generated by XOR operation.

Benefits of technology

It improves the efficiency and accuracy of iris localization, reduces noise interference, and achieves fast and accurate iris localization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115984538B_ABST
    Figure CN115984538B_ABST
Patent Text Reader

Abstract

The application discloses an iris positioning method, device and equipment and a storage medium. The method comprises the following steps: acquiring an iris image, wherein the iris image contains an iris to be positioned and a pupil; calculating a gray histogram of the iris image; calculating a pupil threshold of the pupil by using the gray histogram; performing a binary processing on the iris image based on the pupil threshold to obtain a pupil gradient image; calculating the iris image according to a pupil center and a pupil radius on the pupil gradient image; calculating iris edge points, an iris center and an iris radius of the iris image according to an optimal path of the iris image; determining an iris safe area according to the iris edge points, the iris center and the iris radius; calculating a mean value and a variance of the iris safe area to obtain an iris noise mask; and performing an exclusive or calculation on the iris noise mask and a ring mask to obtain an iris mask. The application can quickly position the iris and is not easily affected by noise, improves the positioning efficiency and positioning accuracy of the iris, and has wide applicability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet technology, and in particular to an iris positioning method, device, equipment and storage medium. Background Technology

[0002] With the development of information technology, biometric technology has been increasingly widely used in various fields of life. Compared with biometric technologies such as fingerprint recognition and facial recognition, iris recognition technology has higher reliability and stability. Iris has more feature points than fingerprints and faces, which can achieve a very high recognition rate. Moreover, iris features are almost unchanged for life after they mature, and the stability is relatively high.

[0003] The iris is the ring-shaped area between the pupil and sclera in the human eye. The main steps of iris recognition include iris acquisition, iris localization, iris normalization, iris encoding, and iris recognition. Among these, iris localization refers to locating the inner and outer boundaries of the iris ring-shaped area. The inner boundary is the boundary between the iris and the pupil, and the outer boundary is the boundary between the iris and the sclera. Based on this, an iris mask image is generated. In the iris mask image, the white area represents the iris area, and the black area represents the non-iris area. Subsequent iris normalization, iris encoding, and iris recognition are all based on the iris area. Therefore, iris localization is a key step in the iris recognition process.

[0004] Iris localization methods in related technologies typically employ differential difference methods and Hough transform methods. Differential difference methods locate the iris through circular difference operations, searching for the maximum difference within a parameter range that generally corresponds to the pupil and iris boundaries. Hough transform methods use gradient-based edge detection algorithms to detect iris edge points, and then perform a Hough transform based on these edge points to locate the iris. However, these iris localization methods suffer from significant time consumption due to their large parameter spaces, and are easily affected by factors such as eyelashes, reflections, and occlusions, leading to low iris localization efficiency and inaccurate iris localization. Summary of the Invention

[0005] This application proposes an iris localization method, apparatus, device, and storage medium to solve the problems of low efficiency and inaccuracy in iris localization.

[0006] This application provides an iris localization method, which adopts the following technical solution:

[0007] Acquire an iris image, wherein the iris image contains the iris and pupil to be located;

[0008] Calculate the grayscale histogram of the iris image;

[0009] The pupil threshold of the pupil is calculated using the grayscale histogram;

[0010] The iris image is binarized based on the pupil threshold to obtain a pupil gradient image.

[0011] Calculate the iris image based on the pupil center and pupil radius on the pupil gradient image;

[0012] Based on the optimal path of the iris image, calculate the iris edge point, iris center, and iris radius of the iris image;

[0013] The iris safety zone is determined based on the iris edge point, iris center, and iris radius.

[0014] Calculate the mean and variance of the iris security region to obtain the iris noise mask;

[0015] The iris noise mask and the ring mask are XORed to obtain the iris mask.

[0016] In some embodiments, calculating the pupil threshold using the grayscale histogram includes:

[0017] Calculate the moving average of the grayscale histogram;

[0018] Shift the moving average value one position to the left to obtain the left-shifted value;

[0019] The gradient of the grayscale histogram is obtained by subtracting the corresponding position of the moving average value and the left shift value.

[0020] The pupil threshold is determined based on the gray value of the first peak of the gradient.

[0021] In some embodiments, the iris image is binarized based on the pupil threshold to obtain a pupil gradient image, including:

[0022] The iris image is binarized based on the pupil threshold to obtain a pupil image, wherein the white pixels in the pupil image represent pupil pixels;

[0023] The light spot on the pupil image is filled to obtain a light spot filled image;

[0024] The image filled with light spots is inverted to obtain an inverted image;

[0025] Using any black pixel in the inverted image as a seed point, traverse the black pixels near the seed point and fill the black pixels with white to obtain the inverted filled image;

[0026] The inverted fill image is inverted and ORed with the pupil image to obtain the pupil fill image;

[0027] Calculate the first gradient distribution map of the pupil filling image in the horizontal direction, and calculate the second gradient distribution map of the pupil filling image in the vertical direction;

[0028] The first gradient distribution map and the second gradient distribution map are weighted and calculated to obtain the pupil gradient image.

[0029] In some embodiments, calculating the iris image based on the pupil center and pupil radius on the pupil gradient image includes:

[0030] A ring-shaped region containing the iris boundary is defined based on the pupil center and pupil radius;

[0031] The annular region is stretched into a rectangular region to obtain the iris image, wherein the horizontal coordinate of the iris image represents the angle of the annular region, and the vertical coordinate of the iris image represents the distance from the annular region to the center of the pupil.

[0032] The iris image is Gaussian smoothed using a two-dimensional Gaussian distribution function to remove Gaussian noise. The formula for the two-dimensional Gaussian distribution function is as follows:

[0033]

[0034] Where (x,y) represents any two-dimensional coordinate in the iris image, and σ represents the standard deviation of the distribution.

[0035] In some embodiments, calculating the iris edge points, iris center, and iris radius of the iris image based on the optimal path of the iris image includes:

[0036] The optimal path for the iris image is calculated based on the Viterbi algorithm;

[0037] The pixels on the optimal path are obtained as the iris edge points;

[0038] For any pixel (d, a) in the iris image i The gradient formula for this pixel is expressed as:

[0039]

[0040] Where i = 1, 2, ..., N, i represents the width of the gradient image Gr of the iris image; the gradient image Gr is calculated in the vertical direction of the iris image using the Sobel operator; Gr(d, a i ) represents the pixel (d, a) in the gradient image Gr. i The pixel value at ()

[0041] The gradient accumulation matrix m is constructed by accumulating column by column. i (d):

[0042]

[0043] The cumulative matrix m is compared column by column from right to left. i (d) Perform backtracking, using the optimal value P of the current column. i Select the optimal value P from the previous column. i-1 :

[0044]

[0045] Multiple corresponding radii d and angles α are calculated, where the radius d and angle α represent the first polar coordinates of the iris edge point in the first coordinate system of the rectangular region.

[0046] The first polar coordinates of the iris edge point in the first coordinate system of the rectangular region are converted to the second polar coordinates of the iris edge point in the second coordinate system of the corresponding annular region;

[0047] Construct the corresponding circle using the second polar coordinates of the iris edge point in the second coordinate system of the corresponding annular region;

[0048] The iris center is obtained from the center of the circle, and the iris radius is obtained from the radius of the circle.

[0049] In some embodiments, the mean and variance of the iris safe region are calculated to obtain an iris noise mask, including:

[0050] The annular mask is calculated based on the pupil center and pupil radius, as well as the iris center and iris radius.

[0051] Based on the ring mask, the iris region corresponding to the width from the center of the pupil to the lower edge of the pupil is taken from the iris image as the iris safe region;

[0052] Calculate the average and variance of the grayscale values ​​of the iris pixels in the iris security area;

[0053] The formula for calculating the iris noise mask based on the mean and variance is as follows:

[0054]

[0055] Among them, Mn k and I k The values ​​represent the iris noise mask Mn and the pixel values ​​at position P in the iris image I; avg represents the average value; and d represents the variance.

[0056] In some embodiments, the pupil center and pupil radius are calculated as follows:

[0057] Obtain all edge pixels of the pupil gradient image;

[0058] For each edge pixel, two predicted pupil centers are calculated based on the edge pixel's coordinates on the x and y axes and the predicted radius. The candidate triplet for the two predicted pupil centers is (C1). x C1 y ,r) and (C2 x C2 y ,r):

[0059]

[0060]

[0061]

[0062]

[0063] Where x represents the coordinate value of the edge pixel on the x-axis of the pupil gradient image; y represents the coordinate value of the edge pixel on the y-axis of the pupil gradient image; and r represents the preset radius.

[0064] Calculate the number of overlapping pixels between the circle corresponding to each candidate triplet and the pupil gradient image to obtain the weight of each candidate triplet;

[0065] The predicted radius is traversed, and the pupil center and pupil radius are obtained based on the candidate triple with the largest weight.

[0066] This application also provides an iris positioning device, including:

[0067] The acquisition unit is configured to acquire an iris image, wherein the iris image includes the iris and pupil to be located;

[0068] The first computing unit is configured to calculate the grayscale histogram of the iris image;

[0069] The second calculation unit is configured to calculate the pupil threshold of the pupil using the grayscale histogram;

[0070] The processing unit is configured to perform binarization processing on the iris image based on the pupil threshold to obtain a pupil gradient image;

[0071] The third calculation unit is configured to calculate the iris image based on the pupil center and pupil radius on the pupil gradient image;

[0072] The fourth calculation unit is configured to calculate the iris edge point, iris center, and iris radius of the iris image based on the optimal path of the iris image.

[0073] The fifth calculation unit is configured to determine the iris safety zone based on the iris edge point, iris center, and iris radius;

[0074] The sixth calculation unit is configured to calculate the mean and variance of the iris security region to obtain the iris noise mask;

[0075] The seventh calculation unit is configured to perform an XOR operation on the iris noise mask and the ring mask to obtain the iris mask.

[0076] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the iris localization method described above.

[0077] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the iris localization method described above.

[0078] The embodiments of this application adopt the following technical solutions:

[0079] Acquire an iris image, which contains the iris and pupil to be located; calculate the grayscale histogram of the iris image; calculate the pupil threshold using the grayscale histogram; binarize the iris image based on the pupil threshold to obtain a pupil gradient image; calculate the iris image based on the pupil center and pupil radius on the pupil gradient image; calculate the iris edge points, iris center, and iris radius based on the optimal path of the iris image; determine the iris safe region based on the iris edge points, iris center, and iris radius; calculate the mean and variance of the iris safe region to obtain the iris noise mask; XOR the iris noise mask with the ring mask to obtain the iris mask.

[0080] The above-described technical solutions adopted in the embodiments of this application can achieve the following beneficial effects:

[0081] It can quickly locate the iris and is not easily affected by noise, improving the efficiency and accuracy of iris positioning, and has wide applicability. Attached Figure Description

[0082] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0083] Figure 1 A flowchart illustrating an iris localization method provided in an embodiment of this application;

[0084] Figure 2 This is a schematic diagram of the structure of an iris positioning device provided in an embodiment of this application;

[0085] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0086] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0087] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.

[0088] Example 1

[0089] like Figure 1 As shown in the figure, this application provides an iris localization method, including the following steps:

[0090] S101. Obtain an iris image, wherein the iris image contains the iris and pupil to be located.

[0091] Optionally, since iris images are generally large in size, directly using iris images for calculation takes a long time. Therefore, iris images can be preprocessed, for example, by scaling the iris image. The scaling factor can be 0.5, and users can set it according to their actual needs. This application embodiment does not limit this.

[0092] S102. Calculate the grayscale histogram of the iris image.

[0093] S103. Calculate the pupil threshold using the grayscale histogram.

[0094] S104. Binarize the iris image based on the pupil threshold to obtain the pupil gradient image.

[0095] White pixels in the pupil gradient image represent pixels at the edge of the pupil.

[0096] S105. Calculate the iris image based on the pupil center and pupil radius on the pupil gradient image.

[0097] S106. Based on the optimal path of the iris image, calculate the iris edge points, iris center, and iris radius of the iris image.

[0098] S107. Determine the safe zone of the iris based on the iris edge point, the iris center, and the iris radius.

[0099] S108. Calculate the mean and variance of the iris safe zone to obtain the iris noise mask.

[0100] S109. Perform an XOR operation between the iris noise mask and the ring mask to obtain the iris mask.

[0101] The embodiments of this application can quickly locate the iris and are not easily affected by noise, thereby improving the efficiency and accuracy of iris positioning and having wide applicability.

[0102] In some embodiments, step S103, calculating the pupil threshold using a grayscale histogram, includes:

[0103] Calculate the moving average of the grayscale histogram;

[0104] Shift the moving average one position to the left to obtain the left-shifted value;

[0105] The gradient of the grayscale histogram is obtained by subtracting the corresponding positions of the moving average and the left shift value.

[0106] The pupil threshold is determined based on the gray value of the first peak of the gradient.

[0107] Optionally, calculating the moving average of the grayscale histogram can eliminate some of the impact of sharp noise on subsequent calculations.

[0108] In some embodiments, step S104, binarizing the iris image based on a pupil threshold to obtain a pupil gradient image, includes:

[0109] The iris image is binarized based on the pupil threshold to obtain the pupil image, where the white pixels in the pupil image represent the pupil pixels;

[0110] Fill the light spot on the pupil image to obtain a light spot filled image;

[0111] Invert the image filled with light spots to obtain the inverted image;

[0112] Take any black pixel in the inverted image as the seed point, traverse the black pixels near the seed point, and fill the black pixels with white to obtain the inverted and filled image.

[0113] Invert the filled image and perform an OR operation with the pupil image to obtain the pupil filled image;

[0114] Calculate the first gradient distribution map of the pupil filling image in the horizontal direction, and calculate the second gradient distribution map of the pupil filling image in the vertical direction;

[0115] The pupil gradient image is obtained by weighting the first gradient distribution map and the second gradient distribution map.

[0116] Optionally, since iris image acquisition devices are generally equipped with an illumination device, the resulting iris image will contain reflected light spots, which will affect the subsequent gradient calculation. Therefore, a flooding method is used to fill the light spots on the pupil image.

[0117] Optionally, black pixels near the seed point are filled with white until all black pixels within the enclosed area are filled with white, resulting in an inverted filled image.

[0118] Optionally, the Sobel operator is used to calculate the first gradient distribution map Gh and the second gradient distribution map Gv of the pupil filling image in the horizontal and vertical directions. The Sobel operator can be set to a value of 3. The first gradient distribution map Gh and the second gradient distribution map Gv are weighted and mixed to obtain the complete pupil gradient image Gp. For each pupil edge pixel (x, y) in the pupil gradient image Gp, its direction θ relative to the center of the circle can be expressed as:

[0119] In some embodiments, step S105, calculating the iris image based on the pupil center and pupil radius on the pupil gradient image, includes:

[0120] A ring-shaped region containing the iris boundary is defined based on the pupil's center and radius.

[0121] The annular region is stretched into a rectangular region to obtain the iris image, where the horizontal axis of the iris image represents the angle of the annular region, and the vertical axis of the iris image represents the distance from the annular region to the center of the pupil.

[0122] A two-dimensional Gaussian distribution function is used to perform Gaussian smoothing on the iris image to remove Gaussian noise. The formula for the two-dimensional Gaussian distribution function is as follows:

[0123]

[0124] Where (x,y) represents any two-dimensional coordinate in the iris image, and σ represents the standard deviation of the distribution. For example, σ can take the value 1.

[0125] Optionally, the range of the annular region can be 1.4 to 3.5 times the pupil radius. It should be noted that the range of the annular region can be set according to actual needs, and this embodiment does not limit this. Based on the characteristics of general iris images, this range of the annular region can basically cover the iris boundary.

[0126] Optionally, Gaussian smoothing defines weights based on the distance between pixels and the pupil center. The weights are calculated using a two-dimensional Gaussian distribution function; the farther a pixel is from the pupil center, the smaller its weight. Gaussian smoothing can remove Gaussian noise from iris images, preserving more of the image's edge and detail information.

[0127] In some embodiments, step S106, calculating the iris edge points, iris center, and iris radius of the iris image based on the optimal path of the iris image, includes:

[0128] Calculate the optimal path for the iris image based on the Viterbi algorithm;

[0129] Pixels along the optimal path are used as iris edge points;

[0130] For any pixel (d, a) in the iris image i The gradient formula for this pixel is expressed as:

[0131]

[0132] Where i = 1, 2, ..., N, i represents the width of the gradient image Gr of the iris image; the gradient image Gr is calculated in the vertical direction of the iris image using the Sobel operator; Gr(d, a i ) represents the pixel (d, a) in the gradient image Gr. i The pixel value at ()

[0133] The gradient accumulation matrix m is constructed by accumulating column by column. i (d):

[0134]

[0135] The cumulative matrix m is compared column by column from right to left. i (d) Perform backtracking, using the optimal value P of the current column. i Select the optimal value P from the previous column. i-1 :

[0136]

[0137] Multiple corresponding radii d and angles α are calculated, where the radius d and angle α represent the first polar coordinates of the iris edge point in the first coordinate system of the rectangular region;

[0138] The first polar coordinates of the iris edge point in the first coordinate system of the rectangular region are converted to the second polar coordinates of the iris edge point in the second coordinate system of the corresponding annular region.

[0139] Construct the corresponding circle using the second polar coordinates of the iris edge point in the second coordinate system of the corresponding annular region;

[0140] The iris center is obtained from the center of the circle, and the iris radius is obtained from the radius of the circle.

[0141] In some embodiments, step S108, calculating the mean and variance of the iris safe region to obtain the iris noise mask, includes:

[0142] The ring mask is calculated based on the pupil center and pupil radius, as well as the iris center and iris radius.

[0143] Based on the ring mask, the iris region corresponding to the width from the center of the pupil to the lower edge of the pupil is taken from the iris image as the iris safe region;

[0144] Calculate the mean and variance of the grayscale values ​​of the iris pixels within the iris security region;

[0145] The formula for calculating the iris noise mask based on the mean and variance is as follows:

[0146]

[0147] Among them, Mn k and I k represents the iris noise mask Mn and the pixel value at position P in the iris image I; avg represents the mean; d represents the variance.

[0148] In some embodiments, the pupil center and pupil radius are calculated as follows:

[0149] Obtain all edge pixels of the pupil gradient image;

[0150] For each edge pixel, two predicted pupil centers are calculated based on the edge pixel's coordinates on the x and y axes and the predicted radius. The candidate triplet for the two predicted pupil centers is (C1). x C1 y ,r) and (C2 x C2 y ,r):

[0151]

[0152]

[0153]

[0154]

[0155] Where x represents the coordinate value of the edge pixel on the x-axis of the pupil gradient image; y represents the coordinate value of the edge pixel on the y-axis of the pupil gradient image; and r represents the preset radius.

[0156] Calculate the number of overlapping pixels between the circular and pupil gradient images corresponding to each candidate triplet to obtain the weight of each candidate triplet;

[0157] Iterate through the predicted radii and obtain the pupil center and pupil radius based on the candidate triplet with the largest weight.

[0158] It should be noted that the execution subject of each step of the method provided in Embodiment 1 can be the same device, or the method can be executed by different devices. For example, the execution subject of steps S101 and S102 can be device 1, and the execution subject of step S103 can be device 2; or the execution subject of step S101 can be device 1, and the execution subject of steps S102 and S103 can be device 2; and so on.

[0159] Example 2

[0160] like Figure 2 As shown in the illustration, this application also provides an iris positioning device, comprising:

[0161] The acquisition unit 21 is configured to acquire an iris image, wherein the iris image contains the iris and pupil to be located;

[0162] The first computing unit 22 is configured to calculate the grayscale histogram of the iris image;

[0163] The second calculation unit 23 is configured to calculate the pupil threshold of the pupil using a grayscale histogram;

[0164] Processing unit 24 is configured to perform binarization processing on the iris image based on the pupil threshold to obtain a pupil gradient image;

[0165] The third calculation unit 25 is configured to calculate the iris image based on the pupil center and pupil radius on the pupil gradient image;

[0166] The fourth calculation unit 26 is configured to calculate the iris edge points, iris center, and iris radius of the iris image based on the optimal path of the iris image.

[0167] The fifth calculation unit 27 is configured to determine the iris safety zone based on the iris edge point, the iris center, and the iris radius;

[0168] The sixth calculation unit 28 is configured to calculate the mean and variance of the iris safe area to obtain the iris noise mask;

[0169] The seventh calculation unit 29 is configured to perform an XOR operation between the iris noise mask and the ring mask to obtain the iris mask.

[0170] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0171] Therefore, this application also proposes a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the methods as described in any embodiment of this application.

[0172] Furthermore, this application also proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in any embodiment of this application.

[0173] Example 3

[0174] This application provides an electronic device. Figure 3 This is a schematic diagram of the structure of an electronic device provided in Embodiment Six of this application. Figure 3 As shown, this embodiment provides an electronic device 300, which includes: one or more processors 320; and a storage device 310 for storing one or more programs. When the one or more programs are run by the one or more processors 320, the one or more processors 320 implement the iris localization method provided in this application embodiment. The method includes:

[0175] Acquire an iris image, wherein the iris image contains the iris and pupil to be located;

[0176] Calculate the grayscale histogram of the iris image;

[0177] The pupil threshold of the pupil is calculated using the grayscale histogram;

[0178] The iris image is binarized based on the pupil threshold to obtain a pupil gradient image.

[0179] Calculate the iris image based on the pupil center and pupil radius on the pupil gradient image;

[0180] Based on the optimal path of the iris image, calculate the iris edge point, iris center, and iris radius of the iris image;

[0181] The iris safety zone is determined based on the iris edge point, iris center, and iris radius.

[0182] Calculate the mean and variance of the iris security region to obtain the iris noise mask;

[0183] The iris noise mask and the ring mask are XORed to obtain the iris mask.

[0184] Figure 3 The electronic device 300 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0185] like Figure 3 As shown, the electronic device 300 includes a processor 320, a storage device 310, an input device 330, and an output device 340; the number of processors 320 in the electronic device can be one or more. Figure 3 Taking a processor 320 as an example; the processor 320, storage device 310, input device 330, and output device 340 in the electronic device can be connected via a bus or other means. Figure 3 Taking the connection between China and Israel via bus 350 as an example.

[0186] Storage device 310, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and module units, such as the program instructions corresponding to the cloud bottom height determination method in the embodiments of this application.

[0187] Storage device 310 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a function; the data storage area may store data created based on terminal usage. Furthermore, storage device 310 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, storage device 310 may further include memory remotely located relative to processor 320, and these remote memories can be connected via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0188] Input device 330 can be used to receive input digital, character, or voice information, and to generate key signal inputs related to user settings and function control of the electronic device. Output device 340 may include electronic devices such as a display screen and a speaker.

[0189] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0190] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0191] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0192] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0193] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0194] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0195] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0196] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. An iris positioning method, characterized by, The method comprises the following steps: acquiring an iris image, wherein the iris image contains an iris and a pupil to be positioned; calculating a gray histogram of the iris image; calculating a pupil threshold of the pupil by using the gray histogram; performing a binaryzation on the iris image based on the pupil threshold to obtain a pupil gradient image; calculating an iris image according to a pupil center and a pupil radius on the pupil gradient image; calculating an iris edge point, an iris center and an iris radius of the iris image according to an optimal path of the iris image; determining an iris safe area according to the iris edge point, the iris center and the iris radius; calculating a mean value and a variance of the iris safe area to obtain an iris noise mask; performing an exclusive or calculation on the iris noise mask and a ring mask to obtain an iris mask.

2. The iris positioning method of claim 1, wherein, The method for calculating the pupil threshold of the pupil by using the gray histogram comprises the following steps: calculating a moving average value of the gray histogram; moving the moving average value to the left by one bit to obtain a left-moving value; performing a subtraction calculation on corresponding positions of the moving average value and the left-moving value to obtain a gradient of the gray histogram; determining the pupil threshold according to a gray value of a first wave crest of the gradient.

3. The iris positioning method of claim 1, wherein, The method for performing a binaryzation on the iris image based on the pupil threshold to obtain a pupil gradient image comprises the following steps: performing a binaryzation on the iris image based on the pupil threshold to obtain a pupil image, wherein white pixels in the pupil image represent pupil pixels; filling in a light spot on the pupil image to obtain a light spot filling image; inverting the light spot filling image to obtain an inverted image; taking any one black pixel point of the inverted image as a seed point, traversing black pixel points near the seed point, and filling the black pixel points into white to obtain an inverted filling image; inverting the inverted filling image and performing an or operation on the inverted filling image and the pupil image to obtain a pupil filling image; calculating a first gradient distribution graph of the pupil filling image in a horizontal direction, and calculating a second gradient distribution graph of the pupil filling image in a vertical direction; performing a weighted calculation on the first gradient distribution graph and the second gradient distribution graph to obtain a pupil gradient image.

4. The iris positioning method of claim 1, wherein, The method for calculating an iris image according to a pupil center and a pupil radius on the pupil gradient image comprises the following steps: dividing an annular area containing an iris boundary according to the pupil center and the pupil radius; stretching the annular area into a rectangular area to obtain the iris image, wherein an abscissa of the iris image represents an angle of the annular area, and an ordinate of the iris image represents a distance from the annular area to the pupil center; performing a Gaussian smoothing processing on the iris image by using a two-dimensional Gaussian distribution function to remove Gaussian noise in the iris image, wherein a formula of the two-dimensional Gaussian distribution function is as follows: ; where (x, y) represents any two-dimensional coordinate in the iris image, denotes the standard deviation of the distribution.

5. The iris positioning method of claim 4, wherein, The method for calculating an iris edge point, an iris center and an iris radius of the iris image according to an optimal path of the iris image comprises the following steps: calculating the optimal path of the iris image based on a Viterbi algorithm; acquiring a pixel point on the optimal path as the iris edge point; For any one pixel point (x, y) in the iris image, The gradient formula of the pixel point is represented as: ; in, , i represents the gradient image of the iris image. The width of the gradient image; It is calculated using the Sobel operator in the vertical direction of the iris image; Represents the gradient image Medium pixel ( The pixel value at () The gradient accumulation matrix is constructed by means of column-by-column accumulation : ; cumulative matrix is compared from right to left by column by column comparison backtracking, by the optimal value of the current column , the optimal value of the previous column is selected : ; A plurality of corresponding radii d and angles are calculated , radius d and angle representing a first polar coordinate of the iris edge point in a first coordinate system of the rectangular region; convert the first polar coordinates of the iris edge points in the first coordinate system of the rectangular region into second polar coordinates of the iris edge points in the second coordinate system of the corresponding annular region; construct a corresponding circle according to the second polar coordinates of the iris edge points in the second coordinate system of the corresponding annular region; obtain the iris center according to the center of the circle and obtain the iris radius according to the radius of the circle.

6. The iris positioning method of claim 1, wherein, calculate the mean and variance of the iris safe region to obtain an iris noise mask, including: calculate an annular mask according to the pupil center, pupil radius, and the iris center and iris radius; obtain an iris region corresponding to a width from the pupil center to the lower edge of the pupil from the iris image as the iris safe region according to the annular mask; calculate the mean and variance of the iris pixel gray value of the iris safe region; the formula for calculating the iris noise mask according to the mean and variance is as follows: ; wherein, and denote the pixel value of the iris noise mask Mn and the iris image I at position P; avg denotes the average; d denotes the variance.

7. The iris positioning method of claim 1, wherein, the calculation method of the pupil center and pupil radius is as follows: obtain all edge pixel points of the pupil gradient image; For each of the edge pixel points, two predicted pupil centers are calculated according to the coordinates of the edge pixel point on the x-axis and the y-axis and a predicted radius, and a candidate triplet of the two predicted pupil centers is ( ) and ( ): ; ; ; ; wherein x represents a coordinate value of the edge pixel point on an x coordinate axis of the pupil gradient image; y represents a coordinate value of the edge pixel point on a y coordinate axis of the pupil gradient image; and r represents a preset radius. represents a direction of the edge pixel relative to the center of the circle. calculate the number of overlapping pixels of each circle corresponding to the candidate triplets and the pupil gradient image to obtain the weight of each candidate triplet; obtain the pupil center and pupil radius according to the candidate triplet with the largest weight by traversing the predicted radius.

8. An iris positioning device, characterized by comprising: an acquisition unit configured to acquire an iris image, wherein the iris image contains an iris and a pupil to be positioned; a first calculation unit configured to calculate a gray level histogram of the iris image; a second calculation unit configured to calculate a pupil threshold of the pupil by using the gray level histogram; a processing unit configured to perform binaryzation processing on the iris image based on the pupil threshold to obtain a pupil gradient image; a third calculation unit configured to calculate an iris image according to a pupil center and a pupil radius on the pupil gradient image; a fourth calculation unit configured to calculate an iris edge point, an iris center, and an iris radius of the iris image according to an optimal path of the iris image; a fifth calculation unit configured to determine an iris safe region according to the iris edge point, the iris center, and the iris radius; a sixth calculation unit configured to calculate a mean and a variance of the iris safe region to obtain an iris noise mask; a seventh calculation unit configured to perform exclusive or calculation on the iris noise mask and an annular mask to obtain an iris mask.

9. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the iris positioning method of any one of claims 1-7.

10. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the iris positioning method of any one of claims 1-7.

Citation Information

Patent Citations

  • Pupil center positioning method for iris recognition

    CN106022315A

  • Invariant radial iris segmentation

    US20070211924A1