CN106326823A - Method and system for acquiring head image in picture - Google Patents

Method and system for acquiring head image in picture Download PDF

Info

Publication number
CN106326823A
CN106326823A CN201510394449.5A CN201510394449A CN106326823A CN 106326823 A CN106326823 A CN 106326823A CN 201510394449 A CN201510394449 A CN 201510394449A CN 106326823 A CN106326823 A CN 106326823A
Authority
CN
China
Prior art keywords
face
data
original image
head portrait
choice box
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
CN201510394449.5A
Other languages
Chinese (zh)
Other versions
CN106326823B (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.)
Beijing Shenzhou Taiyue Software Co Ltd
Original Assignee
Beijing Shenzhou Taiyue Software 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 Beijing Shenzhou Taiyue Software Co Ltd filed Critical Beijing Shenzhou Taiyue Software Co Ltd
Priority to CN201510394449.5A priority Critical patent/CN106326823B/en
Publication of CN106326823A publication Critical patent/CN106326823A/en
Application granted granted Critical
Publication of CN106326823B publication Critical patent/CN106326823B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/01Social networking

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Primary Health Care (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Computing Systems (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a method and system for acquiring a head image in a picture. The method includes the following steps that: an obtained face in an original picture is detected, so that face detection data in the original picture can be acquired; an interception region corresponding to the face detection data is obtained according to a preset interception ratio and the face detection data, and the interception region is displayed; and cutting and saving processing is performed on the interception region, a required head image is obtained and is uploaded to a page of an application website so as to be displayed. According to the method and system provided by the technical schemes of the invention, the required head image can be automatically obtained from the picture. Compared with an existing method, the method does not need to carry out a plurality of times of manual interception, and therefore, the head image with the preset interception ratio can be quickly required.

Description

A kind of obtain the method and system of head portrait in picture
Technical field
The present invention relates to human face detection tech field, particularly to a kind of obtain in picture the method for head portrait and System.
Background technology
Along with the development of the Internet, especially development of Mobile Internet technology, increasing user passes through network society District's platform carries out making friends, chats, trade.On this virtualized Web Community platform, in order to distinguish User, also for showing individual character, is provided with the function showing user's head portrait.
At present, people more and more need to upload head portrait at different web sites, and by Website page space Limiting, the image uploaded typically can be scaled to a less ratio and show.Therefore, in order to make The photo uploaded meets the requirements, it usually needs find a photo only having head or manually to photo Carry out cutting.And during manual cutting photo, generally require devote a tremendous amount of time selection be suitable for Region, estimate the ratio etc. of cutting, and after devoting a tremendous amount of time the photo obtaining optimal proportion, Upload in application system also to make the photo display effect uploaded not due to the display characteristic of application system Preferable.
As described above it can be seen that in prior art, the mode of user setup head portrait is the most manually Head portrait in cutting picture, is uploaded to the head portrait obtained by cutting on Web Community's platform, and this mode is taken Time and inefficiency, affect Consumer's Experience.
Summary of the invention
The invention provides and a kind of obtain the method and system of head portrait in picture, to solve hands in prior art Dynamic intercepting picture head portrait is numerous and diverse time-consuming, the problem of head portrait display effect difference.
For reaching above-mentioned purpose, the technical scheme is that and be achieved in that:
On the one hand, the invention provides and a kind of obtain the method for head portrait in picture, described method includes:
Face in the original image obtained is detected, obtains the Face datection in described original image Data;
According to default intercepting ratio and described Face datection data, obtain described Face datection data corresponding The intercepting region of head portrait also shows;
Described intercepting region carries out shear preservation process, obtain the head portrait needed and upload to apply website The page show.
Wherein, described Face datection data at least include that face number and each face are in described original graph Pixel coordinate in Xiang, intercepting ratio that described basis is preset and described Face datection data, obtain described Intercepting region the display of Face datection data correspondence head portrait include:
According to the face number in described Face datection data, described original image generates respective numbers Editable choice box;
According to each face in default intercepting ratio and described Face datection data at described original image In pixel coordinate, it is thus achieved that corresponding choice box little big and the position on described original image thereof;
According to the little big of described choice box and the position on described original image thereof, at described original image The intercepting region of upper location each face correspondence head portrait;
Described original image highlights the intercepting region of qualified face correspondence head portrait.
Wherein, the described intercepting highlighting qualified face correspondence head portrait on described original image Region includes:
When the face number in the described Face datection data obtained is one, on described original image Highlight the choice box that described face is corresponding;
When the face number in the described Face datection data obtained is two or more, will detection To each face carry out recognition of face, it is thus achieved that the facial recognition data of each face, by obtain each Facial recognition data contrasts with the human face data in data base respectively, prominent on described original image The choice box that the display the highest facial recognition data of similarity is corresponding.
Wherein, the described intercepting highlighting qualified face correspondence head portrait on described original image Region specifically includes:
Color and/or the line style of type by choice box highlight qualified face correspondence head portrait Intercept region.
Preferably, described basis preset intercepting ratio and described Face datection data, obtain described face Intercepting region the display of detection data correspondence head portrait farther include:
The intercepting region that the described choice box highlighted is corresponding is carried out preview show;
The effect shown according to preview, manually adjusts described choice box size and/or ratio;
Size according to the described choice box after adjusting and/or ratio, in the relevant position of described original image Place reorientates the intercepting region of described Face datection data correspondence head portrait.
On the other hand, the invention provides and a kind of obtain the system of head portrait in picture, described system includes:
Face datection unit, for detecting the face in the original image obtained, obtains described former Face datection data in beginning picture;
Interception unit, for according to the intercepting ratio preset and described Face datection data, obtaining described people Face detects the intercepting region of data correspondence head portrait and shows;
Head portrait acquiring unit, for carrying out shearing preservation process, the head of acquisition needs to described intercepting region Picture also uploads to apply the page of website to show.
Wherein, the Face datection data that described Face datection unit obtains at least include face number and every Individual face pixel coordinate in described original image, described interception unit includes:
Choice box generation module, is used for according to the face number in described Face datection data described original The editable choice box of respective numbers is generated on picture;
Position acquisition module, be used in the default intercepting ratio of basis and described Face datection data is each Face pixel coordinate in described original image, it is thus achieved that corresponding choice box little big and described former Position on beginning picture;
Locating module, for the little position greatly and on described original image according to described choice box, Described original image positions the intercepting region of each face correspondence head portrait;
Display module, for highlighting qualified face correspondence head portrait on described original image Intercept region.
Wherein, described display module is further used for,
When the face number in the described Face datection data obtained is one, on described original image Highlight the choice box that described face is corresponding;
When the face number in the described Face datection data obtained is two or more, will detection To each face carry out recognition of face, it is thus achieved that the facial recognition data of each face, by obtain each Facial recognition data contrasts with the human face data in data base respectively, prominent on described original image The choice box that the display the highest facial recognition data of similarity is corresponding.
Wherein, described display module is further used for,
Color and/or the line style of type by choice box highlight qualified face correspondence head portrait Intercept region.
Preferably, described interception unit also includes previewing module;
Described previewing module, for carrying out preview to the intercepting region that the described choice box highlighted is corresponding Display;
Described locating module, is further used for according to size and/or the ratio manually adjusting rear described choice box Example, reorientates cutting of described Face datection data correspondence head portrait in the corresponding position of described original image Take region.
The embodiment of the present invention provides the benefit that: the invention discloses and a kind of obtains the method for head portrait in picture And system, by the face in the original image obtained is detected automatically, it is thus achieved that include face number With the Face datection data of each face pixel coordinate in original image, according to default intercepting ratio With Face datection data, it is thus achieved that the intercepting region of this Face datection data correspondence head portrait, by intercepting district Territory carries out shearing preservation and processes, it is thus achieved that the head portrait of needs also uploads to the page of described application website and shows Show.Technical scheme automatically can obtain the head portrait of needs from original image, compared to existing There is method, it is not necessary to user carries out Manual interception repeatedly, it is thus possible to quickly obtain and preset intercepting ratio Head portrait.
Accompanying drawing explanation
Fig. 1 obtains the method flow diagram of head portrait in picture for what the embodiment of the present invention provided;
Fig. 2 obtains the system structure schematic diagram of head portrait in picture for what the embodiment of the present invention provided.
Detailed description of the invention
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to this Bright embodiment is described in further detail.
Fig. 1 obtains the method flow diagram of head portrait in picture for what the embodiment of the present invention provided, and the method is especially It is applicable to page space and the head portrait picture uploaded is had the application website of size limitation, Fig. 1 obtains figure In sheet, the method for head portrait includes:
S10, detects the face in the original image obtained, and obtains the face inspection in original image Survey data.Wherein, it is thus achieved that Face datection data at least include that face number and each face are original Pixel coordinate in image.
Face datection (Face Detection) refers to determine all face (if present) in the input image Position, size, the process of pose.Human face detection tech be on face recognition technology further development, Optimize, be a key link in Automatic face recognition system.It is considerably complicated that face is that a class has The natural structure target of variations in detail, the challenge of the test problems of this type of target is: face is due to outward The differences such as looks, expression, the colour of skin, have the transmutability of pattern;On face in the general sense, Ke Nengcun At the appurtenance such as glasses, beard;Image as the face of three-dimensional body is inevitably produced by by illumination The impact of raw shade.If it is possible to find the method solving these problems, Successful construct goes out people Face detection and the system of tracking, by for solving the enlightenment that other similar complex patterns test problems provides important.
The feature mode comprised due to facial image is the abundantest, such as color characteristic (colour of skin, color development etc.), Contour feature (elliptic contour etc.), histogram feature (distribution, distance etc.), Heuristic Feature (hair, Lower jaw etc.), template characteristic (average, variance, distance etc.), transform domain feature (eigenface, little baud Levy) and architectural feature (symmetry, projection properties etc.), and face pattern has complicated and careful Change, therefore it is generally required to use various modes characteristic synthetic method.Wherein, according to utilizing feature Method for detecting human face can be divided into by color attribute: method based on features of skin colors and based on gray feature Method two class, method based on features of skin colors is applicable to construct quick Face datection and Face tracking algorithm, Method based on gray feature make use of the most essential feature of face difference and other objects, and according to The different models used during characteristic synthetic, can be divided into the method for feature based on gray scale based on heuristic The method of pattern and method based on statistical model.Due to Face datection the complex nature of the problem, no matter which Class method all cannot be adapted to all of situation, the most all in Face datection field certain or some special Fixed problem.
Owing to the colour of skin is the important information of face, do not rely on the minutia of face, for rotation, table The situations of change such as feelings can be suitable for, and has relative stability, and and the color of most of background objects Distinguish, the feature that therefore the present embodiment mainly uses the colour of skin to be face pattern.
Features of skin colors is mainly described by complexion model, and conventional complexion model includes Gauss model, mixing height This model and histogram model.Use any type of complexion model and chrominance space (Chrominance Space) selection is closely related, and the chrominance space that Face datection is conventional includes: RGB (red, green, blue Three primary colours), rgb (the normalized three primary colours of brightness), SHI (saturation, tone, brightness), YIQ (NTSC System brightness and colorimetry model), YUV (brightness of PAL-system and colorimetry model), YCbCr (colorimetry model of CCIR601 coded system) etc..Certain chrominance space can be investigated in terms of two, Can one be the distribution that describe " colour of skin " region in this chrominance space with given model, and it two is " colour of skin " and the degree of overlapping in " the non-colour of skin " region in chrominance space.
In step slo, can obtain original image by input equipment, this input equipment can be to move Dynamic smart machine, such as mobile phone, it is also possible to be notebook or photographic head.
S20, according to default intercepting ratio and Face datection data, obtains Face datection data correspondence head The intercepting region of picture also shows, the intercepting ratio wherein preset can be obtained by data statistics, it is also possible to It is set as golden section proportion.
In step S20, according to default intercepting ratio and Face datection data, obtain Face datection number Intercepting region display according to corresponding head portrait specifically include:
On original image, the editable of respective numbers is generated according to the face number in Face datection data Choice box;
According to the pixel in original image of each face in default intercepting ratio and Face datection data Coordinate, it is thus achieved that the size of corresponding choice box and the position on original image thereof;
Size according to choice box and the position on original image thereof position each face on original image The intercepting region of corresponding head portrait;
Original image highlights the intercepting region of qualified face correspondence head portrait.
Wherein, when the face number in the Face datection data obtained is one, prominent on original image Go out to show the choice box that this face is corresponding;When obtain Face datection data in face number be two or During two or more, each face detected is carried out recognition of face, it is thus achieved that the recognition of face of each face Data, contrast with the human face data in data base respectively by each facial recognition data obtained, The choice box that the highest facial recognition data of similarity is corresponding is highlighted on original image.
Recognition of face (Face Recognition) is that a kind of facial characteristics according to people carries out identity mirror automatically Other a kind of technology, its integrated use digital picture/multiple technologies such as Video processing, pattern recognition.Extensively Recognition of face in justice refers to the identification of human body face, refers in particular to the knowledge at the positions such as eye, nose, mouth and buccal Not.Face recognition technology includes four main links, be followed successively by facial image detection, facial image pre- Process, facial image feature extraction and matching and identification.Wherein,
1) facial image detects as it was previously stated, calibrate position and the size of face the most accurately.
2) limited and random disturbances by various conditions due to original image, tend not to directly use, At the commitment of image procossing, it must be carried out the Image semantic classification such as gray correction, noise filtering, right For facial image, its preprocessing process mainly include the light compensation of facial image, greyscale transformation, Histogram equalization, normalization, geometric correction, filter and sharpening etc..
3) method that face characteristic extracts be roughly divided into Knowledge based engineering characterizing method and based on algebraic characteristic or The characterizing method of statistical learning: Knowledge based engineering characterizing method is mainly according to the shape description of human face And the range performance between them obtains the characteristic contributing to face classification, its characteristic component leads to Often include the Euclidean distance between characteristic point, curvature and angle etc..Face is by eyes, nose, mouth, chin Constitute Deng local, to these local and the geometric description of structural relation between them, can be as identifying face Key character, these features are referred to as geometric properties, and Knowledge based engineering face characterizes and mainly includes base Method and template matching method in geometric properties.
4) facial image coupling stores with identifying in the characteristic referring to the facial image extracted and data base Feature templates scan for coupling, by set a threshold value, when similarity exceedes this threshold value, then The result output that coupling is obtained.Recognition of face is exactly by face characteristic to be identified and the face obtained Feature templates compares, and judges the identity information of face according to similarity degree.This process is again Being divided into two classes: a class is to confirm, is the process that image compares that carries out one to one, another kind of is identification, is One-to-many carries out the process of images match contrast.
In the present embodiment, recognition of face mainly uses recognizer based on human face characteristic point (Feature-based Recognition Algorithms) realizes the automatic identification of face in original image.
It should be noted that highlighted the face pair automatically got on original image by choice box When answering the intercepting region of head portrait, the present embodiment also provides for the means of man-machine interaction, meets the personalization of user Demand.User can reorientate the intercepting region meeting its demand by the choice box that editor highlights, Such as, the size of the choice box that the Face datection data that automatically obtained by adjustment are corresponding or the ratio of choice box Example, adjusts the intercepting region of this Face datection data correspondence head portrait.Or, judge automatically to know user The intercepting region of the facial recognition data correspondence head portrait that other similarity is the highest be not its when want, User can manually select the choice box that suitable face is corresponding, it is thus achieved that the face correspondence head after reselecting The intercepting region of picture.
Further, in step S20, it is also possible to the intercepting region corresponding to the choice box highlighted Carry out preview to show;
The effect shown according to preview, manually adjusts choice box size and/or ratio;
Size according to the choice box after adjusting and/or ratio, again fixed in the corresponding position of original image The intercepting region that position Face datection data are corresponding.
S30, carries out shearing preservation process to intercepting region, obtains the head portrait needed and long passing to applies net The page stood shows.
In this step, can carry out accordingly shearing the picture obtained after region is sheared intercepting Process, such as head portrait is carried out edge and light and processes, then the head portrait being truncated to is saved in above-mentioned In data base, to enrich the resource improving data base.
The present embodiment is by carrying out Face datection to picture, it is thus achieved that the Face datection data in picture, according to The intercepting ratio preset obtains the intercepting region of this corresponding head portrait of Face datection data with Face datection data, By to intercepting the head portrait obtaining needs after region carries out shearing preservation process.The method of the present embodiment can Obtain optimal intercepting ratio automatically, it is not necessary to user carries out repeatedly Manual interception, it is possible to efficiently reduce Obtain the time presetting intercepting ratio head portrait.
In order to the more detailed description present invention obtains method and the beneficial effect thereof of head portrait in picture, below with Automatically illustrate as a example by obtaining the face head portrait needed in original image, it is assumed that this original image has 3 faces.
First, it is thus achieved that complexion model.
Setting up colour of skin sample, this colour of skin sample packages is containing the different colours of skin, the RGB figure of different size of face Picture, the present embodiment have selected each not phase of the 100 width colours of skin from the Internet, face database and daily living photo Same facial image, cuts out the sub-fraction of people's face skin from which as colour of skin sample.
Consider that complexion model is the mathematical model describing skin distribution rule at certain color space, for side Just describing the mathematical model of colour of skin sample, rgb color space is converted to YCrCb color by the present embodiment Space, is divided into the colour of skin and non-skin pixel two class, to improve the efficiency of Face datection simultaneously by image pixel And correctness.
The present embodiment selects dimensional Gaussian distribution to describe the Colour of Cb-Cr, due at YCbCr color In space, Y represents that brightness, Cb and Cr are color distinction signals, represents colourity.Therefore, this enforcement Example only selects Cb and the Cr chromatic component in YCbCr color space, utilizes the two component to set up color Degree scattergram.After colour of skin sample is trained, obtain a distribution center, according to colour of skin sample number Obtain a similarity about the colour of skin according to the distance apart from this distribution center, calculate the average of this similarity Gaussian distribution model is i.e. can get with variance.The watchband type of the dimensional Gaussian distribution of the present embodiment is as follows:
p ( x ‾ ) = ( 2 π ) 3 2 | Σ | 1 2 exp { - 1 2 ( x ‾ - μ ) T Σ - 1 ( x ‾ - μ ) }
Wherein,For average, μ is variance,Expression formula for dimensional Gaussian distribution.
After estimating face complexion complexion model in YCbCr color space, obtain from input equipment Picture, this input equipment can be mobile phone, computer or photographic head, to the inspection in the original image of input By the complexion model of training, the colour of skin of measuring point, detects whether this point belongs to human face region, so that it is determined that defeated Face number and the position of each face in the original image entered.
Next on the picture obtained, show the intercepting region of the Face datection data correspondence head portrait of needs.
According to the number of the Face datection data obtained, picture generates the editable choosing of respective numbers Select frame.Assume during Face datection, whole three face detected, then generating three can edit Choice box.
According to default intercepting ratio and corresponding each Face datection data, it is thus achieved that corresponding choice box exists Location of pixels in above-mentioned picture.
On the basis of above-mentioned hypothesis, in order to clearly distinguish three faces, by three people's face respective markers For A, B, C.Wherein, it is thus achieved that the method intercepting region of face A is: according to the face of face A Detection data, it is thus achieved that lay respectively at the pixel coordinate of four pixels at its four corner locations, according to Golden section proportion (can certainly be other ratios) calculates outside four that four pixels are corresponding respectively Expand the pixel coordinate of point, then these four extend out the rectangular area that pixel coordinate a little surrounds and are face A Corresponding intercepting region.Face B and face C intercepts method and the intercepting of face A that region obtains The acquisition methods in region is identical.
After obtaining the choice box that each Face datection data are corresponding, owing to automatically detecting on picture Multiple faces, the present embodiment uses recognition methods of based on human face characteristic point, every on original image Individual face carries out recognition of face, by obtain each face facial recognition data respectively with in data base Human face data contrasts, thus obtains the recognition of face number the highest with human face data similarity in data base According to.Still be based on above-mentioned it is assumed that by A, B, C facial recognition data respectively with the face in data base After Data Comparison, obtain the facial recognition data of face A for human face data similarity in data base High facial recognition data, highlights choice box corresponding to face A on picture.Can be by choosing The means such as the color of frame, the line style of type of selecting highlight choice box corresponding to face A, the present embodiment pair The method highlighting choice box on picture does not limits.
When highlighting intercepting region by choice box on picture, user can be to this intercepting region Choice box is edited, such as, adjust the size of choice box, ratio or position, after adjusting according to user Choice box, positions the intercepting region that this human face data is corresponding again on picture.Be still based on above-mentioned it is assumed that When being highlighted the intercepting region of face A on picture by choice box, user can be based on currently Size, ratio or position that choice box corresponding for face A is adjusted are adjusted correspondingly, it is thus achieved that meet and use The intercepting region of the display effect of family demand.Certainly, user can also be by face B or the choosing of face C Select frame to highlight, it is thus achieved that the intercepting region that the Face datection data of face B or face C are corresponding.
In order to preferably show intercepting region, the present embodiment additionally provides preview display function.
Concrete, the intercepting region that the choice box highlighted is corresponding is carried out preview and shows, according to preview The effect of display, manually adjusts this choice box size and/or ratio, according to the size of the choice box after adjusting And/or ratio reorientates the intercepting region that human face data is corresponding in the corresponding position of picture.
In actual applications, the original image of input is likely to a face only be detected, is only detecting During one face, then without carrying out recognition of face further, can directly according to these Face datection data and The intercepting ratio preset, automatically obtains the intercepting region that these Face datection data are corresponding.Concrete, at figure Generate an editable choice box on sheet, obtain according to default intercepting ratio and these Face datection data This choice box location of pixels in picture, according to the location of pixels of this choice box, on picture, location should The intercepting region that Face datection data are corresponding.Certainly, picture shows this Face datection by choice box During intercepting region corresponding to data, it is possible to use size, ratio or the position adjustment of above-mentioned adjustment choice box The intercepting region that these Face datection data are corresponding.
Finally, it is thus achieved that the head portrait of needs, upload head portrait and show.
To intercept region shear after can process accordingly, such as head portrait is carried out edge and Light processes, and is then saved in above-mentioned data base by the head portrait being truncated to, and improves data base's with abundant Data resource.
The technology design identical with the method for head portrait in above-mentioned acquisition picture, embodiments of the invention also provide for A kind of obtaining the system of head portrait in picture, this system includes Face datection unit 21, interception unit 22 With head portrait acquiring unit 23.
Face datection unit 21, for detecting the face in the original image obtained, obtains original Face datection data in picture.Wherein, the Face datection data that Face datection unit 21 obtains at least are wrapped Include face number and each face pixel coordinate in described original image.
Face datection (Face Detection) refers to determine all face (if present) in the input image Position, size, the process of pose.The feature mode comprised due to facial image is the abundantest, and people Face pattern has a complicated and careful change, therefore it is generally required to the method using various modes characteristic synthetic. Due to Face datection the complex nature of the problem, which kind of method all cannot be adapted to all of situation, and one As all for certain or some specific problem in Face datection field.
Owing to the colour of skin is the important information of face, do not rely on the minutia of face, for rotation, table The situations of change such as feelings can be suitable for, and has relative stability, and and the color of most of background objects Distinguish.Therefore, the spy that the Face datection unit 21 in the present embodiment mainly uses the colour of skin to be face pattern Levy.
Features of skin colors is mainly described by complexion model, and conventional complexion model includes Gauss model, mixing height This model and histogram model.Use any type of complexion model and chrominance space (Chrominance Space) selection is closely related, and the chrominance space that Face datection is conventional includes: RGB (red, green, blue Three primary colours), rgb (the normalized three primary colours of brightness), SHI (saturation, tone, brightness), YIQ (NTSC System brightness and colorimetry model), YUV (brightness of PAL-system and colorimetry model), YCbCr (colorimetry model of CCIR601 coded system) etc..Certain chrominance space can be investigated in terms of two, Can one be the distribution that describe " colour of skin " region in this chrominance space with given model, and it two is " colour of skin " and the degree of overlapping in " the non-colour of skin " region in chrominance space.
Face datection unit 21 can obtain original image by input equipment, and this input equipment can be to move Dynamic smart machine, such as mobile phone, it is also possible to be notebook or photographic head.
Interception unit 22, for according to the intercepting ratio preset and Face datection data, obtains Face datection The intercepting region of data correspondence head portrait also shows.
In a preferred version of the present embodiment, interception unit 22 specifically includes:
Choice box generation module, for according to the life on original image of the face number in Face datection data Become the editable choice box of respective numbers;
Position acquisition module, for according to each face in the intercepting ratio preset and Face datection data Pixel coordinate in original image, it is thus achieved that the little position greatly and on original image of corresponding choice box Put;
Locating module, is used for the little position greatly and on original image according to choice box at original image The intercepting region of upper location each face correspondence head portrait;
Display module, for highlighting the intercepting of qualified face correspondence head portrait on original image Region.
Preferably, display module, is further used for the color by choice box and/or the line style of type is prominent aobvious Show the intercepting region of qualified face correspondence head portrait.
Wherein, display module, it is further used for when the face number in the Face datection data obtained is one Time individual, original image highlights the choice box that this face is corresponding;
When the face number in the Face datection data obtained is two or more, by detect Each face carries out recognition of face, it is thus achieved that the facial recognition data of each face, each face that will obtain Identify that data contrast with the human face data in data base respectively, original image highlights similar Spend the choice box that the highest facial recognition data is corresponding.
Recognition of face (Face Recognition) is that a kind of facial characteristics according to people carries out identity mirror automatically Other a kind of technology, sensu lato recognition of face refers to the identification of human body face, refer in particular to eye, nose, mouth with And the identification at the position such as buccal.Face recognition technology includes four main links, is followed successively by facial image Detection, facial image pretreatment, facial image feature extraction and matching and identification.Face in the present embodiment Identify main employing recognizer (Feature-based Recognition based on human face characteristic point Algorithms) the automatic identification of face in original image is realized.
It should be noted that the display module of the system of head portrait is prominent aobvious by choice box in obtaining picture When showing the intercepting region of the face correspondence head portrait automatically got, the system of the present embodiment also provides for man-machine friendship Mutual means, meet the individual demand of user.The choice box weight that user can be highlighted by editor New definition meets the intercepting region of its demand, such as, the Face datection data pair automatically obtained by adjustment The size of the choice box answered or the ratio of choice box, adjust the intercepting of this Face datection data correspondence head portrait Region.Or, judge, user, facial recognition data correspondence head portrait that the similarity that automatically identifies is the highest Intercept region be not its when want, user can manually select the choice box that suitable face is corresponding, Obtain the intercepting region of the face correspondence head portrait after reselecting.
In above-mentioned preferred version, interception unit 22 also includes previewing module,
Previewing module, shows for the intercepting region that the choice box highlighted is corresponding is carried out preview;
Locating module, is further used for according to size and/or the ratio manually adjusting rear choice box, original The intercepting region of Face datection data correspondence head portrait is reorientated in the corresponding position of picture.
Head portrait acquiring unit 23, for described intercepting region carries out shearing preservation process, acquisition needs Head portrait also uploads to apply the page of website to show.
The system of head portrait in picture that obtains of the present embodiment is particularly suited for the page space head portrait figure to uploading Sheet has the application website of size limitation.
The system of the present embodiment is by carrying out Face datection to picture, it is thus achieved that the Face datection data in picture, Obtain the intercepting of this corresponding head portrait of Face datection data with Face datection data according to default intercepting ratio Region, by intercepting the head portrait obtaining needs after region carries out shearing preservation process.The side of the present embodiment Method can obtain optimal intercepting ratio automatically, it is not necessary to user carries out repeatedly Manual interception, it is possible to effectively Ground reduces the time obtaining default intercepting ratio head portrait.
In sum, the invention discloses and a kind of obtain the method and system of head portrait in picture, by obtaining Face in the original image taken detects automatically, it is thus achieved that include that face number and each face are original The Face datection data of the pixel coordinate in image, according to default intercepting ratio and Face datection data, Obtain the intercepting region of this Face datection data correspondence head portrait, by carrying out shearing at preservation to intercepting region Reason, it is thus achieved that the head portrait of needs also uploads to the page of described application website and shows.The technology of the present invention Scheme automatically can obtain the head portrait of needs from original image, compared to existing method, it is not necessary to user Carry out Manual interception repeatedly, it is thus possible to quickly obtain the head portrait presetting intercepting ratio.
The foregoing is only presently preferred embodiments of the present invention, be not intended to limit the protection model of the present invention Enclose.All any modification, equivalent substitution and improvement etc. made within the spirit and principles in the present invention, all Comprise within the scope of the present invention.

