Iris recognition method, device, storage medium and equipment
By fitting an elliptical curve onto the iris image to correct the iris image, the problem of image distortion caused by eye deflection in iris recognition is solved, thus improving recognition accuracy and efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING TECHSHINO TECHNOLOGY CO LTD
- Filing Date
- 2021-11-19
- Publication Date
- 2026-07-03
AI Technical Summary
During iris recognition, the iris image is distorted due to the user's head tilt or eye movement, which reduces the accuracy and efficiency of iris recognition.
By fitting an elliptical curve onto the iris image, it is determined whether the object to be identified has undergone eye deviation. The iris image is then corrected based on the parameters of the fitted elliptical curve to obtain an iris image of the object when its eyes are looking straight ahead for identification.
It improves the accuracy and efficiency of iris recognition, reduces the posture requirements of the object being recognized, and enables effective recognition of strabismic iris images.
Smart Images

Figure CN116152902B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of biometrics, and in particular to an iris recognition method, apparatus, storage medium and device. Background Technology
[0002] The development of modern society has placed higher demands on the accuracy, security, and practicality of human identity verification. Identity verification is a ubiquitous issue in daily life, frequently requiring the verification of one's own identity and the identification of others. Traditional photo-based identity verification methods are far outdated, necessitating the search for more secure, reliable, and user-friendly new methods.
[0003] Biometric identification technology boasts advantages such as being less prone to forgetting or losing, strong anti-counterfeiting performance, difficulty in forgery or theft, portability, and usability anytime, anywhere. Biometric identification technology refers to the use of inherent physiological or behavioral characteristics of the human body for personal identification, possessing features such as non-replicability, uniqueness, universality, and stability. The human iris, with its random detailed and textured features, maintains a high degree of stability, possesses inherent isolation and protection capabilities, and does not require contact-based data collection. Therefore, iris recognition technology has broad market prospects and significant scientific research value.
[0004] The iris is a ring-shaped structure located between the pupil and the sclera, such as... Figure 1 The outer and inner circumferences of the iris are partially obscured by the eyelids and eyelashes, resulting in the loss of some iris information. The iris is approximately 12mm in diameter and 0.5mm thick. From a recognition perspective, these interwoven, filament-like, stripe-like, and other subtle features in the iris are what make it unique. These features are typically considered the texture features of the iris and are used for iris recognition.
[0005] In iris recognition, the first step is to acquire an iris image that meets certain requirements. The quality of the iris image directly affects the speed and accuracy of recognition. However, a significant issue in iris recognition is that during image acquisition, factors such as head tilt or rotation can cause eye movement, resulting in a tilted iris image. Figure 2 The image provided is an iris image captured during eye rotation, from... Figure 2 As can be seen, when the eyeball deflects, it causes iris deformation. For iris images with severe eyeball deflection, the iris is severely deformed, resulting in a reduced iris recognition pass rate. Summary of the Invention
[0006] To address the shortcomings of existing technologies, this invention provides an iris recognition method, apparatus, storage medium, and device that corrects the iris image when the object being recognized is strabismic, reducing the posture requirements of the object being recognized and improving the accuracy and efficiency of iris recognition.
[0007] The technical solution provided by this invention is as follows:
[0008] In a first aspect, the present invention provides an iris recognition method, the method comprising:
[0009] Acquire the iris image of the object to be identified;
[0010] The pupil boundary is fitted with an ellipse curve on the iris image, and the eyeball deflection of the object to be identified is determined based on the fitted ellipse curve.
[0011] If it is determined that the object to be identified has undergone eye deviation, the iris image is corrected according to the parameters of the fitted elliptic curve to obtain the iris image of the object when the human eye is looking straight ahead; if it is determined that the object to be identified has not undergone eye deviation, the iris image is determined to be the iris image of the object when the human eye is looking straight ahead.
[0012] Iris recognition is performed on the object to be identified based on the iris image of the object when the human eye is looking straight ahead.
[0013] Furthermore, the step of fitting an ellipse curve to the pupil boundary on the iris image and determining whether the object to be identified has undergone eyeball deflection based on the fitted elliptical curve includes:
[0014] The pupil is located on the iris image to obtain the pupil boundary;
[0015] Gradient information from the iris image is used to correct points on the pupil boundary and remove noise, resulting in a valid set of points on the pupil boundary.
[0016] Elliptic curve fitting is performed based on the effective point set on the pupil boundary, and the flatness of the fitted elliptic curve is used to determine whether the object to be identified has undergone eyeball deflection.
[0017] Furthermore, the step of using gradient information from the iris image to correct points on the pupil boundary and remove noise to obtain a valid set of points on the pupil boundary includes:
[0018] Spot detection is performed on the iris image, and spot removal is achieved using biquadratic interpolation;
[0019] The annular region image with center (y,x) and radius range [r1,r2] on the iris image after removing light spots is expanded into a rectangular region image by taking values at certain intervals of angle;
[0020] Where (y,x) represents the pupil center obtained by locating the pupil on the iris image, r1 = a1r, r2 = a2r, r is the pupil radius obtained by locating the pupil on the iris image, and a1 and a2 are set coefficients, 0 <a1<1<a2;
[0021] Smoothing filtering is performed on the rectangular region image, and alternating subtraction is performed. Values greater than 0 after subtraction are retained, and values less than or equal to 0 are set to 0 to obtain the gradient image.
[0022] Obtain the maximum pixel value and its coordinates for each row of the gradient image, and select rows whose maximum pixel value is not less than a set threshold as valid rows;
[0023] The coordinates of the maximum pixel values in the valid rows are transformed back onto the annular region of the iris image to obtain the set of valid points on the pupil boundary.
[0024] Furthermore, obtaining the maximum pixel value and its coordinates for each row of the gradient image also includes:
[0025] Replace the maximum pixel value of each row with the average of the maximum pixel value of that row and the average of several pixels near the maximum pixel value in that row.
[0026] Furthermore, the step of fitting an elliptic curve based on the effective set of points on the pupil boundary includes:
[0027] Get the points (y_max, xx2) and (y_min, xx1) with the maximum and minimum ordinates on the effective point set on the pupil boundary, and the points (yy2, x_max) and (yy1, x_min) with the maximum and minimum abscissas.
[0028] Calculate the initial center point (y_point, x_point), the initial major axis a, and the initial minor axis b;
[0029] Where y_point=(y_min+y_max) / 2, x_point=(x_min+x_max) / 2, a=max(a_point,b_point), b=min(a_point,b_point), a_point is the Euclidean distance between (y_min,xx1) and (y_max,xx2), and b_point is the Euclidean distance between (yy1,x_min) and (yy2,x_max);
[0030] Define the traversal range of the center point, major axis, and minor axis based on the initial center point, initial major axis, and initial minor axis;
[0031] For each value within the traversal range of the center point, major axis, and minor axis, perform elliptic curve fitting, and find the elliptic curve that matches the set of valid points on the pupil boundary most often as the fitted elliptic curve.
[0032] Furthermore, determining whether the object to be identified has undergone eye movement based on the flatness of the fitted elliptical curve includes:
[0033] Calculate the ratio of the distance between the two foci on the major axis of the fitted elliptic curve to the length of the major axis to obtain the first ratio; or, calculate the ratio of the length of the major axis to the length of the minor axis of the fitted elliptic curve to obtain the second ratio.
[0034] When the first ratio is greater than the first set threshold or when the second ratio is greater than the second set threshold, it is determined that eye deviation has occurred.
[0035] Furthermore, the iris image is corrected using the following formula;
[0036]
[0037] Where (X',Y') are the coordinates of each pixel in the iris image before correction, (X,Y) are the coordinates of each pixel in the iris image after correction, A and B are the major axis length and minor axis length of the fitted elliptic curve, respectively, and θ is the deflection angle of (X',Y').
[0038] In a second aspect, the present invention provides an iris recognition device, the device comprising:
[0039] The image acquisition module is used to acquire the iris image of the object to be identified;
[0040] An eye deflection detection module is used to fit an ellipse curve to the pupil boundary on the iris image, and to determine whether the object to be identified has undergone eye deflection based on the fitted ellipse curve.
[0041] The iris image acquisition module is used to correct the iris image according to the parameters of the fitted elliptic curve if it is determined that the object to be identified has deflected its eyeballs to obtain the iris image of the object when it is looking straight ahead; if it is determined that the object to be identified has not deflected its eyeballs, the iris image is determined to be the iris image of the object when it is looking straight ahead.
[0042] The iris recognition module is used to perform iris recognition on the object to be identified based on the iris image of the object when the human eye is looking straight ahead.
[0043] Furthermore, the eye deflection determination module includes:
[0044] The pupil boundary extraction unit is used to locate the pupil on the iris image and obtain the pupil boundary;
[0045] The effective point set determination unit is used to correct the points on the pupil boundary and remove noise using the gradient information of the iris image to obtain the effective point set on the pupil boundary.
[0046] The fitting and judgment unit is used to fit an elliptic curve based on the effective point set on the pupil boundary, and to determine whether the object to be identified has undergone eyeball deflection based on the flatness of the fitted elliptic curve.
[0047] Furthermore, the effective point set determination unit includes:
[0048] A spot removal unit is used to detect spots in the iris image and remove spots using biquadratic interpolation.
[0049] The rectangular region image unfolding unit is used to unfold the annular region image with center (y,x) and radius range [r1,r2] on the iris image after removing light spots into a rectangular region image by taking values at certain intervals of angle;
[0050] Where (y,x) represents the pupil center obtained by locating the pupil on the iris image, r1 = a1r, r2 = a2r, r is the pupil radius obtained by locating the pupil on the iris image, and a1 and a2 are set coefficients, 0 <a1<1<a2;
[0051] The gradient image acquisition unit is used to perform smoothing filtering on the rectangular region image and perform interlaced subtraction, retaining the values greater than 0 after subtraction and setting the values less than or equal to 0 to 0, thereby obtaining the gradient image;
[0052] The valid row determination unit is used to obtain the maximum pixel value and its coordinates of each row of the gradient image, and to take the row with the maximum pixel value not less than a set threshold as a valid row.
[0053] The coordinate transformation unit is used to transform the coordinates of the maximum pixel value of the effective row back to the annular region image of the iris image, so as to obtain the effective point set on the pupil boundary.
[0054] Furthermore, in the effective row determination unit, obtaining the maximum pixel value and coordinates of each row of the gradient image further includes:
[0055] Replace the maximum pixel value of each row with the average of the maximum pixel value of that row and the average of several pixels near the maximum pixel value in that row.
[0056] Furthermore, in the fitting and judgment unit, the step of performing elliptic curve fitting based on the effective point set on the pupil boundary includes:
[0057] The data acquisition unit is used to acquire the points (y_max, xx2) and (y_min, xx1) with the maximum and minimum vertical coordinates in the effective point set on the pupil boundary, and the points (yy2, x_max) and (yy1, x_min) with the maximum and minimum horizontal coordinates.
[0058] The initial parameter calculation unit is used to calculate the initial center point (y_point, x_point), the initial major axis a, and the initial minor axis b;
[0059] Where y_point=(y_min+y_max) / 2, x_point=(x_min+x_max) / 2, a=max(a_point,b_point), b=min(a_point,b_point), a_point is the Euclidean distance between (y_min,xx1) and (y_max,xx2), and b_point is the Euclidean distance between (yy1,x_min) and (yy2,x_max);
[0060] The traversal range determination unit is used to set the traversal range of the center point, major axis, and minor axis based on the initial center point, initial major axis, and initial minor axis;
[0061] The traversal unit is used to perform elliptic curve fitting for each value within the traversal range of the center point, major axis, and minor axis, and find the elliptic curve that matches the set of valid points on the pupil boundary the most.
[0062] Furthermore, in the fitting and judgment unit, the step of judging whether the object to be identified has undergone eye deviation based on the flatness of the fitted elliptical curve includes:
[0063] Calculate the ratio of the distance between the two foci on the major axis of the fitted elliptic curve to the length of the major axis to obtain the first ratio; or, calculate the ratio of the length of the major axis to the length of the minor axis of the fitted elliptic curve to obtain the second ratio.
[0064] When the first ratio is greater than the first set threshold or when the second ratio is greater than the second set threshold, it is determined that eye deviation has occurred.
[0065] Furthermore, the iris image is corrected using the following formula;
[0066]
[0067] Where (X',Y') are the coordinates of each pixel in the iris image before correction, (X,Y) are the coordinates of each pixel in the iris image after correction, A and B are the major axis length and minor axis length of the fitted elliptic curve, respectively, and θ is the deflection angle of (X',Y').
[0068] Thirdly, the present invention provides a computer-readable storage medium for iris recognition, including a memory for storing processor-executable instructions, which, when executed by the processor, implement the steps of the iris recognition method described in the first aspect.
[0069] Fourthly, the present invention provides an apparatus for iris recognition, comprising at least one processor and a memory storing computer-executable instructions, wherein the processor executes the instructions to implement the steps of the iris recognition method described in the first aspect.
[0070] The present invention has the following beneficial effects:
[0071] The present invention first acquires the iris image of the object to be identified, and then determines whether the object has deflected its eyeball by fitting an elliptical curve to the pupil boundary of the iris image. When the object deflects its eyeball, the iris image is corrected according to the parameters of the fitted elliptical curve to obtain the iris image of the object when its eyes are looking straight ahead, and the iris image of the object when its eyes are looking straight ahead is used for iris recognition.
[0072] This invention corrects the iris image when the object being identified is strabismic, enabling iris recognition even with strabismic iris images. This improves the accuracy of iris recognition, reduces the posture requirements of the object being identified, and increases the efficiency of iris recognition. Attached Figure Description
[0073] Figure 1 A schematic diagram of a normal iris image;
[0074] Figure 2 A schematic diagram of the iris image showing eye movement;
[0075] Figure 3 This is a flowchart of the iris recognition method of the present invention;
[0076] Figure 4 A schematic diagram showing the initial pupil localization in an iris image;
[0077] Figure 5 A schematic diagram showing the iris image after removing light spots;
[0078] Figure 6 This is a schematic diagram of a rectangular region image;
[0079] Figure 7 This is a schematic diagram of a gradient image;
[0080] Figure 8 A schematic diagram of the effective point set on the pupil boundary;
[0081] Figure 9 This is a schematic diagram of an ellipse;
[0082] Figure 10 This is a schematic diagram of the iris image before correction;
[0083] Figure 11 This is a schematic diagram of the corrected iris image;
[0084] Figure 12 This is a schematic diagram of the iris recognition device of the present invention. Detailed Implementation
[0085] To make the technical problems, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. The components of the embodiments of this invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention.
[0086] Example 1:
[0087] This invention provides an iris recognition method, such as... Figure 3 As shown, the method includes:
[0088] S100: Obtain the iris image of the object to be identified.
[0089] S200: Fit the pupil boundary to an ellipse on the iris image, and determine whether the object to be identified has undergone eyeball deflection based on the fitted elliptical curve.
[0090] An iris image without eye deviation, such as Figure 1 As shown, the pupil boundary (i.e., the inner circle of the iris) is circular, and the iris image when the eyeball deflects is as follows. Figure 2 As shown, the pupil boundary is elliptical. Therefore, by fitting a curve to the pupil boundary as an ellipse, the result of the fitted elliptical curve can be used to determine whether the object being identified has experienced eyeball deflection.
[0091] S300: If it is determined that the object to be identified has undergone eye deflection, the iris image is corrected according to the parameters of the fitted elliptic curve to obtain the iris image of the object when the human eye is looking straight ahead; if it is determined that the object to be identified has not undergone eye deflection, the iris image is determined to be the iris image of the object when the human eye is looking straight ahead.
[0092] When eye movement occurs, the iris becomes elliptical. An elliptical iris reduces the success rate of iris recognition, and a severely deformed iris can even prevent iris recognition altogether. This invention determines eye movement by fitting an elliptical curve, and then corrects the iris image based on the fitted elliptical curve to obtain the iris image of the subject when the eye is looking straight ahead—that is, an iris image without deformation.
[0093] S400: Iris recognition is performed on the object to be identified based on the iris image of the object when the human eye is looking straight ahead.
[0094] Iris recognition can be improved by using iris images when the human eye is looking straight ahead.
[0095] The present invention first acquires the iris image of the object to be identified, and then determines whether the object has deflected its eyeball by fitting an elliptical curve to the pupil boundary of the iris image. When the object deflects its eyeball, the iris image is corrected according to the parameters of the fitted elliptical curve to obtain the iris image of the object when its eyes are looking straight ahead, and the iris image of the object when its eyes are looking straight ahead is used for iris recognition.
[0096] This invention corrects the iris image when the object being identified is strabismic, enabling iris recognition even with strabismic iris images. This improves the accuracy of iris recognition, reduces the posture requirements of the object being identified, and increases the efficiency of iris recognition.
[0097] As one implementation of this invention, the aforementioned S200 includes:
[0098] S210: Locate the pupil on the iris image to obtain the pupil boundary.
[0099] This step is used to locate the pupil on the iris image, obtaining the pupil center, pupil radius, and pupil boundary. One specific implementation of this step includes:
[0100] S211: Binarize the iris image and use the curve fitting method of symmetrical radial transformation to locate the pupil, thereby obtaining the pupil center and pupil radius.
[0101] In this step, binarization is first performed to obtain a binarized image. Then, using algorithms such as Sobel, the pupil boundary is initially located as a circle through symmetric radial transformation to obtain parameters (y, x, r), where (y, x) are the coordinates of the pupil center and r is the pupil radius.
[0102] One example of the location results is as follows: Figure 4 As shown, the white arc line is the boundary of the pupil, which is the boundary of a circle, and the white cross is the center of the pupil circle.
[0103] S212: The iris image is segmented into several connected regions using an eight-way connected labeling algorithm. The pupil region is determined by comparing the area ratio of each connected region and the distance between the centroid of each connected region and the center of the pupil.
[0104] After initial positioning of the pupil as a circle in S211, this step performs fine positioning. A specific method for fine positioning may include:
[0105] Interference regions formed by eyelashes and other structures in the binarized image are removed. An eight-way connected labeling algorithm is used to segment the iris image into several connected regions. The accurate pupil region is determined by comparing the area ratio of each connected region and the distance between the centroid of each connected region and the initially located pupil center.
[0106] S213: Use an edge detection algorithm to extract the contour of the pupil region and obtain the pupil boundary.
[0107] In this step, the Sobel edge detection algorithm can be used to extract the contour of the pupil region and obtain the pupil boundary.
[0108] It should be noted that other edge detection algorithms, such as the Canny edge detection algorithm, can also be used in this invention, and this invention does not impose any special limitations on them. By processing the binarized image using an edge detection algorithm, the boundary points of the pupil can be obtained.
[0109] This invention improves the accuracy of pupil positioning by coarsely locating the pupil to determine its approximate boundary and then finely locating it.
[0110] S220: Use the gradient information of the iris image to correct the points on the pupil boundary and remove noise to obtain the effective point set on the pupil boundary.
[0111] The aforementioned S210 positions the pupil as a circle, resulting in a circular pupil boundary. However, the circular pupil boundary may have inaccurate positioning. For example, when the eyeball deflects or strabismus occurs, the positioned pupil boundary will be inaccurate.
[0112] Therefore, this step corrects the points on the pupil boundary using the gradient information of the iris image. The gradient information can reflect the degree of change around each pixel in the image. The pixel changes are drastic at the real pupil boundary point, so the pupil boundary can be corrected using the gradient information to obtain the real pupil boundary point.
[0113] The pupil boundary obtained by S210 localization is also susceptible to noise, which consists of false boundary points formed by occlusion on the pupil edge. The true pupil boundary point is located between the pupil and the iris, while false pupil boundary points (i.e., noise) are often located between the pupil and the eyelid or light spot, and need to be removed. Similarly, gradient information from the iris image can be used to remove noise; if necessary, light spot detection technology can also be combined to remove noise.
[0114] S230: Perform elliptic curve fitting based on the effective point set on the pupil boundary, and determine whether the object to be identified has undergone eyeball deflection based on the flatness of the fitted elliptic curve.
[0115] After obtaining the effective point set on the pupil boundary, elliptic curve fitting can be performed. This invention does not limit the method of elliptic curve fitting. For example, the edge points on the pupil boundary can be calculated based on the least squares method or the Hough transform elliptic curve fitting method: using the effective point set on the pupil boundary, elliptic curve fitting is performed to obtain the edge of the fitted elliptic curve, and the edge of the fitted elliptic curve with the smallest Euclidean distance to the actual edge is found using the nonlinear least squares method, thus obtaining the fitted elliptic curve.
[0116] After fitting the elliptic curve, the closer the elliptic curve is to a circle, the smaller the pupil tilt and the milder the eye movement. Conversely, the flatter the elliptic curve, the greater the pupil tilt and the more severe the eye movement. Therefore, parameters such as the flatness of the elliptic curve can represent the degree of eye movement and be compared with a set threshold to determine whether the subject has experienced eye movement.
[0117] After the elliptic curve fitting is completed, the parameters of the final elliptic curve include the length of the major axis A, the length of the minor axis B, and the two foci F1 and F2 on the major axis and the distance c between them.
[0118] Then, based on the parameters of the elliptic curve obtained from the final fitting, it can be determined whether the object to be identified has undergone eye movement:
[0119] 1. Calculate the ratio of the distance between the two foci on the major axis of the fitted elliptic curve to the length of the major axis to obtain the first ratio; or, calculate the ratio of the length of the major axis A to the length of the minor axis B of the fitted elliptic curve to obtain the second ratio.
[0120] 2. When the first ratio is greater than a set first threshold or when the second ratio is greater than a set second threshold, eye deviation is determined. Furthermore, the degree of eye deviation can be determined based on either the first or second ratio.
[0121] Taking the two foci F1 and F2 on the major axis of an elliptic curve as an example, the closer F1 and F2 are (i.e., the smaller the distance between F1 and F2), the closer the shape of the elliptic curve is to a circle, and the less tilted the pupil. Conversely, the farther apart F1 and F2 are, the greater the tilt of the pupil and the more severe the eyeball deflection. Therefore, the degree of eyeball deflection can be determined by calculating the ratio of the distance between F1 and F2 to the entire major axis. Similarly, the ratio of the major axis length to the minor axis length can also determine the degree of eyeball deflection.
[0122] An eye deviation is determined when the ratio of the distance between F1 and F2 to the entire long axis is greater than a first threshold, or when the ratio of the long axis length A to the short axis length B is greater than a second threshold. The first and second thresholds can be values set by those skilled in the art based on experience.
[0123] This invention first performs pupil localization on the acquired iris image to determine the pupil boundary. Then, it uses the gradient information of the iris image to correct the points on the pupil boundary and remove noise, obtaining a set of effective points on the pupil boundary. Next, it performs elliptic curve fitting based on the set of effective points, and judges whether the object to be identified has undergone eye deflection based on the flatness of the elliptic curve, thereby improving the accuracy of elliptic curve fitting and ultimately improving the accuracy of eye deflection judgment.
[0124] In step S220, this invention utilizes gradient information from the iris image to correct points on the pupil boundary and remove noise, obtaining a set of effective points on the pupil boundary, thus improving the accuracy of effective points on the pupil boundary. Specific implementation methods include:
[0125] S221: Perform spot detection on the iris image and remove the spots using biquadratic interpolation.
[0126] When acquiring iris images, factors such as supplemental lighting can easily cause light spots to appear within the pupil, such as... Figure 4 As shown, the light spot has a relatively large gradient at the pupil boundary, which has a significant impact on the pupil boundary fitting. Therefore, it is necessary to remove the light spot noise.
[0127] The process of removing light spots in this step is as follows: the iris image is binarized using a set binarization threshold, and dilation is performed to obtain the light spot region. The light spot region is then filled in on the iris image using biquadratic interpolation to remove the light spots.
[0128] One specific implementation method is as follows:
[0129] 1. Using a grayscale value of 250 as the binarization threshold, the image is binarized. Pixels with a grayscale value greater than 250 are assigned a value of 1, and pixels with a grayscale value less than or equal to 250 are assigned a value of 0. The positions of pixels with a value of 1 in the resulting image represent light spots, which can roughly determine the location and size of the light spots. The binarization threshold of 250 is only used as an example and is not intended to limit the invention.
[0130] 2. Perform dilation operation on the binarized image to locate the spot region.
[0131] Dilation is similar to "neighborhood expansion," which expands the highlighted or white areas in an image, resulting in a larger highlighted area than the original image. This step uses dilation to remove holes within light spots or jagged edges on the light spots.
[0132] 3. Perform biquadratic interpolation on the pixels within the light spot on the iris image and their adjacent pixels. Use the pixel values around the light spot to perform calculations and replace the values within the light spot to fill the light spot area, thus removing the light spot. The effect after removing the light spot is as follows: Figure 5 As shown.
[0133] S222: Take the annular region image with center (y,x) and radius range [r1,r2] on the iris image after removing the light spots, and expand it into a rectangular region image by taking values at certain angle intervals.
[0134] Where (y,x) represents the pupil center obtained by locating the pupil on the iris image, r1 = a1r, r2 = a2r, r is the pupil radius obtained by locating the pupil on the iris image, and a1 and a2 are set coefficients, 0 <a1<1<a2。
[0135] This step unfolds the image based on the pupil center (y, x) and pupil radius r obtained from the aforementioned localization. Specifically:
[0136] The pupil in the iris image is a ring-shaped region with a radius variation of [r1, r2] centered at (y, x). The [-π, π] ring-shaped region images are expanded into rectangular region images with rows (r2-r1+1) and columns P respectively using coordinate transformation.
[0137] When expanding, the center (y,x) is taken as the origin, and the value is taken once at a certain angle interval. For example, when the value is taken every 2°, the column is 180 rows, when the value is taken every 3°, the column is 120 rows, when the value is taken every 4°, the column is 90 rows, and so on. The angle intervals should not be too dense or too sparse. Preferably, the value is taken once at 3°, and the expanded area is a rectangular region image with 120 columns.
[0138] With (y,x) as the center, the traversal range of r is [r1,r2], where r1 = a1r and r2 = a2r. In one example, a1 = 0.5 and a2 = 1.5. It should be noted that a1 = 0.5 and a2 = 1.5 are merely illustrative examples and are not intended to limit the invention.
[0139] Taking a 3° interval as an example, with the center (y,x) as the origin, the annular region between radii r1 = 0.5r and r2 = 1.5r is expanded into a rectangular region every 3° interval, transforming it into... Figure 6 The rectangular region image shown has 120 columns and r2-r1+1 rows.
[0140] S223: Perform smoothing filtering on the rectangular region image and perform interlaced subtraction. Keep the values greater than 0 after subtraction and set the values less than or equal to 0 to 0 to obtain the gradient image.
[0141] In this step, a 3x3 or 5x5 smoothing filter can be applied to the expanded rectangular region image. Then, alternating row subtraction is performed, that is, the (n+1)th row is subtracted from the (n-1)th row. Values greater than 0 are retained, while values less than or equal to 0 are set to 0, resulting in the gradient image, as shown below. Figure 7 As shown.
[0142] S224: Obtain the maximum pixel value and its coordinates for each row of the gradient image, and take the rows whose maximum pixel value is not less than the set threshold as valid rows.
[0143] This step, based on the gradient image, uses rows as a reference to obtain the maximum value of pixels and their coordinates for each row. Then, a threshold T is set; if the maximum pixel value in a row is not less than T, the row is considered valid; otherwise, it is considered invalid.
[0144] To prevent the influence of noise, the maximum pixel value of each row can be replaced by the maximum pixel value of the row and the average value of several pixels near the maximum pixel value in that row.
[0145] For example, if the m-th pixel in a row is the maximum pixel value, then the average pixel value of the five points (m-2, m-1, m, m+1, m+2) can be used to replace the maximum value at position m.
[0146] S225: Transform the coordinates of the maximum pixel value of the valid row back onto the annular region image of the iris image to obtain the set of valid points on the pupil boundary.
[0147] Assuming there are n valid rows, we obtain the coordinates of the maximum pixel value in all valid rows: (m1,1), (m2,2), (m3,3), ... . Then, these coordinates are transformed back to the original iris image. Figure 6, Figure 7 By corresponding the angles one-to-one with those in the original iris image and transforming the coordinates back to the original iris image based on the angle values, the pupil coordinates on the annular region image are obtained, which is the effective set of points on the pupil boundary.
[0148] Assumption Figure 7 There are 20 rows. For each row, the maximum pixel value and its coordinates are obtained. Then, the average of 5 nearby pixels is taken from the coordinates of the maximum pixel value and used to replace the original maximum pixel value. Simultaneously, assuming a threshold T of 20, if the maximum pixel value in a row is less than 20, that row is considered invalid. Taking 3 invalid rows as an example, there are 17 valid rows. The actual number of coordinates of the maximum pixel value obtained is 17, and the set of valid points on the pupil boundary after coordinate transformation is also 17.
[0149] After obtaining the effective point set, elliptic curve fitting is performed in S230 based on the effective point set. A specific implementation of elliptic curve fitting may include:
[0150] S231: Obtain the points (y_max, xx2) and (y_min, xx1) with the maximum and minimum ordinates on the effective point set on the pupil boundary, and the points (yy2, x_max) and (yy1, x_min) with the maximum and minimum abscissas.
[0151] Assume the coordinates of the effective point set on the pupil boundary in the iris image are (y1, x1), (y2, x2), (y3, x3)...(yn, xn), as follows Figure 8 As shown. Take the maximum and minimum values of y1, y2, y3...yn and denote them as (y_max, xx2) and (y_min, xx1). Take the maximum and minimum values of x1, x2, x3...xn and denote them as (yy2, x_max) and (yy1, x_min).
[0152] S232: Calculate the initial center point (y_point, x_point), the initial major axis a, and the initial minor axis b.
[0153] Where y_point=(y_min+y_max) / 2, x_point=(x_min+x_max) / 2, a=max(a_point,b_point), b=min(a_point,b_point), a_point is the Euclidean distance between (y_min,xx1) and (y_max,xx2), and b_point is the Euclidean distance between (yy1,x_min) and (yy2,x_max);
[0154] S233: Set the traversal range of the center point, major axis, and minor axis based on the initial center point, initial major axis, and initial minor axis.
[0155] In one example, the range to be traversed is:
[0156] The traversal range in the y-direction is [y_point-5, y_point+5], the traversal range in the x-direction is [x_point-5, x_point+5], the traversal range of the major axis is [a-10, a+10], and the traversal range of the minor axis is [b-10, b+10]. It should be noted that the values of 5 and 10 in this paragraph are merely illustrative and are not intended to limit the scope of this invention.
[0157] S234: For each value within the traversal range of the center point, major axis, and minor axis, perform elliptic curve fitting, and find the elliptic curve that matches the set of valid points on the pupil boundary the most, as the fitted elliptic curve.
[0158] In this step, the system iterates through the range described above, with (y_point, x_point) as the center point and a = max(a_point, b_point) as the major axis and b = min(a_point, b_point) as the minor axis. For each value within the range, an elliptic curve is fitted using the standard elliptic curve equation formula:
[0159]
[0160] Until the elliptic curve that best matches the set of valid points on the pupil boundary is found, such as... Figure 9 As shown, the parameters of the elliptic curve can be obtained. After fitting, the final parameters of the elliptic curve can include the length of the major axis A, the length of the minor axis B, and the two foci F1 and F2 on the major axis and the distance c between them.
[0161] This invention does not limit the specific method of correcting the iris image, as long as the iris image of the object to be identified when the human eye is looking straight ahead can be obtained. In one example, the iris image is corrected by the following formula;
[0162]
[0163] Where (X',Y') are the coordinates of each pixel in the iris image before correction, (X,Y) are the coordinates of each pixel in the iris image after correction, that is, the coordinates of each pixel in the iris image when the human eye of the object to be identified is looking straight ahead, A and B are the major axis length and minor axis length of the fitted elliptic curve, respectively, and θ is the deflection angle of (X',Y').
[0164] The derivation process of the aforementioned equation (1) is as follows:
[0165] The formula for mapping the iris from a circle to an ellipse in polar coordinates is:
[0166]
[0167] Where t is the coordinate point in the polar coordinate system, and its value ranges from [0, 2π].
[0168] To visually represent the rotational changes, (2) is modified as follows:
[0169]
[0170] Conversely, the transformation process from an ellipse to a circle is derived, and the specific transformation process is as follows:
[0171] First, the iris image is transformed into an ellipse according to the standard formula. Then, a scaling transformation from ellipse to circle is performed, using x = x' and y = (B / A) * y', resulting in a circle x. 2 +y 2 =A 2 .
[0172] Finally, an inverse transformation is performed to map the coordinate system to the coordinate system of the original iris image, resulting in equation (1). During the transformation process, the bilinear interpolation method can also be used to fill the pixels of the transformed image.
[0173] Iris images before and after correction, as shown below Figure 10 and Figure 11 As shown. In Figure 11 Based on the located inner and outer boundaries of the iris, iris features are extracted and used as the final iris features for iris recognition.
[0174] Example 2:
[0175] This invention provides an iris recognition device, such as... Figure 12 As shown, the device includes:
[0176] Image acquisition module 100 is used to acquire the iris image of the object to be identified.
[0177] The eye deflection judgment module 200 is used to fit the pupil boundary to an ellipse on the iris image and determine whether the object to be identified has deflected its eye based on the fitted elliptical curve.
[0178] The iris image acquisition module 300 is used to correct the iris image according to the parameters of the fitted elliptic curve if it is determined that the object to be identified has deflected its eyeballs, so as to obtain the iris image of the object to be identified when its eyes are looking straight ahead; if it is determined that the object to be identified has not deflected its eyeballs, the iris image is determined to be the iris image of the object to be identified when its eyes are looking straight ahead.
[0179] The iris recognition module 400 is used to perform iris recognition on the object to be recognized based on the iris image of the object when the human eye is looking straight ahead.
[0180] The present invention first acquires the iris image of the object to be identified, and then determines whether the object has deflected its eyeball by fitting an elliptical curve to the pupil boundary of the iris image. When the object deflects its eyeball, the iris image is corrected according to the parameters of the fitted elliptical curve to obtain the iris image of the object when its eyes are looking straight ahead, and the iris image of the object when its eyes are looking straight ahead is used for iris recognition.
[0181] This invention corrects the iris image when the object being identified is strabismic, enabling iris recognition even with strabismic iris images. This improves the accuracy of iris recognition, reduces the posture requirements of the object being identified, and increases the efficiency of iris recognition.
[0182] The aforementioned eye deflection detection module includes:
[0183] The pupil boundary extraction unit is used to locate the pupil on the iris image and obtain the pupil boundary.
[0184] The effective point set determination unit is used to correct the points on the pupil boundary and remove noise using the gradient information of the iris image, so as to obtain the effective point set on the pupil boundary.
[0185] The fitting and judgment unit is used to fit an elliptic curve based on the effective point set on the pupil boundary, and to determine whether the object to be identified has undergone eyeball deflection based on the flatness of the fitted elliptic curve.
[0186] The effective point set determination unit includes:
[0187] The spot removal unit is used to detect spots in the iris image and remove spots using biquadratic interpolation.
[0188] The rectangular region image unfolding unit is used to unfold a ring-shaped region image with center (y,x) and radius range [r1,r2] on the iris image after removing light spots into a rectangular region image by taking values at certain intervals of angle.
[0189] Where (y,x) represents the pupil center obtained by locating the pupil on the iris image, r1 = a1r, r2 = a2r, r is the pupil radius obtained by locating the pupil on the iris image, and a1 and a2 are set coefficients, 0 <a1<1<a2。
[0190] The gradient image acquisition unit is used to perform smoothing filtering on the rectangular region image and perform interlaced subtraction, retaining the values greater than 0 after subtraction and setting the values less than or equal to 0 to 0, thus obtaining the gradient image.
[0191] The valid row determination unit is used to obtain the maximum pixel value and its coordinates of each row of the gradient image, and to identify rows whose maximum pixel value is not less than a set threshold as valid rows.
[0192] The coordinate transformation unit is used to transform the coordinates of the maximum pixel value of the effective row back to the annular region image of the iris image, so as to obtain the effective point set on the pupil boundary.
[0193] In the effective row determination unit, obtaining the maximum pixel value and coordinates of each row of the gradient image further includes:
[0194] Replace the maximum pixel value of each row with the average of the maximum pixel value of that row and the average of several pixels near the maximum pixel value in that row.
[0195] In the aforementioned fitting and judgment unit, elliptic curve fitting is performed based on the effective point set on the pupil boundary, including:
[0196] The data acquisition unit is used to acquire the points (y_max, xx2) and (y_min, xx1) with the maximum and minimum vertical coordinates, and the points (yy2, x_max) and (yy1, x_min) with the maximum and minimum horizontal coordinates, respectively, in the effective point set on the pupil boundary.
[0197] The initial parameter calculation unit is used to calculate the initial center point (y_point, x_point), the initial major axis a, and the initial minor axis b.
[0198] Where y_point=(y_min+y_max) / 2, x_point=(x_min+x_max) / 2, a=max(a_point,b_point), b=min(a_point,b_point), a_point is the Euclidean distance between (y_min,xx1) and (y_max,xx2), and b_point is the Euclidean distance between (yy1,x_min) and (yy2,x_max).
[0199] The traversal range determination unit is used to set the traversal range of the center point, major axis, and minor axis based on the initial center point, initial major axis, and initial minor axis.
[0200] The traversal unit is used to perform elliptic curve fitting for each value within the traversal range of the center point, major axis, and minor axis, and find the elliptic curve that matches the set of valid points on the pupil boundary the most.
[0201] In the fitting and judgment unit, the step of judging whether the object to be identified has undergone eye deviation based on the flatness of the fitted elliptical curve includes:
[0202] Calculate the ratio of the distance between the two foci on the major axis of the fitted elliptic curve to the length of the major axis to obtain the first ratio; or, calculate the ratio of the length of the major axis to the length of the minor axis of the fitted elliptic curve to obtain the second ratio.
[0203] When the first ratio is greater than the first set threshold or when the second ratio is greater than the second set threshold, it is determined that eye deviation has occurred.
[0204] In this invention, the iris image is corrected using the following formula;
[0205]
[0206] Where (X',Y') are the coordinates of each pixel in the iris image before correction, (X,Y) are the coordinates of each pixel in the iris image after correction, A and B are the major axis length and minor axis length of the fitted elliptic curve, respectively, and θ is the deflection angle of (X',Y').
[0207] The device provided in this embodiment of the invention has the same implementation principle and technical effects as the aforementioned method embodiment 1. For the sake of brevity, any parts not mentioned in this device embodiment can be referred to the corresponding content in the aforementioned method embodiment 1. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the aforementioned device and unit can all be referred to the corresponding processes in the aforementioned method embodiment 1, and will not be repeated here.
[0208] Example 3:
[0209] The method described in Embodiment 1 of this invention can implement business logic through a computer program and record it on a storage medium. This storage medium can be read and executed by a computer, achieving the effects of the scheme described in Embodiment 1 of this specification. Therefore, this invention also provides a computer-readable storage medium for iris recognition, including a memory for storing processor-executable instructions. When executed by a processor, the instructions implement the steps of the iris recognition method of Embodiment 1.
[0210] This invention corrects the iris image when the object being identified is strabismic, enabling iris recognition even with strabismic iris images. This improves the accuracy of iris recognition, reduces the posture requirements of the object being identified, and increases the efficiency of iris recognition.
[0211] The storage medium may include a physical device for storing information, typically digitizing the information and then storing it using electrical, magnetic, or optical methods. The storage medium may include: devices that store information using electrical energy, such as various types of memory, like RAM and ROM; devices that store information using magnetic energy, such as hard disks, floppy disks, magnetic tapes, magnetic core memory, bubble memory, and USB flash drives; and devices that store information using optical methods, such as CDs or DVDs. Of course, there are other readable storage media, such as quantum memories and graphene memories.
[0212] The storage medium described above may also include other implementation methods according to the description of method embodiment 1. The implementation principle and technical effects of this embodiment are the same as those of the aforementioned method embodiment 1. For details, please refer to the description of the relevant method embodiment 1, which will not be repeated here.
[0213] Example 4:
[0214] The present invention also provides a device for iris recognition. This device may be a standalone computer, or it may include an actual operating device that uses one or more of the methods or embodiments described in this specification. The iris recognition device may include at least one processor and a memory storing computer-executable instructions. When the processor executes the instructions, it implements the steps of any one or more of the iris recognition methods described in Embodiment 1.
[0215] This invention corrects the iris image when the object being identified is strabismic, enabling iris recognition even with strabismic iris images. This improves the accuracy of iris recognition, reduces the posture requirements of the object being identified, and increases the efficiency of iris recognition.
[0216] The device described above may include other implementation methods according to the description of method embodiment 1. The implementation principle and technical effects of this embodiment are the same as those of the aforementioned method embodiment 1. For details, please refer to the description of the relevant method embodiment 1, which will not be repeated here.
[0217] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the scope of the technology disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. All should be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. An iris recognition method, characterized in that, The method includes: Acquire the iris image of the object to be identified; The pupil boundary is fitted with an ellipse curve on the iris image, and the eyeball deflection of the object to be identified is determined based on the fitted ellipse curve. If it is determined that the object to be identified has undergone eye deviation, the iris image is corrected according to the parameters of the fitted elliptic curve to obtain the iris image of the object when the human eye is looking straight ahead; if it is determined that the object to be identified has not undergone eye deviation, the iris image is determined to be the iris image of the object when the human eye is looking straight ahead. Iris recognition is performed on the object to be identified based on the iris image of the object when the human eye is looking straight ahead; The step of fitting an ellipse curve to the pupil boundary on the iris image and determining whether the object to be identified has undergone eyeball deflection based on the fitted ellipse curve includes: The pupil is located on the iris image to obtain the pupil boundary; Gradient information from the iris image is used to correct points on the pupil boundary and remove noise, resulting in a valid set of points on the pupil boundary. Elliptic curve fitting is performed based on the effective point set on the pupil boundary, and the flatness of the fitted elliptic curve is used to determine whether the object to be identified has undergone eyeball deflection. The step of using gradient information from the iris image to correct points on the pupil boundary and remove noise to obtain a valid set of points on the pupil boundary includes: Spot detection is performed on the iris image, and spot removal is achieved using biquadratic interpolation; The annular region image with center (y, x) and radius range [r1, r2] on the iris image after removing light spots is expanded into a rectangular region image by taking values at certain intervals of angle. Where (y, x) represents the pupil center obtained by locating the pupil on the iris image, r1 = a1r, r2 = a2r, r is the pupil radius obtained by locating the pupil on the iris image, and a1 and a2 are set coefficients, 0 < a1 < 1. <a2; Smoothing filtering is performed on the rectangular region image, and alternating subtraction is performed. Values greater than 0 after subtraction are retained, and values less than or equal to 0 are set to 0 to obtain the gradient image. Obtain the maximum pixel value and its coordinates for each row of the gradient image, and select rows whose maximum pixel value is not less than a set threshold as valid rows; The coordinates of the maximum pixel values in the valid rows are transformed back onto the annular region of the iris image to obtain the set of valid points on the pupil boundary.
2. The iris recognition method according to claim 1, characterized in that, The step of obtaining the maximum pixel value and coordinates of each row of the gradient image also includes: Replace the maximum pixel value of each row with the average of the maximum pixel value of that row and the average of several pixels near the maximum pixel value in that row.
3. The iris recognition method according to claim 1, characterized in that, The step of fitting an elliptic curve based on the effective set of points on the pupil boundary includes: Obtain the points (y_max, xx2) and (y_min, xx1) with the maximum and minimum ordinates on the valid point set on the pupil boundary, and the points (yy2, x_max) and (yy1, x_min) with the maximum and minimum abscissas. Calculate the initial center point (y_point, x_point), the initial major axis a, and the initial minor axis b; Where y_point = (y_min+y_max) / 2, x_point = (x_min+x_max) / 2, a = max(a_point, b_point), b = min(a_point, b_point), a_point is the Euclidean distance between (y_min, xx1) and (y_max, xx2), and b_point is the Euclidean distance between (yy1, x_min) and (yy2, x_max); Define the traversal range of the center point, major axis, and minor axis based on the initial center point, initial major axis, and initial minor axis; For each value within the traversal range of the center point, major axis, and minor axis, perform elliptic curve fitting, and find the elliptic curve that matches the set of valid points on the pupil boundary most often as the fitted elliptic curve.
4. The iris recognition method according to claim 1, characterized in that, The step of determining whether the object to be identified has undergone eye movement based on the flatness of the fitted elliptical curve includes: Calculate the ratio of the distance between the two foci on the major axis of the fitted elliptic curve to the length of the major axis to obtain the first ratio; or, calculate the ratio of the length of the major axis to the length of the minor axis of the fitted elliptic curve to obtain the second ratio. When the first ratio is greater than the first set threshold or when the second ratio is greater than the second set threshold, it is determined that eye deviation has occurred.
5. The iris recognition method according to any one of claims 1-4, characterized in that, The iris image is corrected using the following formula; Where (X', Y') are the coordinates of each pixel in the iris image before correction, (X, Y) are the coordinates of each pixel in the iris image after correction, and A and B are the major axis length and minor axis length of the fitted elliptic curve, respectively. Let be the deflection angle of (X', Y').
6. An iris recognition device, characterized in that, The device includes: The image acquisition module is used to acquire the iris image of the object to be identified; An eye deflection detection module is used to fit an ellipse curve to the pupil boundary on the iris image, and to determine whether the object to be identified has undergone eye deflection based on the fitted ellipse curve. The iris image acquisition module is used to correct the iris image according to the parameters of the fitted elliptic curve if it is determined that the object to be identified has deflected its eyeballs to obtain the iris image of the object when it is looking straight ahead; if it is determined that the object to be identified has not deflected its eyeballs, the iris image is determined to be the iris image of the object when it is looking straight ahead. The iris recognition module is used to perform iris recognition on the object to be identified based on the iris image of the object when the human eye is looking straight ahead; The eye deflection detection module includes: The pupil boundary extraction unit is used to locate the pupil on the iris image and obtain the pupil boundary; The effective point set determination unit is used to correct the points on the pupil boundary and remove noise using the gradient information of the iris image to obtain the effective point set on the pupil boundary. The fitting and judgment unit is used to fit an elliptic curve based on the effective point set on the pupil boundary, and to determine whether the object to be identified has undergone eyeball deflection based on the flatness of the fitted elliptic curve. The effective point set determination unit includes: A spot removal unit is used to detect spots in the iris image and remove spots using biquadratic interpolation. The rectangular region image unfolding unit is used to unfold the annular region image with center (y, x) and radius range [r1, r2] on the iris image after removing light spots into a rectangular region image by taking values at certain intervals of angle. Where (y, x) represents the pupil center obtained by locating the pupil on the iris image, r1 = a1r, r2 = a2r, r is the pupil radius obtained by locating the pupil on the iris image, and a1 and a2 are set coefficients, 0 < a1 < 1. <a2; The gradient image acquisition unit is used to perform smoothing filtering on the rectangular region image and perform interlaced subtraction, retaining the values greater than 0 after subtraction and setting the values less than or equal to 0 to 0, thereby obtaining the gradient image; The valid row determination unit is used to obtain the maximum pixel value and its coordinates of each row of the gradient image, and to take the row with the maximum pixel value not less than a set threshold as a valid row. The coordinate transformation unit is used to transform the coordinates of the maximum pixel value of the effective row back to the annular region image of the iris image, so as to obtain the effective point set on the pupil boundary.
7. A computer-readable storage medium for iris recognition, characterized in that, It includes a memory for storing processor-executable instructions, which, when executed by the processor, implement the steps of the iris recognition method according to any one of claims 1-5.
8. A device for iris recognition, characterized in that, It includes at least one processor and a memory storing computer-executable instructions, wherein the processor executes the instructions to implement the steps of the iris recognition method according to any one of claims 1-5.