CN104850847B - Image optimization system and method with automatic thin face function - Google Patents

Image optimization system and method with automatic thin face function Download PDF

Info

Publication number
CN104850847B
CN104850847B CN201510294637.0A CN201510294637A CN104850847B CN 104850847 B CN104850847 B CN 104850847B CN 201510294637 A CN201510294637 A CN 201510294637A CN 104850847 B CN104850847 B CN 104850847B
Authority
CN
China
Prior art keywords
face
region
module
image
thin
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.)
Active
Application number
CN201510294637.0A
Other languages
Chinese (zh)
Other versions
CN104850847A (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.)
Huzhou YingLie Intellectual Property Operation Co.,Ltd.
Original Assignee
Shanghai Feixun Data Communication 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 Shanghai Feixun Data Communication Technology Co Ltd filed Critical Shanghai Feixun Data Communication Technology Co Ltd
Priority to CN201510294637.0A priority Critical patent/CN104850847B/en
Publication of CN104850847A publication Critical patent/CN104850847A/en
Application granted granted Critical
Publication of CN104850847B publication Critical patent/CN104850847B/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
    • G06V40/162Detection; Localisation; Normalisation using pixel segmentation or colour matching

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The present invention relates to a kind of image optimization systems with automatic thin face function, and the image optimization method realized using the system.This method includes: S1, face detection module determine the face rectangular area in image comprising face using Face recognition technology, determine eyes regional location;S2, face Delta Region establish module and determine face Delta Region according to eyes regional location;S3, face boundary curve are established module and are determined to face circumference, and face both sides of the edge curve is obtained;S4, thin face area pixel filling module determine that face two sides need skinny region, and refill to pixel in the region.The automatic detection of present invention realization face, face needs the automatic detection in skinny region, and curve matching is added by edge detection, thin face region is accurately positioned, pixel filling simultaneously in thin face rear region is naturally reasonable, meet with region continuous pixels criterion, algorithm complexity is lower, and thin face is high-efficient.

Description

Image optimization system and method with automatic thin face function
Technical field
The present invention relates to a kind of image optimization system and method, in particular to a kind of image with automatic thin face function are excellent Change system and method, belongs to computer application technology.
Background technique
Epoch now, people pursue with thin as beauty, therefore various images beautification algorithm is able to develop and be widely used, especially It is the beautification algorithm of face, is emerged from various mobile phones and digital camera.
But existing thin face technology otherwise after the degree of automation is high or thin face filling region pixel variation compared with Greatly or thin face algorithm complexity is higher, it is difficult to practice.
Based on above-mentioned, the present invention is intended to provide a kind of efficient thin face system and method for automation, for in image Face carry out thin face beautification.
Summary of the invention
The purpose of the present invention is to provide a kind of image optimization system and method with automatic thin face function, realize face Automatic detection, face needs the automatic detection in skinny region, and adds curve matching by edge detection, quasi- to thin face region It determines position, while the pixel filling in thin face rear region is naturally reasonable, meets with region continuous pixels criterion, algorithm complexity Lower, thin face is high-efficient.
In order to achieve the above object, the present invention provides a kind of image optimization system with automatic thin face function, includes: people Face detection module determines the face rectangular area in image comprising face using Face recognition technology, extracts face square Data in shape region determine eyes regional location;Module is established in face Delta Region, with the face detection module phase Connection, on the basis of face rectangular area, determines face Delta Region according to eyes regional location;Face boundary curve is established Module establishes module with the face Delta Region and is connected, and on the basis of face Delta Region, takes turns to face periphery Exterior feature is determined, and obtains face both sides of the edge curve;Thin face area pixel fills module, true with the face boundary curve Formwork erection block is connected, and according to face both sides of the edge curve and the side of left and right two of face Delta Region, determines face two sides Skinny region is needed, and pixel in the region is refilled.
Module is established in the face Delta Region: module is established on Delta Region bottom edge, is examined with the face It surveys module to be connected, is based on face rectangular area, the center of left and right two-eye area is calculated, the eye of the left and right two The extended line of the line of the center in eyeball region is face three with the intersection point that two sides of face rectangular area are intersected respectively Two vertex of angular zone, and the line of the two intersection points is the bottom edge of face Delta Region;Module is established in Delta Region side, It is established module with the Delta Region bottom edge and is connected, and based on the center of left and right two-eye area, is calculated Midpoint between two forms the vertical line on face Delta Region bottom edge by the midpoint between this two, with face rectangle region The intersection point of the bottom edge intersection in domain is the third vertex of face Delta Region, thereby determines that face Delta Region and face triangle The side of left and right two in region.
The face boundary curve establishes module: face edge detection module is pushed up with the Delta Region Point establishes module and is connected, using edge detection algorithm to image in the lower-left triangle of face rectangular area and right bottom triangle region Edge detection is carried out, face edge contour pixel is obtained;Face boundary curve fitting module, with the face edge detection Module is connected, and is believed according to the coordinate information of face edge contour pixel and the coordinate on three vertex of face Delta Region Breath, using curve-fitting method, carries out curve fitting to face edge contour, obtains face left and right sides edge contour curve.
The thin face area pixel filling module includes: thin face rear profile curve establishes module, with the face Boundary curve fitting module is connected, according to face both sides of the edge curve and the side of left and right two of face Delta Region, really Surely skinny two sides human face region is needed;By each point on the right side side of face Delta Region to face right side edge curve away from From the curve that is constituted of midpoint be determined as right side face mask curve after thin face, by face Delta Region right side side with it is thin Right side face mask curve constitutes the new right side face area of formation after thin face after face;By the left side of face Delta Region The curve that is constituted of midpoint of distance of each point to face left side edge curve is determined as left side of the face contouring after thin face on side Curve, by a new left side for formation after constituting thin face by left side of the face contouring curve behind the left side side of face Delta Region and thin face Side face area;Face area pixel filling module after thin face establishes module with the thin face rear profile curve and is connected, The two are calculated in the new right side face area of formation after skinny right side human face region and thin face as needed The supplementary set of the intersection in region is right side peripheral region, is by right side face mask curve after face right side edge curve and thin face It is constituted;After thin face by the new color value of each pixel in the new right side face area of formation by its original color value with The color value of corresponding pixel points in the peripheral region of right side is calculated and is refilled;Skinny people from left side as needed By the new left side face area of formation behind face region and thin face, the supplementary set of the intersection in the two regions is calculated as a left side Side peripheral region is made of face left side edge curve and left side of the face contouring curve after thin face;It will be formed after thin face New left side face area in each pixel new color value by pair in its original color value and left side peripheral region It answers the color value of pixel to be calculated and is refilled;New background area pixels fill module after thin face, and described Thin face after face area pixel filling module be connected, right side peripheral region and left side peripheral region are expanded outward respectively One equidistant adjacent area is filled using the color value combination mirror image of each pixel in each adjacent area or duplication is filled Background pixel filling is carried out to right side peripheral region and left side peripheral region respectively.
The image optimization system with automatic thin face function of the present invention, also includes image pre-processing module, with The face detection module is connected, to original image transmit it to after preparatory data processing face detection module into Row Face recognition.
The image pre-processing module includes: image denoising module, is carried out using smooth algorithm to image flat Sliding denoising;Image enhancement module is connected with the image denoising module, to the color of image after smoothing denoising, Contrast, brightness and histogram are adjusted processing, enhance image definition;Image gray processing and normalization module, difference It is connected with the image enhancement module and face detection module, gray processing processing is carried out to the image after enhancing clarity And normalized.
The image optimization system with automatic thin face function of the present invention, also includes post processing of image module, with The thin face area pixel filling module is connected, to the skinny region in face two sides of filler pixels again and new background area It is smoothed.
The present invention also provides a kind of image optimization methods with automatic thin face function comprising the steps of:
S1, face detection module determine the face rectangular area in image comprising face using Face recognition technology, The data in face rectangular area are extracted, determine eyes regional location;
S2, face Delta Region establish module on the basis of face rectangular area, determine people according to eyes regional location Face Delta Region;
S3, face boundary curve establish module on the basis of face Delta Region, are determined to face circumference, Obtain face both sides of the edge curve;
S4, thin face area pixel fill mould root tuber are according to face both sides of the edge curve and the left and right two of face Delta Region Side determines that face two sides need skinny region, and refills to pixel in the region.
In the S2, comprising the following steps:
S21, Delta Region bottom edge establish module and are based on face rectangular area, are calculated in the two-eye area of left and right Heart position, the extended line of the line of the center of the left and right two-eye area and two sides of face rectangular area are distinguished The intersection point of intersection is two vertex of face Delta Region, and the line of the two intersection points is the bottom edge of face Delta Region;
S22, Delta Region side establish center of the module based on left and right two-eye area, be calculated two it Between midpoint, the vertical line on face Delta Region bottom edge, the bottom with face rectangular area are formed by midpoint between this two The intersection point of side intersection is the third vertex of face Delta Region, thereby determines that face Delta Region and face Delta Region Two sides in left and right.
In the S3, comprising the following steps:
S31, face edge detection module utilize lower-left triangle and bottom right three of the edge detection algorithm to face rectangular area Image carries out edge detection in angular zone, obtains face edge contour pixel;
The coordinate information and face trigonum of S32, face boundary curve fitting module according to face edge contour pixel The coordinate information on three vertex in domain carries out curve fitting to face edge contour using curve-fitting method, and it is left to obtain face Right both sides of the edge contour curve.
In the S4, comprising the following steps:
S41, thin face rear profile curve establish module according to face both sides of the edge curve and the left and right of face Delta Region Two sides determine and need skinny two sides human face region;On the right side of each point on the right side side of face Delta Region to face The curve that the midpoint of the distance of boundary curve is constituted is determined as right side face mask curve after thin face, by face Delta Region Right side face mask curve constitutes the new right side face area of formation after thin face after right side side and thin face;By face three On the left side side of angular zone each point to face left side edge curve distance the curve that is constituted of midpoint be determined as thin face after Left side face mask curve, will after constituting thin face by left side of the face contouring curve behind the left side side of face Delta Region and thin face The new left side face area formed;
It will after face area pixel filling module skinny right side human face region and thin face as needed after S42, thin face The new right side face area formed, it is by people that the supplementary set that the intersection in the two regions is calculated, which is right side peripheral region, Face right side edge curve is constituted with right side face mask curve after thin face;It will be in the new right side face area of formation after thin face The new color value of each pixel is calculated by the color value of the corresponding pixel points in its original color value and right side peripheral region It obtains and is refilled;As needed by the new left side face of formation after skinny left side human face region and thin face Region, be calculated the intersection in the two regions supplementary set be left side peripheral region, be by face left side edge curve with it is thin Left side of the face contouring curve is constituted after face;By the new color of each pixel in the new left side face area of formation after thin face Value is calculated and is refilled by the color value of its original color value and the corresponding pixel points in the peripheral region of left side;
New background area pixels filling module is outside to right side peripheral region and left side peripheral region difference after S43, thin face An equidistant adjacent area is expanded in side, is filled using the color value combination mirror image of each pixel in each adjacent area or multiple System filling carries out background pixel filling to right side peripheral region and left side peripheral region respectively.
The image optimization method with automatic thin face function of the present invention also includes before the S1: S0, Image pre-processing module carries out preparatory data processing to original image, and is transmitted to face detection module progress face and knows automatically Not.
In the S0, comprising the following steps:
S01, image denoising module carry out smoothing denoising processing to image using smooth algorithm;
S02, image enhancement module are adjusted place to the color of image, contrast, brightness and histogram after smoothing denoising Reason enhances image definition;
S03, image gray processing and normalization module carry out gray processing and normalized to the image after enhancing clarity.
The image optimization method with automatic thin face function of the present invention also includes after the S4: S5, Post processing of image module is smoothed the skinny region in face two sides of filler pixels again and new background area.
The image optimization system and method with automatic thin face function provided by the present invention, are able to achieve the automatic inspection of face It surveys, face needs the automatic detection in skinny region, and adds curve matching by edge detection, thin face region is accurately positioned, Pixel filling simultaneously in thin face rear region is naturally reasonable, meets with region continuous pixels criterion, algorithm complexity is lower, thin Face is high-efficient.
Detailed description of the invention
Fig. 1 is the structural schematic diagram in the present invention with the image optimization system of automatic thin face function;
Fig. 2 is the schematic diagram of the face rectangular area determined in the present invention by Face recognition technology;
Fig. 3 A~Fig. 3 E is the schematic diagram that face two sides need skinny area pixel to refill in the present invention;
Fig. 4 is the flow chart in the present invention with the image optimization method of automatic thin face function.
Specific embodiment
The present invention is done and is further explained by the way that a preferable specific embodiment is described in detail below in conjunction with FIG. 1 to FIG. 4 It states.
As shown in Figure 1, including for the image optimization system with automatic thin face function provided by the present invention: face inspection Module 2 is surveyed, utilizing have been relatively mature at present and determine in the Face recognition technology of a large amount of different fields application Comprising the face rectangular area F of face in image, specifically as shown in Fig. 2, extracting the data in the F of face rectangular area, eye is determined The position of eyeball, nose and mouth, especially eyes regional location;Module 3 is established in face Delta Region, examines with the face It surveys module 2 to be connected, in face rectangular area on the basis of F, face Delta Region is determined according to eyes regional location;Face side Edge curve establishes module 4, establishes module 3 with the face Delta Region and is connected, on the basis of face Delta Region, Face circumference is determined, face both sides of the edge curve is obtained;Thin face area pixel fills module 5, and described Face boundary curve establishes module 4 and is connected, according to face both sides of the edge curve and the side of left and right two of face Delta Region Side determines that face two sides need skinny region, and refills to pixel in the region, reaches thin face effect.
As shown in Fig. 2, the face Delta Region establishment module 3 includes: module 31 is established on Delta Region bottom edge, with The face detection module 2 is connected, and is based on face rectangular area F, the centre bit of left and right two-eye area is calculated Set ElAnd Er, the line of the center of the left and right two-eye areaExtended line and face rectangular area F two sides Side intersects at point L and point R respectively, therefore the two intersection points L and R are two vertex of face Delta Region, and lineFor The bottom edge of face Delta Region;Module 32 is established in Delta Region side, establishes 31 phase of module with the Delta Region bottom edge Connection, the center E based on left and right two-eye arealAnd Er, the midpoint C between two, that is, left and right two is calculated The line of the center of a eye areasMidpoint C, by C dot at face Delta Region bottom edgeVertical line, and Point B is intersected at the bottom edge of face rectangular area F, which is the third vertex of face Delta Region, thereby determines that face Delta Region is, the side of left and right two of face Delta Region is respectivelyWith, and this two sides be even more after The continuous reference line for carrying out thin face processing.
As shown in Fig. 2, the face boundary curve establishes module 4 includes: face edge detection module 41, and it is described Delta Region vertex establish module 32 and be connected, according to low frequency between pixel in human face region, human face region edge pixel and back The characteristic of high frequency between scene element, lower-left triangle and right bottom triangle region using edge detection algorithm to face rectangular area F Interior image carries out edge detection, rough to obtain face edge contour pixel;Face boundary curve fitting module 42, and it is described Face edge detection module 41 is connected, according to the three of the coordinate information of face edge contour pixel and face Delta Region The coordinate information of a vertex L, R, B carry out curve fitting to face edge contour using curve-fitting method, and it is left to obtain face Right both sides of the edge contour curveWith, and then in subsequent thin face processing, face is indicated with this two matched curves Edge contour.
The thin face area pixel filling module 5 includes: thin face rear profile curve establishes module 51, with the people Face boundary curve fitting module 42 is connected, as shown in fig. 2 and fig. 3 a, according to face both sides of the edge curveAnd The side of left and right two of face Delta Region, determine that the skinny human face region of needs is;As shown in Figure 3B, By the right side side of face Delta RegionUpper each point is to face right side edge curveDistance the song that is constituted of midpoint LineIt is determined as right side face mask curve after thin face, therefore, by the right side side of face Delta RegionAfter thin face Right side face mask curveIt constitutes the new right side face area of formation after thin face;And for left side after thin face Identical mode can be used in the new left side face area of formation after face mask curve and thin face to obtain, i.e., by face three The left side side of angular zoneUpper each point is to face left side edge curveDistance the curve that is constituted of midpoint (in figure Do not show) it is determined as left side of the face contouring curve after thin face, by the left side side of face Delta RegionWith left side of the face portion after thin face Contour curve is constituted the new left side face area of formation after thin face;Face area pixel filling module 52 after thin face, with The thin face rear profile curve establishes module 51 and is connected, in order to keep after thin face the continuity of face color with naturally, thin The color value (gray value) of the pixel of the new left and right sides face area formed after face must be by the pixel face of its peripheral region Color value (gray value) is calculated and is filled;Skinny right side human face region as neededAnd by the new of formation after thin face Right side face area, the supplementary set of the intersection in the two regions is calculated, in Fig. 3 C it can be seen fromIt is by face right side edge curveWith right side face mask curve after thin faceThe peripheral region constituted;Thin face Afterwards by the new right side face area of formationIn each pixel new color value (gray value) by its original color value (gray value) and peripheral regionThe color value (gray value) of interior corresponding pixel points is calculated and is refilled;Together Sample, skinny left side human face region as neededAnd the new left side face area of formation is calculated after thin face Supplementary set to the intersection in the two regions is left side peripheral region, is by face left side edge curveWith left side after thin face Face mask curve is constituted;By the new color value of each pixel in the new left side face area of formation by its original after thin face Some color values and the color value of the corresponding pixel points in the peripheral region of left side are calculated and are refilled;It is new after thin face Background area pixels fill module 53, are connected with face area pixel filling module 52 after the thin face, thin when completing After face when the pixel filling of face area, left side peripheral region and right side peripheral regionThe new back of picture after referred to as thin face Scene area, wherein color value (gray value) needs of each pixel are filled by the pixel of its adjacent area;As described in Fig. 3 D, To right side peripheral regionExpand an equidistant adjacent area outward, utilize adjacent areaIn each pixel Color value combines common filling algorithm (such as mirror image filling or duplication filling) to right side peripheral regionBackground pixel is carried out to fill out It fills;Likewise, also carry out the filling of background pixel to left side peripheral region, thus the face after obtaining as shown in FIGURE 3 E skinny Region.
The image optimization system with automatic thin face function of the present invention, also includes image pre-processing module 1, with The face detection module 2 is connected, and transmits it to face detection module 2 after carrying out preparatory data processing to original image Carry out Face recognition.
The image pre-processing module 1 includes: image denoising module 11, is carried out using smooth algorithm to image Smoothing denoising processing reduces noise present in image to the subsequent interference for carrying out thin face processing;Image enhancement module 12, with The image denoising module 11 is connected, and is adjusted to the color of image, contrast, brightness and histogram after smoothing denoising Processing enhances image definition;Image gray processing and normalization module 13, respectively with the image enhancement module 12 and Face detection module 2 is connected, and carries out gray processing to the image after enhancing clarity and handles to provide image border data, after being Continuous face edge detection is ready, and is normalized to avoid picture size and image grayscale range to data The influence of reason.
The image optimization system with automatic thin face function of the present invention, also includes post processing of image module 6, with The thin face area pixel filling module 5 is connected, to the skinny region in face two sides of filler pixels again and new background area Domain is smoothed, and keeps the continuity between the area pixel, so that the colouring information in the region seems more natural.
As shown in figure 4, including following step the present invention also provides a kind of image optimization method with automatic thin face function It is rapid:
S1, face detection module 2 determine the face rectangular area in image comprising face using Face recognition technology F determines the position of eyes, nose and mouth specifically as shown in Fig. 2, extracting the data in the F of face rectangular area, especially double Eye regional location;
S2, face Delta Region establish module 3 on the basis of the F of face rectangular area, are determined according to eyes regional location Face Delta Region;
S3, face boundary curve establish module 4 on the basis of face Delta Region, carry out to face circumference true It is fixed, obtain face both sides of the edge curve;
S4, thin face area pixel filling module 5 are according to face both sides of the edge curve and the left and right two of face Delta Region Side, determines that face two sides need skinny region, and refill to pixel in the region, reaches thin face effect.
In the S2, comprising the following steps:
S21, Delta Region bottom edge establish module 31 and are based on face rectangular area F, and left and right two-eye area is calculated Center ElAnd Er, the line of the center of the left and right two-eye areaExtended line and face rectangular area F Two sides intersect at point L and point R respectively, the two intersection points L and R are two vertex of face Delta Region, and lineFor the bottom edge of face Delta Region;
Center E of the module 32 based on left and right two-eye area is established in S22, Delta Region sidelAnd Er, calculate Midpoint C between to two, that is, left and right two-eye area center lineMidpoint C, pass through C dot At face Delta Region bottom edgeVertical line, intersect at point B with the bottom edge of face rectangular area F, which is face three The third vertex of angular zone thereby determines that face Delta Region is, the side of left and right two point of face Delta Region It is notWith
In the S3, comprising the following steps:
S31, face edge detection module 41 are according to low frequency between pixel in human face region, human face region edge pixel and background The characteristic of high frequency between pixel, using edge detection algorithm in the lower-left triangle of face rectangular area F and right bottom triangle region Image carries out edge detection, rough to obtain face edge contour pixel;
S32, face boundary curve fitting module 42 are according to the coordinate information and face triangle of face edge contour pixel The coordinate information of three vertex L, R, the B in region carry out curve fitting to face edge contour, are obtained using curve-fitting method Obtain face left and right sides edge contour curveWith
In the S4, comprising the following steps:
S41, as shown in fig. 2 and fig. 3 a, thin face rear profile curve establish module 51 according to face both sides of the edge curveAnd the side of the left and right of face Delta Region two, determine that the skinny human face region of needs is;Such as Shown in Fig. 3 B, by the right side side of face Delta RegionUpper each point is to face right side edge curveDistance midpoint The curve constitutedIt is determined as right side face mask curve after thin face, by the right side side of face Delta RegionWith it is thin Right side face mask curve after faceIt constitutes the new right side face area of formation after thin face;By face trigonum The left side side in domainUpper each point is to face left side edge curveThe curve that is constituted of midpoint of distance be determined as thin face Left side of the face contouring curve afterwards, by the left side side of face Delta RegionIt is constituted with left side of the face contouring curve after thin face thin By the new left side face area of formation after face;
The skinny right side human face region as needed of face area pixel filling module 52 after S42, thin faceAnd it is thin By the new right side face area of formation after face, the supplementary set of the intersection in the two regions is calculated, by It can be seen that in Fig. 3 CIt is by face right side edge curveWith right side face mask curve after thin faceIt is constituted Peripheral region;By the new right side face area of formation after thin faceIn each pixel new color value (gray value) by Its original color value (gray value) and peripheral regionThe color value (gray value) of interior corresponding pixel points, which is calculated, goes forward side by side Row refills;Likewise, skinny left side human face region as neededAnd by the new left side of the face of formation after thin face Portion region, it is by face left side edge curve that the supplementary set that the intersection in the two regions is calculated, which is left side peripheral region,It is constituted with left side of the face contouring curve after thin face;By each pixel in the new left side face area of formation after thin face New color value is calculated and is carried out by the color value of its original color value and the corresponding pixel points in the peripheral region of left side It refills;
S43, as described in Fig. 3 D, 53 pairs of right sides of new background area pixels filling module peripheral region after thin faceOutward Expand an equidistant adjacent area, utilize adjacent areaIn the color value of each pixel combine common filling algorithm (such as mirror image filling or duplication filling) is to right side peripheral regionCarry out background pixel filling;Likewise, to left side peripheral region Domain also carries out the filling of background pixel, thus the human face region after obtaining as shown in FIGURE 3 E skinny.
It is specific each for after thin face by the new right side face area of formation in the S42 in the present embodiment Following methods realization can be used in the calculation method of the new color value of pixel: the right side side for being located at face Delta Region On wherein certain point O, pass through O point formed with right side sidePerpendicular vertical line and respectively with face right side edge curveAnd right side face mask curve after thin faceIntersect at point T and point T ', it is assumed that lineThe picture at upper any point Plain color value (gray value) is, lineAbove the pixel color value of corresponding equidistant point is, then line Above the new color value (gray value) of the pixel is, whereinIt is a constant, and
The image optimization method with automatic thin face function of the present invention also includes before the S1: S0, Image pre-processing module 1 carries out preparatory data processing to original image, and is transmitted to the progress face of face detection module 2 and knows automatically Not, carrying out pretreatment to image is to improve the efficiency and success rate of face-slimming method to provide better resource to subsequent step.
In the S0, comprising the following steps:
S01, image denoising module 11 carry out smoothing denoising processing to image using smooth algorithm;
S02, image enhancement module 12 are adjusted the color of image, contrast, brightness and histogram after smoothing denoising Processing enhances image definition;
Image after 13 pairs of module S03, image gray processing and normalization enhancing clarity carries out at gray processing and normalization Reason.
The image optimization method with automatic thin face function of the present invention also includes after the S4: S5, Post processing of image module 6 is smoothed the skinny region in face two sides of filler pixels again and new background area.
The image optimization system and method with automatic thin face function provided by the present invention, are able to achieve the automatic inspection of face It surveys, face needs the automatic detection in skinny region, and adds curve matching by edge detection, thin face region is accurately positioned, Pixel filling simultaneously in thin face rear region is naturally reasonable, meets with region continuous pixels criterion, algorithm complexity is lower, thin Face is high-efficient.
It is discussed in detail although the contents of the present invention have passed through above preferred embodiment, but it should be appreciated that above-mentioned Description is not considered as limitation of the present invention.After those skilled in the art have read above content, for of the invention A variety of modifications and substitutions all will be apparent.Therefore, protection scope of the present invention should be limited to the appended claims.