Claims (10)

1. one kind obtains the method for head portrait in picture, it is characterised in that described method includes:
Face in the original image obtained is detected, obtains the Face datection in described original image Data;
According to default intercepting ratio and described Face datection data, obtain described Face datection data corresponding The intercepting region of head portrait also shows;
Described intercepting region carries out shear preservation process, obtain the head portrait needed and upload to apply website The page show.
Method the most according to claim 1, it is characterised in that described Face datection data are at least wrapped Including face number and each face pixel coordinate in described original image, what described basis was preset cuts Take ratio and described Face datection data, obtain the intercepting region of described Face datection data correspondence head portrait also Display includes:
According to the face number in described Face datection data, described original image generates respective numbers Editable choice box;
According to each face in default intercepting ratio and described Face datection data at described original image In pixel coordinate, it is thus achieved that corresponding choice box little big and the position on described original image thereof;
According to the little big of described choice box and the position on described original image thereof, at described original image The intercepting region of upper location each face correspondence head portrait;
Described original image highlights the intercepting region of qualified face correspondence head portrait.
Method the most according to claim 2, it is characterised in that described prominent on described original image Go out to show that the intercepting region of qualified face correspondence head portrait includes:
When the face number in the described Face datection data obtained is one, on described original image Highlight the choice box that described face is corresponding;
When the face number in the described Face datection data obtained is two or more, will detection To each face carry out recognition of face, it is thus achieved that the facial recognition data of each face, by obtain each Facial recognition data contrasts with the human face data in data base respectively, prominent on described original image The choice box that the display the highest facial recognition data of similarity is corresponding.
Method the most according to claim 3, it is characterised in that described prominent on described original image Go out to show that the intercepting region of qualified face correspondence head portrait specifically includes:
Color and/or the line style of type by choice box highlight qualified face correspondence head portrait Intercept region.
Method the most according to claim 4, it is characterised in that the intercepting ratio that described basis is preset With described Face datection data, obtain the intercepting region of described Face datection data correspondence head portrait and show into One step includes:
The intercepting region that the described choice box highlighted is corresponding is carried out preview show;
The effect shown according to preview, manually adjusts described choice box size and/or ratio;
Size according to the described choice box after adjusting and/or ratio, in the relevant position of described original image Place reorientates the intercepting region of described Face datection data correspondence head portrait.
6. one kind obtains the system of head portrait in picture, it is characterised in that described system includes:
Face datection unit, for detecting the face in the original image obtained, obtains described former Face datection data in beginning picture;
Interception unit, for according to the intercepting ratio preset and described Face datection data, obtaining described people Face detects the intercepting region of data correspondence head portrait and shows;
Head portrait acquiring unit, for carrying out shearing preservation process, the head of acquisition needs to described intercepting region Picture also uploads to apply the page of website to show.
System the most according to claim 6, it is characterised in that described Face datection unit obtains Face datection data at least include that face number and each face pixel in described original image is sat Mark, described interception unit includes:
Choice box generation module, is used for according to the face number in described Face datection data described original The editable choice box of respective numbers is generated on picture;
Position acquisition module, be used in the default intercepting ratio of basis and described Face datection data is each Face pixel coordinate in described original image, it is thus achieved that corresponding choice box little big and described former Position on beginning picture;
Locating module, for the little position greatly and on described original image according to described choice box, Described original image positions the intercepting region of each face correspondence head portrait;
Display module, for highlighting qualified face correspondence head portrait on described original image Intercept region.
System the most according to claim 7, it is characterised in that described display module is further used for,
When the face number in the described Face datection data obtained is one, on described original image Highlight the choice box that described face is corresponding;
When the face number in the described Face datection data obtained is two or more, will detection To each face carry out recognition of face, it is thus achieved that the facial recognition data of each face, by obtain each Facial recognition data contrasts with the human face data in data base respectively, prominent on described original image The choice box that the display the highest facial recognition data of similarity is corresponding.
System the most according to claim 8, it is characterised in that described display module is further used for,
Color and/or the line style of type by choice box highlight qualified face correspondence head portrait Intercept region.
System the most according to claim 9, it is characterised in that described interception unit also includes pre- Look at module;
Described previewing module, for carrying out preview to the intercepting region that the described choice box highlighted is corresponding Display;
Described locating module, is further used for according to size and/or the ratio manually adjusting rear described choice box Example, reorientates cutting of described Face datection data correspondence head portrait in the corresponding position of described original image Take region.
CN201510394449.5A 2015-07-07 2015-07-07 Method and system for obtaining head portrait in picture Active CN106326823B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510394449.5A CN106326823B (en) 2015-07-07 2015-07-07 Method and system for obtaining head portrait in picture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510394449.5A CN106326823B (en) 2015-07-07 2015-07-07 Method and system for obtaining head portrait in picture

