CN102592260A - Certificate image cutting method and system - Google Patents

Certificate image cutting method and system Download PDF

Info

Publication number
CN102592260A
CN102592260A CN201110442745XA CN201110442745A CN102592260A CN 102592260 A CN102592260 A CN 102592260A CN 201110442745X A CN201110442745X A CN 201110442745XA CN 201110442745 A CN201110442745 A CN 201110442745A CN 102592260 A CN102592260 A CN 102592260A
Authority
CN
China
Prior art keywords
ears
chin
license image
portrait
cutting
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.)
Granted
Application number
CN201110442745XA
Other languages
Chinese (zh)
Other versions
CN102592260B (en
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.)
GUANGZHOU SHANGJING NETWORK TECHNOLOGY Co Ltd
Original Assignee
GUANGZHOU SHANGJING NETWORK TECHNOLOGY Co Ltd
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 GUANGZHOU SHANGJING NETWORK TECHNOLOGY Co Ltd filed Critical GUANGZHOU SHANGJING NETWORK TECHNOLOGY Co Ltd
Priority to CN201110442745XA priority Critical patent/CN102592260B/en
Publication of CN102592260A publication Critical patent/CN102592260A/en
Application granted granted Critical
Publication of CN102592260B publication Critical patent/CN102592260B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

The invention provides a certificate image cutting method and a system. The method comprises the following steps of: reading a certificate image and finding pupil positions of a portrait in the certificate image; determining a head position of the portrait in the certificate image according to the pupil positions; determining a lower jaw position and two ear positions of the portrait in the certificate image according to the pupil positions; determining a cutting region according to the determined head position, lower jaw position and two ear positions; and cutting the certificate image according to the determined cutting region. According to the certificate image cutting method and the system, disclosed by the invention, the disadvantage of manually selecting the cutting region to cause low efficiency in a traditional certificate manufacturing process is overcome; the automatic cutting of the certificate image based on multi-point checking and positioning is realized; the certificate image cutting region can be rapidly, efficiently and accurately positioned so as to automatically cut out a photo meeting the requirements; and therefore, the certificate image cutting method and the system can be widely applied to automatically cutting out the certificate image meeting the requirements by self-help photographing equipment, and can also help non-professional ordinary people to have the convenience effect of photographing a certificate photo by oneself.

Description

