CN108305146A - A kind of hair style recommendation method and system based on image recognition - Google Patents

A kind of hair style recommendation method and system based on image recognition Download PDF

Info

Publication number
CN108305146A
CN108305146A CN201810091195.3A CN201810091195A CN108305146A CN 108305146 A CN108305146 A CN 108305146A CN 201810091195 A CN201810091195 A CN 201810091195A CN 108305146 A CN108305146 A CN 108305146A
Authority
CN
China
Prior art keywords
image
hair style
user
dimensional
head
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810091195.3A
Other languages
Chinese (zh)
Inventor
杨太立
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN201810091195.3A priority Critical patent/CN108305146A/en
Publication of CN108305146A publication Critical patent/CN108305146A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0631Item recommendations
    • 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
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0641Shopping interfaces
    • G06Q30/0643Graphical representation of items or shoppers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/73Deblurring; Sharpening
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • 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/165Detection; Localisation; Normalisation using facial parts and geometric relationships
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Economics (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Health & Medical Sciences (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Processing Or Creating Images (AREA)
  • Geometry (AREA)
  • Image Processing (AREA)
  • General Health & Medical Sciences (AREA)

Abstract

The invention belongs to field of computer technology, and in particular to a kind of hair style recommendation method and system based on image recognition include the following steps:S1 obtains the shooting image of user, carries out preliminary treatment to shooting image, obtains the head image of user and show head image;S2 carries out digitization analyzing processing to head image and obtains analysis result, and recommends a variety of hair styles to user according to analysis result;S3 obtains display type, hair style and the color development of user's selection, replaces the original hair style of head image and color development according to the hair style and color development and carry out two-dimentional display and Three-dimensional Display.The present invention is that user recommends suitable hair style, and is shown in user interface according to the hair style and color development of user's selection, the suitable hair style that can select oneself to like thereby using family according to the facial image that user shoots.

Description

A kind of hair style recommendation method and system based on image recognition
Technical field
The invention belongs to field of computer technology, and in particular to a kind of hair style based on image recognition recommends method and is System.
Background technology
If got a haircut in beauty parlor, when most, customer selects needs from cut-and-dried magazine and hair type Hair style.In this approach, considerable customer complains hair style after haircut.This is because understanding and the customer of designer It understands differently caused by cause.
According to the institute in Japanese patent application Laid-Open No.2001-344492 (hereinafter referred to as first prior art) The beauty salon of description selects system, if the information terminal input that the search criterion of such as hair style possesses from customer, is searched Device searches the beauty salon for meeting search criterion from the first database for storing store information, designer's information etc..Therefore, Which depict customers can select the beauty salon that required hair style can be satisfied.
But such technology has following problem:Client can only select beauty salon, but nothing according to desired hair style Method confirms whether oneself selected hair style meets oneself.
Invention content
For the defects in the prior art, the hair style based on image recognition that the present invention provides a kind of recommending method and is System, the facial image according to user's shooting are that user recommends suitable hair style, and according to the hair style of user's selection and color development with Family interface shown, the suitable hair style that can select oneself to like thereby using family.
In a first aspect, the present invention provides a kind of, the hair style based on image recognition recommends method, includes the following steps:
S1 obtains the shooting image of user, carries out preliminary treatment to shooting image, obtains the head image of user and display Head image;
S2 carries out digitization analyzing processing to head image and obtains analysis result, and recommended to user according to analysis result A variety of hair styles;
S3 obtains display type, hair style and the color development of user's selection, head image is replaced according to the hair style and color development Original hair style and color development simultaneously carry out two-dimentional display and Three-dimensional Display.
Preferably, the S1 is specially:
The shooting image for obtaining user carries out denoising to shooting image and obtains smoothed image, increased by enhancing operator The edge of strong smoothed image, carries out the smoothed image after enhancing edge the edge detection of face, hair and neck, to Obtain include face, hair and neck head image, and user interface show head image.
Preferably, the S2 is specially:
Recognition of face and analyzing processing are carried out to head image, head image progress recognition of face is obtained into facial image, Facial image is inputted into hair style recommended device, hair style recommended device carries out several hair styles in facial image and hair style template library Match, obtain matching angle value, top n hair style is ranked up according to the sequence of matching angle value from big to small, hair style is obtained and recommends row Table, and on a user interface, head image side show hair style recommendation list.
Preferably, the user interface includes for showing the head image sub-interface of head image, for showing N number of push away Recommend the hair style recommendation list sub-interface of the matching angle value of hair style and each hair style, for showing that the color development of several color development selects son Interface and display type sub-interface for showing display type.
Preferably, the S3 is specially:
The display type of user's selection is obtained, the display type includes two dimension display and Three-dimensional Display;
After display type determines, facial image is handled to obtain full two-dimensional faceform or Complete three-dimensional head mould Type;
Obtain the hair style and color development of user's selection;
Increase hair style, color development and facial image on full two-dimensional faceform or Complete three-dimensional head model, obtains two Dimension shows image or three dimensional rendered images;
Two-dimensional display image or three dimensional rendered images are shown on a user interface.
Preferably, described that facial image is handled to obtain full two-dimensional faceform or Complete three-dimensional head model tool Body is:
The label of face mask and face profile is carried out to facial image;
Each image characteristic point in original two-dimensional faceform is iterated along the normal direction of profile, each Continuous adjusting parameter in iteration so that entire model constantly adapts to target shape and keeps the Reasonable Shape of face, is most connect The full two-dimensional faceform of person of modern times's face image;
Model characteristic point corresponding with image characteristic point is marked in initial three-dimensional head model, and according to each figure As the depth information of characteristic point optimizes initial three-dimensional head model, the Complete three-dimensional head closest to user's head is obtained Model.
Preferably, the original two-dimensional faceform is obtained after carrying out alignment normalized to several image patterns 's;The initial three-dimensional head model is obtained by three-dimensional head sample training several different.
Preferably, the step further includes:
S4 obtains the fine tuning instruction of user, is carried out to two-dimensional display image or three dimensional rendered images according to fine tuning instruction micro- It adjusts, the two-dimensional display image after being optimized or three dimensional rendered images.
Preferably, the step further includes:
S5 obtains the preservation instruction of user, is instructed to the two-dimensional display image or three-dimensional display after optimization according to preserving As being preserved.
Second aspect, the present invention provides a kind of hair style commending system based on image recognition are suitable for first aspect institute The hair style based on image recognition stated recommends method, including:
Image processing unit, the shooting image for obtaining user carry out preliminary treatment to shooting image, obtain user's Head image simultaneously shows head image;
Hair style recommendation unit obtains analysis result for carrying out digitization analyzing processing to head image, and according to analysis As a result recommend a variety of hair styles to user;
Display unit is selected, display type, hair style and color development for obtaining user's selection, according to the hair style and color development It replaces the original hair style of head image and color development and carries out two-dimentional display and Three-dimensional Display.
Beneficial effects of the present invention are:The present invention is that user recommends suitable hair style according to the facial image that user shoots, And shown in user interface according to the hair style and color development of user's selection, it is suitble to thereby using what family can select oneself to like Hair style.
Description of the drawings
It, below will be to specific in order to illustrate more clearly of the specific embodiment of the invention or technical solution in the prior art Embodiment or attached drawing needed to be used in the description of the prior art are briefly described.In all the appended drawings, similar element Or part is generally identified by similar reference numeral.In attached drawing, each element or part might not be drawn according to actual ratio.
Fig. 1 is the flow chart that the hair style based on image recognition recommends method in the present embodiment;
Fig. 2 is the structure chart of the hair style commending system based on image recognition in the present embodiment.
Specific implementation mode
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 describes, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
It should be appreciated that ought use in this specification and in the appended claims, term " comprising " and "comprising" instruction Described feature, entirety, step, operation, the presence of element and/or component, but one or more of the other feature, whole is not precluded Body, step, operation, element, component and/or its presence or addition gathered.
It is also understood that the term used in this description of the invention is merely for the sake of the mesh for describing specific embodiment And be not intended to limit the present invention.As description of the invention and it is used in the attached claims, unless on Other situations are hereafter clearly indicated, otherwise " one " of singulative, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in description of the invention and the appended claims is Refer to any combinations and all possible combinations of one or more of associated item listed, and includes these combinations.
Embodiment one:
A kind of hair style recommendation method based on image recognition is present embodiments provided, as shown in Figure 1, the method for the present embodiment It is run on user terminal and remote server.User terminal can download this system APP, and the user terminal includes intelligent hand The intelligent terminals such as machine, tablet computer.
The method of the present embodiment includes the following steps:
S1 obtains the shooting image of user, carries out preliminary treatment to shooting image, obtains the head image of user and display Head image.
The S1 is specially:
The shooting image for obtaining user carries out denoising to shooting image and obtains smoothed image, increased by enhancing operator The edge of strong smoothed image, carries out the smoothed image after enhancing edge the edge detection of face, hair and neck, to Obtain include face, hair and neck head image, and user interface show head image.
After user enters this system APP, hair style design control key is clicked, last time figure is prompted in the user interface of user terminal Picture, user can select the image having had been taken to upload in photograph album, or be shot originally by the camera function of user terminal Image after user terminal obtains the shooting image of user, can also occur locally carrying out image procossing to remote service Device carries out image procossing.
Image procossing is carried out if remote server, then user terminal is sent to remote server by image is shot, remotely Server is smoothed shooting image.Image shoot and transmission process in, due to being influenced by various interference, or pass Defeated channel, sampling system are second-rate, and cause image crude, at this time, it is necessary to be smoothed to image.The present embodiment Image procossing use neighborhood averaging, the neighborhood averaging be it is a kind of carrying out smooth technology directly in spatial domain, should Technology is to be based on such a hypothesis:Image is made of the constant fritter of many gray scales, there is very high space between adjacent pixel Correlation, and noise is then relatively independent, based on as above it is assumed that being averaged all pixels in a pixel and its neighborhood Gray value is assigned to corresponding pixel in smoothed image, smooth to achieve the purpose that, also known as mean filter or local smoothing method method.
Because after having carried out denoising smooth processing to image, although being the reduction of picture noise, the marginal information of image Also it can lose, the edge of image can thicken.In order to reduce this unfavorable effect, usually figure is sharpened using enhancing operator Picture makes edge be apparent from, to facilitate subsequent edge detection.The enhancing operator is commonly used in adjustment brightness of image, right Than degree or grey level distribution, the pixel value of output image as a result is taken on a new look according to the transforming function transformation function applied.
Behind the edge for enhancing image, the edge of face, hair and neck is detected using edge detection method, to Obtain include face, hair and neck head image.There are many type of institute's edge detection method, such as method of differential operator, model With method, Wavelet Detection method, neural network etc..And it is shown in the user interface of user terminal.
The user interface includes multiple small interfaces, such as showing the head image sub-interface of head image, for showing The hair style recommendation list sub-interface of showing the matching angle value that five kinds are recommended hair styles and each hair style, the hair for showing several color development Color sorting selects sub-interface, the display type sub-interface etc. for showing display type.
S2 carries out digitization analyzing processing to head image and obtains analysis result, and recommended to user according to analysis result A variety of hair styles.
The S2 is specially:
Recognition of face and analyzing processing are carried out to head image, head image progress recognition of face is obtained into facial image, Facial image is inputted into hair style recommended device, hair style recommended device carries out several hair styles in facial image and hair style template library Match, obtain matching angle value, top n hair style is ranked up according to the sequence of matching angle value from big to small, hair style is obtained and recommends row Table, and on a user interface, head image side show hair style recommendation list.
The limb recognition that the remote server of the present embodiment carries out head image facial contour extracts facial image, then Facial image is inputted into hair style recommended device, hair style recommended device uses neural network algorithm, and hair style recommended device is by facial image and sends out Several hair styles in type template library are matched, and obtain matching angle value.If be stored in hair style module library several shapes of face and There are one dry hair style, each hair style and each hair style tools matches angle value, and hair style recommended device is identified point according to facial image Analysis, finds immediate shape of face therewith, the matching angle value with each hair style is obtained according to immediate shape of face, further according to matching degree Top n hair style is ranked up by the sequence of value from big to small, obtains hair style recommendation list, and hair style recommended device exports the hair style and pushes away List is recommended, the hair style recommendation list includes N number of hair style and corresponding N number of matching angle value.Remote server recommends hair style List is sent to user terminal, user terminal on a user interface, head image side show hair style recommendation list, for user into Row selection.
S3 obtains display type, hair style and the color development of user's selection, head image is replaced according to the hair style and color development Original hair style and color development simultaneously carry out two-dimentional display and Three-dimensional Display;
The S3 is specially:
The display type of user's selection is obtained, the display type includes two dimension display and Three-dimensional Display;
After display type determines, facial image is handled to obtain full two-dimensional faceform or Complete three-dimensional head mould Type;
Obtain the hair style and color development of user's selection;
Increase hair style, color development and facial image on full two-dimensional faceform or Complete three-dimensional head model, obtains two Dimension shows image or three dimensional rendered images;
Two-dimensional display image or three dimensional rendered images are shown on a user interface.
In the present embodiment, it is equipped with two dimension in the display type sub-interface of user interface and shows control key and Three-dimensional Display control Key.After user selects two dimension to show control key or Three-dimensional Display control key, user terminal is by two-dimentional idsplay order or 3-D display command It is sent to remote server.Original two-dimensional faceform and initial three-dimensional face model are prestored in remote server, it is described first Beginning two-dimension human face model obtains after carrying out alignment normalized to several image patterns;The initial three-dimensional head model It is to be obtained by three-dimensional head sample training several different.
The remote server of the present embodiment carries out facial image the label of face mask and face profile;
Each image characteristic point in original two-dimensional faceform is iterated along the normal direction of profile, each Continuous adjusting parameter in iteration so that entire model constantly adapts to target shape and keeps the Reasonable Shape of face, is most connect Person of modern times's face image full two-dimensional faceform (direct picture in the case of full two-dimensional faceform, that is, people's shaven head, Because of facial image the blocking due to hair identified from the shooting image that user uploads, it is most likely that be incomplete).
Model characteristic point corresponding with image characteristic point is marked in initial three-dimensional head model, and according to each figure As the depth information of characteristic point optimizes initial three-dimensional head model, the Complete three-dimensional head closest to user's head is obtained Model.
The two-dimension human face model or three-dimensional head model are sent to user terminal by the present embodiment remote server, and It is shown in user terminal.The matching angle value of each hair style shown on user's display interface is used to make reference to user, Since everyone hobby is different, perhaps the most suitable hair style recommended according to this system is not user preferences, described reality It applies and recommends a variety of hair styles by matching angle value in the hair style recommendation list of example, selected convenient for user.
If what user front selected is two-dimentional display, the present embodiment increases face figure on full two-dimensional faceform The hair style and color development that picture, user select, to obtain two-dimensional display image, and show two-dimensional display image on a user interface, The effect of this hair style of do-it-yourself is seen convenient for user.After user reselects hair style and color development, regenerate to obtain two-dimentional aobvious Diagram picture, and show on a user interface, the effect of this hair style of do-it-yourself is seen convenient for user.
If user's selection is Three-dimensional Display, the present embodiment increases facial image on Complete three-dimensional faceform, uses The hair style and color development of family selection, to obtain three dimensional rendered images, and show three dimensional rendered images, Yong Huke on a user interface To be clicked in user interface, the operations such as stroke can not only see to realize three dimensional rendered images from a different perspective Positive effect after to do-it-yourself this hair style can also be seen that lateral effect and back side effect.User sends out after reselecting hair style After color, regenerates to obtain three dimensional rendered images, and show on a user interface, see convenient for user after having changed another hair style Effect.
S4 obtains the fine tuning instruction of user, is carried out to two-dimensional display image or three dimensional rendered images according to fine tuning instruction micro- It adjusts, the two-dimensional display image after being optimized or three dimensional rendered images.
In the present embodiment, the fine tuning instruction of the user includes the instruction of the facial light and shade of adjustment, the instruction of removal spot, adjusts The instruction etc. of whole certain organs local detail, such as increase eyes, increase the bridge of the nose, thicken lip.Two-dimensional display image or three-dimensional After showing that image is finely tuned after fine tuning instructs, customer satisfaction system two-dimensional display image or three dimensional rendered images after being optimized.
S5 obtains the preservation instruction of user, is instructed to the two-dimensional display image or three-dimensional display after optimization according to preserving As being preserved.
In the present embodiment, after user has finely tuned, the preservation instruction of user interface can be clicked, to by two-dimensional display image or Three dimensional rendered images are stored in local user terminal, so that user's later stage uses, such as QQ head portraits, wechat head portrait.
In the present embodiment, the facial image according to user's shooting is that user recommends suitable hair style, and is selected according to user Hair style and color development carry out two-dimentional display or Three-dimensional Display in user interface, the effect of the different hair style of do-it-yourself is seen convenient for user Fruit.For Three-dimensional Display, the operations such as user can click in user interface, stroke, to realize from a different perspective Three dimensional rendered images not can be only seen the positive effect after do-it-yourself this hair style and can also be seen that lateral effect and back side effect Fruit, being capable of the suitable hair style liked of better choice oneself thereby using family.
Embodiment two:
Present embodiments provide a kind of hair style commending system based on image recognition, be suitable for embodiment one described in based on The hair style of image recognition recommends method, as shown in Fig. 2, including image processing unit, hair style recommendation unit, selection display unit, Fine-adjusting unit, storage unit etc..
Image processing unit, the shooting image for obtaining user carry out preliminary treatment to shooting image, obtain user's Head image simultaneously shows head image.
Hair style recommendation unit obtains analysis result for carrying out digitization analyzing processing to head image, and according to analysis As a result recommend a variety of hair styles to user.
Display unit is selected, display type, hair style and color development for obtaining user's selection, according to the hair style and color development It replaces the original hair style of head image and color development and carries out two-dimentional display and Three-dimensional Display.
Fine-adjusting unit, the fine tuning for obtaining user instructs, according to fine tuning instruction to two-dimensional display image or Three-dimensional Display Image is finely adjusted, the two-dimensional display image after being optimized or three dimensional rendered images.
Storage unit, for obtain user preservation instruct, according to preserve instruction to after optimization two-dimensional display image or Three dimensional rendered images are preserved.
As shown in Figure 1, the hair style recommends method to include the following steps:
S1 obtains the shooting image of user, carries out preliminary treatment to shooting image, obtains the head image of user and display Head image.
The S1 is specially:
The shooting image for obtaining user carries out denoising to shooting image and obtains smoothed image, increased by enhancing operator The edge of strong smoothed image, carries out the smoothed image after enhancing edge the edge detection of face, hair and neck, to Obtain include face, hair and neck head image, and user interface show head image.
After user enters this system APP, hair style design control key is clicked, last time figure is prompted in the user interface of user terminal Picture, user can select the image having had been taken to upload in photograph album, or be shot originally by the camera function of user terminal Image after user terminal obtains the shooting image of user, can also occur locally carrying out image procossing to remote service Device carries out image procossing.
Image procossing is carried out if remote server, then user terminal is sent to remote server by image is shot, remotely Server is smoothed shooting image.Image shoot and transmission process in, due to being influenced by various interference, or pass Defeated channel, sampling system are second-rate, and cause image crude, at this time, it is necessary to be smoothed to image.The present embodiment Image procossing use neighborhood averaging, the neighborhood averaging be it is a kind of carrying out smooth technology directly in spatial domain, should Technology is to be based on such a hypothesis:Image is made of the constant fritter of many gray scales, there is very high space between adjacent pixel Correlation, and noise is then relatively independent, based on as above it is assumed that being averaged all pixels in a pixel and its neighborhood Gray value is assigned to corresponding pixel in smoothed image, smooth to achieve the purpose that, also known as mean filter or local smoothing method method.
Because after having carried out denoising smooth processing to image, although being the reduction of picture noise, the marginal information of image Also it can lose, the edge of image can thicken.In order to reduce this unfavorable effect, usually figure is sharpened using enhancing operator Picture makes edge be apparent from, to facilitate subsequent edge detection.The enhancing operator is commonly used in adjustment brightness of image, right Than degree or grey level distribution, the pixel value of output image as a result is taken on a new look according to the transforming function transformation function applied.
Behind the edge for enhancing image, the edge of face, hair and neck is detected using edge detection method, to Obtain include face, hair and neck head image.There are many type of institute's edge detection method, such as method of differential operator, model With method, Wavelet Detection method, neural network etc..And it is shown in the user interface of user terminal.
The user interface includes multiple small interfaces, such as showing the head image sub-interface of head image, for showing The hair style recommendation list sub-interface of showing the matching angle value that five kinds are recommended hair styles and each hair style, the hair for showing several color development Color sorting selects sub-interface, the display type sub-interface etc. for showing display type.
S2 carries out digitization analyzing processing to head image and obtains analysis result, and recommended to user according to analysis result A variety of hair styles.
The S2 is specially:
Recognition of face and analyzing processing are carried out to head image, head image progress recognition of face is obtained into facial image, Facial image is inputted into hair style recommended device, hair style recommended device carries out several hair styles in facial image and hair style template library Match, obtain matching angle value, top n hair style is ranked up according to the sequence of matching angle value from big to small, hair style is obtained and recommends row Table, and on a user interface, head image side show hair style recommendation list.
The limb recognition that the remote server of the present embodiment carries out head image facial contour extracts facial image, then Facial image is inputted into hair style recommended device, hair style recommended device uses neural network algorithm, and hair style recommended device is by facial image and sends out Several hair styles in type template library are matched, and obtain matching angle value.If be stored in hair style module library several shapes of face and There are one dry hair style, each hair style and each hair style tools matches angle value, and hair style recommended device is identified point according to facial image Analysis, finds immediate shape of face therewith, the matching angle value with each hair style is obtained according to immediate shape of face, further according to matching degree Top n hair style is ranked up by the sequence of value from big to small, obtains hair style recommendation list, and hair style recommended device exports the hair style and pushes away List is recommended, the hair style recommendation list includes N number of hair style and corresponding N number of matching angle value.Remote server recommends hair style List is sent to user terminal, user terminal on a user interface, head image side show hair style recommendation list, for user into Row selection.
S3 obtains display type, hair style and the color development of user's selection, head image is replaced according to the hair style and color development Original hair style and color development simultaneously carry out two-dimentional display and Three-dimensional Display;
The S3 is specially:
The display type of user's selection is obtained, the display type includes two dimension display and Three-dimensional Display;
After display type determines, facial image is handled to obtain full two-dimensional faceform or Complete three-dimensional head mould Type;
Obtain the hair style and color development of user's selection;
Increase hair style, color development and facial image on full two-dimensional faceform or Complete three-dimensional head model, obtains two Dimension shows image or three dimensional rendered images;
Two-dimensional display image or three dimensional rendered images are shown on a user interface.
In the present embodiment, it is equipped with two dimension in the display type sub-interface of user interface and shows control key and Three-dimensional Display control Key.After user selects two dimension to show control key or Three-dimensional Display control key, user terminal is by two-dimentional idsplay order or 3-D display command It is sent to remote server.Original two-dimensional faceform and initial three-dimensional face model are prestored in remote server, it is described first Beginning two-dimension human face model obtains after carrying out alignment normalized to several image patterns;The initial three-dimensional head model It is to be obtained by three-dimensional head sample training several different.
The remote server of the present embodiment carries out facial image the label of face mask and face profile;
Each image characteristic point in original two-dimensional faceform is iterated along the normal direction of profile, each Continuous adjusting parameter in iteration so that entire model constantly adapts to target shape and keeps the Reasonable Shape of face, is most connect Person of modern times's face image full two-dimensional faceform (direct picture in the case of full two-dimensional faceform, that is, people's shaven head, Because of facial image the blocking due to hair identified from the shooting image that user uploads, it is most likely that be incomplete).
Model characteristic point corresponding with image characteristic point is marked in initial three-dimensional head model, and according to each figure As the depth information of characteristic point optimizes initial three-dimensional head model, the Complete three-dimensional head closest to user's head is obtained Model.
The two-dimension human face model or three-dimensional head model are sent to user terminal by the present embodiment remote server, and It is shown in user terminal.The matching angle value of each hair style shown on user's display interface is used to make reference to user, Since everyone hobby is different, perhaps the most suitable hair style recommended according to this system is not user preferences, described reality It applies and recommends a variety of hair styles by matching angle value in the hair style recommendation list of example, selected convenient for user.
If what user front selected is two-dimentional display, the present embodiment increases face figure on full two-dimensional faceform The hair style and color development that picture, user select, to obtain two-dimensional display image, and show two-dimensional display image on a user interface, The effect of this hair style of do-it-yourself is seen convenient for user.After user reselects hair style and color development, regenerate to obtain two-dimentional aobvious Diagram picture, and show on a user interface, the effect of this hair style of do-it-yourself is seen convenient for user.
If user's selection is Three-dimensional Display, the present embodiment increases facial image on Complete three-dimensional faceform, uses The hair style and color development of family selection, to obtain three dimensional rendered images, and show three dimensional rendered images, Yong Huke on a user interface To be clicked in user interface, the operations such as stroke can not only see to realize three dimensional rendered images from a different perspective Positive effect after to do-it-yourself this hair style can also be seen that lateral effect and back side effect.User sends out after reselecting hair style After color, regenerates to obtain three dimensional rendered images, and show on a user interface, see convenient for user after having changed another hair style Effect.
S4 obtains the fine tuning instruction of user, is carried out to two-dimensional display image or three dimensional rendered images according to fine tuning instruction micro- It adjusts, the two-dimensional display image after being optimized or three dimensional rendered images.
In the present embodiment, the fine tuning instruction of the user includes the instruction of the facial light and shade of adjustment, the instruction of removal spot, adjusts The instruction etc. of whole certain organs local detail, such as increase eyes, increase the bridge of the nose, thicken lip.Two-dimensional display image or three-dimensional After showing that image is finely tuned after fine tuning instructs, customer satisfaction system two-dimensional display image or three dimensional rendered images after being optimized.
S5 obtains the preservation instruction of user, is instructed to the two-dimensional display image or three-dimensional display after optimization according to preserving As being preserved.
In the present embodiment, after user has finely tuned, the preservation instruction of user interface can be clicked, to by two-dimensional display image or Three dimensional rendered images are stored in local user terminal, so that user's later stage uses, such as QQ head portraits, wechat head portrait.
In the present embodiment, the facial image according to user's shooting is that user recommends suitable hair style, and is selected according to user Hair style and color development carry out two-dimentional display or Three-dimensional Display in user interface, the effect of the different hair style of do-it-yourself is seen convenient for user Fruit.For Three-dimensional Display, the operations such as user can click in user interface, stroke, to realize from a different perspective Three dimensional rendered images not can be only seen the positive effect after do-it-yourself this hair style and can also be seen that lateral effect and back side effect Fruit, being capable of the suitable hair style liked of better choice oneself thereby using family.
Those of ordinary skill in the art may realize that lists described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and method and step, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware With the interchangeability of software, each exemplary composition and step are generally described according to function in the above description.This A little functions are implemented in hardware or software actually, depend on the specific application and design constraint of technical solution.Specially Industry technical staff can use different methods to achieve the described function each specific application, but this realization is not It is considered as beyond the scope of this invention.
In several embodiments provided herein, it should be understood that disclosed method and system can pass through it Its mode is realized.For example, in addition the division of the above unit, only a kind of division of logic function can have in actual implementation Dividing mode, such as multiple units or component can be combined or can be integrated into another system or some features can be with Ignore, or does not execute.Said units may or may not be physically separated, and the component shown as unit can be with It is or may not be physical unit, you can be located at a place, or may be distributed over multiple network units.It can The purpose of the embodiment of the present invention is realized to select according to the actual needs some or all of unit therein.
Finally it should be noted that:The above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent Present invention has been described in detail with reference to the aforementioned embodiments for pipe, it will be understood by those of ordinary skill in the art that:Its according to So can with technical scheme described in the above embodiments is modified, either to which part or all technical features into Row equivalent replacement;And these modifications or replacements, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution The range of scheme should all cover in the claim of the present invention and the range of specification.

