A kind of identity-based certificate and the identity security verification method and system of recognition of face
Technical field
The invention belongs to the safety certification field of living things feature recognition, more particularly, to a kind of identity-based certificate and
The identity security verification method and system of recognition of face.
Background technology
Identity security verification is widely used in the scenes such as bank, customs, airport, railway station, with non-in identity document
Universal and face recognition technology the high speed development of contact intelligent chip, more and more occasions are for authentication system
Simplification, high efficiency, accuracy propose higher requirement.
On the one hand identity security verification needs to verify the true and false of certificate, on the other hand need to verify that holder owns with certificate
Whether person is consistent.At present, it for the former, is mainly identified using the anti-fake point of certificate in itself or artificial judgment chip
It reads photo and whether document surface printing photo is consistent.And for the latter, then usually requiring staff is manually veritified,
It not only takes considerable time, and the highly reliable experience and ability dependent on staff verified so that the peace of whole system
Full property significantly reduces.
It is more existing at present that system is verified based on the identity security of China second-generation identity card and face recognition technology, in order to solve
Chip storage photograph pixel it is extremely low can not application image treatment technology the problem of, part system take networking obtain the original photograph of certificate
The method that piece is compared again with scene photograph, the requirement of networking lead to application range critical constraints.
Application No. is CN102902959A, it is entitled " based on China second-generation identity card storage certificate photo face identification method and
The scheme that the patent document of system " proposes demonstrate,proves data center without access identity, but the program needs to take greatly chip photo
Complicated pre-treatment step is measured, and determination decisions still rely on face training library.
Application No. is CN102129555A, entitled " method and system that authentication is carried out based on second generation identity card "
Patent document, complete verification to holder identity by comparing identity card surface scan photo and live-pictures, but due to
Scanning the photo that obtains, there are can not normalized influence of noise caused by hardware so that the feature of extraction can not accurately express figure
As information, so as to which system identification accuracy is relatively low, the strict demand in safety check scene can not be met.
In addition, domestic there is no the identity security verification system that can handle the identity documents such as Hongkong and Macro's pass and passport at present
System can not meet the needs of customs or international large-scale activity safety check scene.
Invention content
In view of the drawbacks of the prior art and Improvement requirement, the present invention provides a kind of identity-based certificate and recognitions of face
Identity security verification method and system it is intended that independent of external data base, can directly verify holder and certificate institute
The consistency for the person of having, so as to improve the efficiency of verification and accuracy rate, while number of units after gradually expanding with verification systematic difference
According to library, to realize the inclusive authentication based on various identity cards such as No.2 residence card, Hongkong and Macro's pass, passports, into one
Step ensures public safety.
To achieve the above object, one side according to the invention provides a kind of identity-based certificate and recognition of face
Identity security verification method, include the following steps:
(1) system registry step:The certificate information of user identity certificate is obtained as log-on message, and acquires user front
Then log-on message and registered images are stored in database by clearly facial image without a hat on as registered images;Identity document can
To include but not limited to No.2 residence card, Hongkong and Macro's pass, passport;The certificate information of identity document include certificate number and
The name of holder;
(2) information collection step:Obtain the certificate information of user identity certificate, image and document surface printing in chip
The scan image of photo, and acquire real-time face image;Database is inquired according to certificate information, if inquiring relevant entry,
Registered images are extracted from query result;If inquiry creates one according to certificate information in the database less than relevant entry
New entry, registered images are sky in the new entry created;
(3) certificate false distinguishing step:It is special that the shallow-layer of image and scan image in the chip got by step (2) is extracted respectively
Sign, and carry out consistency checking;If image is consistent with scan image in chip, it is transferred to step (4);If it image and is swept in chip
Tracing then verified and do not passed through as inconsistent, and verification terminates;
(4) image preprocessing step:If in step (2), registered images are got, then face are carried out to real-time face image
Detection and pretreatment obtain the first contrast images, and carry out Face datection and pretreatment to registered images, obtain the second comparison diagram
Picture;If in step (2), registered images have not been obtained, then Face datection and pretreatment is carried out to real-time face image, obtains first
Contrast images, and Face datection and pretreatment are carried out to the higher image of picture quality in image in chip and scan image, it obtains
To the second contrast images;By carrying out Face datection and pretreatment to image, the Efficiency and accuracy of face verification can be improved;
(5) face verification step:The first contrast images got by step (4) and the second contrast images are extracted respectively
Further feature, and calculate the matching degree of the two;If matching degree is higher than first threshold, it is transferred to step (6);Otherwise, it verifies obstructed
It crosses, verification terminates;
(6) database update step:If in step (2), registered images have not been obtained, then by the real-time face of this acquisition
Image is stored in the corresponding entry of database, and be transferred to step (7) as registered images;If in step (2), registration is got
Image, and the time interval of current authentication time gap last time data base update time is more than second threshold, then adopts this
The real-time face image of collection updates the data corresponding entry in library, and be transferred to step (7) as registered images;If step (2)
In, registered images are got, and the time interval of current authentication time gap last time data base update time is less than second
Threshold value is then transferred to step (7);
(7) it is verified, verification terminates.
Further, in step (5) for judge face verification whether by first threshold rule of thumb set;First
Threshold value is bigger, then the computation complexity of face verification is lower, but the accuracy of face verification is lower;On the contrary, first threshold is got over
Small, then the accuracy of face verification is higher, but the computation complexity of face verification is higher.
Further, in step (5), between the further feature of the further feature of the first contrast images and the second contrast images
Matching degree for both COS distance.
Further, the second threshold for determining whether to update registered images in step (6) is set according to practical application scene;
Second threshold is smaller, then registered images update is more frequent, and the accuracy of face verification is higher, but it is larger to update expense;On the contrary,
Second threshold is smaller, then more infrequently, update expense is smaller, but the accuracy of face verification is also smaller for registered images update.
Further, the shallow-layer extracted in step (3) is characterized as SURF features, histogram level projection properties, histogram
The feature that upright projection feature and Gradient Features are composed;To reduce computation complexity, while improve extraction rate.
Further, in step (3), the method for consistency checking includes:Calculate the Europe between extracted shallow-layer feature
Formula distance;If Euclidean distance is more than third threshold value, judge that image is consistent with scan image in chip;Otherwise, it is determined that in chip
Image and scan image are inconsistent.
Further, third threshold value is rule of thumb set;As system comes into operation, database meeting dynamic expanding is
System will be regularly updated, and third threshold value will be more accurate.
Further, Haar features can be used in step (4) and Adaboost graders carry out Face datection;
Further, in step (4), the pretreatment of image is included:Histogram equalization, gaussian filtering denoising and image
Size normalization;
Further, in step (4), the method for the picture quality of image and scan image includes in comparable chip:Compare
The size of the image file of image and scan image in chip, image file is bigger, then picture quality is higher;The second generation is occupied
People's identity card, the picture quality of scan image are higher;For passport, the picture quality of image is higher in chip.
Further, in step (5), the method for extraction image further feature includes:The higher-dimension convolution feature of image is obtained,
Dimension-reduction treatment is carried out to higher-dimension convolution feature again, obtains the low-dimensional feature suitable for calculating;It is tested using low-dimensional feature as face
The further feature of card;Method for obtaining image higher-dimension convolution feature includes but not limited to depth convolutional neural networks;For
The method for carrying out dimension-reduction treatment to higher-dimension convolution feature includes but not limited to Principal Component Analysis Algorithm.
It is another aspect of this invention to provide that the present invention also provides one kind to be used to implement identity-based provided by the present invention
The system of certificate and the identity security verification method of recognition of face, including:Video streaming image unit, certificate information collection unit,
Image pre-processing unit, face verification unit and database management unit;
Video streaming image unit is used for the acquisition user front-face and hat-free photos in system registry, and clearly facial image is used as registration
Image;Video streaming image unit is additionally operable to acquire real-time face image in information collection;
Certificate information collection unit be used in system registry typing certificate information as log-on message;Certificate information collection
Unit is additionally operable in information collection image in the certificate information and chip of reading identity card part, and identity document is scanned
To obtain the scan image of document surface printing photo;
Image pre-processing unit is used to carry out Face datection and pretreatment to image in image preprocessing, to improve face
The accuracy of verification;
Face verification unit for image in extraction is obtained by certificate information collection unit in certificate false distinguishing chip and
Then scan image extracts the shallow-layer feature of the two and carries out consistency checking respectively;Face verification unit is additionally operable in face
Extraction obtains the first contrast images and the second contrast images by image pre-processing unit during verification, then the first comparison of extraction respectively
The further feature of image and the second contrast images and the matching degree for calculating the two;
Database management unit is used to obtain log-on message from certificate information collection unit, and from video in system registry
Stream picture unit obtains registered images, and the log-on message got and registered images then are stored in database;Data base administration
Unit is additionally operable to obtain certificate information, and inquire number according to the certificate information got from information acquisition unit in information collection
According to library;Database management unit is additionally operable to obtain real-time face image as note from video streaming image unit in database update
Volume image, and the registered images got are stored in or are updated into database.
Further, video streaming image unit is camera.
Further, certificate information collection unit includes:CIS (Contact Image Sensor, contact type image sensing
Device) image capture module and chip card reader;CIS image capture modules are used to scan certificate to obtain identity document surface printing
The scan image of photo, chip card reader is for image in the certificate information and chip of reading identity card part.
Further, face verification unit is characterized as that SURF features, histogram level projection are special from the shallow-layer of image zooming-out
The feature that sign, histogram upright projection feature and Gradient Features are composed, to reduce computation complexity, while improves extraction
Speed.
Further, the method for face verification unit from image zooming-out further feature includes:Obtain the higher-dimension convolution of image
Feature, then dimension-reduction treatment is carried out to higher-dimension convolution feature, obtain the low-dimensional feature suitable for calculating;Using low-dimensional feature as people
The further feature of face verification.
In general, by the above technical scheme conceived by the present invention, following advantageous effect can be obtained:
(1) database for storing identity document information and registered images is established, and periodically registered images are carried out
Update on the one hand independent of external data base, can improve the efficiency of identity security verification;On the other hand, it is tested for face
The contrast images of the card facial image recent for user and the real-time face image of acquisition, can significantly improve face verification just
True rate, and on this basis, face verification is not strongly dependent upon manual operation, can significantly improve the verification speed of face verification
Degree;
(2) in certificate false distinguishing, the scanning of image and document surface printing photo in the chip by extracting identity document
The shallow-layer feature of image completes the identification of the certificate true and false, is no longer dependent on artificial discriminating, can improve certificate false distinguishing efficiency and
Accuracy;And extract shallow-layer be characterized as SURF features, histogram level projection properties, histogram upright projection feature and
The feature that Gradient Features are composed to reduce computation complexity, while improves extraction rate;
(3) a variety of certificates such as No.2 residence card, Hongkong and Macro's pass, passport can be directed to and completes identity security verification,
It can be suitable for a variety of identity securities and verify scene;Meanwhile with systematic difference, a variety of cards for will storing user in database
Part information can realize the comprehensive verification to various identity cards;
(4) when obtaining less than registered images, image and document surface printing photo in the chip of identity document can be chosen
Scan image in one of contrast images of the higher image of picture quality as face verification, it is thus possible to ensure face verification
Accuracy.
Description of the drawings
Fig. 1 is the flow chart of identity-based certificate provided by the invention and the identity security verification method of recognition of face;
Fig. 2 is the structure of the identity security verification system of identity-based certificate provided in an embodiment of the present invention and recognition of face
Block diagram;
Fig. 3 is the first embodiment of identity security verification method provided by the present invention;
Fig. 4 is the second embodiment of identity security verification method provided by the present invention.
Specific embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, with reference to the accompanying drawings and embodiments, it is right
The present invention is further elaborated.It should be appreciated that specific embodiment described herein is only to explain the present invention, not
For limiting the present invention.As long as in addition, technical characteristic involved in the various embodiments of the present invention described below that
Conflict is not formed between this to can be combined with each other.
Identity-based certificate provided by the invention and the identity security verification method of recognition of face, as shown in Figure 1, including such as
Lower step:
(1) system registry step:The certificate information of user identity certificate is obtained as log-on message, and acquires the people of user
Then face image will use log-on message and registered images deposit database as registered images;The certificate information packet of identity document
Include certificate number and the name of holder;
(2) information collection step:Obtain the certificate information of user identity certificate, image and document surface printing in chip
The scan image of photo, and acquire real-time face image;Database is inquired according to certificate information, if inquiring relevant entry,
Registered images are extracted from query result;If inquiry creates one according to certificate information in the database less than relevant entry
New entry, registered images are sky in the new entry created;
(3) certificate false distinguishing step:The shallow-layer feature of image and scan image in chip is extracted respectively, and is carried out consistency and sentenced
It is fixed;If image is consistent with scan image in chip, it is transferred to step (4);If image and scan image are inconsistent in chip, test
Card does not pass through, and verification terminates;
(4) image preprocessing step:If in step (2), registered images are got, then face are carried out to real-time face image
Detection and pretreatment obtain the first contrast images, and carry out Face datection and pretreatment to registered images, obtain the second comparison diagram
Picture;If in step (2), registered images have not been obtained, then Face datection and pretreatment is carried out to real-time face image, obtains first
Contrast images, and Face datection and pretreatment are carried out to the higher image of picture quality in image in chip and scan image, it obtains
To the second contrast images;By carrying out Face datection and pretreatment to image, the Efficiency and accuracy of face verification can be improved;
(5) face verification step:The further feature of the first contrast images and the second contrast images is extracted respectively, and calculates two
The matching degree of person;If matching degree is higher than first threshold, it is transferred to step (6);Otherwise, verification does not pass through, and verification terminates;
(6) database update step:If in step (2), registered images have not been obtained, then using real-time face image as note
Volume image is stored in the corresponding entry of database, and is transferred to step (7);If in step (2), registered images are got, and work as
Time interval of the preceding verification time apart from last time data base update time is more than second threshold, then using real-time face image as note
Volume image, updates the data corresponding entry in library, and be transferred to step (7);If in step (2), registered images are got, and work as
Time interval of the preceding verification time apart from last time data base update time is less than second threshold, then is transferred to step (7);
(7) it is verified, verification terminates.
With reference to identity security verification method shown in FIG. 1, an embodiment of the present invention provides a kind of this method that is used to implement
System, as shown in Fig. 2, including:Video streaming image unit, certificate information collection unit, image pre-processing unit, face verification list
Member and database management unit;
Video streaming image unit is used for the acquisition user front-face and hat-free photos in system registry, and clearly facial image is used as registration
Image;Video streaming image unit is additionally operable to acquire real-time face image in information collection;In the present embodiment, video streaming image
Unit is the camera that can acquire facial image in real time;
Certificate information collection unit be used in system registry typing certificate information as log-on message;Certificate information collection
Unit is additionally operable in information collection image in the certificate information and chip of reading identity card part, and identity document is scanned
To obtain the scan image of document surface printing photo;In the present embodiment, certificate information collection unit includes the card based on CIS
Part scanner and chip card reader;Image scanner based on CIS is used to scan certificate to obtain document surface printing photo
Scan image;Chip card reader is for image in the certificate information and chip of reading identity card part;Certificate information collection unit is also
Equipment including supporting to be manually entered, such as mouse, keyboard;
Image pre-processing unit is used to carry out Face datection and pretreatment to image in image preprocessing, to improve face
The accuracy of verification;
Face verification unit is used to obtain image and scanning figure in chip from certificate information collection unit in certificate false distinguishing
Then picture extracts the feature of the two and carries out consistency checking respectively;Face verification unit is additionally operable in face verification from figure
As pretreatment unit the first contrast images of acquisition and the second contrast images, the first contrast images and the second comparison are then extracted respectively
The further feature of image and the matching degree for calculating the two;
Database management unit is used to obtain log-on message from certificate information collection unit, and from video in system registry
Stream picture unit obtains registered images, and the log-on message got and registered images then are stored in database;Data base administration
Unit is additionally operable to obtain certificate information, and inquire number according to the certificate information got from information acquisition unit in information collection
According to library;Database management unit is additionally operable to obtain real-time face image as note from video streaming image unit in database update
Volume image, and the registered images got are stored in or are updated into database.
Face verification unit is characterized as SURF features, histogram level projection properties, histogram from the shallow-layer of image zooming-out
The feature that upright projection feature and Gradient Features are composed to reduce computation complexity, while improves extraction rate;Face
The method of authentication unit from image zooming-out further feature includes:The higher-dimension convolution feature of image is obtained, then to higher-dimension convolution feature
Dimension-reduction treatment is carried out, obtains the low-dimensional feature suitable for calculating;Using low-dimensional feature as the further feature for face verification.
In the first application scenarios, user has been based on No.2 residence card and has completed system registry step, therefore data
The certificate information and registered images of user identity certificate have been stored in library.
Under the first application scenarios, as shown in figure 3, identity security verification method provided by the present invention specifically include as
Lower step:
(11) information collection step:Read the certificate information of user's No.2 residence card, image in chip, and to
Family No.2 residence card is scanned the scan image to obtain document surface printing photo, while acquires real-time face figure
Picture;Database is inquired according to the certificate information of reading, extracts the registered images stored in database;
(12) certificate false distinguishing step:The shallow-layer feature of image and scan image in chip is extracted respectively, and carries out consistency
Judgement;If image is consistent with scan image in chip, it is transferred to step (13);If image and scan image are inconsistent in chip,
It then verifies and does not pass through, verification terminates;In the present embodiment, the method for consistency checking includes:Respectively extract chip in image and
The shallow-layer feature of scan image;The shallow-layer of extraction is characterized as SURF features, histogram level projection properties, histogram upright projection
The feature that feature and Gradient Features are composed;To reduce computation complexity, while improve extraction rate;Calculate what is extracted
Euclidean distance between shallow-layer feature;If Euclidean distance is more than third threshold value, judge that image is consistent with scan image in chip;
Otherwise, it is determined that image and scan image are inconsistent in chip;Third threshold value is rule of thumb set;As system comes into operation, number
According to library meeting dynamic expanding, system will be regularly updated, and third threshold value will be more accurate;
(13) image preprocessing step:Face datection and pretreatment are carried out to real-time face image, obtain the first comparison diagram
Picture, and the registered images extracted to inquiry database carry out Face datection and pretreatment, obtain the second contrast images;In this reality
It applies in example, Face datection is carried out using Haar features and Adaboost graders;Pretreatment includes:Histogram equalization, Gauss filter
Wave denoising and image size normalization;
(14) face verification step:The further feature of the first contrast images and the second contrast images is extracted respectively, and is calculated
The COS distance of the two is as matching degree;If matching degree is higher than first threshold, it is transferred to step (15);Otherwise, verification does not pass through,
Verification terminates;In the present embodiment, the method for extraction image further feature includes:Image is obtained by depth convolutional neural networks
Higher-dimension convolution feature, then by Principal Component Analysis Algorithm to higher-dimension convolution feature carry out dimension-reduction treatment, obtain suitable for calculate
Low-dimensional feature;Using low-dimensional feature as the further feature for face verification;
(15) database update step:If the time interval of current authentication time gap last time data base update time is more than
Second threshold then using real-time face image as registered images, updates the data corresponding entry in library, and be transferred to step (16);
Otherwise, it is transferred to step (16);Second threshold is rule of thumb set;
(16) it is verified, verification terminates.
In the second application scenarios, the accredited part of user institute is passport, and not yet completes system registry step, therefore data
The certificate information and registered images of the user identity certificate are not present in library.
Under the first application scenarios, as shown in figure 4, identity security verification method provided by the present invention specifically include as
Lower step:
(21) information collection step:It reads the certificate information of user's passport, image in chip, and user's passport is swept
The scan image to obtain document surface printing photo is retouched, while acquires real-time face image;It is looked into according to the certificate information of reading
Database is ask, query result is sky, creates a new entry, the registration corresponding to new entry according to certificate information in the database
Image is sky;
(22) certificate false distinguishing step:The shallow-layer feature of image and scan image in chip is extracted respectively, and carries out consistency
Judgement;If image is consistent with scan image in chip, it is transferred to step (23);If image and scan image are inconsistent in chip,
It then verifies and does not pass through, verification terminates;In the present embodiment, the method for consistency checking includes:Respectively extract chip in image and
The shallow-layer feature of scan image;The shallow-layer of extraction is characterized as SURF features, histogram level projection properties, histogram upright projection
The feature that feature and Gradient Features are composed;To reduce computation complexity, while improve extraction rate;Calculate what is extracted
Euclidean distance between shallow-layer feature;If Euclidean distance is more than third threshold value, judge that image is consistent with scan image in chip;
Otherwise, it is determined that image and scan image are inconsistent in chip;Third threshold value is rule of thumb set;As system comes into operation, number
According to library meeting dynamic expanding, system will be regularly updated, and third threshold value will be more accurate;
(23) image preprocessing step:Face datection and pretreatment are carried out to collected facial image, obtain first pair
Face datection and pretreatment are carried out than image, and to image in the chip of passport, obtains the second contrast images;In the present embodiment
In, Face datection is carried out using Haar features and Adaboost graders;Pretreatment includes:Histogram equalization, gaussian filtering are gone
It makes an uproar and image size normalization;
(24) face verification step:The further feature of the first contrast images and the second contrast images is extracted respectively, and is calculated
The COS distance of the two is as matching degree;If matching degree is higher than first threshold, it is transferred to step (25);Otherwise, verification does not pass through,
Verification terminates;In the present embodiment, the method for extraction image further feature includes:Image is obtained by depth convolutional neural networks
Higher-dimension convolution feature, then by Principal Component Analysis Algorithm to higher-dimension convolution feature carry out dimension-reduction treatment, obtain suitable for calculate
Low-dimensional feature;Using low-dimensional feature as the further feature for face verification;
(25) database update step:Using collected real-time face image as registered images, deposit database corresponds to
Entry in, and be transferred to step (26);
(26) it is verified, verification terminates.
As it will be easily appreciated by one skilled in the art that the foregoing is merely illustrative of the preferred embodiments of the present invention, not to
The limitation present invention, all any modification, equivalent and improvement made all within the spirits and principles of the present invention etc., should all include
Within protection scope of the present invention.