Claims (12)

1. a kind of image optimization system with automatic thin face function, characterized by comprising:
Face detection module (2) determines the face rectangular area in image comprising face using Face recognition technology, mentions The data in face rectangular area are taken, determine eyes regional location;
Module (3) are established in face Delta Region, are connected with the face detection module (2), in face rectangular area On the basis of, face Delta Region is determined according to eyes regional location;
Face boundary curve establishes module (4), establishes module (3) with the face Delta Region and is connected, in face three On the basis of angular zone, face circumference is determined, obtains face both sides of the edge curve;
Thin face area pixel fills module (5), establishes module (4) with the face boundary curve and is connected, according to face The side of left and right two of both sides of the edge curve and face Delta Region, determines that face two sides need skinny region, and to this Pixel is refilled in region;
Module (3) are established in the face Delta Region:
Module (31) are established on Delta Region bottom edge, are connected with the face detection module (2), and face rectangle region is based on The center of left and right two-eye area is calculated in domain, and the line of the center of the left and right two-eye area prolongs The intersection point that long line and two sides of face rectangular area are intersected respectively is two vertex of face Delta Region, and the two are handed over The line of point is the bottom edge of face Delta Region;
Module (32) are established in Delta Region side, establish module (31) with the Delta Region bottom edge and are connected, based on a left side The midpoint between two is calculated in the center of right two-eye area, forms face by the midpoint between this two The vertical line on Delta Region bottom edge, the intersection point intersected with the bottom edge of face rectangular area are that the third of face Delta Region is pushed up Point thereby determines that the side of left and right two of face Delta Region and face Delta Region.
2. the image optimization system with automatic thin face function as described in claim 1, which is characterized in that the face Boundary curve establishes module (4):
Face edge detection module (41) is established module (32) with the Delta Region vertex and is connected, examined using edge Method of determining and calculating carries out edge detection to image in the lower-left triangle of face rectangular area and right bottom triangle region, obtains face edge wheel Wide pixel;
Face boundary curve fitting module (42) is connected, according to face side with the face edge detection module (41) The coordinate information on three vertex of the coordinate information and face Delta Region of edge contour pixel, it is right using curve-fitting method Face edge contour carries out curve fitting, and obtains face left and right sides edge contour curve.
3. the image optimization system with automatic thin face function as claimed in claim 2, which is characterized in that the area Shou Lian Domain pixel filling module (5) includes:
Thin face rear profile curve establishes module (51), is connected with the face boundary curve fitting module (42), according to The side of left and right two of face both sides of the edge curve and face Delta Region determines and needs skinny two sides human face region;It will On the left and right side side of face Delta Region each point to face left and right side boundary curve distance the curve that is constituted of midpoint It is determined as thin face rear left and right side face contouring curve, left and right side side and thin face rear left and right side face by face Delta Region Contouring curve constitutes the new left and right side face area of formation after thin face;
Face area pixel filling module (52) after thin face establishes module (51) with the thin face rear profile curve and is connected It connects, will need the intersection of the new left and right side face area of formation after skinny left and right side human face region and thin face Supplementary set is by face left and right side boundary curve and thin face respectively as left and right side peripheral region, above-mentioned left and right side peripheral region Rear left and right side face contouring curve is constituted;After thin face by the new left and right side face area of formation each pixel it is new Color value be calculated and carried out by the color value of its original color value and the corresponding pixel points in left and right side peripheral region It refills;
Face area pixel filling module (52) behind new background area pixels filling module (53), with the thin face after thin face It is connected, equidistant adjacent area is expanded to right side peripheral region and left side peripheral region outward respectively, utilizes each phase In neighbouring region each pixel color value combination mirror image filling or duplication filling respectively to right side peripheral region and left side around Region carries out background pixel filling.
4. the image optimization system with automatic thin face function as described in claim 3, which is characterized in that also include image Preprocessing module (1) is connected with the face detection module (2), will after carrying out preparatory data processing to original image It is transmitted to face detection module (2) and carries out Face recognition.
5. the image optimization system with automatic thin face function as claimed in claim 4, which is characterized in that the image Preprocessing module (1) includes:
Image denoising module (11) carries out smoothing denoising processing to image using smooth algorithm;
Image enhancement module (12) is connected with the image denoising module (11), to the color of image after smoothing denoising, Contrast, brightness and histogram are adjusted processing, enhance image definition;
Image gray processing and normalization module (13), respectively with the image enhancement module (12) and face detection module (2) it is connected, gray processing processing and normalized is carried out to the image after enhancing clarity.
6. the image optimization system with automatic thin face function as claimed in claim 3, which is characterized in that also include image Post-processing module (6) is connected, to the face two of filler pixels again with thin face area pixel filling module (5) The skinny region in side and new background area are smoothed.
7. a kind of image optimization method with automatic thin face function, which is characterized in that comprise the steps of:
S1, face detection module (2) determine the face rectangular area in image comprising face using Face recognition technology, mention The data in face rectangular area are taken, determine eyes regional location;
S2, face Delta Region establish module (3) on the basis of face rectangular area, determine face according to eyes regional location Delta Region;
S3, face boundary curve establish module (4) on the basis of face Delta Region, are determined to face circumference, Obtain face both sides of the edge curve;
S4, thin face area pixel filling module (5) are according to face both sides of the edge curve and the left and right two of face Delta Region Side determines that face two sides need skinny region, and refills to pixel in the region;
In the S2, comprising the following steps:
S21, Delta Region bottom edge establish module (31) and are based on face rectangular area, are calculated in the two-eye area of left and right Heart position, the extended line of the line of the center of the left and right two-eye area and two sides of face rectangular area are distinguished The intersection point of intersection is two vertex of face Delta Region, and the line of the two intersection points is the bottom edge of face Delta Region;
S22, Delta Region side establish the center of module (32) based on left and right two-eye area, be calculated two it Between midpoint, the vertical line on face Delta Region bottom edge, the bottom with face rectangular area are formed by midpoint between this two The intersection point of side intersection is the third vertex of face Delta Region, thereby determines that face Delta Region and face Delta Region Two sides in left and right.
8. the image optimization method with automatic thin face function as described in claim 7, which is characterized in that the S3 In, comprising the following steps: S31, face edge detection module (41) are using edge detection algorithm to face rectangular area Image carries out edge detection in lower-left triangle and right bottom triangle region, obtains face edge contour pixel;
The coordinate information and face trigonum of S32, face boundary curve fitting module (42) according to face edge contour pixel The coordinate information on three vertex in domain carries out curve fitting to face edge contour using curve-fitting method, and it is left to obtain face Right both sides of the edge contour curve.
9. the image optimization method with automatic thin face function as described in claim 8, which is characterized in that the S4 In, comprising the following steps:
S41, thin face rear profile curve establish module (51) according to face both sides of the edge curve and the left and right of face Delta Region Two sides determine and need skinny two sides human face region;By each point on the left and right side side of face Delta Region to face The curve that the midpoint of the distance of left and right side boundary curve is constituted is determined as thin face rear left and right side face contouring curve, by face The left and right side side of Delta Region and thin face rear left and right side face contouring curve constitute the new left and right of formation after thin face Side face area;
After face area pixel filling module (52) will need skinny left and right side human face region and thin face after S42, thin face Using the supplementary set of the intersection of the new left and right side face area of formation as left and right side peripheral region, above-mentioned left and right side is all Enclosing region is made of face left and right side boundary curve and thin face rear left and right side face contouring curve;It will be formed after thin face New left and right side face area in each pixel new color value by its original color value and left and right side peripheral region The color value of interior corresponding pixel points is calculated and is refilled;
New background area pixels filling module (53) is outside to right side peripheral region and left side peripheral region difference after S43, thin face Equidistant adjacent area is expanded in side, fills or replicates using the color value combination mirror image of each pixel in each adjacent area Filling carries out background pixel filling to right side peripheral region and left side peripheral region respectively.
10. the image optimization method with automatic thin face function as described in claim 9, which is characterized in that described Before S1, also include: S0, image pre-processing module (1) carry out preparatory data processing to original image, and are transmitted to face inspection It surveys module (2) and carries out Face recognition.
11. the image optimization method with automatic thin face function as described in claim 10, which is characterized in that described In S0, comprising the following steps:
S01, image denoising module (11) carry out smoothing denoising processing to image using smooth algorithm;
S02, image enhancement module (12) are adjusted place to the color of image, contrast, brightness and histogram after smoothing denoising Reason enhances image definition;
S03, image gray processing and normalization module (13) carry out gray processing and normalized to the image after enhancing clarity.
12. the image optimization method with automatic thin face function as described in claim 9, which is characterized in that described After S4, also include: S5, post processing of image module (6) are to the skinny region in face two sides of filler pixels again and new background Region is smoothed.
CN201510294637.0A 2015-06-02 2015-06-02 Image optimization system and method with automatic thin face function Active CN104850847B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510294637.0A CN104850847B (en) 2015-06-02 2015-06-02 Image optimization system and method with automatic thin face function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510294637.0A CN104850847B (en) 2015-06-02 2015-06-02 Image optimization system and method with automatic thin face function

Publications (2)

Publication Number Publication Date
CN104850847A CN104850847A (en) 2015-08-19
CN104850847B true CN104850847B (en) 2019-11-29

Family

ID=53850482

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510294637.0A Active CN104850847B (en) 2015-06-02 2015-06-02 Image optimization system and method with automatic thin face function

Country Status (1)

Country Link
CN (1) CN104850847B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109509140A (en) * 2017-09-15 2019-03-22 阿里巴巴集团控股有限公司 Display methods and device
US11410268B2 (en) 2018-05-31 2022-08-09 Beijing Sensetime Technology Development Co., Ltd Image processing methods and apparatuses, electronic devices, and storage media
CN110555794B (en) * 2018-05-31 2021-07-23 北京市商汤科技开发有限公司 Image processing method and device, electronic equipment and storage medium
CN110555806B (en) * 2018-05-31 2022-09-27 北京市商汤科技开发有限公司 Image processing method and device, electronic device and storage medium
CN110188711A (en) * 2019-06-03 2019-08-30 北京字节跳动网络技术有限公司 Method and apparatus for output information
CN110290395B (en) * 2019-06-14 2021-05-25 北京奇艺世纪科技有限公司 Image processing method and device and computer readable storage medium
CN110399836A (en) * 2019-07-25 2019-11-01 深圳智慧林网络科技有限公司 User emotion recognition methods, device and computer readable storage medium
CN110602390B (en) * 2019-08-30 2021-02-02 维沃移动通信有限公司 Image processing method and electronic equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102999929A (en) * 2012-11-08 2013-03-27 大连理工大学 Triangular gridding based human image face-lift processing method
CN103208133A (en) * 2013-04-02 2013-07-17 浙江大学 Method for adjusting face plumpness in image
CN103218835A (en) * 2012-01-19 2013-07-24 北京千橡网景科技发展有限公司 Method and device for transforming shape / face image
CN103413268A (en) * 2013-08-06 2013-11-27 厦门美图移动科技有限公司 Photographing method capable of automatically optimizing facial form
CN104159032A (en) * 2014-08-20 2014-11-19 广东欧珀移动通信有限公司 Method and device of adjusting facial beautification effect in camera photographing in real time
CN104299250A (en) * 2014-10-15 2015-01-21 南京航空航天大学 Front face image synthesis method and system based on prior model
CN104537630A (en) * 2015-01-22 2015-04-22 厦门美图之家科技有限公司 Method and device for image beautifying based on age estimation
CN103605975B (en) * 2013-11-28 2018-10-19 小米科技有限责任公司 A kind of method, apparatus and terminal device of image procossing

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103218835A (en) * 2012-01-19 2013-07-24 北京千橡网景科技发展有限公司 Method and device for transforming shape / face image
CN102999929A (en) * 2012-11-08 2013-03-27 大连理工大学 Triangular gridding based human image face-lift processing method
CN103208133A (en) * 2013-04-02 2013-07-17 浙江大学 Method for adjusting face plumpness in image
CN103413268A (en) * 2013-08-06 2013-11-27 厦门美图移动科技有限公司 Photographing method capable of automatically optimizing facial form
CN103605975B (en) * 2013-11-28 2018-10-19 小米科技有限责任公司 A kind of method, apparatus and terminal device of image procossing
CN104159032A (en) * 2014-08-20 2014-11-19 广东欧珀移动通信有限公司 Method and device of adjusting facial beautification effect in camera photographing in real time
CN104299250A (en) * 2014-10-15 2015-01-21 南京航空航天大学 Front face image synthesis method and system based on prior model
CN104537630A (en) * 2015-01-22 2015-04-22 厦门美图之家科技有限公司 Method and device for image beautifying based on age estimation

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Image Deformation Using Moving Least Squares;Scott Schaefer 等;《ACM transactions on graphics》;20060731;第25卷(第3期);533-540 *
个性化人脸图像模拟研究;胡伟平 等;《西南大学学报(自然科学版)》;20140228;第36卷(第2期);178-185 *
基于特征网格的面部图象变形算法;张静波 等;《中国图象图形学报》;20020331;第7卷(第3期);256-260 *

Also Published As

Publication number Publication date
CN104850847A (en) 2015-08-19

Similar Documents

Publication Publication Date Title
CN104850847B (en) Image optimization system and method with automatic thin face function
US10818026B2 (en) Systems and methods for hybrid depth regularization
US11010967B2 (en) Three dimensional content generating apparatus and three dimensional content generating method thereof
CN103236082B (en) Towards the accurate three-dimensional rebuilding method of two-dimensional video of catching static scene
CN109462747B (en) DIBR system cavity filling method based on generation countermeasure network
CN106408513B (en) Depth map super resolution ratio reconstruction method
CN104616286B (en) Quick semi-automatic multi views depth restorative procedure
CN103996174B (en) Method for performing hole repair on Kinect depth images
CN110197462A (en) A kind of facial image beautifies in real time and texture synthesis method
CN107622480B (en) Kinect depth image enhancement method
CN101799939A (en) Rapid and self-adaptive generation algorithm of intermediate viewpoint based on left and right viewpoint images
US9578312B2 (en) Method of integrating binocular stereo video scenes with maintaining time consistency
CN111047709B (en) Binocular vision naked eye 3D image generation method
CN104376535A (en) Rapid image repairing method based on sample
Hervieu et al. Stereoscopic image inpainting: distinct depth maps and images inpainting
CN108629809B (en) Accurate and efficient stereo matching method
CN104156957A (en) Stable and high-efficiency high-resolution stereo matching method
CN110544300B (en) Method for automatically generating three-dimensional model based on two-dimensional hand-drawn image characteristics
CN106060509B (en) Introduce the free view-point image combining method of color correction
CN103826032A (en) Depth map post-processing method
CN103955945A (en) Self-adaption color image segmentation method based on binocular parallax and movable outline
CN111899295A (en) Monocular scene depth prediction method based on deep learning
CN113538569A (en) Weak texture object pose estimation method and system
CN110287894A (en) A kind of gesture identification method and system for ultra-wide angle video
CN113392879A (en) Multi-view matching method for aerial image

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20201118

Address after: Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Hangzhou Jiji Intellectual Property Operation Co., Ltd

Address before: 201620 Shanghai city Songjiang District Sixian Road No. 3666

Patentee before: Phicomm (Shanghai) Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20211201

Address after: 313000 room 1019, Xintiandi commercial office, Yishan street, Wuxing District, Huzhou, Zhejiang, China

Patentee after: Huzhou YingLie Intellectual Property Operation Co.,Ltd.

Address before: Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: Hangzhou Jiji Intellectual Property Operation Co., Ltd