Contact lens detection and iris recognition method, device, readable storage medium and equipment

By acquiring eye images, calculating pixel average values ​​and gradient transformations, performing matrix addition and binarization, and identifying the colored contact lens area, the problem of colored contact lenses affecting iris recognition is solved. This achieves accurate recognition of both dark and light colored contact lenses, improving the accuracy and robustness of iris recognition.

CN116152139BActive Publication Date: 2026-04-28BEIJING TECHSHINO TECHNOLOGY CO LTD +1
View PDF 2 Cites 0 Cited by

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-04-28

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately identify colored contact lenses, especially dark colored contact lenses, which negatively impact the accuracy of iris recognition. Furthermore, deep learning methods are highly dependent on training samples and cannot recognize all colored contact lens styles.

Method used

By acquiring eye images, calculating the average pixel value, performing grayscale stretching and gradient transformation, and using matrix addition and binarization, the proportion of pixels outside the pupil area is statistically analyzed to determine whether colored contact lenses are being worn, and the colored contact lens area is treated as noise during iris recognition.

Benefits of technology

It achieves accurate recognition of both dark and light colored contact lenses, improves the accuracy of iris recognition, and is not dependent on image samples, thus exhibiting strong robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116152139B_ABST
    Figure CN116152139B_ABST
Patent Text Reader

Abstract

The application discloses a kind of beauty pupil detection and iris identification method, device, readable storage medium and equipment, belong to iris identification field.The present application utilizes the characteristics that the texture of beauty pupil area is relatively complex, and the relative gradient is relatively large, and the outer circle of normal iris is relatively smooth;And the characteristics that the pixel value of beauty pupil area is relatively small relative to the whole iris area are used for beauty pupil detection.The beauty pupil detection and iris identification method first acquires eye image, then respectively carries out gray scale stretching and gradient transformation to eye image, and carries out matrix addition operation and binaryzation, whether wearing beauty pupil is judged according to the proportion of the pixel with value 1 in the part outside pupil area on the obtained binary image.This application can accurately identify dark beauty pupil and light beauty pupil, and does not need to rely on image sample, has strong robustness, and can identify various styles of beauty pupil.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of iris recognition, and in particular to a method, apparatus, readable storage medium, and device for detecting colored contact lenses and iris recognition. Background Technology

[0002] The iris is a ring-like structure located between the pupil and the sclera, such as Figure 1 As shown, the portion between the outer and inner circles of the iris is the iris itself. Due to the obstruction by the eyelids and eyelashes, some iris information is lost. The iris is approximately 12mm in diameter and 0.5mm thick. The subtle, interwoven features resembling filaments or stripes within the iris are what make it unique. These features are typically considered the texture of the iris and are used for iris recognition.

[0003] Iris recognition mainly includes iris image acquisition, iris image quality assessment, iris image preprocessing, iris image normalization, iris image feature extraction, and iris feature comparison.

[0004] Iris recognition essentially identifies the iris region inside the eye. However, in practical applications, users (especially women) often wear colored contact lenses, which can cause problems and affect the accuracy of iris recognition. Colored contact lenses can be broadly categorized into three types: clear lenses (similar to regular contact lenses, which generally have no impact on iris recognition), light-colored lenses, and dark-colored lenses. Details are as follows: Figure 2 , 3 As shown, Figure 2 Dark colored contact lenses, Figure 3 Light-colored contact lenses.

[0005] The existing technologies for detecting colored contact lenses mainly include the following two methods:

[0006] 1) Based on the characteristic that the colored contact lens area is relatively dark, grayscale judgment is performed, mainly by directly judging the pixel grayscale value, and then setting a threshold to judge the colored contact lens area.

[0007] This method has some recognition effect on dark colored contact lenses, but it basically cannot recognize light colored contact lenses.

[0008] 2) The deep learning-based method mainly involves collecting training sample data, which is divided into two categories: colored contact lenses and non-colored contact lenses. Then, a deep network model is found and trained to perform binary classification of colored contact lenses and non-colored contact lenses.

[0009] Deep learning is highly dependent on training samples, especially for colored contact lens styles. In reality, it is impossible to collect all colored contact lens styles, which leads to the training of deep network models that cannot classify them accurately. Summary of the Invention