License image method of cutting out and system
Technical field
The present invention relates to the computer software image processing field, particularly a kind of license image method of cutting out, a kind of license image cutting system.
Background technology
When bidding to host legal certificate; For example during certificate such as passport, visa, the pass, driving license, I.D.; Certificates handling office all can require the applicant when sending in one's application material; Send in one's application simultaneously people, recent electronics photograph without a hat on, and strict technical requirement is all arranged at aspects such as background, pixel, specification, color, expression, attitude, clothing.And; Because the difference of area, certificate kind, the specification requirement of photograph is also had different, for example: the Guangdong exit and entry certificates requires portrait horizontal center in the photograph rectangle frame; General image length and width specification is: 567 pixels (height) * 390 pixels (wide); Wide 248~283 pixels of portrait head wherein, head length is 354~402 pixels, interpupillary distance is 82~118 pixels; The eyes position far from the distance of upper edge in (children's eyes position far from the distance of upper edge between 152~293 pixels) between 152~246 pixels, the crown 25~35 pixels of gaining fame and fortune apart from the photograph upper edge; The Certification of Second Generation identity photographs requires portrait horizontal center in the photograph rectangle frame, and the general image size is 441 pixels (height) * 358 pixels (wide), wide 207 ± 14 pixels of portrait face wherein, and the crown 7 pixels~21 pixels of gaining fame and fortune apart from the photograph upper edge; Driver's license requires portrait horizontal center in the photograph rectangle frame; General image size length and width specification is: 378 pixels (height) * 260 pixels (wide); Wide 165 to 189 pixels of portrait head wherein, head length is 224 to 260 pixels, the crown 10 pixels~20 pixels apart from the photograph upper edge of gaining fame and fortune.
In the actual photographed manufacturing process of certificate photo, be not directly to take the certificate photo that becomes standard, but take pictures by basic demand earlier, with image processing software the photo of taking is handled again, thereby be made into satisfactory certificate photo.Therefore; In the shooting and producing process of certificate photo, often need carry out processing such as cutting through software program to the license image, make it to satisfy the accreditation technical requirement; Obviously; In license cutting process, locate how fast, efficiently, accurately and find the clipping region, be the very critical step that realizes the automatic cutting of license.
Traditional license disposal route mainly is to be handled through the image processor software of specialty by professional operator, selects the clipping region according to the license specification requirement at the image center, and the particular point of perhaps choosing in the image through manual work positions cutting.According to this processing mode, the professional operating personnel that must possess certain Flame Image Process basis hand-make with professional software, and efficient is low, and are not easy to grasp into ruck; Same; Because existing method is too big to artificial dependence; Efficient is not high; Can't be applicable to the needs of the automatic cutting of self-service photographing device, satisfy not Possum and cut out satisfactory license image demand for development automatically, also can't be generalized to the application demand of the self-service shooting certificate photo of general population.Thereby cause when making certificate photo, can not navigating to the clipping region of license image fast, accurately, the make efficiency of certificate photo is low, badly influences the collection service of certificate photo.
Summary of the invention
To the problem that exists in the above-mentioned prior art; The object of the present invention is to provide a kind of license image method of cutting out, a kind of license image cutting system; It can automatical and efficient, accurately navigate to the clipping region of license image; Realization is cut out the license image automatically, improves the make efficiency of license.
For achieving the above object, the present invention adopts following technical scheme:
A kind of license image method of cutting out comprises step:
Read the license image, search the pupil position of portrait in the license image;
Confirm the position, the crown of portrait in the license image according to said pupil position;
Confirm chin position, the ears position of portrait in the license image according to said pupil position;
Confirm the clipping region according to above-mentioned definite position, the crown, chin position, ears position, and the license image is carried out cutting according to the clipping region of confirming.
A kind of license image cutting system comprises:
Pupil position is searched the unit, is used to read the license image, searches the pupil position of portrait in the license image;
Crown position determination unit is used for confirming according to said pupil position the position, the crown of license image portrait;
The chin position determination unit is used for confirming according to said pupil position the chin position of license image portrait;
The ears position determination unit is used for confirming according to said pupil position the ears position of license image portrait;
The cutting unit is used for confirming the clipping region according to position, the said crown, said chin position, said ears position, and according to the clipping region of confirming the license image is carried out cutting.
According to the invention described above scheme; It at first finds out the pupil position of portrait in the license image after reading the license image, then based on the pupil position of the portrait that finds out; Confirm position, the crown, ears position, the chin position of portrait in the license image; Confirm the clipping region according to position, the crown, ears position, the chin position of the portrait of determining then, and the license image is carried out cutting, thereby realize, accurate localization automatical and efficient in view of the above the clipping region of license image according to the clipping region of confirming; Realized the cutting out automatically of license image improved the make efficiency of license.
Description of drawings
Fig. 1 is the schematic flow sheet of license image method of cutting out embodiment of the present invention;
Fig. 2 is a schematic flow sheet of confirming clipping region embodiment;
Fig. 3 is the structural representation of license image cutting system embodiment of the present invention.
Embodiment
Preferred embodiment below in conjunction with is wherein set forth the present invention program in detail.
Referring to shown in Figure 1, the schematic flow sheet of license image method of cutting out embodiment of the present invention has been shown among Fig. 1, as shown in Figure 1, the method in the present embodiment comprises step:
Step S101: read the license image, get into step S102;
Step S102: search the pupil position of portrait in the license image, get into step S103;
Step S103: confirm the position, the crown of portrait in the license image according to said pupil position, get into step S104;
Step S104: confirm chin position, the ears position of portrait in the license image according to said pupil position, get into step S105;
Step S105: confirm the clipping region according to above-mentioned definite position, the crown, chin position, ears position, and the license image is carried out cutting according to the clipping region of confirming.
According to the scheme in the above-mentioned present embodiment; It at first finds out the pupil position of portrait in the license image after reading the license image, then based on the pupil position of the portrait that finds out; Confirm position, the crown, ears position, the chin position of portrait in the license image; Confirm the clipping region according to position, the crown, ears position, the chin position of the portrait of determining then, and the license image is carried out cutting, thereby realize, accurate localization automatical and efficient in view of the above the clipping region of license image according to the clipping region of confirming; Realized the cutting out automatically of license image improved the make efficiency of license.
Scheme among the invention described above embodiment confirms that process and definite chin position of position, the crown, the process of ears position can be to carry out synchronously, also can be that branch successively carries out.
When in above-mentioned steps S102, searching the pupil position of portrait in the license image, can in the license image, find pupil position fast through OpenCV.
OpenCV is the Intel computer vision storehouse (Computer Version) of increasing income; It is made up of a series of C functions and a small amount of C++ class; Have the cross-platform middle and high layer API that comprises more than 300 C function; The interface of language such as Python, Ruby, MATLAB is provided, has realized a lot of general-purpose algorithms of Flame Image Process and computer vision aspect.
In the present invention program's a embodiment, can realize accurately searching through the function that OpenCV provides to pupil position.OpenCV has provided algorithm and the learning database that pupil is searched, but the learning database that OpenCV provides is to all portraits, does not have certain specific aim; Therefore, in preferred embodiments of the present invention, the pupil image of standard certificate photo that can be through some is provided; For example 1000; Carry out special study with these pictures, obtain learning database to certificate photo, thereby when adopting OpenCV to search pupil position based on this learning database; Specific aim can be had more, more accurate pupil position can be found.The mode that concrete employing OpenCV searches pupil position can be to adopt existing mode in the prior art, does not repeat them here.
Through searching of OpenCV, the eyes coordinate that note finds out is: (x 1, y 1), (x 2, y 2), according to these 2 the coordinate P that can obtain the middle bridge of the nose of eyes Mid(x Mid, y Mid):
x mid = x 1 + x 2 2 y mid = y 1 + y 2 2
After obtaining pupil position, when confirming the position, the crown of portrait in the license image,, mainly can adopt following manner to carry out in order on the basis of the pupil position of confirming, to find position, the crown fast and accurately according to pupil position according to aforesaid way.
At first; Confirm the highest possible position in the crown, the minimum possible position in the crown according to pupil position; On definite crown when the highest possible position, the minimum possible position in the crown; Can necessarily confirm to the distance of pupil based on the crown, thereby have greater than the distance between eyes and less than the principle of 3 times eyes distance:
y h=max[0,y mid-3*(x 2-x 1)]
y l=[y mid-(x 2-x 1)]
Wherein, y hThe expression crown the highest possible position, i.e. the ordinate at the highest possible position in crown place, y lThe minimum possible position in the expression crown, the i.e. ordinate of the minimum possible position in the crown.
At [y h, y l] search for dichotomy in the interval, confirm position, the crown.Concrete mode can be:
At first, choose the centre position
Figure BDA0000124628430000052
And with (x Mid, y p) choose the rectangle that length and width are respectively a, b for central point, and the ratio of the shared number of background colour in the rectangle relatively:
If the ratio of the shared number of background colour is less than 1/2 in the rectangle, then adopt
Figure BDA0000124628430000053
Upgrade y p
If the ratio of the shared number of background colour is greater than 1/2 in the rectangle, then adopt Upgrade y p
Upgrade y pAfter, repeat said process, promptly return once more with the (x after upgrading Mid, y p) choose the process that length and width are respectively the rectangle of a, b for central point, cycle repeats like this, the ratio of the shared number of background colour in the gained rectangle equals 1/2, the last resulting y of iteration pBe the ordinate of position, the determined crown.
Wherein, during above-mentioned definite rectangle, the length and width a of rectangle, the value of b can rule of thumb be set.And in the actual computation process,, then possibly cause the increase of operand too greatly as if a, b value as if a, the too little out of true that may cause of b value.Therefore, generally, the value of a, b can be: a=x 2-x 1,
Figure BDA0000124628430000061
The length that is rectangle is the eyes distance, and the wide of rectangle is the half the of eyes distance.
Similarly, after obtaining pupil position, can also find other unique points of people's face through pupil position, for example the chin position of people face position and ears position.Because the characteristic of chin and ears can vary with each individual, therefore on confirming, have certain degree of difficulty.In the present invention program, be based on the feature learning storehouse and realize the chin position of people face position and the accurate location of ears position.
When the accurate location of realizing the ears position, consider that for the former figure photograph of the license image under the normal condition all there is considerable influence in the outside of ears to the cutting of certificate photo with the position of inboard.Therefore, in the present invention program, for ear's clear photograph, can two edges of ears all be found out, specifically can be the position of judging ears through CF.Below describe respectively from two angles of CF.
When coming based on the angle of color the position of ears judged, need to consider the incidence relation of ears and color in the license image.
In the license image, the inboard of ears is human face regions, is exactly the background area and the outside of ears is not a hair.In photograph, the color of ears roughly is similar with the color of people face position, but owing to the light reason, the color of ears can be darker than the color of people face.In view of the above, can obtain the Position Approximate of ear through colouring information.The concrete mode of using can be to find out all than the darker location of pixels of people's face color at people's face bilateral.Concrete mode can be:
At the above-mentioned pupil position (x that obtains 1, y 1), (x 2, y 2) after, can be through the learn approximate region of people's face of organization of human body, according to pupil position, learn the process of confirming the ears zone according to organization of human body and specifically can be:
The outside horizontal ordinate of left and right ear is respectively:
l 1 = x 1 + x 2 2 - x 2 - x 1 k 1 , l 3 = x 1 + x 2 2 + x 2 - x 1 k 1
The inboard horizontal ordinate of left and right ear is respectively:
l 2 = x 1 + x 2 2 - x 2 - x 1 k 2 , l 4 = x 1 + x 2 2 + x 2 - x 1 k 2
Wherein, the span of above-mentioned k1, k2 can be: k1 ∈ (0.63,0.9), k2 ∈ (0.8,1.22).
And then add up all kinds of colour of skin proportions in this zone, promptly the sum of the pixel of all kinds of colours of skin when adding up, is one type with similar color statistics.
Judge two color C1 (r1, g1, b1), C2 (r2, g2 when b2) similar, can judge through following formula:
(r1-r2) 2+(g1-g2) 2+(b1-b2) 2≤a0
If two colors satisfy the condition in the following formula, promptly the quadratic sum of the respective pixel values difference of C1 and C2 is less than or equal to preset threshold a0, then judges C1, these two color similarities of C2, otherwise is dissimilar.According to actual needs, above-mentioned a0 can be set at different values, and generally value is 100.
According to above-mentioned statistical conditions, can obtain the statistical conditions of all kinds of colours of skin in the human face region: note c iBe the average color of one type of similar color, color constitutes s by R, G, three components of B iNumber for this type color.(1, n), n is the sum of classification to i ∈, thereby the information that can obtain each is c is i, and the variance yields that can calculate all categories number of color in view of the above is:
σ 2 = 1 n Σ i = 1 n ( s i - 1 n Σ j = 1 n s i ) 2
Resulting variance yields and pre-determined variance threshold value are judged:
Work as σ 2>σ 0The time, expression people face color is relatively more consistent, thus the color average of that type color that can number is maximum is as face complexion c f
Work as σ 2≤σ 0The time, explain that the color of people's face is more assorted, this situation generally appears at the elderly or face has on the human face region of color spot, in this case, the color average c of three types of colors that the peek order is maximum F1, c F2, c F3
With above-mentioned face complexion c fThe RGB component deduct the colour of skin difference c of setting m, can obtain the color c on people's lug areas e, search people's face both sides and c again eAll similar location of pixels, so just can obtain institute might be ear's color pixel point, these and c eIt possibly be ear's color pixel point that similar location of pixels is.
Three kinds of color c that number is maximum have been got above-mentioned F1, c F2, c F3Situation under, respectively with c F1, c F2, c F3The RGB component deduct the colour of skin difference c of setting m, obtain the color c of three-type-person's lug areas E1, c E2, c E3, search people's face both sides and c again E1, c E2, c E3In any all similar location of pixels, so just can obtain the institute might be ear's color pixel point.
After obtaining all possible ear pixel from the colour of skin, from these possible pixels, find out real ears zone with shape again.When combining shape facility accurately to judge, at first need draw some possible ears curves, be referred to as candidate's ears curve, candidate's ears curve can draw based on these all possible ear pixels, and concrete mode does not repeat them here.
The shape of people's ear is similar basically, therefore can come people's ear is carried out judgement roughly through the shape of people's ear.In a concrete example, concrete determination methods can be to be described below.
At first can set up a standard feature storehouse, store the sample of some in the standard feature storehouse, and the sample of being stored is a curve corresponding to ear shape; Curve has certain width; Therefore, an ear will specifically can be the certificate photo that from the certificate photo of standard, extracts earlier some to two abscissa value should be arranged; For example 1000; Confirm ear curve sample with these certificate photos then, remove the real photograph of match with these ear curve samples then, promptly remove candidate's ear curve of match license image to be cut out.
Suppose to have extracted n ear curve sample, promptly n opens the basic configuration of ear, and any ear curve sample that is extracted is designated as (x i, y i), i ∈ (1, n).
This n that will from the standard feature storehouse, extract then ear curve sample carries out match with the license image of treating cutting respectively, promptly with this n ear curve sample of opening and the curve (x that treats the license image of cutting j, y j) carry out match, the (x here j, y j) be meant the candidate's ear curve in the license image of treating cutting.Here said match is meant according to the ear curve sample that is taken out, and from all candidate's ear curves of the license image of treating cutting, finds out, the curve of coupling the most suitable with these ear curve samples.Concrete match, matching mode can adopt existing mode in the prior art, do not repeat them here.
Above-mentioned when carrying out match, from all ear curve sample (x i, y i) in find out and treat candidate's ear curve (x of the license image of cutting j, y j) curve (x that is complementary most i, y i), judge that the mode that two curves are complementary can adopt existing mode in the prior art, has confirmed the curve (x that is complementary most i, y i) after, can and then confirm the similarity of these two curves that are complementary, and the similarity of these two curves that are complementary is used minor increment l mRepresent, then with this minor increment l mWith setpoint distance threshold value l 0Compare:
If l m>l 0, then think and do not find the curve that matees most, and its minor increment is made as a maximum value l M
If l m≤l 0, then keep minor increment l mConstant.
Add up in all ear curve samples and the pairing minor increment of candidate's ear curve of treating the license image of cutting; Just can obtain only candidate's ear curve approximate as the license image of treating cutting, being about to this only candidate's ear curve approximation is the ear of treating the license image of cutting.
Because the sample in the feature database is a curve, this curve has certain width, and therefore an ear is two abscissa value of correspondence (two positions of an ear comprise outline and interior profile), thereby can draw four abscissa value x coordinate figures of ears, x L1, x L2, x R1, x R2, represent the left ear outside, left ear inboard, inboard, the auris dextra outside of auris dextra respectively.
Ears can can't be discerned because of blocking of hair, if having only an ear covered this moment, then can judge this covered ear information through the ear information that another has been found out.Concrete account form can be that calculate the axis with the eyes bridge of the nose, and concrete account form can be:
If obtained the positional information x of left ear L1, x L2, the positional information that then can calculate auris dextra is: x R1=2x Mid-x L2, x R2=2x Mid-x L1
If obtained the positional information x of auris dextra R1, x R2, the positional information that then can calculate left ear is: x L1=2x Mid-x R2, x L2=2x Mid-x R1
If two ears all are blocked, then can only be through the position of pupil, come roughly to judge the position of ear x is arranged this moment with human face structure L1=x L2, x R1=x R2Because ears are symmetrical, after drawing a positional information of picking up the ears piece, can draw the positional information of opposite side ear according to pupil position.Concrete account form does not repeat them here.
According to the aforementioned calculation process, the degree of accuracy that can also calculate the ears position in view of the above is:
e ear = 1 n Σ i = 1 n l M - l mi l M + l mi
According to above-mentioned definite pupil position, can also confirm the chin position of portrait in the license image.
When confirming the chin position of portrait; Can at first determine all possible chin curve, the chin curve of confirming according to this mode has many, can be referred to as candidate's chin curve; Then a certain amount of chin curve sample in these candidate's chin curves and the standard feature storehouse is carried out match; From candidate's chin curve, select only candidate's chin curve, this candidate's chin curve of selecting is definite chin curve, and then determines the chin position of portrait.
Because the influence of the three-dimensional factor of shooting effect and people's face, in general chin area can present hatching effect in photo, therefore can confirm chin through this hatching effect.Specifically can be to discern through color to obtain candidate's chin curve; Specifically through the color RM obtain candidate's chin curve mode can with above-mentioned identify might be ear color pixel point and and then to draw the mode of candidate's ear curve similar; Just the setting meeting of colour of skin difference is different, does not repeat them here.
Yet, because the existence of special circumstances, for example beard, double chin or over-exposed or the like; May cause situation such as shade is not obvious; In particular cases this, possibly can't identify concrete chin curve through color identification, invariant that therefore can facial contours is confirmed the position of chin; Specifically can be to confirm the chin curve through the sample chin curve in the facial contours combined standard sample storehouse; Promptly confirm the chin position of portrait in the license image, specifically can concern and confirm, do not repeat them here through Invariant of Quadratic Curve.
In a concrete example, confirm that according to pupil position the mode of chin position can be to be described below.
At first learn and can determine chin area roughly, the regional available following formulate on the longitudinal axis of chin according to above-mentioned definite pupil position and organization of human body:
y = x 2 - x 1 k + y 1 + y 2 2
Wherein, The span of k is (0.47; 0.63) between, x1, y1, x2, y2 represent horizontal stroke, the ordinate of above-mentioned definite pupil position respectively here, thereby can roughly judge the zone of chin in view of the above according to pupil position; In following process, only need to search in the approximate region to the chin of confirming here and get final product.
Then; Find out the cheek edge; Specifically can find out the candidate region of all chins with shadow character, promptly all candidate's chin curves remove to verify the shape invariance magnitude relation that whether satisfies with the cheek edge with these candidate's chin curves then; If do not find the chin candidate region of shade, then through cheek edge calculations chin area.
Concrete, the invariant relationship description do not receive the influence of attitude, perspective projection and camera intrinsic parameter.
Cheek edge and chin constitute quafric curve, therefore can come match with the invariant in the plane quadratic curve, and a plane quadratic curve can be represented by a following such equation:
ax 2+bxy+cy 2+dx+ey+f=0
For x=(x, y, 1) TThen the also available following Matrix C of quafric curve defines:
C = a b / 2 d / 2 b / 2 c e / 2 d / 2 e / 2 f
x TCx=0
For the quafric curve of representing by Matrix C arbitrarily, and two coplane straight lines that are not cut in clean curve, can define an invariant:
I = ( l 1 T C - 1 l 2 ) 2 ( l 1 T C - 1 l 1 ) ( l 2 T C - 1 l 2 )
Two coplanar points for a quafric curve can form same invariant.
For two normalization matrix c by them 1, c 2(| c i|=1) expression quafric curve, can confirm two invariants.
I 1 = Trace [ C 1 - 1 C 2 ] , I 2 = Trace [ C 2 - 1 C 1 ]
Choose people's face of the standard of some; For example 1000, calculate the quadratic curve equation of chin area of people's face of these quantity, deposit the Matrix C of these quadratic curve equations in feature database; Treat that with the chin in the picture to be identified curvilinear equation in matched curve and the learning database compares, promptly to I 1, I 2Value compare.
Threshold values I sets up standard 1s, I 2s, use this threshold values calculate draw chin area at last degree of accuracy be:
e chine = 1 2 [ | I 1 - I 1 s I 1 s + | I 2 - I 2 s I 2 s ]
Behind the position, the crown that obtains the license image according to aforesaid way, ears position and chin position, the cutting of license image is carried out according to the clipping region of confirming then in the clipping region that can confirm to treat cutting.
Confirm the clipping region of license image, as long as confirm the boundary rectangle of people's face, according to above-mentioned definite position, the crown, ears position and chin position; Position, the crown can accurately be confirmed; And ears position, chin position maybe not can simultaneously accurately, and just can determine the boundary rectangle of people's face on the basis overhead again with the positional information of ears or chin, after calculating this rectangle; Detect to this rectangle again; As long as meet the architectural feature of people's face, just can explain that the boundary rectangle that draws is correct, can carry out cutting in view of the above.
Concrete; Because the different existing difference of people's face the unconspicuous situation of some face feature can occur, for example; Man's beard may make that the chin characteristic is not obvious; Ms's hair may make that the characteristic of ears is not obvious, at this moment, just can in chin and these two characteristics of ears, select the foundation of Human Face zone as cutting.
Provided the schematic flow sheet of confirming the clipping region in the concrete example among Fig. 2, as shown in Figure 2, confirm that the concrete mode of clipping region can be described below.
The center line of at first choosing photo is x=x Mid, promptly choose the point midway of pupil.
Set e oThe degree of accuracy threshold values of be setting, and the degree of accuracy e of the gained during with above-mentioned definite ears position, chin position Ear, e ChineWith this threshold value e 0Compare:
Work as e Ear>e 0The time, explain that the ears zone location is accurate;
Work as e Chine>e 0The time, the chin area location is described accurately.
At e Ear, e ChineAll greater than threshold value e 0Situation under, promptly ears zones, chin area are all located more accurately under the situation, then to e EarMutual e ChineCompare, and confirm the cutting foundation according to comparative result.
If e Ear>e Chine, explain that the ears position is more accurate than chin position, therefore can select for use ears as the cutting foundation, specifically can be:
Carry out the location of left and right edges by the axis of portrait:
If the distance in the inboard of ears and the outside is excessive, promptly | x L1-x L2|>l e, then explanation then can have considerable influence to the cutting of certificate when type of credential is tight to the requirement of ear, and need handle accordingly this moment according to the actual specification requirement of certificate photo;
If certificate requires the distance at human face region and picture edge, then should use inside edge x L2, x R1Position;
If certificate photo requires ears to drop in certain zone, then need use outer ledge x L1, x R2Position.
After having confirmed the crown and ears edge, can be through these 3 location of accomplishing the clipping region.
If e Ear<e ChineThe time, explain that ear information is not too obvious, the chin position is more accurate than ears position, and therefore approximate solution is come at available chin position, selects for use chin as the cutting foundation, specifically can be:
After pupil, the crown, chin position accurately obtain, at first confirm the axis x of portrait by the position of two pupils Mid, position, crown y Top, chin position y Chine, use these three values can confirm the position of portrait on y direction, again according to of the requirement of specific certificate photo, can draw last former figure clipping region to the portrait length and width.
If e Ear=e Chine, explain that then the degree of accuracy of ears position, chin position is equally matched, then can select for use in ears position, the chin position one as the cutting foundation arbitrarily, identical in the mode of concrete location, clipping region and the aforesaid way.
If e Ear>e 0And e Chine<e 0, explain that then the ears position is more accurate, therefore the chin position is accurate inadequately, can select for use the ears position as the cutting foundation, identical in the mode of concrete location, clipping region and the aforesaid way.
If e Ear<e 0And e Chine>e 0, explain that then the ears position is accurate inadequately, therefore the chin position is more accurate, can select for use the chin position as the cutting foundation, identical in the mode of concrete location, clipping region and the aforesaid way.
If e Ear, e ChineAll be not more than threshold value e 0, i.e. ears position, chin position out of true all, the position of chin and ears does not all get access to accurately, then does equalization through pupil and approximate region and handles, and specifically can be:
Through the spacing and the position of pupil, and the zone that obtains ears, chin with the empirical value of human face structure; Generally speaking; The picture that chin, ears simultaneously all can not precision be found; Use this method can reach 90% degree of accuracy, because of not obvious picture proportion less---general certificate photo all requires face characteristic clear, so this method can obtain higher accuracy under special circumstances.
According to the license image method of cutting out of the invention described above, the present invention also provides a kind of license image cutting system, and the structural representation of a kind of license image cutting system embodiment of the present invention has been shown among Fig. 3, and as shown in Figure 3, it comprises:
Pupil position is searched unit 201, is used to read the license image, searches the pupil position of portrait in the license image;
Crown position determination unit 202 is used for confirming according to said pupil position the position, the crown of license image portrait;
Chin position determination unit 203 is used for confirming according to said pupil position the chin position of license image portrait;
Ears position determination unit 204 is used for confirming according to said pupil position the ears position of license image portrait;
Cutting unit 205 is used for confirming the clipping region according to position, the said crown, said chin position, said ears position, and according to the clipping region of confirming the license image is carried out cutting.
Wherein, When above-mentioned pupil position is searched unit 201 and is searched the pupil position of portrait in the license image; Can search through OpenCV, when searching the pupil position of portrait in the license image through OpenCV, the certificate photo pupil image that the learning database that is relied on can preset number.
In the license image cutting system of the present invention; Pupil position is searched unit 201 and is searched mode of the mode of the concrete mode of the concrete mode of the concrete mode of pupil position, crown position determination unit 202 definite positions, the crown, chin position determination unit 203 definite chin positions, ears position determination unit 204 definite ears positions, 205 definite clipping regions, cutting unit and concrete cutting or the like; Can with the license image method of cutting out of the invention described above in identical, will not add to give unnecessary details at this.
Aforesaid the present invention program; Be based on multiple spot checking location and realize the license automatic image cutting out method; The multiple spot here comprises the crown, ears, chin; Need manually to select the clipping region to cause the too low deficiency of efficient thereby overcome traditional license making, can locate license image clipping region fast, efficiently, accurately, cut out satisfactory photograph automatically; Can be widely used in self-service photographing device and cut out satisfactory license image automatically, also help the convenient effect of the self-service shooting certificate photo of non-professional ruck.
In addition, through adopting chin and binaural localization, find only point among the present invention program, can let the result of cutting more accurate through CF.
In addition; When confirming the clipping region, taken into full account the influence of chin and ears, verify comparison with the characteristic curve storehouse simultaneously in the zone of calculating chin and ears; Calculate degree of accuracy; Then when confirming the clipping region, confirm in these two characteristics, to select the foundation of Human Face zone through the degree of accuracy of contrast chin and ears, thereby the assurance cutting is more accurate as cutting.
Above-described embodiment of the present invention only is the detailed description to preferred embodiment of the present invention, does not constitute the qualification to protection domain of the present invention.Any modification of within spirit of the present invention and principle, being done, be equal to replacement and improvement etc., all should be included within the claim protection domain of the present invention.

Claims (10)

1. a license image method of cutting out is characterized in that, comprises step:
Read the license image, search the pupil position of portrait in the license image;
Confirm the position, the crown of portrait in the license image according to said pupil position;
Confirm chin position, the ears position of portrait in the license image according to said pupil position;
Confirm the clipping region according to above-mentioned definite position, the crown, chin position, ears position, and the license image is carried out cutting according to the clipping region of confirming.
2. license image method of cutting out according to claim 1 is characterized in that, searches the pupil position of portrait in the license image through OpenCV.
3. license image method of cutting out according to claim 2 is characterized in that, when searching the pupil position of portrait in the license image through OpenCV, the learning database that is relied on is the certificate photo pupil image of preset number.
4. according to claim 1 or 2 or 3 described license image method of cutting out, it is characterized in that, confirm that according to said pupil position the mode of the position, the crown of portrait in the license image comprises:
Confirm the highest possible position y in the crown according to pupil position h, the minimum possible position y in the crown l
Choose the centre position
Figure FDA0000124628420000011
With y pChoose the rectangle of setting length and width for central point, compare the ratio of the shared number of background colour in the rectangle:
If the ratio of the shared number of background colour is less than 1/2 in the rectangle, adopt Upgrade y p
If the ratio of the shared number of background colour is greater than 1/2 in the rectangle, adopt
Figure FDA0000124628420000013
Upgrade y p
Repeat said process, the ratio of the shared number of background colour in the gained rectangle equals 1/2, the last resulting y of iteration pOrdinate for position, the crown.
5. according to claim 1 or 2 or 3 described license image method of cutting out, it is characterized in that, confirm that according to said pupil position the mode of the ears position of portrait in the license image comprises:
According to the learn approximate region of people's face of pupil position and organization of human body, and colour of skin proportion of all categories is confirmed the pixel in all possible ears zone, people's face both sides in the approximate region according to people's face;
Confirm candidate's ears curve of license image according to the pixel in all possible ears zone, people's face both sides;
The ears curve sample of the setting quantity in said candidate's ears curve and the preset standard database is carried out match; From candidate's ears curve, confirm the most similar ears curve of ears curve sample with said setting quantity, and confirm the ears position according to this ears curve.
6. license image method of cutting out according to claim 5 is characterized in that, colour of skin proportion of all categories confirms that the mode of the pixel in all possible ears zone, people's face both sides comprises in the approximate region according to people's face:
Confirm to calculate the variance yields of colour of skin number of all categories, relatively this variance yields and the difference of setting variance threshold values;
If this variance yields is selected the maximum colour of skin classification of number greater than setting variance threshold values;
If this variance yields is less than or equal to the setting variance threshold values, select three kinds of maximum colour of skin classifications of number;
The color value of confirming selected colour of skin classification deducts the color value of setting colour of skin difference gained, searches people's face both sides all location of pixels similar with this color value, and these all location of pixels are confirmed the pixel for possible ears zone, people's face both sides.
7. according to claim 1 or 2 or 3 described license image method of cutting out, it is characterized in that:
The mode of confirming the chin position of portrait in the license image according to said pupil position comprises: determine all possible candidate's chin curve according to said pupil position; The chin curve sample of the setting quantity in said candidate's chin curve and the preset feature database is carried out match; From candidate's chin curve, select the most similar chin curve of chin curve sample with said setting quantity, confirm the chin position of portrait according to this chin curve;
And/or
Confirm that according to above-mentioned definite position, the crown, chin position, ears position the mode of clipping region comprises: the chin degree of accuracy e that calculates the chin position of confirming Chine, the ears position ears degree of accuracy e Ear, and with e Chine, e EarWith preset precision threshold e 0Relatively:
If e Ear>e Chine>e 0Perhaps e Ear>e 0, e Chine<e 0, the clipping region is confirmed as the cutting foundation in said ears position;
If e Chine>e Ear>e 0Perhaps e Ear<e 0, e Chine>e 0, the clipping region is confirmed as the cutting foundation in said chin position,
If e Ear>e 0, e Chine>e 0And e Ear=e Chine, with in ears position, the chin position any one as cutting according to confirming the clipping region;
If e Ear<e 0And e Chine<e 0, do equalization through pupil and approximate region and handle definite clipping region.
8. a license image cutting system is characterized in that, comprising:
Pupil position is searched the unit, is used to read the license image, searches the pupil position of portrait in the license image;
Crown position determination unit is used for confirming according to said pupil position the position, the crown of license image portrait;
The chin position determination unit is used for confirming according to said pupil position the chin position of license image portrait;
The ears position determination unit is used for confirming according to said pupil position the ears position of license image portrait;
The cutting unit is used for confirming the clipping region according to position, the said crown, said chin position, said ears position, and according to the clipping region of confirming the license image is carried out cutting.
9. license image cutting system according to claim 8 is characterized in that said pupil position is searched portrait in the license image is searched in the unit through OpenCV pupil position.
10. license image cutting system according to claim 9 is characterized in that, when searching the pupil position of portrait in the license image through OpenCV, the learning database that is relied on is the certificate photo pupil image of preset number.
CN201110442745XA 2011-12-26 2011-12-26 Certificate image cutting method and system Active CN102592260B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110442745XA CN102592260B (en) 2011-12-26 2011-12-26 Certificate image cutting method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110442745XA CN102592260B (en) 2011-12-26 2011-12-26 Certificate image cutting method and system

Publications (2)

Publication Number Publication Date
CN102592260A true CN102592260A (en) 2012-07-18
CN102592260B CN102592260B (en) 2013-09-25

Family

ID=46480854

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110442745XA Active CN102592260B (en) 2011-12-26 2011-12-26 Certificate image cutting method and system

Country Status (1)

Country Link
CN (1) CN102592260B (en)

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105791665A (en) * 2014-12-23 2016-07-20 中兴通讯股份有限公司 Shooting method and shooting device
CN106156739A (en) * 2016-07-05 2016-11-23 华南理工大学 A kind of certificate photo ear detection analyzed based on face mask and extracting method
CN106355548A (en) * 2016-08-24 2017-01-25 神思电子技术股份有限公司 Method for cropping and transformation of 2nd-generation ID card photo
CN107009412A (en) * 2017-04-12 2017-08-04 广东工业大学 A kind of certificate photo automatic cutting method, device and system
CN107123088A (en) * 2017-04-21 2017-09-01 山东大学 A kind of method of automatic replacing photo background color
CN107580180A (en) * 2017-08-24 2018-01-12 深圳市华盛昌科技实业股份有限公司 Display methods, device, equipment and the computer-readable recording medium of view-finder
CN108135467A (en) * 2015-08-21 2018-06-08 奇跃公司 Eyelid shape is estimated
CN108352155A (en) * 2015-09-30 2018-07-31 惠普发展公司,有限责任合伙企业 Inhibit ambient sound
CN108805120A (en) * 2018-06-13 2018-11-13 广州视源电子科技股份有限公司 The treating method and apparatus of person's handwriting
CN108898045A (en) * 2018-04-23 2018-11-27 杭州电子科技大学 The multi-tag image pre-processing method of gesture identification based on deep learning
CN108921167A (en) * 2018-06-22 2018-11-30 四川斐讯信息技术有限公司 A kind of color image automatic cutting method and system
CN109410138A (en) * 2018-10-16 2019-03-01 北京旷视科技有限公司 Modify jowled methods, devices and systems
CN109639962A (en) * 2018-11-22 2019-04-16 深圳艺达文化传媒有限公司 The short-sighted frequency mode selecting method of self-timer and Related product
CN109658328A (en) * 2018-11-26 2019-04-19 深圳艺达文化传媒有限公司 From animal head ear processing method and the Related product of shooting the video
CN109712103A (en) * 2018-11-26 2019-05-03 深圳艺达文化传媒有限公司 From the eyes processing method and Related product of the Thunder God picture that shoots the video
CN110288531A (en) * 2019-07-01 2019-09-27 山东浪潮人工智能研究院有限公司 A kind of assist operators make the method and tool of standard identity card photograph
CN111191539A (en) * 2019-12-20 2020-05-22 江苏常熟农村商业银行股份有限公司 Certificate authenticity verification method and device, computer equipment and storage medium
CN111626166A (en) * 2020-05-19 2020-09-04 Oppo广东移动通信有限公司 Image processing method, image processing device, electronic equipment and storage medium
US11538280B2 (en) 2015-08-21 2022-12-27 Magic Leap, Inc. Eyelid shape estimation using eye pose measurement
US11749025B2 (en) 2015-10-16 2023-09-05 Magic Leap, Inc. Eye pose identification using eye features
CN117412158A (en) * 2023-10-09 2024-01-16 广州翼拍联盟网络技术有限公司 Method, device, equipment and medium for processing photographed original image into multiple credentials

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002042116A (en) * 2000-07-21 2002-02-08 Seiko Precision Inc Image processing device, image processing method, recording medium, and printing system
CN1658225A (en) * 2005-03-16 2005-08-24 沈阳工业大学 Personal identity recognising method based on pinna geometric parameter
CN1798237A (en) * 2004-12-10 2006-07-05 富士胶片株式会社 Method of and system for image processing and computer program
CN102063659A (en) * 2010-12-28 2011-05-18 广州商景网络科技有限公司 Method, server and system for collecting and making electronic photo

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002042116A (en) * 2000-07-21 2002-02-08 Seiko Precision Inc Image processing device, image processing method, recording medium, and printing system
CN1798237A (en) * 2004-12-10 2006-07-05 富士胶片株式会社 Method of and system for image processing and computer program
CN1658225A (en) * 2005-03-16 2005-08-24 沈阳工业大学 Personal identity recognising method based on pinna geometric parameter
CN102063659A (en) * 2010-12-28 2011-05-18 广州商景网络科技有限公司 Method, server and system for collecting and making electronic photo

Cited By (31)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105791665A (en) * 2014-12-23 2016-07-20 中兴通讯股份有限公司 Shooting method and shooting device
CN108135467A (en) * 2015-08-21 2018-06-08 奇跃公司 Eyelid shape is estimated
US11538280B2 (en) 2015-08-21 2022-12-27 Magic Leap, Inc. Eyelid shape estimation using eye pose measurement
CN108352155A (en) * 2015-09-30 2018-07-31 惠普发展公司,有限责任合伙企业 Inhibit ambient sound
US11749025B2 (en) 2015-10-16 2023-09-05 Magic Leap, Inc. Eye pose identification using eye features
CN106156739A (en) * 2016-07-05 2016-11-23 华南理工大学 A kind of certificate photo ear detection analyzed based on face mask and extracting method
CN106156739B (en) * 2016-07-05 2019-06-18 华南理工大学 A kind of certificate photo ear detection and extracting method based on face mask analysis
CN106355548A (en) * 2016-08-24 2017-01-25 神思电子技术股份有限公司 Method for cropping and transformation of 2nd-generation ID card photo
CN106355548B (en) * 2016-08-24 2019-05-17 神思电子技术股份有限公司 A kind of China second-generation identity card photo cuts out transform method
CN107009412A (en) * 2017-04-12 2017-08-04 广东工业大学 A kind of certificate photo automatic cutting method, device and system
CN107009412B (en) * 2017-04-12 2019-05-28 广东工业大学 A kind of certificate photo automatic cutting method, apparatus and system
CN107123088A (en) * 2017-04-21 2017-09-01 山东大学 A kind of method of automatic replacing photo background color
CN107123088B (en) * 2017-04-21 2019-09-13 山东大学 A kind of method of automatic replacement photo background color
CN107580180B (en) * 2017-08-24 2020-07-10 深圳市华盛昌科技实业股份有限公司 Display method, device and equipment of view frame and computer readable storage medium
CN107580180A (en) * 2017-08-24 2018-01-12 深圳市华盛昌科技实业股份有限公司 Display methods, device, equipment and the computer-readable recording medium of view-finder
CN108898045A (en) * 2018-04-23 2018-11-27 杭州电子科技大学 The multi-tag image pre-processing method of gesture identification based on deep learning
CN108898045B (en) * 2018-04-23 2021-05-25 杭州电子科技大学 Multi-label image preprocessing method based on deep learning gesture recognition
CN108805120A (en) * 2018-06-13 2018-11-13 广州视源电子科技股份有限公司 The treating method and apparatus of person's handwriting
CN108921167A (en) * 2018-06-22 2018-11-30 四川斐讯信息技术有限公司 A kind of color image automatic cutting method and system
CN109410138A (en) * 2018-10-16 2019-03-01 北京旷视科技有限公司 Modify jowled methods, devices and systems
CN109639962A (en) * 2018-11-22 2019-04-16 深圳艺达文化传媒有限公司 The short-sighted frequency mode selecting method of self-timer and Related product
CN109712103A (en) * 2018-11-26 2019-05-03 深圳艺达文化传媒有限公司 From the eyes processing method and Related product of the Thunder God picture that shoots the video
CN109712103B (en) * 2018-11-26 2021-07-30 温岭卓致智能科技有限公司 Eye processing method for self-shot video Thor picture and related product
CN109658328A (en) * 2018-11-26 2019-04-19 深圳艺达文化传媒有限公司 From animal head ear processing method and the Related product of shooting the video
CN110288531A (en) * 2019-07-01 2019-09-27 山东浪潮人工智能研究院有限公司 A kind of assist operators make the method and tool of standard identity card photograph
CN110288531B (en) * 2019-07-01 2023-06-13 山东浪潮科学研究院有限公司 Method and tool for assisting operator in making standard identity card photo
CN111191539A (en) * 2019-12-20 2020-05-22 江苏常熟农村商业银行股份有限公司 Certificate authenticity verification method and device, computer equipment and storage medium
CN111191539B (en) * 2019-12-20 2021-01-29 江苏常熟农村商业银行股份有限公司 Certificate authenticity verification method and device, computer equipment and storage medium
CN111626166A (en) * 2020-05-19 2020-09-04 Oppo广东移动通信有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN111626166B (en) * 2020-05-19 2023-06-09 Oppo广东移动通信有限公司 Image processing method, device, electronic equipment and storage medium
CN117412158A (en) * 2023-10-09 2024-01-16 广州翼拍联盟网络技术有限公司 Method, device, equipment and medium for processing photographed original image into multiple credentials

Also Published As

Publication number Publication date
CN102592260B (en) 2013-09-25

Similar Documents

Publication Publication Date Title
CN102592260B (en) Certificate image cutting method and system
US11017205B2 (en) Three-dimensional finger vein recognition method and system
CN108921100B (en) Face recognition method and system based on visible light image and infrared image fusion
EP3542211B1 (en) Method and device and computer program for determining a representation of a spectacle glass rim
Vijayan et al. Twins 3D face recognition challenge
CN102542275B (en) Automatic identification method for identification photo background and system thereof
CN104933389B (en) Identity recognition method and device based on finger veins
US20050084140A1 (en) Multi-modal face recognition
US8577094B2 (en) Image template masking
CN104915656B (en) A kind of fast human face recognition based on Binocular vision photogrammetry technology
CN103116749A (en) Near-infrared face identification method based on self-built image library
CN101339607A (en) Human face recognition method and system, human face recognition model training method and system
US20110116707A1 (en) Method for grouping 3d models to classify constitution
CN106570447B (en) Based on the matched human face photo sunglasses automatic removal method of grey level histogram
KR20160036375A (en) Fast Eye Detection Method Using Block Contrast and Symmetry in Mobile Device
CN109074471B (en) Iris region segmentation method and device based on active appearance model
US20150169940A1 (en) Method for face model alignment on unseen faces
Bastias et al. A method for 3D iris reconstruction from multiple 2D near-infrared images
Xu et al. Robust shape-feature-vector-based face recognition system
Osadchy et al. Surface dependent representations for illumination insensitive image comparison
Xie et al. An efficient method for face recognition under varying illumination
Tsutsumi et al. Face identification using a 3D gray-scale image-a method for lessening restrictions on facial directions
Vezzetti et al. Application of geometry to rgb images for facial landmark localisation-a preliminary approach
Sablatnig et al. Structural analysis of paintings based on brush strokes
CN109034051A (en) Human-eye positioning method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant