CN101655981A - Method for detecting and adjusting inversion of certificate image - Google Patents

Method for detecting and adjusting inversion of certificate image Download PDF

Info

Publication number
CN101655981A
CN101655981A CN200910192159A CN200910192159A CN101655981A CN 101655981 A CN101655981 A CN 101655981A CN 200910192159 A CN200910192159 A CN 200910192159A CN 200910192159 A CN200910192159 A CN 200910192159A CN 101655981 A CN101655981 A CN 101655981A
Authority
CN
China
Prior art keywords
image
certificate
inversion
face
detecting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN200910192159A
Other languages
Chinese (zh)
Inventor
谭洪舟
朱雄泳
文旭桦
郑俊辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN200910192159A priority Critical patent/CN101655981A/en
Publication of CN101655981A publication Critical patent/CN101655981A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a method for detecting and adjusting the inversion of a certificate image, comprising the following steps: (1) acquiring a color certificate image by an image acquisition tool;(2) shrinking the certificate image according to a certain scale factor; (3) converting the RGB color space of the certificate image into HIS color space; (4) converting the HIS image into an binaryimage by utilizing the constraint condition of a human face skin color; (5) carrying out median filtering of the binary image to obtain a binary image only with a human face part; (6) cutting a humanface part image according to the human face part binary image; (7) obtaining a human face edge binary image by an RGB edge extraction method; and (8) utilizing horizontal projection statistics to detect the inversion of a certificate. The method for detecting and adjusting the inversion of the certificate image shrinks the image under the condition of keeping the human face outline information ofthe image constant so as to greatly reduce the pixel participating human face skin color positioning and outline extraction operation, thereby not only enhancing the arithmetic efficiency but also ensuring the high accuracy, robustness and reliability of arithmetic detection.

Description