Claims (10)

1. a kind of hair style based on image recognition recommends method, which is characterized in that include the following steps:
S1 obtains the shooting image of user, carries out preliminary treatment to shooting image, obtains the head image of user and show head Image;
S2 carries out digitization analyzing processing to head image and obtains analysis result, and a variety of to user's recommendation according to analysis result Hair style;
S3 obtains display type, hair style and the color development of user's selection, it is original to replace head image according to the hair style and color development Hair style and color development and carry out two-dimentional display and Three-dimensional Display.
2. hair style according to claim 1 based on image recognition recommends method, which is characterized in that the S1 is specially:
The shooting image for obtaining user carries out denoising to shooting image and obtains smoothed image, flat by enhancing operator enhancing The edge of sliding image, carries out the smoothed image after enhancing edge the edge detection of face, hair and neck, to obtain Include the head image of face, hair and neck, and head image is shown in user interface.
3. hair style according to claim 2 based on image recognition recommends method, which is characterized in that the S2 is specially:
Recognition of face and analyzing processing are carried out to head image, head image progress recognition of face is obtained into facial image, by people Face image inputs hair style recommended device, and hair style recommended device matches facial image with several hair styles in hair style template library, Matching angle value is obtained, top n hair style is ranked up according to the sequence of matching angle value from big to small, obtains hair style recommendation list, And on a user interface, head image side show hair style recommendation list.
4. the hair style according to claim 3 based on image recognition recommends method, which is characterized in that the user interface packet Include head image sub-interface for showing head image, the matching angle value for showing N number of recommendation hair style and each hair style Hair style recommendation list sub-interface, the color development selection sub-interface for showing several color development and the display for showing display type Type sub-interface.
5. hair style according to claim 4 based on image recognition recommends method, which is characterized in that the S3 is specially:
The display type of user's selection is obtained, the display type includes two dimension display and Three-dimensional Display;
After display type determines, facial image is handled to obtain full two-dimensional faceform or Complete three-dimensional head model;
Obtain the hair style and color development of user's selection;
Increase hair style, color development and facial image on full two-dimensional faceform or Complete three-dimensional head model, it is aobvious to obtain two dimension Diagram picture or three dimensional rendered images;
Two-dimensional display image or three dimensional rendered images are shown on a user interface.
6. the hair style according to claim 5 based on image recognition recommends method, which is characterized in that described to facial image It is handled to obtain full two-dimensional faceform or Complete three-dimensional head model is specially:
The label of face mask and face profile is carried out to facial image;
Each image characteristic point in original two-dimensional faceform is iterated along the normal direction of profile, in each iteration In continuous adjusting parameter so that entire model constantly adapts to target shape and the Reasonable Shape of holding face, obtains closest to people The full two-dimensional faceform of face image;
Model characteristic point corresponding with image characteristic point is marked in initial three-dimensional head model, and according to each image spy The depth information of sign point optimizes initial three-dimensional head model, obtains the Complete three-dimensional head mould closest to user's head Type.
7. the hair style according to claim 6 based on image recognition recommends method, which is characterized in that the original two-dimensional people Face model obtains after carrying out alignment normalized to several image patterns;If the initial three-dimensional head model be by A dry different three-dimensional head sample training obtains.
8. the hair style according to claim 1 based on image recognition recommends method, which is characterized in that the step is also wrapped It includes:
S4 obtains the fine tuning instruction of user, is finely adjusted, is obtained to two-dimensional display image or three dimensional rendered images according to fine tuning instruction Two-dimensional display image after to optimization or three dimensional rendered images.
9. the hair style according to claim 8 based on image recognition recommends method, which is characterized in that the step is also wrapped It includes:
S5, obtain user preservation instruction, according to preserve instruction to after optimization two-dimensional display image or three dimensional rendered images into Row preserves.
10. a kind of hair style commending system based on image recognition, which is characterized in that be suitable for any one institute of claim 1-9 The hair style based on image recognition stated recommends method, including:
Image processing unit, the shooting image for obtaining user carry out preliminary treatment to shooting image, obtain the head of user Image simultaneously shows head image;
Hair style recommendation unit obtains analysis result for carrying out digitization analyzing processing to head image, and according to analysis result Recommend a variety of hair styles to user;
Display unit is selected, display type, hair style and color development for obtaining user's selection are replaced according to the hair style and color development Fall the original hair style of head image and color development and carries out two-dimentional display and Three-dimensional Display.
CN201810091195.3A 2018-01-30 2018-01-30 A kind of hair style recommendation method and system based on image recognition Pending CN108305146A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810091195.3A CN108305146A (en) 2018-01-30 2018-01-30 A kind of hair style recommendation method and system based on image recognition

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810091195.3A CN108305146A (en) 2018-01-30 2018-01-30 A kind of hair style recommendation method and system based on image recognition