[0010] To address the technical problems of the aforementioned colored contact lens detection methods being unable to recognize colored contact lenses and relying on training samples, this invention provides a colored contact lens detection and iris recognition method, apparatus, readable storage medium, and device that can accurately identify both dark and light colored contact lenses, and does not rely on image samples, thus exhibiting strong robustness.

[0011] The technical solution provided by this invention is as follows:

[0012] In a first aspect, the present invention provides a method for detecting colored contact lenses, the method comprising:

[0013] Acquire eye images;

[0014] Calculate the average pixel value of the eye image, and stretch the grayscale of pixels in the eye image that are less than the average pixel value to [0, 1], and set the pixels that are greater than the average pixel value to 0, to obtain the first image matrix;

[0015] Gradient transformation is performed on the eye image, and the gray levels of each pixel in the gradient transformation image are normalized to [0, 1] to obtain the second image matrix;

[0016] Perform matrix addition on the first image matrix and the second image matrix, and binarize each pixel on the image obtained by matrix addition according to the set binarization threshold to obtain a binarized image;

[0017] The proportion of pixels with a value of 1 in the portion of the binary image outside the pupil area is counted. If the proportion is greater than a set contact lens threshold, it is determined that no contact lenses are being worn; otherwise, it is determined that contact lenses are being worn.

[0018] Furthermore, the method further includes: preprocessing the acquired eye image, the preprocessing including:

[0019] Initial pupil localization is performed on the eye image to obtain the pupil position, pupil radius, upper eyelid boundary, and lower eyelid boundary;

[0020] The eye image is cropped by selecting the vertex of the upper eyelid boundary, the bottom point of the lower eyelid boundary, and the two intersection points of the upper and lower eyelid boundaries as cropping boundaries to obtain an eye region image.

[0021] Spot detection is performed on the eye region image. If a spot is detected, biquadratic interpolation is used to fill the detected spot in the eye region image.

[0022] Furthermore, the proportion of pixels with a value of 1 in the portion of the binary image outside the pupil region includes:

[0023] Select the central region on the binarized image and count the total number of pixels N in the central region. T ;

[0024] Count the number N1 of pixels with a value of 1 in the portion of the central region excluding the pupil region;

[0025] Using the formula N1 / N T Calculate the ratio.

[0026] Secondly, the present invention provides a colored contact lens detection device, the device comprising:

[0027] Image acquisition module, used to acquire images of the eyes;

[0028] The first image matrix calculation module is used to calculate the average pixel value of the eye image, and to stretch the grayscale of pixels in the eye image that are less than the average pixel value to [0, 1], and set the pixels that are greater than the average pixel value to 0, so as to obtain the first image matrix;

[0029] The second image matrix calculation module is used to perform gradient transformation on the eye image and normalize the gray level of each pixel in the gradient transformed image to [0, 1] to obtain the second image matrix.

[0030] The binarization image calculation module is used to perform matrix addition on the first image matrix and the second image matrix, and to perform binarization processing on each pixel in the image obtained by matrix addition according to the set binarization threshold to obtain a binarized image.

[0031] The colored contact lens detection module is used to count the proportion of pixels with a value of 1 in the part of the binary image outside the pupil area. If the proportion is greater than the set colored contact lens threshold, it is determined that no colored contact lenses are being worn; otherwise, it is determined that colored contact lenses are being worn.

[0032] Furthermore, the device also includes a preprocessing module for preprocessing the acquired eye images, the preprocessing module comprising:

[0033] The pupil initial localization unit is used to perform initial pupil localization on the eye image to obtain the pupil position, pupil radius, upper eyelid boundary, and lower eyelid boundary;

[0034] The image cropping unit is used to select the vertex of the upper eyelid boundary, the bottom point of the lower eyelid boundary, and the two intersection points of the upper and lower eyelid boundaries as cropping boundaries to crop the eye image and obtain an eye region image.

[0035] The spot filling unit is used to detect spots in the eye region image. If a spot is detected, the detected spot in the eye region image is filled using biquadratic interpolation.

[0036] Furthermore, in the colored contact lens determination module, the proportion of pixels with a value of 1 in the portion of the binarized image outside the pupil region includes:

[0037] The central region selection unit is used to select a central region on the binarized image and count the total number N pixels in the central region. T ;

[0038] A pixel counting unit is used to count the number N1 of pixels with a value of 1 in the part of the central region excluding the pupil region;