The method of detecting and adjusting inversion of certificate image
Technical field
The present invention relates to a kind of method that is applied to detecting and adjusting inversion of certificate image, specifically, relate to a kind of face complexion location of utilizing, and add up to determine whether inverted method of image in conjunction with projection.
Background technology
From certificate, obtain relevant information, more and more appear in the various fields of the social people's livelihood, maturation along with computer technology, Flame Image Process and optical character recognizer, utilize computing machine to carry out certificate information and discern typing automatically and become possibility, this appearance of obtaining information approach will improve professional both sides' work efficiency greatly.Certificate information collection system based on computing machine OCR can be widely used in the section industries such as public security, bank, telecommunications, postal service, railway, civil aviaton, security, civil administration, entry and exit, army, Internet bar and hotel, can save great amount of manpower and material resources, have quite wide application prospect.
Certificate information collection system can be divided into image acquisition, image pre-service, certificate location, image segmentation, five key steps of character recognition, detecting and adjusting inversion of certificate image is an important process process between certificate location, image segmentation, certificate image can phenomena of inversion occur owing to the randomness that certificate is placed, this brings difficulty not only can for next step image segmentation, even causes certificate information correctly not discern.
The detecting and adjusting inversion of certificate image is important problem in the certificate information collection system, in order to avoid the inverted problem of certificate imaging as far as possible, can be to collecting device and acquisition step, using method etc. are carried out some corresponding restrictions, but consider the robustness and extensibility (as being adapted to different big or small certificates) of system, also to give the user simultaneously and use degree of freedom to the full extent, so stop relatively difficulty of certificate image imaging phenomena of inversion, but if certificate is not carried out corresponding detecting and adjusting inversion, then can carry out information subgraph piece (as head portrait to certificate image, name, cutting apart message block such as passport NO.) brings very big difficulty, prominent question be exactly can be because information is damaged, factors such as character distortion and cause character recognition and information extraction to make mistakes.
Generally, the image acquisition of certificate is to finish in a dark all around specific environment, it is more far better than the imaging circumstances of common Vehicle License Plate Recognition System, guaranteed that the interference that imaging process is subjected to is had predictability preferably, usually the certificate image that photographs is comparatively clear, effect is relatively good, and object plane also is parallel with lens plane, perspective imaging phenomenon (Perspective Imaging) promptly can not occur.Simultaneously, because the head portrait of certificate such as China second-generation identity card etc. is colored, so for people's face Face Detection, the RGB profile sketches the contours that good basis is provided.
Summary of the invention
At above deficiency, the invention provides a kind of can whether the inversion by fast automatic judgement certificate image, if be inverted, and the method for the detecting and adjusting inversion of certificate image of in time correcting.
The method of detecting and adjusting inversion of certificate image of the present invention comprises:
1) image acquisition: utilize the image acquisition instrument to obtain the coloured image of certificate;
2) conversioning colour space: the rgb color space of the certificate image that above-mentioned steps is obtained converts the HIS color space to;
3) people's face detects: according to face complexion constraint condition the image transitions that above-mentioned steps obtains is become bianry image;
4) people's face cutting: the bianry image according to people face part in the bianry image cuts out the people face part image that step 1) obtains;
5) extract facial contour: utilize RGB edge extracting method, obtain the edge binary images of people's face;
6) the horizontal projection statistics detects the certificate inversion.
Described step 1) also comprises step 11): the certificate coloured image that step 1) is obtained carries out convergent-divergent.
Described step 3) also comprises 31): the bianry image of people's face that step 3) is obtained carries out the medium filtering operation, obtains the only bianry image of remaining people face part of a width of cloth.
What the bianry image of people's face was carried out that the medium filtering operation adopts is 9 * 9 template.
The process of utilizing RGB edge extracting method to extract facial contour in the described step 5) comprises:
51) (i, red, green, blue component j) is r to definition protoplast face image pixel f 1, g 1, b 1, (i+1, red, green, blue component j) is r to the f that goes together mutually 2, g 2, b 2, (i, red, green, blue component j+1) is r to same column f 3, g 3, b 3, above-mentioned component increases 1.5 times earlier certainly, image g after obtaining handling according to following formula then (i, red, green, blue component j) is r, g, b:
r = 2 × ( r 1 - r 2 ) 2 + ( r 1 - r 3 ) 2
g = 2 × ( g 1 - g 2 ) 2 + ( g 1 - g 3 ) 2 ;
b = 2 × ( b 1 - b 2 ) 2 + ( b 1 - b 3 ) 2
52) with step 51) r, g, these three components of b of obtaining are converted to gray-scale value with the gray scale formula:
gray=0.11×b+0.5×g+0.39×r ;
53), be 0 or 255 with this grayvalue transition according to constraint condition:
binaryvalue = 255 , gray ≤ 200 , 0 gray > 200 ;
54) traversal view picture facial image repeats step 51)~52) operation, finish until traversal, can obtain the bianry image of a width of cloth facial contour.
Described step 6) horizontal projection statistics detects certificate inversion process and comprises:
61) bianry image with facial contour is divided into upper and lower two parts N 1And N 2
61) if N 1-N 2<15, then can conclude image inversion, should be with image Rotate 180 °; Otherwise, judge that then image is normal.
Beneficial effect of the present invention: detecting and adjusting inversion of certificate image method of the present invention under the constant situation of image facial contour information is dwindled image keeping, thereby the profile that participates in face complexion location and image extracts the pixel of operation to significantly reduce, this has not only improved efficiency of algorithm, also guaranteed the accuracy height that algorithm detects, strong robustness, reliability height.
Description of drawings
Fig. 1 is a detecting and adjusting inversion of certificate image method flow diagram of the present invention;
Fig. 2 is certificate original image of the present invention (because certificate relates to personal information, so the information of having carried out is erased in the certificate image subregion, down together);
Fig. 3 detects the bianry image that obtains for the present invention according to face complexion;
Fig. 4 is for utilizing the bianry image after 9 * 9 templates are carried out medium filtering;
The people face part image of Fig. 5 for cutting out according to detected people's face position;
Fig. 6 is the facial contour figure that utilizes RGB profile extraction method to extract;
Fig. 7 is the bianry image that utilizes constraint condition that facial contour figure is converted to;
Fig. 8 rotates normal picture after utilizing the horizontal projection statistic law to detect image inversion.
Embodiment
Below in conjunction with accompanying drawing the present invention is further set forth, but not as a limitation of the invention, dreamboat output of the present invention is that a width of cloth does not have inverted certificate image.
As shown in Figure 1, be inversion of certificate image automatic detecting and correcting method overview flow chart of the present invention, it comprises:
1, image acquisition
At first be to carry out the certificate image collection, can utilize common IP Camera, digital camera, scanner or buy some certificate recognition instrument pickup images.In the present invention, because the imaging background environment is fine, the certificate image that photographs is more clear, is fit to follow-up work of treatment.
In view of certificate all has a width of cloth clour mixing picture, so the present invention adopts based on colour of skin location people's face, come detected image whether to be inverted according to face characteristic then, export normal picture at last.
2, downscaled images
Owing to only need utilize people's face to come detected image whether to be inverted, image is narrowed down to the relevant information that certain degree can't change people's face in the image, then can run counter to desire but image is too small.So with the suitable factor of dwindling it is dwindled behind the certificate color reproduction image that needs above-mentioned steps is obtained, to reduce the operand of algorithm.
3, conversioning colour space
The rgb color space of this image is converted to the HIS color space, and conversion formula is:
Figure A20091019215900081
S = 1 - 3 ( R + G + B ) [ min ( R , G , B ) ]
I = 1 3 ( R + G + B )
Wherein, R, G, B represent to normalize to redness, green, the blue three-channel color component of the rgb color space of [0,1] scope; H, I, S represent colourity, brightness, the saturation degree component of HIS color space; θ = arccos { 1 2 [ ( R - G ) + ( R - B ) ] [ ( R - G ) 2 + ( R - B ) ( G - B ) ] 1 / 2 } , Angle between the red axle of represent pixel point and HIS color space.
4, people's face detects
Is bianry image according to following face complexion constraint condition with image transitions:
0.003<H<0.174
0.040<S<0.352
0.352<I<1
Also there are some interference noises in image after the conversion, must these interference noises of filtering.
5, medium filtering
Utilize 9 * 9 template that bianry image is carried out the medium filtering operation, can be with the interference noise filtering, thus obtain the only bianry image of remaining people face part of a width of cloth.
6, people's face cutting
According to people's face binary map the people face part image that the front dwindles figure is cut out, this moment picture size will littler, the participation computing pixel quantity also still less, thereby subsequent operation speed can be greatly enhanced.
7, extract facial contour
Utilize RGB edge extracting method, obtain the edge binary images of people's face, method is as follows:
Step1: (i, red, green, blue component j) is r to establish protoplast's face image pixel f 1, g 1, b 1, (i+1, red, green, blue component j) is r to the f that goes together mutually 2, g 2, b 2, (i, red, green, blue component j+1) is r to same column f 3, g 3, b 3, above-mentioned component increases 1.5 times earlier certainly, image g after obtaining handling according to following formula then (i, red, green, blue component j) is r, g, b, these three components can calculate by following formula:
r = 2 × ( r 1 - r 2 ) 2 + ( r 1 - r 3 ) 2
g = 2 × ( g 1 - g 2 ) 2 + ( g 1 - g 3 ) 2
b = 2 × ( b 1 - b 2 ) 2 + ( b 1 - b 3 ) 2
Step2: r, g, these three components of b that Step1 is obtained are converted to gray-scale value with the gray scale formula:
gray=0.11×b+0.5×g+0.39×r
Step3:, be 0 or 255 with this grayvalue transition according to constraint condition:
binaryvalue = 255 , gray ≤ 200 , 0 gray > 200
Step4: the traversal entire image, repeat Step1~Step3 operation, finish until traversal, can obtain the bianry image of the width of cloth facial contour this moment.
8, the horizontal projection statistics detects the certificate inversion
People's face is divided into upper and lower two parts N 1, N 2According to face characteristic as can be known, the lines pixel sum of band eyes, eyebrow part is always than only the lines pixel sum with nose, lip part is many, therefore can adopt the pixel sum of horizontal projection statistical method statistics top and the bottom image, determine according to both sizes whether image is inverted then: if N 1-N 2<15, promptly the difference of top and lower part profile lines pixel is less than 15, then can conclude image inversion (because the people on the face half part comprise eyes, eyebrow, the nose that comprises than people's face the latter half, the contour pixel of face is much more.), should be with image Rotate 180 °; Otherwise, judge that then image is normal.
So far, tilt and the end of inversion detection algorithm, export the normal certificate image of a width of cloth.
Specific embodiment:
Use a USB IP Camera, resolution is 640 * 480, the second generation residential identity certificate image that the width of cloth level of taking is put.
As seen from Figure 2, there is phenomena of inversion in certificate image, can locate the people face part by face complexion, then according to the facial contour feature, utilizes the horizontal projection statistic law to come detected image whether to have phenomena of inversion.
Fig. 2 is reduced into 1/4 of original size, to reduce operand, then according to face complexion constraint condition, with image binaryzation, as shown in Figure 3.
Exist a large amount of interference noise in the binary map this moment, and it is carried out 9 * 9 medium filtering, can be with noise filtering, as shown in Figure 4.
As shown in Figure 4, the image cut of people face part is come out in only remaining people face part in this moment binary map, as shown in Figure 5, further reduces operand.
Can obtain the profile diagram 6 of people face part according to formula RGB edge extracting method, by the constraint condition of gray-scale value, profile diagram is converted to bianry image again, as shown in Figure 7.
Fig. 7 is divided into upper and lower two halves N 1, N 2, the summation of utilizing the horizontal projection statistic law that these two parts are added up profile lines pixel respectively respectively obtains N 1=52, N 2=85, by N 1-N 2<15 as can be known source images be inverted, so ° can be normal with image restoring with Fig. 2 Rotate 180, as shown in Figure 8.
Whether can correctly detect the certificate image by whole algorithm and the visible the present invention of result thereof fell Put, thereby with it reduction, give the use free degree of user Geng Gao. Because this algorithm takes full advantage of Dwindle the color of rear image and people's face colour of skin, the constant characteristics of people's face profile feature, greatly reduced The operand of algorithm has improved the speed of service of program, thereby reaches efficient, reliable, robustness By force, the designing requirement of zmodem.

