Disclosure of Invention
In order to solve the technical problems, the invention provides a method and a device for synthesizing iris characteristics, which increase the effective area of the iris and improve the quality of the iris characteristics.
The technical scheme provided by the invention is as follows:
in one aspect, the present invention provides a method for synthesizing iris features, including:
acquiring iris characteristics of N iris images meeting preset conditions, wherein the iris characteristics comprise a noise template and iris characteristic codes, and the code value of each bit of the noise template represents the validity of the bit;
calculating to obtain a synthesized noise template according to the noise templates of the N iris features, wherein the region composed of the effective bits of the synthesized noise template is the fusion of the regions composed of the effective bits of the N noise templates;
counting the iris feature codes of the N iris features according to the synthetic noise template to obtain a synthetic iris feature code; wherein, the code value of the iris characteristic code corresponding to all the noise templates which are effective on the same bit and the most appeared times on the corresponding bit of the bit is the code value of the synthesized iris characteristic code on the corresponding bit;
and combining the synthesized noise template and the synthesized iris feature code to obtain a synthesized iris feature.
According to an embodiment of the present invention, the acquiring iris features of N iris images satisfying a preset condition, where the iris features include a noise template and an iris feature code, and a code value of each bit of the noise template represents validity of the bit includes:
acquiring a plurality of iris images of the same user;
extracting a plurality of iris features from the plurality of iris images;
comparing the iris features, if the iris features pass the comparison, recording the passing iris features, and if the iris features fail the comparison, recording the failure times;
and if the failure times are less than the preset times and the recorded iris features reach the preset number, taking the recorded iris features as the iris features of the N iris images.
According to another embodiment of the present invention, the iris feature is a 2048-bit Gabor binary coding feature, wherein the first 1024 bits are coded as a noise template, the last 1024 bits are coded as an iris feature code, and a code value of the noise template is 1 for validity, and 0 for invalidity.
According to another embodiment of the present invention, the calculating of the noise templates according to the N iris features to obtain a synthesized noise template, wherein the region composed of significant bits of the synthesized noise template is a fusion of the regions composed of significant bits of the N noise templates, including:
and respectively carrying out OR operation on the code values of the same bits of the N noise templates to obtain a synthetic noise template.
According to another embodiment of the present invention, the iris feature codes of the N iris features are counted according to the synthesized noise template to obtain a synthesized iris feature code; wherein, the code value of the most frequently appearing iris feature code corresponding to all the noise templates valid on the same bit on the corresponding bit of the bit is the code value of the synthesized iris feature code on the corresponding bit, and the method comprises the following steps:
when the coding value of a certain bit of the synthesized noise template is 1, finding out all the noise templates of which the bit is 1;
counting the frequency of 0,1 value appearing on the corresponding position of the iris characteristic code corresponding to the found noise template;
if the frequency of 0 is more than or equal to the frequency of 1, the value of the synthesized iris feature code at the corresponding position is 0, otherwise, the value of the synthesized iris feature code at the corresponding position is 1.
In another aspect, the present invention provides an apparatus for synthesizing iris features, the apparatus comprising:
the system comprises an acquisition module, a comparison module and a comparison module, wherein the acquisition module is used for acquiring iris characteristics of N iris images meeting preset conditions, the iris characteristics comprise a noise template and iris characteristic codes, and the code value of each bit of the noise template represents the validity of the bit;
the computing module is used for computing to obtain a synthesized noise template according to the noise templates of the N iris features, wherein the region formed by the valid bits of the synthesized noise template is the fusion of the regions formed by the valid bits of the N noise templates;
the statistical module is used for carrying out statistics on the iris feature codes of the N iris features according to the synthetic noise template to obtain a synthetic iris feature code; wherein, the code value of the iris characteristic code corresponding to all the noise templates which are effective on the same bit and the most appeared times on the corresponding bit of the bit is the code value of the synthesized iris characteristic code on the corresponding bit;
and the synthesis module is used for obtaining a synthesized iris characteristic according to the synthesized noise template and the synthesized iris characteristic code combination.
According to an embodiment of the present invention, the obtaining module includes:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a plurality of iris images of the same user;
the extraction unit is used for extracting a plurality of iris features from the plurality of iris images;
the mutual comparison unit is used for comparing the iris features, recording the passing iris features if the mutual comparison passes, and recording the failure times if the mutual comparison fails;
and the comparison unit is used for taking the recorded iris characteristics as the iris characteristics of the N iris images if the failure times are less than the preset times and the recorded iris characteristics reach the preset number.
According to another embodiment of the present invention, the iris feature is a 2048-bit Gabor binary coding feature, wherein the first 1024 bits are coded as a noise template, the last 1024 bits are coded as an iris feature code, and a code value of the noise template is 1 for validity, and 0 for invalidity.
According to another embodiment of the invention, the calculation module is configured to:
and respectively carrying out OR operation on the code values of the same bits of the N noise templates to obtain a synthetic noise template.
According to another embodiment of the invention, the statistics module comprises:
the searching unit is used for finding out all the noise templates with a bit of 1 when the coding value of the bit of the synthesized noise template is 1;
the statistical unit is used for counting the frequency of 0,1 value appearing on the corresponding bit of the iris characteristic code corresponding to the found noise template;
and the determining unit is used for synthesizing the value of the iris feature code at the corresponding position to be 0 if the frequency of 0 is more than or equal to the frequency of 1, otherwise, synthesizing the value of the iris feature code at the corresponding position to be 1.
The invention has the following beneficial effects:
the embodiment of the invention obtains a synthesized iris characteristic through the iris characteristics of a plurality of iris images, wherein the effective areas of a plurality of iris characteristic noise templates are fused to obtain the noise template of the synthesized iris characteristic, and the iris characteristic code corresponding to the synthesized noise template is calculated according to a plurality of iris characteristic codes, thereby increasing the effective area of the iris. And when calculating the synthetic iris feature code, the code value with the largest occurrence frequency of the iris feature codes corresponding to all effective noise templates at the same position is used as the code value of the synthetic iris feature code at the position, so that the feature contingency caused by noise is prevented, the quality of the iris feature is improved, and the false recognition rate is reduced.
The invention is preferably used for obtaining the synthesized iris characteristics as an iris characteristic template during iris registration and participating in subsequent identification and authentication. The iris feature template increases the registration area of the iris, improves the quality of the registration feature template, ensures the effectiveness of the registration feature template, improves the success rate of recognition, and solves the problems of poor experience, long registration time and high false recognition rate of the traditional registration method.
Detailed Description
In order to make the technical problems, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings and specific embodiments. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
Example 1:
the embodiment of the invention provides a method for synthesizing iris characteristics.
The embodiment of the invention is preferably used for synthesizing the high-quality iris feature template during iris registration to participate in subsequent identification and authentication. Of course, the embodiment of the invention can also be used in other occasions with higher requirements on the quality of the iris features, and is not limited to the iris registration.
As shown in fig. 1, the method includes:
step S100: acquiring iris characteristics of N iris images meeting preset conditions, wherein the iris characteristics comprise a noise template and iris characteristic codes, and the code value of each bit of the noise template represents the validity of the bit.
The satisfaction of the preset condition means that the quality of the iris features of the iris image meets the requirement, and the preset condition can be set as required. The iris features of the embodiment of the invention comprise a noise template and iris feature codes, wherein the noise template refers to the fact that the results of eyelid positioning, eyelash detection and light spot detection are represented by a binary matrix [0,1] with the same size as an iris image, and the iris feature codes are the 0,1 code values of the real iris features. The noise template corresponds to the bits of the iris feature code at the same position, if the bits of the noise template are valid, the code value of the corresponding bits of the iris feature code is valid, and the bits corresponding to the position on the iris image are valid. The noise template represents the validity of the iris region and the region consisting of the valid bits of the noise template represents the valid region of the iris, i.e. the iris as well as the sclera portion.
Step S200: and calculating to obtain a synthetic noise template according to the noise templates of the N iris features, wherein the region formed by the effective bits of the synthetic noise template is the fusion of the regions formed by the effective bits of the N noise templates. By fusing the regions composed of the significant bits of the N noise templates, the area of the region composed of the significant bits of the synthesized noise template, that is, the area of the effective region of the iris, is increased.
Step S300: counting the iris feature codes of the N iris features according to the synthetic noise template to obtain a synthetic iris feature code; the code value of the iris characteristic code corresponding to all the noise templates which are effective on the same bit and the most frequent occurrence times on the corresponding bit of the bit is the code value of the synthesized iris characteristic code on the corresponding bit.
On the basis of increasing the area of the effective area of the iris, calculating the corresponding iris feature code for the synthetic noise template; as can be seen from the foregoing, if one bit of the synthesized noise template is valid, at least one of the N noise templates is valid in the bit, and the value of the iris feature code corresponding to the valid noise template on the bit corresponding to the valid noise template can be used as the iris feature code corresponding to the synthesized noise template (i.e., synthesized iris feature code). And carrying out the same processing on each bit to obtain the coded value of each bit of the synthesized characteristic code. Because the situation is probably happened accidentally, in order to avoid causing the contingency, the iris feature code value with the most number of times of occurrence of the corresponding bit is counted, the quality of the iris feature is improved, and the false recognition rate is reduced.
Step S400: and combining the synthesized noise template and the synthesized iris feature code to obtain a synthesized iris feature. After the synthetic noise template and the synthetic iris feature code are obtained, the synthetic iris feature can be obtained by combining the two codes and used as a feature template.
The embodiment of the invention obtains a synthesized iris characteristic through the iris characteristics of a plurality of iris images, wherein the effective areas of a plurality of iris characteristic noise templates are fused to obtain the noise template (namely the synthesized noise template), and the iris characteristic code (namely the synthesized iris characteristic code) corresponding to the synthesized noise template is calculated according to the iris characteristic codes, so that the effective area of the iris is increased. And when calculating the synthetic iris feature code, the code value with the largest occurrence frequency of the iris feature codes corresponding to all effective noise templates at the same position is used as the code value of the synthetic iris feature code at the position, so that the feature contingency caused by noise is prevented, the quality of the iris feature is improved, and the false recognition rate is reduced.
The invention is preferably used for obtaining the synthesized iris characteristics as an iris characteristic template during iris registration and participating in subsequent identification and authentication. The iris feature template increases the registration area of the iris, improves the quality of the registration feature template, ensures the effectiveness of the registration feature template, improves the success rate of recognition, and solves the problems of poor experience, long registration time and high false recognition rate of the traditional registration method.
In this embodiment, a method of comparing iris features with each other is used to determine whether a preset condition is satisfied, and step S100 includes:
step S110: multiple iris images of the same user are acquired. The iris recognition device, the iris authentication device, the iris access control device and other iris devices can be used for shooting a plurality of iris images of a user or shooting a video of the eye of the user, and a plurality of frames of images containing iris areas are read from the video.
Step S120: several iris features are extracted from the plurality of iris images, and in this step, it is not always necessary to extract the iris features of all the iris images.
Step S130: and comparing the iris features, recording the passed iris features if the iris features pass the comparison, and recording the failure times if the iris features fail the comparison.
In the embodiment of the invention, the Hamming distance is preferably used for comparing two iris characteristics, and the formula is as follows:
wherein A is
jAnd B
jJ-th Gabor feature codes respectively representing iris features A and B,
representing an exclusive or operation. Therefore, the hamming distance HD is smaller for two iris images of the same person; for two iris images of different persons, the Hamming distance is larger. Therefore, when comparing mutually, a threshold value is set, and when the threshold value is smaller than the threshold value, the iris is considered to be from the same iris, the mutual comparison is passed, and when the threshold value is larger than the threshold value, the iris is considered to be from different irises, and the mutual comparison fails.
Step S140: if the failure times are less than the preset times and the recorded iris characteristics reach the preset number (N), taking the recorded iris characteristics as the iris characteristics of the N iris images; otherwise, the iris features are re-extracted from the plurality of iris images (step S120), or the plurality of iris images are re-acquired (step S110).
The embodiment of the invention compares the extracted characteristics of the multi-frame iris images, records the characteristics of the multi-frame iris images under the condition that the mutual comparison passes, and obtains a plurality of characteristics which meet the requirements, wherein the N iris characteristics which pass the mutual comparison have better quality and are more consistent.
In the embodiment of the present invention, a plurality of iris features may be extracted and then compared with each other, or one iris feature may be extracted and then compared with the iris feature that has passed through the previous mutual comparison, for example, as follows:
a) multiple iris images of the same user are acquired.
b) And preprocessing the plurality of iris images.
c) And extracting the iris features of the first iris image, caching the iris features after the extraction is successful, wherein the iris features are recorded as Fea1, and the number n of the cached iris features is recorded as 1. The first iris image may be a first frame image or an image selected from a plurality of iris images.
d) And extracting the iris features of the second iris image, comparing the extracted iris features with the features Fea1 of the first iris image after the iris features are successfully extracted, caching the iris features Fea2 if the comparison is passed, adding 1 to the cached iris feature number n, and recording the condition of one failure if the comparison is failed, wherein the condition is recorded as that count _ fail is 1. The second iris image may be a second frame image or an image different from the first iris image, which is optionally selected from a plurality of iris images.
e) Repeating the step d), extracting iris features of the third, fourth and fifth … iris images, comparing the extracted iris features with one or more of the cached iris features after the iris features are successfully extracted, accumulating the value of count _ fail if the comparison fails, caching iris features which are successfully compared with each other and sequentially marked as Fea3 and Fea4 … if the comparison succeeds, accumulating the number n of the cached iris features, and so on. The third, fourth and fifth … iris images may be the third, fourth and fifth … frame images, or a series of images different from the iris images optionally selected from a plurality of iris images.
f) Judging the values of the count _ fail and the feature number n, and when the count _ fail is greater than 10, indicating that the initial feature Fea1 has a problem, and clearing all cached features; when a plurality of iris images are left without extraction, starting from the step c), selecting one iris image again and extracting initial iris characteristics; when there are few remaining unextracted iris images among the plurality of iris images, the iris image may be re-acquired, which is equivalent to re-starting the registration, starting from step a).
For example, when N is 7, Fea1, Fea2, Fea3, Fea4, Fea5, Fea6 and Fea7 features are extracted.
The iris features of the embodiment of the invention are 2048-bit Gabor binary coding features, wherein the first 1024 bits are coded as a noise template, the coding value of the noise template is 1 to represent valid and represent iris and sclera parts, the coding value of the noise template is 0 to represent invalid and represent the noise parts of the iris, and the noise template is marked as [ Noi1, Noi2, Noi3, Noi4, … … and Noi1024 ]; the last 1024 bits are coded as iris feature 0,1 codes, which are marked as [ Cod1, Cod2, Cod3, … …, Cod1024 ].
Based on 2048-bit Gabor binary coding characteristics, taking Fea1 as an example, the noise template is:
Fea1_N1,Fea1_N2,Fea1_N3,……,Fea1_N1024;
the iris characteristic code is:
Fea1_C1,Fea1_C2,Fea1_C3,……,Fea1_C1024
when N is 7, Noi1 of 7 iris features are:
Fea1_N1,Fea2_N1,Fea3_N1,Fea4_N1,Fea5_N1,Fea6_N1,Fea7_N1;
cod1 for 7 iris features are:
Fea1_C1,Fea2_C1,Fea3_C1,Fea4_C1,Fea5_C1,Fea6_C1,Fea7_C1。
the specific calculation method of the synthetic noise template comprises the following steps: and respectively carrying out OR operation on the code values of the same bits of the N noise templates to obtain a synthetic noise template.
a) Determining the 0,1 value of Noi1, and carrying out OR operation, specifically:
N1=Fea1_N1||Fea2_N1||Fea3_N1||Fea4_N1||Fea5_N1||Fea6_N1||Fea7_N1;
if the calculation result is 1, then Noi1 is 1, valid, whereas Noi1 is 0, invalid.
b) Repeating the step a), and determining the values of the Noi2, the Noi3, the Noi4, the Noi … … and the Noi1024 bits.
The calculation method for synthesizing the iris feature code based on the 2048-bit Gabor binary coding feature (step S300) comprises the following steps:
step S310: when the code value of a bit of the synthesized noise template is 1, all noise templates with the bit being 1 are found.
Step S320: and counting the times of 0,1 value appearing on the corresponding bit of the iris feature code corresponding to the found noise template.
Step S330: if the frequency of 0 is more than or equal to the frequency of 1, the value of the synthesized iris feature code at the corresponding position is 0, otherwise, the value of the synthesized iris feature code at the corresponding position is 1.
Taking the above 7 iris features as an example, the calculation method is as follows:
a) in the case of Noi1 being 1, for these 7 features, when Fea1_ N1 is 1, the number of occurrences of 0,1 in Fea1_ C1 is counted, and so on, and when Fea2_ N1, Fea3_ N1, Fea4_ N1, Fea5_ N1, Fea6_ N1, and Fea7_ N1 are 1, the number of occurrences of 0,1 in Fea2_ C1, Fea3_ C1, Fea4_ C1, Fea5_ C1, Fea6_ C1, and Fea7_ C1 are counted, respectively.
b) When the degree of 0 > the degree of 1, the value of Cod1 is 0;
when the degree of 1 > the degree of 0, the value of Cod1 is 1;
when the number of times of 0 is equal to the number of times of 1, the value of Cod1 is 0 (initial value, in practical application,
the chance of occurrence in this case is small).
Practical examples are as follows:
Fea1_N1=0,Fea2_N1=1,Fea3_N1=1,
Fea4_N1=0,Fea5_N1=1,Fea6_N1=1,
Fea7_N1=1
wherein, if Fea2_ N1, Fea3_ N1, Fea5_ N1, Fea6_ N1 and Fea7_ N1 are 1, only 0 and 1 statistics are carried out on Fea2_ C1, Fea3_ C1, Fea5_ C1, Fea6_ C1 and Fea7_ C1, and the rest 2 statistics are not considered. If the number of 1 is 4, the number of 0 is 1, and 4>1, the value of Cod1 is 1;
c) repeating the steps a) to b) to obtain the values of Cod2, Cod3, … … and Cod 1024.
Finally, synthesizing the iris feature template according to the values of Noi1, Noi2, … …, Noi1024 and Cod1, Cod2, … … and Cod 1024.
Example 2:
the embodiment of the invention provides an iris characteristic synthesis device.
As shown in fig. 2, the apparatus includes:
the acquisition module 11 is configured to acquire iris features of the N iris images that satisfy the preset condition, where the iris features include a noise template and an iris feature code, and a code value of each bit of the noise template represents validity of the bit.
And the calculating module 12 is configured to calculate a synthesized noise template according to the noise templates of the N iris features, where a region composed of significant bits of the synthesized noise template is a fusion of regions composed of significant bits of the N noise templates.
The statistical module 13 is used for performing statistics on the iris feature codes of the N iris features according to the synthetic noise template to obtain a synthetic iris feature code; the code value of the iris characteristic code corresponding to all the noise templates which are effective on the same bit and the most frequent occurrence times on the corresponding bit of the bit is the code value of the synthesized iris characteristic code on the corresponding bit.
And a synthesis module 14, configured to obtain a synthesized iris feature according to the synthesized noise template and the synthesized iris feature code combination.
The embodiment of the invention obtains a synthesized iris characteristic through the iris characteristics of a plurality of iris images, wherein the effective areas of a plurality of iris characteristic noise templates are fused to obtain the noise template (namely the synthesized noise template), and the iris characteristic code (namely the synthesized iris characteristic code) corresponding to the synthesized noise template is calculated according to the iris characteristic codes, so that the effective area of the iris is increased. And when calculating the synthetic iris feature code, the code value with the largest occurrence frequency of the iris feature codes corresponding to all effective noise templates at the same position is used as the code value of the synthetic iris feature code at the position, so that the feature contingency caused by noise is prevented, the quality of the iris feature is improved, and the false recognition rate is reduced.
The above-mentioned acquisition module includes:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a plurality of iris images of the same user.
And the extraction unit is used for extracting a plurality of iris characteristics from the plurality of iris images.
And the cross comparison unit is used for comparing the plurality of iris characteristics, recording the passed iris characteristics if the cross comparison is passed, and recording the failure times if the cross comparison is failed.
And the comparison unit is used for taking the recorded iris characteristics as the iris characteristics of the N iris images if the failure times are less than the preset times and the recorded iris characteristics reach the preset number.
The iris feature of this embodiment is a 2048-bit Gabor binary coding feature, where the first 1024-bit code is a noise template, the last 1024-bit code is an iris feature code, and a code value of the noise template is 1 for validity, and 0 for invalidity.
The calculating module is configured to: and respectively carrying out OR operation on the code values of the same bits of the N noise templates to obtain a synthetic noise template.
The statistical module comprises:
and the searching unit is used for finding out all the noise templates with a bit of 1 when the code value of the bit of the synthesized noise template is 1.
And the statistical unit is used for counting the frequency of 0,1 value appearing on the corresponding bit of the iris characteristic code corresponding to the found noise template.
And the determining unit is used for synthesizing the value of the iris feature code at the corresponding position to be 0 if the frequency of 0 is more than or equal to the frequency of 1, otherwise, synthesizing the value of the iris feature code at the corresponding position to be 1.
The device provided by the embodiment of the present invention has the same implementation principle and technical effect as the method embodiments, and for the sake of brief description, reference may be made to the corresponding contents in the method embodiments without reference to the device embodiments. It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the apparatus and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
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 units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments provided by the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a device (which may be a personal computer, a server, a network device, or an embedded device) to perform all or part of the steps of the method according to 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.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the present invention in its spirit and scope. Are intended to be covered by the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.