Publications (1)

Publication Number Publication Date
CN108305146A true CN108305146A (en) 2018-07-20

Family

ID=62867284

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810091195.3A Pending CN108305146A (en) 2018-01-30 2018-01-30 A kind of hair style recommendation method and system based on image recognition

Country Status (1)

Country Link
CN (1) CN108305146A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109167914A (en) * 2018-09-25 2019-01-08 维沃移动通信有限公司 A kind of image processing method and mobile terminal
CN109190574A (en) * 2018-09-13 2019-01-11 郑州云海信息技术有限公司 A kind of hair style recommended method, device, terminal and storage medium based on big data
CN109191255A (en) * 2018-09-04 2019-01-11 中山大学 A kind of commodity alignment schemes based on the detection of unsupervised characteristic point
CN109544262A (en) * 2018-09-30 2019-03-29 百度在线网络技术(北京)有限公司 Item recommendation method, device, electronic equipment, system and readable storage medium storing program for executing
CN110009708A (en) * 2019-04-10 2019-07-12 上海大学 Color development transform method, system and terminal based on color segmentation
CN111507791A (en) * 2019-01-31 2020-08-07 北京奇虎科技有限公司 Image-based hair style transformation method and device, computer equipment and storage medium
CN112015934A (en) * 2020-08-27 2020-12-01 华南理工大学 Intelligent hair style recommendation method, device and system based on neural network and Unity
CN112102148A (en) * 2019-06-18 2020-12-18 北京陌陌信息技术有限公司 Figure hair style replacing method, device, equipment and medium based on neural network
CN113112616A (en) * 2021-04-06 2021-07-13 济南大学 Three-dimensional generation method based on improved editable
CN113724366A (en) * 2020-05-25 2021-11-30 北京新氧科技有限公司 3D model generation method, device and equipment
CN113744367A (en) * 2021-09-10 2021-12-03 电子科技大学 System and method for editing portrait hairstyle in two-dimensional image
CN117389676A (en) * 2023-12-13 2024-01-12 成都白泽智汇科技有限公司 Intelligent hairstyle adaptive display method based on display interface

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102663820A (en) * 2012-04-28 2012-09-12 清华大学 Three-dimensional head model reconstruction method
CN103065360A (en) * 2013-01-16 2013-04-24 重庆绿色智能技术研究院 Generation method and generation system of hair style effect pictures
CN104794275A (en) * 2015-04-16 2015-07-22 北京联合大学 Face and hair style matching model for mobile terminal
CN106326815A (en) * 2015-06-30 2017-01-11 芋头科技(杭州)有限公司 Human face image recognition method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102663820A (en) * 2012-04-28 2012-09-12 清华大学 Three-dimensional head model reconstruction method
CN103065360A (en) * 2013-01-16 2013-04-24 重庆绿色智能技术研究院 Generation method and generation system of hair style effect pictures
CN104794275A (en) * 2015-04-16 2015-07-22 北京联合大学 Face and hair style matching model for mobile terminal
CN106326815A (en) * 2015-06-30 2017-01-11 芋头科技(杭州)有限公司 Human face image recognition method

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109191255B (en) * 2018-09-04 2022-04-15 中山大学 Commodity alignment method based on unsupervised feature point detection
CN109191255A (en) * 2018-09-04 2019-01-11 中山大学 A kind of commodity alignment schemes based on the detection of unsupervised characteristic point
CN109190574A (en) * 2018-09-13 2019-01-11 郑州云海信息技术有限公司 A kind of hair style recommended method, device, terminal and storage medium based on big data
CN109167914A (en) * 2018-09-25 2019-01-08 维沃移动通信有限公司 A kind of image processing method and mobile terminal
CN109544262A (en) * 2018-09-30 2019-03-29 百度在线网络技术(北京)有限公司 Item recommendation method, device, electronic equipment, system and readable storage medium storing program for executing
CN111507791A (en) * 2019-01-31 2020-08-07 北京奇虎科技有限公司 Image-based hair style transformation method and device, computer equipment and storage medium
CN110009708A (en) * 2019-04-10 2019-07-12 上海大学 Color development transform method, system and terminal based on color segmentation
CN112102148A (en) * 2019-06-18 2020-12-18 北京陌陌信息技术有限公司 Figure hair style replacing method, device, equipment and medium based on neural network
CN113724366B (en) * 2020-05-25 2024-02-27 北京新氧科技有限公司 3D model generation method, device and equipment
CN113724366A (en) * 2020-05-25 2021-11-30 北京新氧科技有限公司 3D model generation method, device and equipment
CN112015934B (en) * 2020-08-27 2022-07-26 华南理工大学 Intelligent hair style recommendation method, device and system based on neural network and Unity
CN112015934A (en) * 2020-08-27 2020-12-01 华南理工大学 Intelligent hair style recommendation method, device and system based on neural network and Unity
CN113112616A (en) * 2021-04-06 2021-07-13 济南大学 Three-dimensional generation method based on improved editable
CN113744367A (en) * 2021-09-10 2021-12-03 电子科技大学 System and method for editing portrait hairstyle in two-dimensional image
CN113744367B (en) * 2021-09-10 2023-08-08 电子科技大学 System and method for editing portrait hairstyle in two-dimensional image
CN117389676A (en) * 2023-12-13 2024-01-12 成都白泽智汇科技有限公司 Intelligent hairstyle adaptive display method based on display interface
CN117389676B (en) * 2023-12-13 2024-02-13 成都白泽智汇科技有限公司 Intelligent hairstyle adaptive display method based on display interface