Claims (6)

1, a kind of method of detecting and adjusting inversion of certificate image is characterized in that, it comprises:
1) image acquisition: utilize the image acquisition instrument to obtain the coloured image of certificate;
2) conversioning colour space: the rgb color space of the certificate image that above-mentioned steps is obtained converts the HIS color space to;
3) people's face detects: according to face complexion constraint condition the image transitions that above-mentioned steps obtains is become bianry image;
4) people's face cutting: the bianry image according to people face part in the bianry image cuts out the people face part image that step 1) obtains;
5) extract facial contour: utilize RGB edge extracting method, obtain the edge binary images of people's face;
6) the horizontal projection statistics detects the certificate inversion.
2, the method for detecting and adjusting inversion of certificate image according to claim 1 is characterized in that, described step 1) also comprises step 11): the certificate coloured image that step 1) is obtained carries out convergent-divergent.
3, the method for detecting and adjusting inversion of certificate image according to claim 1 and 2 is characterized in that, described step 3) also comprises 31): step 3) is obtained.
4, the method for detecting and adjusting inversion of certificate image according to claim 3 is characterized in that, described bianry image to people's face carries out that medium filtering operation adopts is 9 * 9 template.
According to the method for claim 1 or 4 described detecting and adjusting inversion of certificate image, it is characterized in that 5, the process of utilizing RGB edge extracting method to extract facial contour in the described step 5) comprises:
51) (i, red, green, blue component j) is r to definition protoplast face image pixel f 1, g 1, b 1, (i+1, red, green, blue component j) is r to the f that goes together mutually 2, g 2, b 2, (i, red, green, blue component j+1) is r to same column f 3, g 3, b 3, above-mentioned component increases 1.5 times earlier certainly, image g after obtaining handling according to following formula then (i, red, green, blue component j) is r, g, b:
r = 2 × ( r 1 - r 2 ) 2 + ( r 1 - r 3 ) 2
g = 2 × ( g 1 - g 2 ) 2 + ( g 1 - g 3 ) 2 ;
b = 2 × ( b 1 - b 2 ) 2 + ( b 1 - b 3 ) 2
52) with step 51) r, g, these three components of b of obtaining are converted to gray-scale value with the gray scale formula:
gray=0.11×b+0.5×g+0.39×r;
53), be 0 or 255 with this grayvalue transition according to constraint condition:
binaryvalue = 255 , gray ≤ 200 , 0 gray > 200 ;
54) traversal view picture facial image repeats step 51)~52) operation, finish until traversal, can obtain the bianry image of a width of cloth facial contour.
According to the method for claim 1 or 4 described detecting and adjusting inversion of certificate image, it is characterized in that 6, described step 6) horizontal projection statistics detects certificate inversion process and comprises:
61) bianry image with facial contour is divided into upper and lower two parts N 1And N 2
61) if N 1-N 2<15, then can conclude image inversion, should be with image Rotate 180 °; Otherwise, judge that then image is normal.
CN200910192159A 2009-09-09 2009-09-09 Method for detecting and adjusting inversion of certificate image Pending CN101655981A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910192159A CN101655981A (en) 2009-09-09 2009-09-09 Method for detecting and adjusting inversion of certificate image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910192159A CN101655981A (en) 2009-09-09 2009-09-09 Method for detecting and adjusting inversion of certificate image