[0039] The proportional calculation unit is used to calculate the ratio using the formula N1 / N. T Calculate the ratio.

[0040] Thirdly, the present invention provides a computer-readable storage medium for detecting colored contact lenses, including a memory for storing processor-executable instructions, which, when executed by the processor, implement the steps of the colored contact lens detection method described in the first aspect.

[0041] Fourthly, the present invention provides a device for detecting colored contact lenses, comprising at least one processor and a memory storing computer-executable instructions, wherein the processor executes the instructions to implement the steps of the colored contact lens detection method described in the first aspect.

[0042] Fifthly, the present invention provides an iris recognition method, the method comprising:

[0043] The colored contact lens detection method described in the first aspect is used for colored contact lens detection;

[0044] Iris detection is performed on the eye image to obtain the iris region;

[0045] The proportion of pixels with a value of 1 in the iris region of the binarized image is counted. If the proportion is less than a set recognition threshold, the eye image is used for iris recognition.

[0046] Furthermore, during iris recognition, the regions containing pixels with a value of 1 in the binarized image are treated as noise regions.

[0047] Sixthly, the present invention provides an iris recognition device, the device comprising:

[0048] A colored contact lens detection module, used to perform colored contact lens detection using the colored contact lens detection device described in the second aspect;

[0049] An iris detection module is used to perform iris detection on the eye image to obtain the iris region;

[0050] The recognition and judgment module is used to count the proportion of pixels with a value of 1 in the iris region of the binarized image. If the proportion is less than a set recognition threshold, the eye image is used for iris recognition.

[0051] Furthermore, during iris recognition, the regions containing pixels with a value of 1 in the binarized image are treated as noise regions.

[0052] In a seventh aspect, the present invention provides a computer-readable storage medium for iris recognition, including a memory for storing processor-executable instructions that, when executed by the processor, implement the steps of the iris recognition method described in the fifth aspect.

[0053] Eighthly, 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 fifth aspect.

[0054] The present invention has the following beneficial effects:

[0055] This invention utilizes the characteristics of the colored contact lens area, which has a more complex texture and a larger relative gradient, while the outer circle of a normal iris is smoother; and it also utilizes the fact that the pixel value of the colored contact lens area is relatively small compared to the entire iris area for colored contact lens detection. First, an eye image is acquired, then grayscale stretching and gradient transformation are performed on the eye image, followed by matrix addition and binarization. The proportion of pixels with a value of 1 in the area outside the pupil region of the resulting binarized image determines whether colored contact lenses are being worn.

[0056] This invention can accurately identify both dark and light colored contact lenses without relying on image samples, exhibiting strong robustness and the ability to recognize various styles of colored contact lenses. Attached Figure Description

[0057] Figure 1 A diagram showing the various parts of the eye (including the iris);

[0058] Figure 2 This is an illustration of an eye wearing dark colored contact lenses.

[0059] Figure 3 This is a schematic diagram of an eye wearing light-colored contact lenses.

[0060] Figure 4 This is a flowchart of the colored contact lens detection method of the present invention;

[0061] Figure 5 This is a schematic diagram of the initial pupil localization results;

[0062] Figure 6This is a schematic diagram of the captured image of the eye region;

[0063] Figure 7 A schematic diagram of the eye image after the light spot has been filled in;

[0064] Figure 8 This is a schematic diagram of a binarized image;

[0065] Figure 9 This is a schematic diagram of selecting the central region in a binarized image.

[0066] Figure 10 This is a schematic diagram of the contact lens detection device of the present invention;

[0067] Figure 11 This is a flowchart of the iris recognition method of the present invention;

[0068] Figure 12 This is a schematic diagram showing the localization results of the inner and outer boundaries of the iris on a membrane image.

[0069] Figure 13 This is a schematic diagram of a noise template;

[0070] Figure 14 This is a schematic diagram of the iris recognition device of the present invention. Detailed Implementation

[0071] 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.

[0072] Example 1:

[0073] This invention provides a method for detecting colored contact lenses, such as... Figure 4 As shown, the method includes:

[0074] S100: Acquire eye image.

[0075] After acquiring the eye image, it can be preprocessed as needed. In one example, the preprocessing method includes:

[0076] S101: Perform initial pupil localization on the eye image to obtain the pupil position, pupil radius, upper eyelid boundary, and lower eyelid boundary.

[0077] This step first uses edge detection operators and edge gradient binarization to perform initial pupil localization, preliminarily determining the pupil position, pupil radius, and the boundaries of the upper and lower eyelids. Both the upper and lower eyelid boundaries are parabolic. Figure 5 As shown.

[0078] S102: Select the vertex of the upper eyelid boundary, the bottom point of the lower eyelid boundary, and the two intersection points of the upper and lower eyelid boundaries as the cropping boundaries to crop the eye image and obtain the eye region image.

[0079] This step is used to crop the image based on the initial pupil localization result of S101, reduce the image size, and decrease noise.

[0080] The specific process can be as follows: Select the vertex of the parabola at the upper eyelid boundary, the base of the parabola at the lower eyelid boundary, the intersection of the upper and lower eyelid parabolas on the left, and the intersection of the upper and lower eyelid parabolas on the right as the upper, lower, left, and right boundaries of the cropped image. The cropped image is shown below. Figure 6 As shown.

[0081] S103: Perform spot detection on the eye region image. If a spot is detected, fill the detected spot in the eye region image using biquadratic interpolation.

[0082] When acquiring eye images, light spots can easily appear within the pupil due to factors such as supplemental lighting. This invention utilizes light spot detection and double quadratic difference to fill these light spots. The effect image after light spot filling is shown below. Figure 7 As shown.

[0083] S200: Calculate the average pixel value of the eye image, and stretch the grayscale of pixels in the eye image that are less than the average pixel value to [0, 1], and set the pixels that are greater than the average pixel value to 0, to obtain the first image matrix.

[0084] One specific implementation of this step is as follows: sum and average all pixels in the eye image to calculate the average pixel value, stretch the grayscale of pixels in the eye image that are less than the average pixel value to [0,1], and set the value of pixels that are greater than the average pixel value to 0, thus obtaining the first image matrix Img1.

[0085] S300: Perform gradient transformation on the eye image, and normalize the gray levels of each pixel in the image obtained by gradient transformation to [0, 1] to obtain the second image matrix.

[0086] This step can use the Canny edge detection operator to perform gradient transformation on the eye image, and then normalize the gray levels of each pixel in the gradient transformed image to [0,1] to obtain the second image matrix Img2.

[0087] S400: Perform matrix addition on the first image matrix and the second image matrix, and perform binarization on each pixel of the image obtained by matrix addition according to the set binarization threshold to obtain a binarized image.

[0088] This step adds the first image matrix Img1 and the second image matrix Img2 to obtain the result matrix Image = Img1 + Img2. Then, it is compared with a binarization threshold, for example, set to 0.6, and then binarization processing is performed. The binarization threshold of 0.6 is only illustrative and is not intended to limit the invention. The specific binarization method is as follows:

[0089]

[0090] An example of a binarized image is shown in Figure 8.

[0091] S500: Calculate the proportion of pixels with a value of 1 in the part of the binary image outside the pupil area. If the proportion is greater than the set contact lens threshold, it is judged that no contact lenses are being worn; otherwise, it is judged that contact lenses are being worn.

[0092] In normal, non-colored contact lens images, most pixels except for the pupil area have a value of 1. However, in images with colored contact lenses, a large proportion of pixels outside the pupil area have a value of 0. Therefore, the proportion of pixels with a value of 1 in the portion of the binarized image outside the pupil area can be used to determine whether colored contact lenses are being worn.

[0093] Having obtained the position and radius of the pupil in S101, we can determine the size and coordinates of the pupil region, and then perform statistical analysis. Figure 8 The distribution of pixels with a value of 1 outside the pupil region is considered the colored contact lens area. Then, the ratio of the colored contact lens area to the binarized image is calculated. This ratio represents the proportion of the colored contact lens outside the pupil region. Comparing this ratio with a set colored contact lens threshold determines whether colored contact lenses are being worn.

[0094] Considering the influence of edge noise, a threshold of 0.8 is selected here for colored contact lenses. This 0.8 is merely an example and is not intended to limit the invention. The proportion of pixels with a value of 1 in the non-pupil region of the binarized image is counted. If the proportion is greater than 0.8, it is considered that no colored contact lenses are being worn; if it is less than or equal to 0.8, it is considered that colored contact lenses are being worn.

[0095] This invention utilizes the characteristics of the colored contact lens area, which has a more complex texture and a larger relative gradient, while the outer circle of a normal iris is smoother; and it also utilizes the fact that the pixel value of the colored contact lens area is relatively small compared to the entire iris area for colored contact lens detection. First, an eye image is acquired, then grayscale stretching and gradient transformation are performed on the eye image, followed by matrix addition and binarization. The proportion of pixels with a value of 1 in the area outside the pupil region of the resulting binarized image determines whether colored contact lenses are being worn.

[0096] This invention can accurately identify both dark and light colored contact lenses without relying on image samples, exhibiting strong robustness and the ability to recognize various styles of colored contact lenses.

[0097] When calculating the proportion of pixels with a value of 1 in the portion of a binarized image outside the pupil region, this invention employs the following method to eliminate the influence of noise from the upper and lower eyelids and eyelashes:

[0098] S501: Select the central region on the binarized image and count the total number of pixels N in the central region. T .

[0099] For example, the central region is an image obtained by cutting 1 / 3 down from the top edge, 1 / 3 up from the bottom edge, 1 / 3 to the right from the left boundary, and 1 / 3 to the left from the right boundary, as shown in the example. Figure 9 The rectangular portion in the diagram. The 1 / 3 figure is merely illustrative and not intended to limit the scope of the invention.

[0100] S502: Count the number of pixels N1 with a value of 1 in the part of the central region outside the pupil region.

[0101] The area consisting of pixels with a value of 1 in the part of the central region excluding the pupil area represents the colored contact lens area within the central region.

[0102] S503: Using the formula N1 / N T Calculate the proportion.

[0103] This step calculates the proportion of the colored contact lens area to the central area. This proportion is used as the proportion of pixels with a value of 1 in the part outside the pupil area in the binarized image, thus eliminating the influence of noise from the upper and lower eyelids and eyelashes.

[0104] Example 2:

[0105] This invention provides a device for detecting colored contact lenses, such as... Figure 10 As shown, the device includes:

[0106] Image acquisition module 100 is used to acquire eye images.

[0107] The first image matrix calculation module 200 is used to calculate the average pixel value of the eye image, and to stretch the grayscale of pixels in the eye image that are less than the average pixel value to [0, 1], and set the pixels that are greater than the average pixel value to 0, so as to obtain the first image matrix.

[0108] The second image matrix calculation module 300 is used to perform gradient transformation on the eye image and normalize the gray levels of each pixel in the image obtained by gradient transformation to [0, 1] to obtain the second image matrix.

[0109] The binarized image calculation module 400 is used to perform matrix addition on the first image matrix and the second image matrix, and to perform binarization processing on each pixel of the image obtained by matrix addition according to the set binarization threshold to obtain a binarized image.

[0110] The colored contact lens detection module 500 is used to count the proportion of pixels with a value of 1 in the part outside the pupil area of ​​the binarized image. If the proportion is greater than the set colored contact lens threshold, it is determined that no colored contact lenses are being worn; otherwise, it is determined that colored contact lenses are being worn.

[0111] This invention utilizes the characteristics of the colored contact lens area, which has a more complex texture and a larger relative gradient, while the outer circle of a normal iris is smoother; and it also utilizes the fact that the pixel value of the colored contact lens area is relatively small compared to the entire iris area for colored contact lens detection. First, an eye image is acquired, then grayscale stretching and gradient transformation are performed on the eye image, followed by matrix addition and binarization. The proportion of pixels with a value of 1 in the area outside the pupil region of the resulting binarized image determines whether colored contact lenses are being worn.

[0112] This invention can accurately identify both dark and light colored contact lenses without relying on image samples, exhibiting strong robustness and the ability to recognize various styles of colored contact lenses.

[0113] The device further includes a preprocessing module for preprocessing the acquired eye images, the preprocessing module comprising:

[0114] The pupil initial localization unit is used to acquire eye images and perform initial pupil localization to obtain the pupil position, pupil radius, upper eyelid boundary, and lower eyelid boundary.

[0115] The image cropping unit is used to select the vertex of the upper eyelid boundary, the bottom point of the lower eyelid boundary, and the two intersection points of the upper and lower eyelid boundaries as cropping boundaries to crop the eye image and obtain the eye region image.