Publications (2)

Publication Number Publication Date
CN106326823A true CN106326823A (en) 2017-01-11
CN106326823B CN106326823B (en) 2020-06-30

Family

ID=57725242

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510394449.5A Active CN106326823B (en) 2015-07-07 2015-07-07 Method and system for obtaining head portrait in picture

Country Status (1)

Country Link
CN (1) CN106326823B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108090430A (en) * 2017-12-08 2018-05-29 杭州魔点科技有限公司 The method and its device of Face datection
CN108154515A (en) * 2017-12-27 2018-06-12 三星电子(中国)研发中心 Picture shows method and apparatus
CN108345842A (en) * 2018-01-24 2018-07-31 成都鼎智汇科技有限公司 A kind of processing method based on big data
CN109359508A (en) * 2018-08-27 2019-02-19 贵阳朗玛信息技术股份有限公司 A kind of head portrait processing method and processing device
WO2019071386A1 (en) * 2017-10-09 2019-04-18 深圳传音通讯有限公司 Image data processing method and device
CN110334615A (en) * 2019-06-20 2019-10-15 湖北亮诚光电科技有限公司 A method of there is the recognition of face blocked
WO2020048425A1 (en) * 2018-09-03 2020-03-12 聚好看科技股份有限公司 Icon generating method and apparatus based on screenshot image, computing device, and storage medium
CN112487396A (en) * 2020-12-08 2021-03-12 平安国际智慧城市科技股份有限公司 Picture processing method and device, computer equipment and storage medium
CN112541919A (en) * 2020-12-29 2021-03-23 申建常 Picture segmentation processing method and processing system
CN113792671A (en) * 2021-09-16 2021-12-14 平安银行股份有限公司 Method and device for detecting face synthetic image, electronic equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101000688A (en) * 2007-01-15 2007-07-18 浙江大学 Method for automatic photomotage of multi-face
CN101127076A (en) * 2007-09-27 2008-02-20 上海交通大学 Human eye state detection method based on cascade classification and hough circle transform
CN102982568A (en) * 2012-11-12 2013-03-20 东莞宇龙通信科技有限公司 Method and device for automatic image clipping
CN103914689A (en) * 2014-04-09 2014-07-09 百度在线网络技术(北京)有限公司 Picture cropping method and device based on face recognition
CN104484855A (en) * 2014-12-24 2015-04-01 北京奇虎科技有限公司 Method and device for cropping pictures

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101000688A (en) * 2007-01-15 2007-07-18 浙江大学 Method for automatic photomotage of multi-face
CN101127076A (en) * 2007-09-27 2008-02-20 上海交通大学 Human eye state detection method based on cascade classification and hough circle transform
CN102982568A (en) * 2012-11-12 2013-03-20 东莞宇龙通信科技有限公司 Method and device for automatic image clipping
CN103914689A (en) * 2014-04-09 2014-07-09 百度在线网络技术(北京)有限公司 Picture cropping method and device based on face recognition
CN104484855A (en) * 2014-12-24 2015-04-01 北京奇虎科技有限公司 Method and device for cropping pictures

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
PINAR SANTEMIZ等: "Automatic Landmark Detection and Face Recognition for Side-View Face Images", 《IEEE》 *
李彬彬: "基于整体特征和局部特征的人脸识别方法的研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019071386A1 (en) * 2017-10-09 2019-04-18 深圳传音通讯有限公司 Image data processing method and device
CN108090430A (en) * 2017-12-08 2018-05-29 杭州魔点科技有限公司 The method and its device of Face datection
CN108154515A (en) * 2017-12-27 2018-06-12 三星电子(中国)研发中心 Picture shows method and apparatus
CN108345842A (en) * 2018-01-24 2018-07-31 成都鼎智汇科技有限公司 A kind of processing method based on big data
CN108345842B (en) * 2018-01-24 2022-03-04 中电长城圣非凡信息***有限公司 Big data based processing method
CN109359508A (en) * 2018-08-27 2019-02-19 贵阳朗玛信息技术股份有限公司 A kind of head portrait processing method and processing device
WO2020048425A1 (en) * 2018-09-03 2020-03-12 聚好看科技股份有限公司 Icon generating method and apparatus based on screenshot image, computing device, and storage medium
CN110334615A (en) * 2019-06-20 2019-10-15 湖北亮诚光电科技有限公司 A method of there is the recognition of face blocked
CN112487396A (en) * 2020-12-08 2021-03-12 平安国际智慧城市科技股份有限公司 Picture processing method and device, computer equipment and storage medium
CN112541919A (en) * 2020-12-29 2021-03-23 申建常 Picture segmentation processing method and processing system
CN113792671A (en) * 2021-09-16 2021-12-14 平安银行股份有限公司 Method and device for detecting face synthetic image, electronic equipment and medium

Also Published As

Publication number Publication date
CN106326823B (en) 2020-06-30

Similar Documents

Publication Publication Date Title
CN106326823A (en) Method and system for acquiring head image in picture
Li et al. Multi-angle head pose classification when wearing the mask for face recognition under the COVID-19 coronavirus epidemic
Wen et al. COVERAGE—A novel database for copy-move forgery detection
CN103824059B (en) Facial expression recognition method based on video image sequence
CN103914699B (en) A kind of method of the image enhaucament of the automatic lip gloss based on color space
US8385638B2 (en) Detecting skin tone in images
US9524028B2 (en) Visual language for human computer interfaces
CN104732200B (en) A kind of recognition methods of skin type and skin problem
CN106485222A (en) A kind of method for detecting human face being layered based on the colour of skin
CN107392110A (en) Beautifying faces system based on internet
Berezhnoy et al. Computer analysis of van Gogh’s complementary colours
CN105359162A (en) Image masks for face-related selection and processing in images
CN101739546A (en) Image cross reconstruction-based single-sample registered image face recognition method
CN109740572A (en) A kind of human face in-vivo detection method based on partial color textural characteristics
CN102592141A (en) Method for shielding face in dynamic image
CN107545536A (en) The image processing method and image processing system of a kind of intelligent terminal
JP2021531571A (en) Certificate image extraction method and terminal equipment
CN105404846A (en) Image processing method and apparatus
CN106650606A (en) Matching and processing method for face image and face image model construction system
CN105335719A (en) Living body detection method and device
CN102024156A (en) Method for positioning lip region in color face image
Gritzman et al. Comparison of colour transforms used in lip segmentation algorithms
CN110969631B (en) Method and system for dyeing hair by refined photos
Lionnie et al. A comparison of human skin color detection for biometrie identification
Mohammed et al. Image segmentation for skin detection

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder

Address after: Room 818, 8 / F, 34 Haidian Street, Haidian District, Beijing 100080

Patentee after: BEIJING ULTRAPOWER SOFTWARE Co.,Ltd.

Address before: 100089 Beijing city Haidian District wanquanzhuang Road No. 28 Wanliu new building 6 storey block A Room 601

Patentee before: BEIJING ULTRAPOWER SOFTWARE Co.,Ltd.

CP02 Change in the address of a patent holder