Publications (1)

Publication Number Publication Date
CN101655981A true CN101655981A (en) 2010-02-24

Family

ID=41710252

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910192159A Pending CN101655981A (en) 2009-09-09 2009-09-09 Method for detecting and adjusting inversion of certificate image

Country Status (1)

Country Link
CN (1) CN101655981A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102509093A (en) * 2011-10-18 2012-06-20 谭洪舟 Close-range digital certificate information acquisition system
CN103116628A (en) * 2013-01-31 2013-05-22 新浪网技术(中国)有限公司 Image file digital signature and judgment method and judgment device of repeated image file
CN103514444A (en) * 2013-10-15 2014-01-15 北京联合大学 Pedestrian detection method based on contour and color similar symmetrical distribution features
CN103679700A (en) * 2013-10-29 2014-03-26 成都三泰电子实业股份有限公司 Bill image inversion detection system
CN103514444B (en) * 2013-10-15 2016-11-30 北京联合大学 A kind of based on profile with the pedestrian detection method of color similar symmetric distribution characteristics
CN107392203A (en) * 2017-07-11 2017-11-24 税友软件集团股份有限公司 Regular picture information identifying method and system
CN108429877A (en) * 2017-02-15 2018-08-21 腾讯科技(深圳)有限公司 Image-pickup method and mobile terminal
CN109376735A (en) * 2018-08-31 2019-02-22 百度在线网络技术(北京)有限公司 Identity information extracting method, device, electronic equipment and storage medium
CN109919155A (en) * 2019-03-13 2019-06-21 厦门商集网络科技有限责任公司 A kind of the inclination angle antidote and terminal of text image
CN110135288A (en) * 2019-04-28 2019-08-16 佛山科学技术学院 A kind of quick checking method and device of electronics license
CN113131399A (en) * 2021-05-27 2021-07-16 国网河北省电力有限公司保定供电分公司 Aiming cutting method and aiming cutting system
CN114998976A (en) * 2022-07-27 2022-09-02 江西农业大学 Face key attribute identification method, system, storage medium and computer equipment

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102509093A (en) * 2011-10-18 2012-06-20 谭洪舟 Close-range digital certificate information acquisition system
CN103116628A (en) * 2013-01-31 2013-05-22 新浪网技术(中国)有限公司 Image file digital signature and judgment method and judgment device of repeated image file
CN103514444A (en) * 2013-10-15 2014-01-15 北京联合大学 Pedestrian detection method based on contour and color similar symmetrical distribution features
CN103514444B (en) * 2013-10-15 2016-11-30 北京联合大学 A kind of based on profile with the pedestrian detection method of color similar symmetric distribution characteristics
CN103679700A (en) * 2013-10-29 2014-03-26 成都三泰电子实业股份有限公司 Bill image inversion detection system
CN103679700B (en) * 2013-10-29 2016-09-07 成都三泰控股集团股份有限公司 Bill image inversion detection system
CN108429877B (en) * 2017-02-15 2021-08-13 腾讯科技(深圳)有限公司 Image acquisition method and mobile terminal
CN108429877A (en) * 2017-02-15 2018-08-21 腾讯科技(深圳)有限公司 Image-pickup method and mobile terminal
CN107392203A (en) * 2017-07-11 2017-11-24 税友软件集团股份有限公司 Regular picture information identifying method and system
CN109376735A (en) * 2018-08-31 2019-02-22 百度在线网络技术(北京)有限公司 Identity information extracting method, device, electronic equipment and storage medium
CN109919155A (en) * 2019-03-13 2019-06-21 厦门商集网络科技有限责任公司 A kind of the inclination angle antidote and terminal of text image
CN109919155B (en) * 2019-03-13 2021-03-12 厦门商集网络科技有限责任公司 Inclination angle correction method for text image and terminal
CN110135288A (en) * 2019-04-28 2019-08-16 佛山科学技术学院 A kind of quick checking method and device of electronics license
CN113131399A (en) * 2021-05-27 2021-07-16 国网河北省电力有限公司保定供电分公司 Aiming cutting method and aiming cutting system
CN114998976A (en) * 2022-07-27 2022-09-02 江西农业大学 Face key attribute identification method, system, storage medium and computer equipment