[0116] The spot filling unit is used to detect spots in the eye region image. If a spot is detected, the detected spot in the eye region image is filled using biquadratic interpolation.

[0117] In the aforementioned colored contact lens detection module, the proportion of pixels with a value of 1 in the portion of the binarized image outside the pupil region is statistically analyzed, including:

[0118] The central region selection unit is used to select the central region on the binarized image and count the total number of pixels N in the central region. T .

[0119] The pixel counting unit is used to count the number N1 of pixels with a value of 1 in the part of the central region excluding the pupil region.

[0120] The proportional calculation unit is used to calculate the ratio using the formula N1 / N. T Calculate the proportion.

[0121] 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.

[0122] Example 3:

[0123] The method described in Embodiment 1 of this specification can be implemented through a computer program, and the business logic can be recorded on a storage medium. This storage medium can be read and executed by a computer, achieving the effects of the solution described in Embodiment 1. Therefore, this invention also provides a computer-readable storage medium for colored contact lens detection, including a memory for storing processor-executable instructions. When executed by a processor, the instructions implement the steps of the colored contact lens detection method described in Embodiment 1.

[0124] This invention can accurately identify both dark and light colored contact lenses without relying on image samples, exhibiting strong robustness and the ability to recognize various styles of colored contact lenses.

[0125] 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.

[0126] The apparatus described above, based on the description of method embodiment 1, may also include other implementation methods. Specific implementations can be found in the description of the relevant method embodiment 1, and will not be elaborated upon here.

[0127] Example 4:

[0128] The present invention also provides a device for detecting colored contact lenses. 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 device for detecting colored contact lenses 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 colored contact lens detection methods described in Embodiment 1.

[0129] This invention can accurately identify both dark and light colored contact lenses without relying on image samples, exhibiting strong robustness and the ability to recognize various styles of colored contact lenses.

[0130] The device described above may also include other implementation methods according to the description of the method or apparatus embodiments. For specific implementation methods, please refer to the description of the relevant method embodiment 1, which will not be repeated here.

[0131] Example 5:

[0132] This invention also provides an iris recognition method, such as... Figure 11 As shown, the method includes:

[0133] S100': Colored contact lens detection is performed using the colored contact lens detection method described in Example 1.

[0134] S200': Perform iris detection on the eye image to obtain the iris region.

[0135] Iris detection can be performed simultaneously with S100 of the aforementioned Example 1, or it can be performed separately from S100 of the aforementioned Example 1. The present invention does not limit this.

[0136] Iris detection obtains the inner boundary (which is the outer circle of the pupil) and the outer boundary of the iris, thus determining the iris region, such as... Figure 12 As shown.

[0137] S300': Calculate the ratio of pixels with a value of 1 in the iris region of the binary image. If the ratio is less than the set recognition threshold, then use the eye image for iris recognition.

[0138] In this step, the pixels with a value of 1 in the iris region of the binarized image are the colored contact lens areas within the iris region. This ratio is the ratio of the colored contact lens area to the iris region. When this ratio is large, a large area of ​​the iris texture is obscured by the colored contact lens, and the eye image cannot be used for iris recognition. Conversely, the eye image can be used for iris recognition.

[0139] This invention performs contact lens detection on eye images and determines whether iris recognition can be performed based on the contact lens detection results. The main idea is to use the positioning results of the inner and outer boundaries of the iris, and then generate a noise template to determine the ratio of the contact lens area to the entire iris area. Based on this ratio, it is determined whether it can be used for iris recognition. Figure 12 , 13 These are the iris inner and outer boundary localization results and the noise template obtained from the original eye image.

[0140] based on Figure 12 The positioning results of the inner and outer boundaries of the iris shown are referenced. Figure 13 The ratio of pixels with a value of 1 in the noise template shown to the iris region, for example, with the recognition threshold set to 50%, determines whether the eye image can be used for iris recognition based on the ratio and the recognition threshold. The recognition threshold of 50% is only an example and is not intended to limit the present invention.

[0141] Meanwhile, in iris recognition, during the process of extracting iris features, the region containing pixels with a value of 1 in the binarized image is treated as a noise region. In other words, the colored contact lens area in the iris region is treated as a noise region and is not involved in iris feature extraction or feature comparison.

[0142] In this invention, the ratio of the area occupied by the colored contact lens to the iris area is determined, and the ratio is used to determine whether the eye image can be used for iris recognition. Furthermore, the colored contact lens area is treated as noise during the iris recognition process, thereby improving the accuracy of iris recognition.

[0143] The iris recognition method provided in Embodiment 5 of the present invention includes the colored contact lens detection method described in Embodiment 1 above. For the sake of brevity, any parts not mentioned in Embodiment 5 can be referred to the corresponding content in Embodiment 1 above, and will not be repeated here.

[0144] Example 6:

[0145] This invention also provides an iris recognition device, such as... Figure 14 As shown, the device includes:

[0146] The colored contact lens detection module 100' is used to perform colored contact lens detection using the colored contact lens detection device described in Example 2.

[0147] The iris detection module 200' is used to perform iris detection on eye images to obtain the iris region.

[0148] The recognition and judgment module 300' is used to count the proportion of pixels with a value of 1 in the iris region of the binarized image. If the proportion is less than the set recognition threshold, the eye image is used for iris recognition.

[0149] In the process of iris recognition, the region containing pixels with a value of 1 in the binarized image is treated as a noise region.

[0150] The device provided in this embodiment of the invention has the same implementation principle and technical effect as the aforementioned method embodiment 5. For the sake of brevity, any parts not mentioned in this embodiment can be referred to the corresponding content in the aforementioned method embodiment 5, and will not be repeated here.

[0151] Example 7:

[0152] The method described in Embodiment 5 of this specification 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 to achieve the effects of the scheme described in Embodiment 5. 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 described in Embodiment 5.

[0153] The apparatus described above, according to method embodiment 5, may also include other implementations. Specific implementations can be found in the description of related method embodiment 1, and will not be elaborated upon here.

[0154] Example 8:

[0155] 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 device for iris recognition 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 5.

[0156] The device described above may also include other implementation methods according to the description of the method or apparatus embodiments. For specific implementation methods, please refer to the description of the relevant method embodiment 1, which will not be repeated here.

[0157] It should be noted that the apparatus or system described above in this specification may include other implementation methods based on the description of the relevant method embodiments. Specific implementation methods can be referred to the description of the method embodiments, and will not be elaborated upon here. The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for hardware + program and storage medium + program embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and relevant parts can be referred to the description of the method embodiments.

[0158] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0159] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, a laptop computer, an in-vehicle human-machine interaction device, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or any combination of these devices.

[0160] For ease of description, the above devices are described in terms of function, divided into various modules. Of course, when implementing one or more of these specifications, the functions of each module can be implemented in one or more software and / or hardware components, or a module that performs the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between devices or units, and may be electrical, mechanical, or other forms.

[0161] Those skilled in the art will also know that, besides implementing the controller using purely computer-readable program code, the same functions can be achieved by logically programming the method steps, making the controller function as logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers (PLCs), and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the devices within it used to implement various functions can also be considered structures within that hardware component. Alternatively, the devices used to implement various functions can be considered as both software modules implementing the method and structures within a hardware component.

[0162] 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.

[0163] 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.

[0164] 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.

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

[0166] 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 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, or apparatus that includes said element.

[0167] Those skilled in the art will understand that one or more embodiments of this specification can be provided as a method, system, or computer program product. Therefore, one or more embodiments of this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of this specification may take the form of a computer program product implemented 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.

[0168] One or more embodiments of this specification can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a particular task or implement a particular abstract data type. One or more embodiments of this specification can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules can reside in local and remote computer storage media, including storage devices.

[0169] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, system embodiments are basically similar to method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. In the description of this specification, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this specification. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described can be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0170] 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. A method for detecting colored contact lenses, characterized in that, The method includes: Acquire eye images; Calculate the average pixel value of the eye image, and stretch the grayscale of pixels in the eye image that are less than the average pixel value to [0, 1], and set the pixels that are greater than the average pixel value to 0, to obtain the first image matrix; Gradient transformation is performed on the eye image, and the gray levels of each pixel in the gradient transformation image are normalized to [0, 1] to obtain the second image matrix; Perform matrix addition on the first image matrix and the second image matrix, and binarize each pixel on the image obtained by matrix addition according to the set binarization threshold to obtain a binarized image; The proportion of pixels with a value of 1 in the part of the binary image outside the pupil area is counted. If the proportion is greater than the set contact lens threshold, it is determined that no contact lenses are being worn; otherwise, it is determined that contact lenses are being worn. The proportion of pixels with a value of 1 in the portion of the binary image outside the pupil region includes: Select the central region on the binarized image and count the total number of pixels N in the central region. T ; Count the number N1 of pixels with a value of 1 in the portion of the central region excluding the pupil region; Using the formula N1 / N T Calculate the ratio.

