CN109242785A - A method of lip gloss on the accurate portrait based on neural network and dithering - Google Patents

A method of lip gloss on the accurate portrait based on neural network and dithering Download PDF

Info

Publication number
CN109242785A
CN109242785A CN201810909139.6A CN201810909139A CN109242785A CN 109242785 A CN109242785 A CN 109242785A CN 201810909139 A CN201810909139 A CN 201810909139A CN 109242785 A CN109242785 A CN 109242785A
Authority
CN
China
Prior art keywords
lip
neural network
pixel
dithering
gloss
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.)
Withdrawn
Application number
CN201810909139.6A
Other languages
Chinese (zh)
Inventor
袁亚荣
容李庆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Two Yuan Technology Co Ltd
Original Assignee
Guangzhou Two Yuan Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Two Yuan Technology Co Ltd filed Critical Guangzhou Two Yuan Technology Co Ltd
Priority to CN201810909139.6A priority Critical patent/CN109242785A/en
Publication of CN109242785A publication Critical patent/CN109242785A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/77Retouching; Inpainting; Scratch removal
    • AHUMAN NECESSITIES
    • A45HAND OR TRAVELLING ARTICLES
    • A45DHAIRDRESSING OR SHAVING EQUIPMENT; EQUIPMENT FOR COSMETICS OR COSMETIC TREATMENTS, e.g. FOR MANICURING OR PEDICURING
    • A45D44/00Other cosmetic or toiletry articles, e.g. for hairdressers' rooms
    • A45D44/005Other cosmetic or toiletry articles, e.g. for hairdressers' rooms for selecting or displaying personal cosmetic colours or hairstyle
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The present invention provides a kind of to promote the precise degrees that lip gloss is handled based on the method for lip gloss on the accurate portrait of neural network and dithering, the case where capable of effectively judging lip position and whether having foreign matter or be blocked, the precision of lip gloss identification is improved, so that the virtual makeup processing of lip can be more life-like and natural.The present invention can be inferred that the approximate location of lip in face using neural network model, and then the pixel coverage for belonging to lip is further determined that using the scheme of dithering, can be with the accurate position coordinates of lip pixel in highly effective determining picture.When carrying out makeup to lip gloss can the pixel effectively to only lip handled rather than monolith lip position is handled.

Description