Similar Documents

Publication Publication Date Title
CN101655981A (en) Method for detecting and adjusting inversion of certificate image
CN106874871B (en) Living body face double-camera identification method and identification device
CN101662581B (en) Multifunctional certificate information collection system
CN101609500B (en) Quality estimation method of exit-entry digital portrait photos
CN101673338B (en) Fuzzy license plate identification method based on multi-angle projection
CN102930265B (en) A kind of many I.D.s scan method and device
CN102194108B (en) Smile face expression recognition method based on clustering linear discriminant analysis of feature selection
CN101739546A (en) Image cross reconstruction-based single-sample registered image face recognition method
WO2005098743A3 (en) 2d/3d facial biometric mobile identification
CN105046246A (en) Identification photo camera capable of performing human image posture photography prompting and human image posture detection method
CN101625760A (en) Method for correcting certificate image inclination
CN101916370A (en) Method for processing non-feature regional images in face detection
CN103413119A (en) Single sample face recognition method based on face sparse descriptors
CN104408728A (en) Method for detecting forged images based on noise estimation
CN102024156A (en) Method for positioning lip region in color face image
CN109359577A (en) A kind of Complex Background number detection system based on machine learning
CN107437293A (en) A kind of bill anti-counterfeit discrimination method based on bill global characteristics
CN103366390A (en) Terminal, image processing method and device thereof
CN106297492A (en) A kind of Educational toy external member and utilize color and the method for outline identification programming module
WO2018107574A1 (en) Method and device for detecting see-through register anti-counterfeiting characteristics
TW201039246A (en) Method for continuously outputting character by video-recording
Al-Mahadeen et al. Signature region of interest using auto cropping
CN112215225A (en) KYC certificate verification method based on computer vision technology
CN106600732A (en) Driver training time keeping system and method based on face recognition
CN107481257A (en) The image background minimizing technology of Fusion of Color and local ternary parallel pattern feature

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20100224