2. The method for detecting colored contact lenses according to claim 1, characterized in that, The method further includes: preprocessing the acquired eye image, the preprocessing including: Initial pupil localization is performed on the eye image to obtain the pupil position, pupil radius, upper eyelid boundary, and lower eyelid boundary; The eye image is cropped by selecting the vertex of the upper eyelid boundary, the bottom point of the lower eyelid boundary, and the two intersection points of the upper and lower eyelid boundaries as cropping boundaries to obtain an eye region image. Spot detection is performed on the eye region image. If a spot is detected, biquadratic interpolation is used to fill the detected spot in the eye region image.

3. A device for detecting colored contact lenses, characterized in that, The device includes: Image acquisition module, used to acquire images of the eyes; The first image matrix calculation module is used to calculate the average pixel value of the eye image, and to stretch the grayscale of pixels in the eye image that are less than the average pixel value to [0, 1], and set the pixels that are greater than the average pixel value to 0, so as to obtain the first image matrix; The second image matrix calculation module is used to perform gradient transformation on the eye image and normalize the gray level of each pixel in the gradient transformed image to [0, 1] to obtain the second image matrix. The binarization image calculation module is used to perform matrix addition on the first image matrix and the second image matrix, and to perform binarization processing on each pixel in the image obtained by matrix addition according to the set binarization threshold to obtain a binarized image. The colored contact lens detection module is used to count the proportion of pixels with a value of 1 in the part outside the pupil area of ​​the binarized image. If the proportion is greater than the set colored contact lens threshold, it is determined that no colored contact lenses are being worn; otherwise, it is determined that colored contact lenses are being worn. In the colored contact lens detection module, the proportion of pixels with a value of 1 in the portion of the binarized image outside the pupil region is counted, including: The central region selection unit is used to select a central region on the binarized image and count the total number N pixels in the central region. T ; A pixel counting unit is used to count the number N1 of pixels with a value of 1 in the part of the central region excluding the pupil region; The proportional calculation unit is used to calculate the ratio using the formula N1 / N. T Calculate the ratio.

4. The colored contact lens detection device according to claim 3, characterized in that, The device further includes a preprocessing module for preprocessing the acquired eye images, the preprocessing module comprising: The pupil initial localization unit is used to perform initial pupil localization on the eye image to obtain the pupil position, pupil radius, upper eyelid boundary, and lower eyelid boundary; The image cropping unit is used to select the vertex of the upper eyelid boundary, the bottom point of the lower eyelid boundary, and the two intersection points of the upper and lower eyelid boundaries as cropping boundaries to crop the eye image and obtain an eye region image. The spot filling unit is used to detect spots in the eye region image. If a spot is detected, the detected spot in the eye region image is filled using biquadratic interpolation.

5. A computer-readable storage medium for detecting colored contact lenses, characterized in that, It includes a memory for storing processor-executable instructions, which, when executed by the processor, implement the steps of the contact lens detection method according to any one of claims 1-2.

6. A device for detecting colored contact lenses, 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 contact lens detection method according to any one of claims 1-2.

7. An iris recognition method, characterized in that, The method includes: The method for detecting colored contact lenses according to any one of claims 1-2 is used; Iris detection is performed on the eye image to obtain the iris region; The proportion of pixels with a value of 1 in the iris region of the binarized image is counted. If the proportion is less than a set recognition threshold, the eye image is used for iris recognition. In the binarized image, the pixels with a value of 1 within the iris region are the colored contact lens areas within the iris region, and the ratio is the ratio of the colored contact lens areas to the iris region within the iris region.

8. The iris recognition method according to claim 7, characterized in that, When performing iris recognition, the region containing pixels with a value of 1 in the binarized image is treated as a noise region.

Citation Information

Patent Citations

  • Intelligent monitoring fusion system based on computer vision analysis

    CN110008831A

  • Cosmetic contact lenses detection method and device applied to iris recognition

    CN110516661A