A method of lip gloss on the accurate portrait based on neural network and dithering
Technical field
The present invention relates to the processing of portrait image lip gloss, specifically a kind of accurate portrait based on neural network and dithering The method of upper lip gloss.
Background technique
In the overall technology of digital picture makeup, the processing about lip gloss part is particularly important.One carrys out face lip Portion's form is similar and different, and two carry out lip, and there are ever-changing cheilogrammas, reaches during cosmetic treatment More true effect needs the more accurate lip gloss part identified and judgeed in face.
Chinese Patent Application No. 201210100239.7 proposes a kind of based on different lip morphological feature progress lip glosses The method of makeup.The classification method classified in the method according to the morphological feature of lip to lip and by according to the classification The classification map of the lip for the coordinate composition that method generates and the form for using the plane of delineation of lip and the analysis lip of solid, root So that lip is reached suitable form balance according to plane and three-dimensional analysis result, and proposes the correction information of lip form.
The above method needs to carry out lip the calculation processing of complicated classification processing and balance, and in light complexity In the case where be difficult to preferable expression effect.
Summary of the invention
In order to solve more life-like lip gloss treatment effect in portrait, the invention proposes one kind based on neural network and On the accurate portrait of dithering the method for lip gloss come promoted lip gloss processing precise degrees, can effectively judge lip position The case where whether having foreign matter or being blocked, improves the precision of lip gloss identification, so that the virtual makeup of lip is handled It can be more life-like and natural.
A method of lip gloss on the accurate portrait based on neural network and dithering, comprising the following steps:
1), determine the point of the key position of lip as characteristic point respectively;
2) picture of portrait, is collected, and according to the lip characteristic point defined in step 1) in the picture being collected into Portrait lip be marked, the sample as neural network;
3) neural network, is constructed, lip feature point value is returned using the homing method in neural network Method training, obtains the neural network model of a regression forecasting;
4), the digital picture inputted, obtains the prediction of lip position by step 3), obtains the key point about lip;
5), the range of key point is expanded, prevents neural network from predicting lip position not accurate enough, and then be lost one Partial lip pixel;
6) pixel in key point after, expanding range in step 5 switchs to YCrCb color space from RGB color;
7) two values space R, is definedcbAnd Rcr, the numberical range in the channel Cb and the channel Cr that respectively represent;
8), selecting step 6) in color space the value in the channel Cb and the channel Cr in Cb ∈ Rcb、Cr∈RcrPixel, symbol The pixel for closing above-mentioned condition is the pixel set of lip, records the coordinate value of its pixel;
9) pixel color space, is converted into RGB color from YCrCb;
10) primary colors processing, is carried out using the method that lip gloss is handled to the pixel set got in step 8), reaches and behaves excellently The effect of transformation;
11), output treated result images.
The present invention can be inferred that the approximate location of lip in face using neural network model, and then utilize dithering Scheme further determine that the pixel coverage for belonging to lip, can be with the exact position of lip pixel in highly effective determining picture Coordinate.To lip gloss carry out makeup when can the pixel effectively to only lip handled rather than monolith lip Position is handled.
Detailed description of the invention
Attached drawing is used to provide further understanding of the present invention, and constitutes part of specification, with reality of the invention It applies example to be used to explain the present invention together, not be construed as limiting the invention.In the accompanying drawings:
Fig. 1 is flow diagram of the embodiment of the present invention;
Fig. 2 is the point schematic diagram of the key position of lip of the embodiment of the present invention;
Fig. 3 is that the range of the key point of lip of the embodiment of the present invention expands schematic diagram.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
In the virtual makeup of image lip gloss, the processing of monolith is often carried out just for the position of lip, is generally occurred within The problem of be lip position that excessive dependence neural network is inferred, and non-lip gloss position is also handled.Such as work as lip There are certain will to have carried out the shelter same lip gloss processing when blocking, cause effect very awkward.Pass through The solution of the present invention can effectively avoid the occurrence of this.
As shown in Figure 1, a kind of accurate portrait lip gloss processing method based on neural network and dithering, essential core step It is rapid as follows:
1, determine respectively the key position of lip point (position in such as labial angle position, people, upper lip camber line arc top position and/ Or lower lip camber line arc top position), totally 21, wherein the characteristic point of upper lip is 10, and the characteristic point of lower lip is 11, such as Fig. 2 institute Show.
2, the picture of portrait is collected, and according to 21 characteristic points of the lip defined in step 1 to the picture being collected into In portrait lip (horizontal axis coordinate and ordinate of orthogonal axes position), the sample as neural network is marked.
3, a neural network is constructed, using the homing method in neural network to the total 21x2=42 number of 21 points of lip Value carries out homing method training, obtains the neural network model of 21 points of a regression forecasting.
Due to the diversity of the movement posture of the diversity and lip of human face posture, the neural network mould that is obtained in step 3 Type tends not to access very accurately portrait lip prediction result, especially in some extreme situations, as illumination is strong Either in dim image or digital picture.
4, the prediction for the lip position that the digital picture inputted is obtained by step 3, available 21 about lip Key point.
5, the range of 21 key points is expanded into (as shown in Fig. 3).It is widened the reason is that neural network pair in order to prevent Lip position prediction is not accurate enough, and then is lost the lip pixel of a part.
6, the pixel in 21 points (upperlip) in step 5 is switched into YCrCb color space from RGB color, turned The formula changed is as follows:
Y=0.257*R+0.564*G+0.098*B+16
Cb=-0.148*R-0.291*G+0.439*B+128
Cr=0.439*R-0.368*G-0.071*B+128
7, two values space, R are definedcbAnd Rcr, what is respectively represented is the numberical range in the channel Cb and the channel Cr.
8, in selecting step 6 in color space the value in the channel Cb and the channel Cr in Cb ∈ RcbCr∈RcrPixel, meet The pixel for stating condition is the pixel set of lip, records the coordinate value of its pixel.
9, pixel color space is converted into RGB color, the formula of conversion from YCrCb are as follows:
R=1.164* (Y-16)+1.596* (Cr-128)
G=1.164* (Y-16) -0.392* (Cb-128) -0.813* (Cr-128)
B=1.164* (Y-16)+2.017* (Cb-128)
10, the method that lip gloss processing is utilized to the pixel set got in step 8, as the methods of color mixing carries out original Color processing, achievees the effect that color conversion out.
11, output treated result images.
Method in the present invention is only the value range for judging pixel, and calculation amount is relatively low, can satisfy various performances Real-time requirement of the lower processor in the processing to lip gloss all has extensively in hand-held terminal device and embedded device Application value.
It although an embodiment of the present invention has been shown and described, for the ordinary skill in the art, can be with A variety of variations, modification, replacement can be carried out to these embodiments without departing from the principles and spirit of the present invention by understanding And modification, the scope of the present invention is defined by the appended.

