Disclosure of Invention
Embodiments of the present invention provide a cosmetic pupil detection method and apparatus applied to iris recognition, which overcome the above problems or at least partially solve the above problems.
In a first aspect, an embodiment of the present invention provides a cosmetic pupil detection method applied to iris recognition, including:
acquiring an iris image, and performing normalization processing and pixel transformation on the iris image to obtain an iris area image;
performing local binarization mode LBP feature extraction on the iris area image to obtain an LBP feature vector of the iris area image;
counting four-dimensional features of a gray level co-occurrence matrix GLCM of the iris area image in four directions to obtain a GLCM feature vector of the iris area image;
combining the LBP characteristic vector and the GLCM characteristic vector of the iris area image, and reducing the dimension of the combined vector to obtain the characteristic vector of the iris image;
inputting the characteristic vector of the iris image into a pre-trained beautiful pupil detection model, and outputting a beautiful pupil detection result of the iris image;
the iris image is subjected to normalization processing and pixel transformation to obtain an iris area image, and the method specifically comprises the following steps:
carrying out internal and external boundary positioning and upper and lower eyelid and eyelash detection on the iris image to obtain an iris annular region with an indefinite size under a rectangular coordinate system;
converting the iris annular region into a rectangular image with a fixed size under polar coordinates, and setting pixel values of parts, which are shielded by upper and lower eyelids and eyelashes, in the iris annular region as preset values in the conversion process;
setting the pixel values of the L-L neighborhood of the pixel points with the pixel values being the preset values in the rectangular image as the preset values;
acquiring the minimum value and the maximum value of gray values of pixel points in a foreground region of the rectangular image, and performing pixel value transformation on the pixel points in the foreground region one by one based on a preset pixel range to obtain an iris region image;
the foreground region is a region of the rectangular image except a background region, and the background region is a region formed by pixel points with pixel values of the preset values.
In a second aspect, an embodiment of the present invention provides a cosmetic pupil detection apparatus applied to iris recognition, including:
the preprocessing module is used for acquiring an iris image, and performing normalization processing and pixel transformation on the iris image to obtain an iris area image;
the LBP feature extraction module is used for carrying out local binarization mode LBP feature extraction on the iris area image to obtain an LBP feature vector of the iris area image;
the GLCM characteristic extraction module is used for counting the four-dimensional characteristics of a gray level co-occurrence matrix GLCM of the iris area image in four directions to obtain a GLCM characteristic vector of the iris area image;
the combined dimensionality reduction module is used for combining the LBP characteristic vector and the GLCM characteristic vector of the iris area image and reducing the dimensionality of the combined vector to obtain the characteristic vector of the iris image;
the detection module is used for inputting the characteristic vector of the iris image into a pre-trained beautiful pupil detection model and outputting a beautiful pupil detection result of the iris image;
wherein the preprocessing module is specifically configured to:
carrying out internal and external boundary positioning and upper and lower eyelid and eyelash detection on the iris image to obtain an iris annular region with an indefinite size under a rectangular coordinate system;
converting the iris annular region into a rectangular image with a fixed size under polar coordinates, and setting pixel values of parts, which are shielded by upper and lower eyelids and eyelashes, in the iris annular region as preset values in the conversion process;
setting the pixel values of the L-L neighborhood of the pixel points with the pixel values being the preset values in the rectangular image as the preset values;
acquiring the minimum value and the maximum value of gray values of pixel points in a foreground region of the rectangular image, and performing pixel value transformation on the pixel points in the foreground region one by one based on a preset pixel range to obtain an iris region image;
the foreground region is a region of the rectangular image except a background region, and the background region is a region formed by pixel points with pixel values of the preset values.
In a third aspect, an embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the steps of the cosmetic pupil detection method applied to iris recognition as provided in the first aspect when executing the program.
In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the cosmetic pupil detection method applied to iris recognition as provided in the first aspect.
The beautiful pupil detection method and device applied to iris recognition provided by the embodiment of the invention can detect whether a user wears a beautiful pupil in a registration stage or a recognition stage, thereby removing the influence of beautiful pupil texture on iris texture and improving the anti-interference capability and accuracy of an iris recognition technology.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, a schematic flow chart of a beautiful pupil detection method applied to iris recognition provided in an embodiment of the present invention includes:
step 100, obtaining an iris image, and carrying out normalization processing and pixel transformation on the iris image to obtain an iris area image;
specifically, the embodiment of the present invention first acquires an iris image, and then performs normalization processing on the iris image to expand an iris annular region in the iris image into a rectangular image with a fixed size. Wherein, the iris ring area is specifically the area between sclera-iris excircle and iris-pupil excircle. In addition, in the process of expanding the annular area of the iris, the part shielded by the upper eyelid, the lower eyelid and the eyelashes is specially marked, and only effective iris texture features are extracted.
In order to eliminate the negative influence of different illumination conditions, light spots with different sizes and the like on the extraction of the features of the iris area, the embodiment of the invention maps the pixel values of the rectangular image obtained after the normalization processing to a fixed range to obtain the image of the iris area.
Step 200, carrying out local binarization pattern LBP feature extraction on the iris area image to obtain an LBP feature vector of the iris area image;
specifically, the local binarization pattern LBP (local binary patterns) feature extraction of the iris region image obtained instep 100 refers to calculating local binarization pattern LBP values of pixel points in the iris region image one by one, dividing the iris region image into K blocks of regions along a vertical direction, respectively counting histogram distribution features of the LBP values of each block of region, and concatenating the histogram distribution features of the LBP values of the K blocks of regions to obtain an LBP feature vector of the iris region image, where K is a natural number greater than 1. The obtained LBP feature vector can effectively reflect the texture feature of the iris area.
Step 300, counting four-dimensional characteristics of a gray level co-occurrence matrix GLCM of the iris area image in four directions to obtain a GLCM characteristic vector of the iris area image;
specifically, a Gray Level Co-occurrence Matrix GLCM (Gray Level Co-occurrence Matrix) in four directions of the iris region image obtained in thestep 100 is calculated, four-dimensional features of the GLCM in each direction are counted, and the four-dimensional features of the GLCM in the four directions are concatenated to obtain a GLCM feature vector of the iris region image.
Wherein, the four directions are respectively a horizontal direction, an oblique diagonal 45-degree direction, a vertical direction and an oblique diagonal 135-degree direction.
The four-dimensional feature is a vector composed of four statistical feature values, and the four statistical feature values of the gray level co-occurrence matrix GLCM calculated in the embodiment of the present invention include: entropy, inverse differential moment (abbreviated as moment), contrast constast, and energy.
From the above, the GLCM feature vector of the iris region image is 4 x 4 dimensions.
It should be noted thatstep 300 may also be executed beforestep 200, and the embodiment of the present invention does not limit the execution order ofstep 200 andstep 300.
Step 400, combining the LBP characteristic vector and the GLCM characteristic vector of the iris area image and reducing the dimension of the combined vector to obtain the characteristic vector of the iris image;
specifically, combining the LBP characteristic vector and the GLCM characteristic vector of the iris area image to obtain a combined characteristic vector, and reducing the dimension of the combined characteristic vector to finally obtain the characteristic vector of the iris image.
And 500, inputting the characteristic vector of the iris image into a pre-trained beautiful pupil detection model, and outputting a beautiful pupil detection result of the iris image.
Specifically, the cosmetic pupil detection model is obtained by training and storing a large number of real iris samples with cosmetic pupils and without cosmetic pupils through the same feature extraction steps (i.e., steps 100 to 400).
The output of the beautiful pupil detection model is a beautiful pupil detection result of the input iris image, namely the beautiful pupil is worn or not worn.
The beautiful pupil detection method applied to iris recognition provided by the embodiment of the invention can detect whether a user wears a beautiful pupil no matter in the registration stage or the recognition stage, thereby removing the influence of beautiful pupil texture on iris texture and improving the anti-interference capability and accuracy of the iris recognition technology.
Based on the content of the foregoing embodiment, thestep 100 performs normalization processing and pixel transformation on the iris image to obtain an iris area image, and further includes:
101, performing inner and outer boundary positioning and upper and lower eyelid and eyelash detection on the iris image to obtain an iris annular region with an indefinite size under a rectangular coordinate system;
specifically, as shown in fig. 2, which is a schematic diagram of an iris image acquired according to an embodiment of the present invention, the iris image is subjected to inner and outer boundary positioning, upper and lower eyelids and eyelash detection, and a region between the sclera-iris outer circle and the iris-pupil inner circle, i.e., an iris annular region, is obtained, which has an indefinite size and is inconvenient for direct feature extraction, so that step 102 needs to be performed.
102, converting the iris annular region into a rectangular image with fixed size under polar coordinates, and setting the pixel value of the part of the iris annular region, which is shielded by the upper and lower eyelids and eyelashes, as a preset value in the conversion process;
specifically, the iris ring-shaped region is converted into a rectangular image I with a fixed size in polar coordinates, wherein the fixed size is M × N, M is the width of the rectangular image, and N is the height of the rectangular image.
In order to obtain rich aesthetic pupil texture features, the width M of the rectangular image may be set to 512 and the height N may be set to 128. Alternatively, the width M of the rectangular image may be set to 256 and the height N may be set to 64.
The setting of the pixel value is performed for the iris region portion blocked by the upper and lower eyelids and eyelashes in order to extract only the effective iris region.
The preset value is 255 specifically, that is, the pixel value of each pixel point in the part, which is shielded by the upper and lower eyelids and eyelashes, in the iris annular region is set to be 255, that is, white. Fig. 3 is a schematic diagram of a rectangular image obtained after normalization processing according to an embodiment of the present invention is completed.
In order to eliminate adverse effects of different illumination conditions, light spots of different sizes, and the like on subsequent iris region feature extraction, pixel transformation is also performed on the rectangular image obtained in the step 102.
103, setting the pixel values of the L-L neighborhood of the pixel points with the pixel values being the preset values in the rectangular image as the preset values;
specifically, the pixel values of the neighborhood of the pixel points in the rectangular image whose pixel values are the preset value are also set as the preset value. Wherein the size of the neighborhood is L × L, wherein L =3 or 5.
And taking a region formed by the pixel points with the pixel values as preset values and the pixel points in the L-L neighborhood as a background region, wherein the pixel values of all the pixel points in the background region are the preset values. Then the other regions of the rectangular image are foreground regions.
104, acquiring the minimum value and the maximum value of the gray value of the pixel points in the foreground area of the rectangular image, and performing pixel value transformation on the pixel points in the foreground area one by one based on a preset pixel range to obtain an iris area image;
the foreground region is a region of the rectangular image except a background region, and the background region is a region formed by pixel points with pixel values of the preset values.
Specifically, pixel values of a foreground region of a rectangular image are mapped to a preset pixel range, pixel values of pixel points in the foreground region are transformed one by one according to the maximum value and the minimum value of gray values of the pixel points in the foreground region of the rectangular image, finally, the pixel value of each pixel point in the foreground region is mapped to the preset pixel range, and after pixel transformation is completed, an iris region image J is obtained.
Based on the content of the above embodiment, the following formula is used to perform pixel value transformation on the pixels in the foreground region one by one:
wherein,
for the transformed pixel values to be used,
for the pixel values before the transformation to be,
is the minimum value of the gray values of the pixel points in the foreground region,
is the maximum value of the gray values of the pixel points in the foreground region,
is the lower limit of the preset pixel range,
is the upper limit of the preset pixel range,
。
further, according to the distribution range of the general iris area part pixels in the acquired iris image,
it is possible to set the number of 64,
192 may be set, that is, the predetermined pixel range is (64 to 192).
Based on the content of the foregoing embodiment,step 200 performs local binarization pattern LBP feature extraction on the iris region image to obtain an LBP feature vector of the iris region image, and further includes:
step 201, calculating local binarization pattern LBP values of pixel points in a foreground region of the iris region image one by one;
specifically, the local binarization mode LBP value of pixel points in the foreground region of the iris region image J is calculated one by one, and the LBP value records comparison information of the pixel values of the pixel points and the pixel values of the neighborhood pixel points.
202, dividing the remaining area of the iris area image, from which n rows of pixels located at the upper edge and the lower edge are removed, into K blocks along the vertical direction;
specifically, the iris region image J is divided into K blocks along the vertical direction, the value of K is generally 3 or 4, and n rows of pixels located on the upper edge and the lower edge in the iris region image can be disregarded in the block dividing process, so as to remove the influence caused by inaccurate iris segmentation, where n can be set to 5.
Step 203, respectively counting the histogram distribution characteristics of the LBP values of each block area, and cascading the histogram distribution characteristics of the LBP values of the K block areas to obtain the LBP characteristic vector of the iris area image;
specifically, respectively counting the histogram distribution characteristics of the LBP values of each block area, respectively obtaining the histogram distribution characteristics of the LBP values of the K block areas, cascading the histogram distribution characteristics of the LBP values of the K block areas, and finally obtaining the LBP feature vector of the iris area image
。
It is worth mentioning that the LBP value calculated in the embodiment of the present invention is uniform pattern LBP, i.e. LBP equivalent pattern, so that the feature dimension of histogram distribution is reduced from 256 dimensions to 59 dimensions, and the influence of high frequency noise in the image on the LBP feature is reduced. Thus, the LBP feature vector of the iris region image
Is K × 59 dimensions.
Based on the content of the foregoing embodiment, thestep 300 counts four-dimensional features of a gray level co-occurrence matrix GLCM of the iris region image in four directions to obtain a GLCM feature vector of the iris region image, and further includes:
301, converting the gray value of each pixel point in the foreground region of the iris region image to be between 0 and R-1;
specifically, since the gray level co-occurrence matrix GLCM is R × R, where R =64 or 128, the gray level value of each pixel in the foreground region of the iris region image obtained instep 200 needs to be converted to 0-R-1.
Step 302, calculating a gray level co-occurrence matrix GLCM of the iris area image in four directions after gray level value transformation based on a preset adjacent pixel distance;
specifically, in the embodiment of the present invention, the adjacent pixel distance GLCM _ DIS for calculating GLCM is set to 1 or 2. The background area of the iris area image does not make adjacent pixel statistics.
Based on a preset adjacent pixel distance, calculating GLCM (global Gamut cm) of the iris area image in four directions after the gray value of each pixel point in the foreground area is converted to 0-R-1. The four directions specifically include: horizontal direction, diagonal 45 degree direction, vertical direction and diagonal 135 degree direction.
Step 303, counting four-dimensional features of the GLCM in each direction, and cascading the four-dimensional features of the GLCM in the four directions to obtain GLCM feature vectors of the iris area image;
specifically, the four-dimensional feature is a vector composed of four statistical feature values, and the following four quantities are selected as the statistical feature in the embodiment of the present invention: entropy of the gray-scale co-occurrence matrix GLCM, inverse difference moment of the gray-scale co-occurrence matrix GLCM, contrast contast of the gray-scale co-occurrence matrix GLCM, and energy of the gray-scale co-occurrence matrix GLCM.
The entropy of the gray level co-occurrence matrix GLCM, the inverse difference moment of the gray level co-occurrence matrix GLCM, the contrast of the gray level co-occurrence matrix GLCM, and the energy of the gray level co-occurrence matrix GLCM are respectively defined as:
finally, cascading the four-dimensional features of the GLCM in the four directions to obtain a GLCM feature vector of the iris area image
。
Based on the content of the foregoing embodiment, thestep 400 combines the LBP feature vector and the GLCM feature vector of the iris region image and performs dimension reduction on the combined vector to obtain the feature vector of the iris image, and further includes:
step 401, combining the LBP characteristic vector and the GLCM characteristic vector of the iris area image to obtain a combined characteristic vector;
in particular, from the LBP feature vector of the iris region image
And GLCM feature vectors of the iris region image
Deriving a joint feature vector
Combining feature vectors
Is (K59 + 4) dimension.
Step 402, normalizing the characteristic value of each dimension in the combined characteristic vector;
i.e. before performing PCA dimensionality reduction, the joint feature vectors
The characteristic value of each dimension is normalized to be between 0 and 1.
Combining the joint feature vectors
The formula for normalizing the characteristic value of each dimension to 0-1 specifically comprises the following steps:
wherein,
to normalize the characteristic value of the ith dimension before the normalization,
for the ith dimension feature value after normalization,
and
respectively the maximum value and the minimum value of the ith dimension characteristic value of the combined characteristic vector obtained by training the iris image sample.
And 403, performing PCA (principal component analysis) dimensionality reduction on the normalized combined feature vector based on a feature vector matrix obtained by pre-training to obtain the feature vector of the iris image.
Specifically, the eigenvector matrices for PCA dimension reduction are obtained by performing the same processing on a large number of iris image samples and then training.
Carrying out PCA (principal component analysis) dimensionality reduction and eigenvectors calculation on the normalized combined feature vector to obtain a final feature vector of the iris image
。
Feature vector obtained after dimensionality reduction in the embodiment of the invention
The dimension nDim of (a) may be set to 32, 48, 64, etc.
Based on the content of the above embodiment, the beautiful pupil detection model is specifically an SVM classifier;
the SVM classifier is obtained based on feature vectors of iris image samples and corresponding label training of whether the iris image samples have beautiful pupils or not.
Specifically, feature vectors of the iris image are combined
Inputting the input into a SVM classifier of the support vector machine, and outputting a result that the user wears a beauty pupil or does not wear the beauty pupil.
The SVM classifier is obtained based on feature vectors of iris image samples and corresponding label training whether the iris image samples have beautiful pupils or not, and the kernel function of the SVM classifier is an RBF radial basis kernel function.
The method for acquiring the feature vector of the iris image sample may refer to the foregoingsteps 100 to 400, that is, the feature vector of the iris image sample may be obtained after the iris image sample is processed in thesteps 100 to 400.
In another aspect of the embodiments of the present invention, as shown in fig. 4, a cosmetic pupil detection apparatus applied to iris recognition is provided, and a schematic structural diagram of the cosmetic pupil detection apparatus applied to iris recognition provided in the embodiments of the present invention includes: apreprocessing module 410, an LBP feature extraction module 420, a GLCMfeature extraction module 430, a combined dimensionality reduction module 440, and adetection module 450, wherein,
thepreprocessing module 410 is configured to obtain an iris image, perform normalization processing and pixel transformation on the iris image, and obtain an iris area image;
specifically, thepreprocessing module 410 acquires an iris image, and then performs a normalization process on the iris image to expand an iris annular region in the iris image into a rectangular image having a fixed size. Wherein, the iris ring area is specifically the area between sclera-iris excircle and iris-pupil excircle. In addition, during the process of expanding the iris annular region, thepreprocessing module 410 performs special marking on the parts shielded by the upper and lower eyelids and eyelashes, and only extracts effective iris texture features.
In order to eliminate the negative influence of different illumination conditions, large and small light spots and the like on the extraction of the features of the iris area, thepreprocessing module 410 maps the pixel values of the rectangular image obtained after normalization processing to a fixed range to obtain an iris area image;
wherein thepreprocessing module 410 is specifically configured to:
carrying out internal and external boundary positioning and upper and lower eyelid and eyelash detection on the iris image to obtain an iris annular region with an indefinite size under a rectangular coordinate system;
converting the iris annular region into a rectangular image with a fixed size under polar coordinates, and setting pixel values of parts, which are shielded by upper and lower eyelids and eyelashes, in the iris annular region as preset values in the conversion process;
setting the pixel values of the L-L neighborhood of the pixel points with the pixel values being the preset values in the rectangular image as the preset values;
acquiring the minimum value and the maximum value of gray values of pixel points in a foreground region of the rectangular image, and performing pixel value transformation on the pixel points in the foreground region one by one based on a preset pixel range to obtain an iris region image;
the foreground region is a region of the rectangular image except a background region, and the background region is a region formed by pixel points with pixel values of the preset values.
An LBP feature extraction module 420, configured to perform local binarization mode LBP feature extraction on the iris region image, to obtain an LBP feature vector of the iris region image;
specifically, the LBP feature extraction module 420 performs local binarization pattern LBP (local Binary patterns) feature extraction on the iris region image output by thepreprocessing module 410, that is, performs local binarization pattern LBP value calculation on pixel points in the iris region image one by one, divides the iris region image into K blocks along a vertical direction, respectively counts histogram distribution features of the LBP values of each block, concatenates the histogram distribution features of the LBP values of the K blocks, and obtains an LBP feature vector of the iris region image, where K is a natural number greater than 1. The obtained LBP feature vector can effectively reflect the texture feature of the iris area.
The GLCMfeature extraction module 430 is configured to count four-dimensional features of a gray level co-occurrence matrix GLCM of the iris region image in four directions, and obtain a GLCM feature vector of the iris region image;
specifically, the GLCMfeature extraction module 430 calculates Gray Level Co-occurrence Matrix GLCM (Gray Level Co-occurrence Matrix) of the iris region image in four directions, counts four-dimensional features of the GLCM in each direction, concatenates the four-dimensional features of the GLCM in the four directions, and obtains GLCM feature vectors of the iris region image.
Wherein, the four directions are respectively a horizontal direction, an oblique diagonal 45-degree direction, a vertical direction and an oblique diagonal 135-degree direction.
The four-dimensional feature is a vector composed of four statistical feature values, and the four statistical feature values of the gray level co-occurrence matrix GLCM calculated in the embodiment of the present invention include: entropy, inverse differential moment, contrast, and energy.
From the above, the GLCM feature vector of the iris region image is 4 x 4 dimensions.
A combined dimension reduction module 440, configured to combine the LBP feature vector and the GLCM feature vector of the iris region image, and perform dimension reduction on the combined vector to obtain a feature vector of the iris image;
specifically, the combined dimensionality reduction module 440 combines the LBP feature vector and the GLCM feature vector of the iris region image to obtain a joint feature vector, and performs dimensionality reduction on the joint feature vector to finally obtain the feature vector of the iris image.
Thedetection module 450 is configured to input the feature vector of the iris image to a pre-trained cosmetic pupil detection model, and output a cosmetic pupil detection result of the iris image.
Specifically, the beautiful pupil detection model is obtained by training and storing a large number of real iris samples with beautiful pupils and without the beautiful pupils through the same characteristic extraction step.
The output of the beautiful pupil detection model is a beautiful pupil detection result of the input iris image, namely the beautiful pupil is worn or not worn.
The beautiful pupil detection device applied to iris recognition provided by the embodiment of the invention can detect whether a user wears a beautiful pupil in a registration stage or a recognition stage, thereby removing the influence of beautiful pupil texture on iris texture and improving the anti-interference capability and accuracy of an iris recognition technology.
Fig. 5 is a schematic entity structure diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 5, the electronic device may include: a processor (processor)510, a communication Interface (Communications Interface)520, a memory (memory)530 and acommunication bus 540, wherein theprocessor 510, thecommunication Interface 520 and thememory 530 communicate with each other via thecommunication bus 540.Processor 510 may invoke a computer program stored onmemory 530 and operable onprocessor 510 to perform the cosmetic pupil detection method applied to iris recognition provided by the above-described method embodiments, including, for example: acquiring an iris image, and performing normalization processing and pixel transformation on the iris image to obtain an iris area image; performing local binarization mode LBP feature extraction on the iris area image to obtain an LBP feature vector of the iris area image; counting four-dimensional features of a gray level co-occurrence matrix GLCM of the iris area image in four directions to obtain a GLCM feature vector of the iris area image; combining the LBP characteristic vector and the GLCM characteristic vector of the iris area image, and reducing the dimension of the combined vector to obtain the characteristic vector of the iris image; and inputting the characteristic vector of the iris image into a pre-trained beautiful pupil detection model, and outputting a beautiful pupil detection result of the iris image.
Furthermore, the logic instructions in thememory 530 may be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. Based on such understanding, the technical solutions of the embodiments of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Embodiments of the present invention further provide a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the cosmetic pupil detection method applied to iris recognition, which is provided by the above method embodiments, for example, including: acquiring an iris image, and performing normalization processing and pixel transformation on the iris image to obtain an iris area image; performing local binarization mode LBP feature extraction on the iris area image to obtain an LBP feature vector of the iris area image; counting four-dimensional features of a gray level co-occurrence matrix GLCM of the iris area image in four directions to obtain a GLCM feature vector of the iris area image; combining the LBP characteristic vector and the GLCM characteristic vector of the iris area image, and reducing the dimension of the combined vector to obtain the characteristic vector of the iris image; and inputting the characteristic vector of the iris image into a pre-trained beautiful pupil detection model, and outputting a beautiful pupil detection result of the iris image.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.