Similar Documents

Publication Publication Date Title
CN108305146A (en) A kind of hair style recommendation method and system based on image recognition
Shih et al. Style transfer for headshot portraits
CN107527318B (en) Hair style replacement method based on generation countermeasure network model
Baskan et al. Projection based method for segmentation of human face and its evaluation
Mechrez et al. Saliency driven image manipulation
Xiao et al. Fast shadow removal using adaptive multi‐scale illumination transfer
US9589178B2 (en) Image processing with facial features
Shackleton et al. Classification of facial features for recognition
CN109598210B (en) Picture processing method and device
CN105512617B (en) Method for screening images and device
Keren Painter identification using local features and naive bayes
CN101505659A (en) System and method for counting follicular units
GB2379823A (en) Selecting images based on the similarity between images
US10217265B2 (en) Methods and systems of generating a parametric eye model
KR20010041177A (en) Automatic determination of preset positions corresponding to participants in video-conferences
CN106127181A (en) One is virtual tries manicure method, system on
CN108319894A (en) Fruit recognition methods based on deep learning and device
CN104346136A (en) Method and device for picture processing
CN108537126A (en) A kind of face image processing system and method
KR101967814B1 (en) Apparatus and method for matching personal color
CN106203286A (en) The content acquisition method of a kind of augmented reality, device and mobile terminal
Wang et al. An effective background estimation method for shadows removal of document images
Battiato et al. Automatic image enhancement by content dependent exposure correction
CN109389076A (en) Image partition method and device
Gritzman et al. Comparison of colour transforms used in lip segmentation algorithms

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20180720

RJ01 Rejection of invention patent application after publication