Claims (4)

1. a kind of method of lip gloss on accurate portrait based on neural network and dithering, it is characterised in that including following step It is rapid:
1), determine the point of the key position of lip as characteristic point respectively;
2) picture of portrait, is collected, and according to the lip characteristic point defined in step 1) to the people in the picture being collected into As lip is marked, the sample as neural network;
3) neural network, is constructed, homing method is carried out to lip feature point value using the homing method in neural network Training, obtains the neural network model of a regression forecasting;
4), the digital picture inputted, obtains the prediction of lip position by step 3), obtains the key point about lip;
5), the range of key point is expanded, prevents neural network from predicting lip position not accurate enough, and then be lost a part Lip pixel;
6) pixel in key point after, expanding range in step 5 switchs to YCrCb color space from RGB color;
7) two values space R, is definedcbAnd Rcr, the numberical range in the channel Cb and the channel Cr that respectively represent;
8), selecting step 6) in color space the value in the channel Cb and the channel Cr in Cb ∈ Rcb、Cr∈RcrPixel, meet above-mentioned The pixel of condition is the pixel set of lip, records the coordinate value of its pixel;
9) pixel color space, is converted into RGB color from YCrCb;
10) primary colors processing, is carried out using the method that lip gloss is handled to the pixel set got in step 8), reaches color conversion out Effect;
11), output treated result images.
2. the method for lip gloss, special on a kind of accurate portrait based on neural network and dithering as described in claim 1 Sign is:
In the step 1), the key position of lip include labial angle position, position in people, upper lip camber line arc top position and/or under Lip camber line arc top position.
3. the method for lip gloss, special on a kind of accurate portrait based on neural network and dithering as described in claim 1 Sign is in the step 6) that conversion formula is as follows:
Y=0.257*R+0.564*G+0.098*B+16
Cb=-0.148*R-0.291*G+0.439*B+128
Cr=0.439*R-0.368*G-0.071*B+128.
4. the method for lip gloss, special on a kind of accurate portrait based on neural network and dithering as described in claim 1 Sign is in the step 8) that conversion formula is as follows:
R=1.164* (Y-16)+1.596* (Cr-128)
G=1.164* (Y-16) -0.392* (Cb-128) -0.813* (Cr-128)
B=1.164* (Y-16)+2.017* (Cb-128).
CN201810909139.6A 2018-08-10 2018-08-10 A method of lip gloss on the accurate portrait based on neural network and dithering Withdrawn CN109242785A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810909139.6A CN109242785A (en) 2018-08-10 2018-08-10 A method of lip gloss on the accurate portrait based on neural network and dithering

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810909139.6A CN109242785A (en) 2018-08-10 2018-08-10 A method of lip gloss on the accurate portrait based on neural network and dithering

Publications (1)

Publication Number Publication Date
CN109242785A true CN109242785A (en) 2019-01-18

Family

ID=65070931

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810909139.6A Withdrawn CN109242785A (en) 2018-08-10 2018-08-10 A method of lip gloss on the accurate portrait based on neural network and dithering

Country Status (1)

Country Link
CN (1) CN109242785A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190065831A1 (en) * 2017-08-24 2019-02-28 Cal-Comp Big Data, Inc. Body information analysis apparatus and lip-makeup analysis method thereof
CN110827195A (en) * 2019-10-31 2020-02-21 北京达佳互联信息技术有限公司 Virtual article adding method and device, electronic equipment and storage medium
TWI752473B (en) * 2019-11-22 2022-01-11 大陸商北京市商湯科技開發有限公司 Image processing method and apparatus, electronic device and computer-readable storage medium
US11403788B2 (en) 2019-11-22 2022-08-02 Beijing Sensetime Technology Development Co., Ltd. Image processing method and apparatus, electronic device, and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190065831A1 (en) * 2017-08-24 2019-02-28 Cal-Comp Big Data, Inc. Body information analysis apparatus and lip-makeup analysis method thereof
US10515260B2 (en) * 2017-08-24 2019-12-24 Cal-Comp Big Data, Inc. Body information analysis apparatus and lip-makeup analysis method thereof
CN110827195A (en) * 2019-10-31 2020-02-21 北京达佳互联信息技术有限公司 Virtual article adding method and device, electronic equipment and storage medium
CN110827195B (en) * 2019-10-31 2023-09-22 北京达佳互联信息技术有限公司 Virtual article adding method and device, electronic equipment and storage medium
TWI752473B (en) * 2019-11-22 2022-01-11 大陸商北京市商湯科技開發有限公司 Image processing method and apparatus, electronic device and computer-readable storage medium
US11403788B2 (en) 2019-11-22 2022-08-02 Beijing Sensetime Technology Development Co., Ltd. Image processing method and apparatus, electronic device, and storage medium

Similar Documents

Publication Publication Date Title
CN109242785A (en) A method of lip gloss on the accurate portrait based on neural network and dithering
CN104282002B (en) A kind of quick beauty method of digital picture
CN110084161B (en) Method and system for rapidly detecting key points of human skeleton
CN109559310B (en) Power transmission and transformation inspection image quality evaluation method and system based on significance detection
WO2022179215A1 (en) Image processing method and apparatus, electronic device, and storage medium
CN107204034B (en) A kind of image processing method and terminal
CN107993216A (en) A kind of image interfusion method and its equipment, storage medium, terminal
CN113344836B (en) Face image processing method and device, computer readable storage medium and terminal
CN106504264A (en) Video foreground image extraction method and device
CN106530265A (en) Adaptive image fusion method based on chromaticity coordinates
CN109657612A (en) A kind of quality-ordered system and its application method based on facial image feature
CN108024105A (en) Image color adjusting method, device, electronic equipment and storage medium
CN106340025A (en) Background replacement visual communication method based on chromatic adaptation transformation
CN112308944A (en) Augmented reality display method of simulated lip makeup
CN110533732A (en) The recognition methods of the colour of skin, device, electronic equipment and storage medium in image
CN109919030A (en) Black eye kind identification method, device, computer equipment and storage medium
CN105069745A (en) face-changing system based on common image sensor and enhanced augmented reality technology and method
CN109064431B (en) Picture brightness adjusting method, equipment and storage medium thereof
CN107154046A (en) A kind of method of video background processing and secret protection
KR20210032489A (en) Simulation method of rendering of makeup products on the body area
KR0134701B1 (en) Image generating method and device
CN113052783A (en) Face image fusion method based on face key points
CN114155569B (en) Cosmetic progress detection method, device, equipment and storage medium
JP2006031688A (en) Image processing device, method, and program
CN106360941A (en) Method for locating fingernails and manicure equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20190118

WW01 Invention patent application withdrawn after publication