CN110189348A - Head portrait processing method, device, computer equipment and storage medium - Google Patents

Head portrait processing method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN110189348A
CN110189348A CN201910457165.4A CN201910457165A CN110189348A CN 110189348 A CN110189348 A CN 110189348A CN 201910457165 A CN201910457165 A CN 201910457165A CN 110189348 A CN110189348 A CN 110189348A
Authority
CN
China
Prior art keywords
head portrait
picture
portrait picture
original
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910457165.4A
Other languages
Chinese (zh)
Other versions
CN110189348B (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.)
Xingzhen Technology Shanghai Co ltd
Original Assignee
Beijing Dajia Internet Information 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 Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN201910457165.4A priority Critical patent/CN110189348B/en
Publication of CN110189348A publication Critical patent/CN110189348A/en
Application granted granted Critical
Publication of CN110189348B publication Critical patent/CN110189348B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/01Social networking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/26Devices for calling a subscriber
    • H04M1/27Devices whereby a plurality of signals may be stored simultaneously
    • H04M1/274Devices whereby a plurality of signals may be stored simultaneously with provision for storing more than one subscriber number at a time, e.g. using toothed disc
    • H04M1/2745Devices whereby a plurality of signals may be stored simultaneously with provision for storing more than one subscriber number at a time, e.g. using toothed disc using static electronic memories, e.g. chips
    • H04M1/27467Methods of retrieving data
    • H04M1/27475Methods of retrieving data using interactive graphical means or pictorial representations
    • 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/20024Filtering details
    • G06T2207/20032Median filtering

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Health & Medical Sciences (AREA)
  • Marketing (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Signal Processing (AREA)
  • Economics (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Computing Systems (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Processing Or Creating Images (AREA)
  • Image Processing (AREA)

Abstract

The disclosure belongs to network technique field about a kind of head portrait processing method, device, computer equipment and storage medium.At least one profile diagram that the disclosure passes through the original head portrait picture of extraction, so as to based at least one profile diagram and the original head portrait picture, to generate at least one target head portrait picture, in at least one target head portrait picture, enhance the profile of original head portrait picture, enable the target head portrait picture to carry more information content, it is more abundant also to allow for the information that the head portrait of user can express.

Description

Head portrait processing method, device, computer equipment and storage medium
Technical field
This disclosure relates to network technique field more particularly to a kind of head portrait processing method, device, computer equipment and storage Medium.
Background technique
In the related technology, with the development of network technology, applications client can be installed in terminal, user can step on It records the applications client and user's head portrait is set later, personal elegance is shown by user's head portrait, for example, the applications client can To be instant communication client, live streaming client etc..
It shoots head portrait picture currently, user when head portrait is arranged, can open camera and (or is pre-stored in local Head portrait picture), the head portrait picture after cutting can be uploaded to server after cutting to the head portrait picture by user, Head portrait picture after the cutting is associated by server with the user, to terminal display using the cutting after head portrait picture as The interactive interface of user's head portrait.
In above process, user only can be correct as picture carries out simply trimming operation, and user's head portrait is caused to be held The information content of load is lower, and the information that user's head portrait can express is not abundant enough.
Summary of the invention
The disclosure provides a kind of head portrait processing method, device, computer equipment and storage medium, at least to solve related skill The information content that user's head portrait is carried in art is lower, not abundant enough the problem of the information that user's head portrait can express.The disclosure Technical solution is as follows:
According to the first aspect of the embodiments of the present disclosure, a kind of head portrait processing method is provided, comprising:
The head portrait process instruction of user is received, includes original head portrait picture in the head portrait process instruction;
Extract at least one profile diagram of the original head portrait picture;
According at least one described profile diagram and the original head portrait picture, at least one target head portrait picture is generated;
It selects to refer to according to the head portrait for carrying out either objective head portrait picture at least one described target head portrait picture selection It enables, head of the user in applications client will be determined as with target head portrait picture corresponding to the head portrait selection instruction Picture.
In a kind of possible embodiment, described at least one profile diagram for extracting the original head portrait picture includes:
The original head portrait picture is filtered, at least one first head portrait picture is obtained;
Contour detecting is carried out at least one described first head portrait picture, obtains at least one described profile diagram.
It is described that the original head portrait picture is filtered in a kind of possible embodiment, obtain at least one First head portrait picture includes:
Bilateral filtering processing is carried out to the original head portrait picture, obtains at least one second head portrait picture;
The grayscale image for obtaining at least one second head portrait picture, to the gray scale of at least one second head portrait picture Figure carries out median filter process, obtains at least one described first head portrait picture.
It is described that bilateral filtering processing is carried out to the original head portrait picture in a kind of possible embodiment, it obtains at least One the second head portrait picture includes:
The different Gaussian Blur processing and down-sampled processing of fog-level is carried out to the original head portrait picture, is generated extremely Lack an image collection, each image in each image collection has different resolution ratio;
Bilateral filtering processing is carried out at least one described image collection, obtains at least one described second head portrait picture.
It is described to include: at least one described first head portrait picture progress contour detecting in a kind of possible embodiment
For any pixel point of any first head portrait picture, when the value for detecting the pixel is less than target threshold When value, the pixel is set to black;
When the value for detecting the pixel is greater than or equal to the targets threshold, the pixel is set to white Color.
In a kind of possible embodiment, described at least one profile diagram according to and the original head portrait picture are raw Include: at least one target head portrait picture
The size adjusting of at least one profile diagram is extremely identical as the size of the original head portrait picture, by described in extremely A few profile diagram is overlapped with the original head portrait picture respectively, obtains at least one described target head portrait picture.
According to the second aspect of an embodiment of the present disclosure, a kind of head portrait processing method is provided, comprising:
Original head portrait picture is obtained, head portrait process instruction is generated according to the original head portrait picture, is sent at the head portrait Reason instruction;
Server is received in response to the head portrait process instruction at least one target head portrait picture generated, is selected in head portrait It selects and shows at least one described target head portrait picture in interface;
When detecting the touch control operation to either objective head portrait picture, head portrait selection instruction is generated, the head portrait is sent Selection instruction;
Display is using the target head portrait picture as the interactive interface of head portrait in the applications client.
According to the third aspect of an embodiment of the present disclosure, a kind of head portrait processing unit is provided, comprising:
Receiving unit is configured as executing the head portrait process instruction for receiving user, includes original in the head portrait process instruction Beginning head portrait picture;
Extraction unit is configured as executing at least one profile diagram for extracting the original head portrait picture;
Generation unit is configured as executing according at least one described profile diagram and the original head portrait picture, generate extremely A few target head portrait picture;
Determination unit is configured as executing according to either objective head portrait picture at least one described target head portrait picture The head portrait selection instruction for carrying out selection will be determined as the user with target head portrait picture corresponding to the head portrait selection instruction Head portrait in applications client.
In a kind of possible embodiment, the extraction unit includes:
Subelement is filtered, is configured as execution and the original head portrait picture is filtered, obtain at least one A first head portrait picture;
Contour detecting subelement is configured as executing at least one described first head portrait picture progress contour detecting, obtain To at least one described profile diagram.
In a kind of possible embodiment, the filtering processing subelement includes:
Bilateral filtering element is configured as executing to the original head portrait picture progress bilateral filtering processing, obtain at least One the second head portrait picture;
Median filtering element is configured as executing the grayscale image for obtaining at least one second head portrait picture, to described The grayscale image of at least one the second head portrait picture carries out median filter process, obtains at least one described first head portrait picture.
In a kind of possible embodiment, the bilateral filtering element is configured as executing:
The different Gaussian Blur processing and down-sampled processing of fog-level is carried out to the original head portrait picture, is generated extremely Lack an image collection, each image in each image collection has different resolution ratio;
Bilateral filtering processing is carried out at least one described image collection, obtains at least one described second head portrait picture.
In a kind of possible embodiment, the contour detecting subelement is configured to execute:
For any pixel point of any first head portrait picture, when the value for detecting the pixel is less than target threshold When value, the pixel is set to black;
When the value for detecting the pixel is greater than or equal to the targets threshold, the pixel is set to white Color.
In a kind of possible embodiment, the generation unit is configured as executing:
The size adjusting of at least one profile diagram is extremely identical as the size of the original head portrait picture, by described in extremely A few profile diagram is overlapped with the original head portrait picture respectively, obtains at least one described target head portrait picture.
According to a fourth aspect of embodiments of the present disclosure, a kind of head portrait processing unit is provided, comprising:
Transmission unit is configured as executing the original head portrait picture of acquisition, be generated at head portrait according to the original head portrait picture Reason instruction, sends the head portrait process instruction;
Display unit, be configured as execute receive server in response to the head portrait process instruction it is generated at least one Target head portrait picture shows at least one described target head portrait picture in head portrait selection interface;
The transmission unit is additionally configured to execute when detecting the touch control operation to either objective head portrait picture, raw At head portrait selection instruction, the head portrait selection instruction is sent;
The display unit, being additionally configured to execute the display in the applications client with the target head portrait picture is The interactive interface of head portrait.
According to a fifth aspect of the embodiments of the present disclosure, a kind of computer equipment is provided, comprising:
One or more processors;
For storing one or more memories of one or more of processor-executable instructions;
Wherein, one or more of processors are configured as executing:
The head portrait process instruction of user is received, includes original head portrait picture in the head portrait process instruction;
Extract at least one profile diagram of the original head portrait picture;
According at least one described profile diagram and the original head portrait picture, at least one target head portrait picture is generated;
It selects to refer to according to the head portrait for carrying out either objective head portrait picture at least one described target head portrait picture selection It enables, head of the user in applications client will be determined as with target head portrait picture corresponding to the head portrait selection instruction Picture.
According to a sixth aspect of an embodiment of the present disclosure, a kind of computer equipment is provided, comprising:
One or more processors;
For storing one or more memories of one or more of processor-executable instructions;
Wherein, one or more of processors are configured as executing:
Original head portrait picture is obtained, head portrait process instruction is generated according to the original head portrait picture, is sent at the head portrait Reason instruction;
Server is received in response to the head portrait process instruction at least one target head portrait picture generated, is selected in head portrait It selects and shows at least one described target head portrait picture in interface;
When detecting the touch control operation to either objective head portrait picture, head portrait selection instruction is generated, the head portrait is sent Selection instruction;
Display is using the target head portrait picture as the interactive interface of head portrait in the applications client.
According to the 7th of the embodiment of the present disclosure the aspect, a kind of storage medium is provided, as at least one in the storage medium When item instructs the one or more processors execution by computer equipment, so that computer equipment is able to carry out a kind of head portrait processing Method, which comprises
The head portrait process instruction of user is received, includes original head portrait picture in the head portrait process instruction;
Extract at least one profile diagram of the original head portrait picture;
According at least one described profile diagram and the original head portrait picture, at least one target head portrait picture is generated;
It selects to refer to according to the head portrait for carrying out either objective head portrait picture at least one described target head portrait picture selection It enables, head of the user in applications client will be determined as with target head portrait picture corresponding to the head portrait selection instruction Picture.
According to the eighth aspect of the embodiment of the present disclosure, a kind of storage medium is provided, as at least one in the storage medium When item instructs the one or more processors execution by computer equipment, so that computer equipment is able to carry out a kind of head portrait processing Method, which comprises
Original head portrait picture is obtained, head portrait process instruction is generated according to the original head portrait picture, is sent at the head portrait Reason instruction;
Server is received in response to the head portrait process instruction at least one target head portrait picture generated, is selected in head portrait It selects and shows at least one described target head portrait picture in interface;
When detecting the touch control operation to either objective head portrait picture, head portrait selection instruction is generated, the head portrait is sent Selection instruction;
Display is using the target head portrait picture as the interactive interface of head portrait in the applications client.
According to the 9th of the embodiment of the present disclosure the aspect, a kind of computer program product, including one or more instruction are provided, When one or more instruction can be executed by the one or more processors of computer equipment, enable computer equipment Execute a kind of head portrait processing method, which comprises
The head portrait process instruction of user is received, includes original head portrait picture in the head portrait process instruction;
Extract at least one profile diagram of the original head portrait picture;
According at least one described profile diagram and the original head portrait picture, at least one target head portrait picture is generated;
It selects to refer to according to the head portrait for carrying out either objective head portrait picture at least one described target head portrait picture selection It enables, head of the user in applications client will be determined as with target head portrait picture corresponding to the head portrait selection instruction Picture.
According to the tenth of the embodiment of the present disclosure the aspect, a kind of computer program product, including one or more instruction are provided, When one or more instruction can be executed by the one or more processors of computer equipment, enable computer equipment Execute a kind of head portrait processing method, which comprises
Original head portrait picture is obtained, head portrait process instruction is generated according to the original head portrait picture, is sent at the head portrait Reason instruction;
Server is received in response to the head portrait process instruction at least one target head portrait picture generated, is selected in head portrait It selects and shows at least one described target head portrait picture in interface;
When detecting the touch control operation to either objective head portrait picture, head portrait selection instruction is generated, the head portrait is sent Selection instruction;
Display is using the target head portrait picture as the interactive interface of head portrait in the applications client.
The technical scheme provided by this disclosed embodiment at least bring it is following the utility model has the advantages that
By extracting at least one profile diagram of original head portrait picture, so as to be based at least one profile diagram and be somebody's turn to do Original head portrait picture at least one target head portrait picture, enhances original to generate at least one target head portrait picture The profile of head portrait picture enables the target head portrait picture to carry more information content, also allows for the head portrait institute energy of user The information of expression is more abundant.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not The disclosure can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure Example, and together with specification for explaining the principles of this disclosure, do not constitute the improper restriction to the disclosure.
Fig. 1 is a kind of implementation environment schematic diagram of head portrait processing method shown according to an exemplary embodiment.
Fig. 2 is a kind of flow chart of head portrait processing method shown according to an exemplary embodiment.
Fig. 3 is a kind of interaction diagrams of head portrait processing method shown according to an exemplary embodiment.
Fig. 4 is a kind of schematic diagram of original head portrait picture shown according to an exemplary embodiment.
Fig. 5 is a kind of schematic diagram of target head portrait picture shown according to an exemplary embodiment.
Fig. 6 is a kind of logical construction block diagram of head portrait processing unit shown according to an exemplary embodiment.
Fig. 7 is a kind of logical construction block diagram of head portrait processing unit shown according to an exemplary embodiment.
Fig. 8 shows the structural block diagram of the terminal of one exemplary embodiment of disclosure offer.
Fig. 9 is a kind of structural schematic diagram for server that the embodiment of the present disclosure provides.
Specific embodiment
In order to make ordinary people in the field more fully understand the technical solution of the disclosure, below in conjunction with attached drawing, to this public affairs The technical solution opened in embodiment is clearly and completely described.
It should be noted that the specification and claims of the disclosure and term " first " in above-mentioned attached drawing, " Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way Data be interchangeable under appropriate circumstances, so as to embodiment of the disclosure described herein can in addition to illustrating herein or Sequence other than those of description is implemented.Embodiment described in following exemplary embodiment does not represent and disclosure phase Consistent all embodiments.On the contrary, they are only and as detailed in the attached claim, the disclosure some aspects The example of consistent device and method.
Fig. 1 is a kind of implementation environment schematic diagram of head portrait processing method shown according to an exemplary embodiment, referring to figure 1, it may include at least one terminal 101 and server 102 in the implementation environment, be detailed below:
Wherein, which may be used to provide the interactive service based on head portrait, at least one terminal Applications client can be installed, which can be any be capable of providing based on head portrait in 101 in each terminal Interactive service client.
Wherein, which may be used to provide head portrait processing service, when server 102 completes head portrait processing and head After setting, the interactive interface based on head portrait can also be provided at least one terminal 101.
Schematically, in an implement scene, by taking any terminal as an example, applications client on user's registration terminal it Afterwards, applications client can show the user interface (user interface, UI) for interaction, can be in the user interface The homepage of user interface is shown, at this after user logs in applications client including homepage and at least one subpage frame Homepage may include multiple function choosing-items, and when detecting touch control operation of the user to any function choosing-item, terminal can be shown Show and subpage frame corresponding to the function choosing-item.
In some embodiments, when detecting touch control operation of the user to " setting " option, terminal can be from homepage Switching shows that subpage frame is arranged in an information, can provide the current shape of multiple user informations in information setting subpage frame State may include optionally head portrait in the user information, thus when detecting touch control operation of the user to current head portrait, eventually End display head portrait set interface, in the head portrait set interface may include camera control trigger button and multiple locals The picture prestored, when user original head portrait picture is had taken by camera or the picture that prestores with having selected an anticipatory remark as After original head portrait picture, which can be sent to server 102, to execute this public affairs by server 102 The head portrait processing method in embodiment is opened, at least one target head portrait picture is generated, which is sent out It send to terminal, allows user after having selected target head portrait picture, with the target head portrait figure in the applications client Piece realizes the interactive process based on the target head portrait picture as head portrait.
Certainly, in some embodiments, the head portrait processing method of the embodiment of the present disclosure is not limited to the implementation of replacement head portrait Scene can also be applied to user and first log into after applications client the scene that head portrait is arranged for the first time, furthermore, it is necessary to explanation It is that the head portrait processing method of the embodiment of the present disclosure can not also be executed by server 102, but carried out head portrait by terminal and handled it Afterwards, the target head portrait picture that user selects is uploaded to server 102, is carried out more with the head portrait to the user in each terminal New display, the embodiment of the present disclosure do not limit the executing subject of the head portrait processing method specifically.
Fig. 2 is a kind of flow chart of head portrait processing method shown according to an exemplary embodiment, referring to fig. 2, the head portrait Processing method is applied to computer equipment, is illustrated so that computer equipment is server as an example below.
In step 201, server receives the head portrait process instruction of user, includes original head portrait in the head portrait process instruction Picture.
In step 202, server extracts at least one profile diagram of the original head portrait picture.
In step 203, server generates at least one mesh according at least one profile diagram and the original head portrait picture Mark head portrait picture.
In step 204, server is carried out according to either objective head portrait picture at least one target head portrait picture The head portrait selection instruction of selection will be determined as the user in application visitor with target head portrait picture corresponding to the head portrait selection instruction Head portrait in the end of family.
The method that the embodiment of the present disclosure provides, by extracting at least one profile diagram of original head portrait picture, so as to Based at least one profile diagram and the original head portrait picture, to generate at least one target head portrait picture, at this at least one In target head portrait picture, the profile of original head portrait picture is enhanced, the target head portrait picture is enabled to carry more information Amount also allows for the information that the head portrait of user can express and more enriches.
In a kind of possible embodiment, at least one profile diagram for extracting the original head portrait picture includes:
The original head portrait picture is filtered, at least one first head portrait picture is obtained;
To this, at least one first head portrait picture carries out contour detecting, obtains at least one profile diagram.
In a kind of possible embodiment, which is filtered, obtains at least one first As picture includes:
Bilateral filtering processing is carried out to the original head portrait picture, obtains at least one second head portrait picture;
The grayscale image for obtaining at least one second head portrait picture, to this grayscale image of at least one the second head portrait picture into Row median filter process obtains at least one first head portrait picture.
In a kind of possible embodiment, bilateral filtering processing is carried out to the original head portrait picture, obtain at least one the Two head portrait pictures include:
The different Gaussian Blur processing and down-sampled processing of fog-level is carried out to the original head portrait picture, is generated at least One image collection, each image in each image collection have different resolution ratio;
Bilateral filtering processing is carried out at least one image collection, obtains at least one second head portrait picture.
In a kind of possible embodiment, to this, at least one first head portrait picture progress contour detecting includes:
For any pixel point of any first head portrait picture, when the value for detecting the pixel is less than targets threshold When, which is set to black;
When the value for detecting the pixel is greater than or equal to the targets threshold, which is set to white.
In a kind of possible embodiment, according at least one profile diagram and the original head portrait picture, at least one is generated A target head portrait picture includes:
By the size adjusting of at least one profile diagram to identical as the size of the original head portrait picture, by this at least one Profile diagram is overlapped with the original head portrait picture respectively, obtains at least one target head portrait picture.
All the above alternatives can form the alternative embodiment of the disclosure, herein no longer using any combination It repeats one by one.
Fig. 3 is a kind of interaction diagrams of head portrait processing method shown according to an exemplary embodiment, as shown in figure 3, Head portrait processing method is in terminal and the interactive process of server, which to include the following steps.
In step 301, terminal obtains original head portrait picture, generates head portrait process instruction according to the original head portrait picture, Send the head portrait process instruction.
Wherein, the terminal be it is any the electronic equipment of the interactive service based on head portrait can be provided, on the terminal can be with Applications client is installed, which can be any client for being capable of providing the interactive service based on head portrait, make Obtaining terminal can be based on the head portrait processing method in the applications client execution embodiment of the present disclosure.
Optionally, which can be portrait, animal painting, plant image, cartoon image or expression figure As etc., which can be the picture obtained based on camera captured in real-time, it is also possible to the picture locally prestored, The content to the original head portrait picture and acquisition methods are not limited specifically the embodiment of the present disclosure, and Fig. 4 is according to an example Property implement the schematic diagram of a kind of original head portrait picture exemplified, referring to fig. 4, which can be a Zhang Fengjing Figure.
In some embodiments, it can be performed the following operations when terminal obtains original head portrait picture in above-mentioned steps 301: Applications client on user's registration terminal, terminal shows the homepage of user interface based on the applications client, in the homepage It include head portrait setting options in face, when detecting touch control operation of the user to the head portrait setting options, terminal can be from homepage Face switching display and head portrait set interface corresponding to the head portrait setting options, may include camera shooting in the head portrait set interface The trigger button and multiple pictures locally prestored of head control, optionally, when detecting triggering of the user to camera control When the touch control operation of button, terminal can start camera based on the camera control, allow users to adopt based on camera Collect original image frame, renders to obtain original head portrait picture based on the original image frame, certainly, user can also be without clapping in real time It takes the photograph, but selects one from the picture locally prestored as original head portrait picture, at this time when detecting user to any local When the touch control operation of the picture prestored, picture corresponding to the touch control operation is determined as original head portrait picture by terminal.
It should be noted that in the embodiments of the present disclosure, to include that a special head portrait setting options are in homepage Example is illustrated, and in some embodiments, can be as mentioned in above-mentioned implementation environment the case where, can wrap in the homepage " setting " function choosing-item is included, so that switching when detecting touch control operation of the user to " setting " function choosing-item from homepage It shows an information setting subpage frame, the current state of multiple user informations can be provided in information setting subpage frame, it should It may include current head portrait in user information, so that terminal is aobvious when detecting touch control operation of the user to current head portrait Show head portrait set interface, execute the operation of the acquisition original head portrait picture similar with the above process, the embodiment of the present disclosure is not right The interface layout of applications client is specifically limited.
It in some embodiments, can be by the original head portrait when terminal generates head portrait process instruction in above-mentioned steps 301 Picture and user identifier are encoded according to fixed coded format, generate the first message, are head by first message compression As process instruction, certainly, terminal can also encrypt the head portrait process instruction, for example, can based on symmetric encipherment algorithm, The modes such as rivest, shamir, adelman realize encryption, so as to increase the safety of information transmission.
In step 302, server receives the head portrait process instruction of user, includes original head portrait in the head portrait process instruction Picture.
Wherein, which can be any computer equipment for being capable of providing head portrait processing service, certainly, the server Can be stand-alone device, be also possible to cluster device, the embodiment of the present disclosure not to the specific equipment building form of the server into Row limits.
In above process, which can also carry user identifier other than original head portrait picture, should User identifier is used for unique identification user, such as the user identifier can be the account etc. that user registers in applications client.
In above-mentioned steps 302, server can receive any instruction, detect to the aiming field of the instruction, when When the aiming field is carried with head portrait processing identification information, which is determined as head portrait process instruction, wherein head portrait processing Instruction is the head portrait process instruction that terminal generates in above-mentioned steps 301, is not described herein.
In step 303, server to the original head portrait picture carry out the different Gaussian Blur processing of fog-level and Down-sampled processing generates at least one image collection, and each image in each image collection has different resolution ratio.
During above-mentioned generation image collection, server can carry out multiple fog-level to the original head portrait picture Different Gaussian Blur processing, obtains first image collection, carries out drop to any image in first image collection and adopts Sample is handled, first image in available second image collection, to first image in second image collection The different Gaussian Blur processing of multiple fog-level is carried out, second image collection is obtained, and so on, repeat above-mentioned step Suddenly, multiple images set can be generated.
Using different fuzzy coefficients when in above process, due to carrying out Gaussian Blur processing, so that each image Each image in set all has different resolution ratio, improves the fineness of head portrait treatment process, further, since adopting in drop Picture size can be changed during sample, therefore each picture size inside each image collection is identical, different images set it Between picture size changed according to down-sampled degree, (that is to say so as to promote the multiple dimensioned of head portrait treatment process Under different sizes) processes pixel effect.
In some embodiments, server, can be according to the probability of dimensional gaussian distribution when carrying out Gaussian Blur processing Density function obtains weight matrix, and the image that pending Gaussian Blur is handled and the weight matrix carry out convolution algorithm, obtain Image after Fuzzy Processing.Wherein, the image of the pending Gaussian Blur processing can be original head portrait picture, be also possible to appoint Any image in one image collection.
Wherein, the probability density function of the dimensional gaussian distribution such as following formula:
In above formula, x and y are argument of function, and σ is standard deviation, and π and e are constant.
In some embodiments, server can obtained by taking different numerical value to control fog-level standard deviation sigma When taking any image of any image set, server used σ 1 and ratio when can be by the processing of last Gaussian Blur Example coefficient k be multiplied, by numerical value σ 2=k* σ 1 obtained after multiplication be determined as this Gaussian Blur processing when accepted standard it is poor, Wherein, proportionality coefficient k can be it is any be greater than 0 numerical value.
In above process, it enables in the same image collection, the fog-level between adjacent image differs k times (being determined by the value of proportionality coefficient), so that the resolution ratio of each image shows linear variation rule in the same image collection Rule.
In some embodiments, server can not also obtain other images after obtaining first image collection Set, but following step 304 is directly executed, so as to save the calculation amount of head portrait treatment process, simplify head portrait processing The process flow of process.
In step 304, server carries out bilateral filtering processing at least one image collection, obtain at least one the Two head portrait pictures.
Wherein, which is at least one image collection after noise reduction.
In above-mentioned steps 304, server can be based on distance weighting matrix and color when carrying out bilateral filtering processing The bilateral weight matrix that weight matrix is compounded to form carries out convolution fortune to each of at least one image collection image It calculates, obtains at least one second head portrait picture.
In above process, which can be height when carrying out Gaussian Blur processing in above-mentioned steps 303 This weight matrix, on the one hand, under the action of distance weighting matrix, can make in convolution algorithm closer to the picture at matrix center Vegetarian refreshments have it is bigger apart from weight, and conversely, the pixel further away from matrix center can have it is smaller apart from weight, it is another Aspect can make the more similar pixel of color and matrix center in convolution algorithm have under the action of color weight matrix There is lesser color weight, color and the bigger pixel of matrix center contrast have biggish color weight.
Based on the above situation, it is handled by bilateral filtering, the region more gentle for color change in each image, it is main To be played a role by distance weighting matrix, make it possible to achieve good blur effect, and in each image color change compared with It for violent region (region usually near profile), is mainly played a role, is avoided in filtering by color weight matrix It is lost the profile information of image, realizes and improves the accuracy of head portrait treatment process to the edge-protected of each image.
In above process, server, can be at least one image collection when carrying out bilateral filtering processing Each image carries out a bilateral filtering processing, so as to be quickly obtained at least one second head portrait picture.When So, in some embodiments, server can also repeat multiple bilateral filtering processing to each the second head portrait picture, make Finer edge-protected effect must may be implemented, further promote the accuracy of head portrait treatment process.
In above-mentioned steps 303-304, server can carry out bilateral filtering processing to the original head portrait picture, obtain to Few second head portrait picture, so as to which in the case where guaranteeing not losing the profile information of original head portrait picture, filtering is gone The one part of pixel point in original head portrait picture is removed, the calculation amount of subsequent head portrait treatment process can be reduced, in some implementations In example, server can not also execute above-mentioned steps 303-304, but directly carry out on the basis of original head portrait picture bilateral Filtering, to accelerate the speed of head portrait processing.
In some embodiments, server, can also be to size and original head portrait figure after obtaining the second head portrait picture The second different head portrait picture of piece carries out a liter sampling processing, is and original head portrait figure by the size adjusting of each second head portrait picture The size of piece is identical.
For example, server can between the setting number of image collection, image collection fog-level difference ratio system After counting the parameters such as the execution number of k, bilateral filtering, pass through openCV (open source computer vision Library, computer vision library of increasing income) primary function in library executes operation performed in above-mentioned steps 303-304.
In step 305, server obtains the grayscale image of at least one second head portrait picture, to this at least one second The grayscale image of head portrait picture carries out median filter process, obtains at least one first head portrait picture.
Wherein, each second head portrait picture both corresponds to first head portrait picture, which is by drop The second head portrait picture after making an uproar.
In above process, server can by this at least one second head portrait picture each pixel value, from RGB triple channel numerical value is scaled gray scale single channel numerical value, thus by each second head portrait picture from RGB (RGB) color space Conversion obtains the grayscale image of each second head portrait picture to gray space.
In above-mentioned steps 305, server can realize median filter process by observation window based on one or more, specifically Ground, by taking any observation window as an example, server can carry out the observation window according to target step on each second head portrait picture Sliding sampling sorts from small to large to the multiple pixels for including in the observation window, determines multiple pixel in sampling Median point output is a pixel of the first head portrait picture, then changed according to target step by the median point among point The position of observation window, repeats above-mentioned steps, until all pixels point to each second head portrait picture is completed to sample, energy Access at least one first head portrait picture.
In above process, server indicates multiple pictures in the observation window with the median point of pixel each in observation window Vegetarian refreshments realizes the noise remove (that is to say that some pixels are removed in filtering) to the second head portrait picture, can reduce subsequent rounds Calculation amount when exterior feature detection, accelerates the speed of contour detecting.
In above-mentioned steps 303-305, server can be filtered the original head portrait picture, obtain at least one A first head portrait picture can so as to which before carrying out contour detecting, each second head portrait picture is converted to grayscale image It avoids carrying out contour detecting to the pixel in tri- channels EGB, contour detecting only can be carried out to the single pass pixel of gray scale, The calculation amount of subsequent head portrait treatment process is reduced, in addition, carrying out median filter process, energy on the basis of having obtained grayscale image Enough calculation amounts for further reducing subsequent head portrait treatment process.
Within step 306, to this, at least one first head portrait picture carries out contour detecting to server, obtains at least one wheel Exterior feature figure.
In some embodiments, server is when carrying out contour detecting, to any pixel point of any first head portrait picture For, when the value for detecting the pixel is less than targets threshold, which is set to black;When detecting the pixel Value when being greater than or equal to the targets threshold, which is set to white, repeats above-mentioned steps, until to each the Each pixel of one head portrait picture has carried out above-mentioned detection process, so as to pass through targets threshold, by each first As the gray-scale pixel values of script in picture, the monochrome pixels value of binaryzation is converted.Wherein, which can be any be greater than Or the numerical value equal to 0.
Optionally, server can also realize contour detecting by the primary function in the library openCV, in such case Under, even if server can ensure to detect by adjusting targets threshold in first head portrait picture there are noise pixel point Profile accuracy.
In above-mentioned steps 303-306, server extracts at least one profile diagram of the original head portrait picture, extracts profile One or more processing sides in Gaussian Blur, bilateral filtering, acquisition grayscale image or median filtering can also be passed through before figure Method carries out noise reduction to original head portrait picture, that is to say the noise pixel point got rid of in original head portrait picture, reduces extraction wheel The calculation amount of wide figure process.
Certainly, in some embodiments, server can not also execute the noise reduction process of above-mentioned steps 303-306, but Contour detecting directly is carried out to the original head portrait picture, the profile diagram of the original head portrait picture is obtained, extraction profile can be simplified The process of figure.
In step 307, server generates at least one mesh according at least one profile diagram and the original head portrait picture Head portrait picture is marked, sends at least one target head portrait picture to terminal.
In above process, when carrying out median filter process in above-mentioned steps 305 due to server, can to obtain The size of first head portrait picture and the size of original head portrait picture are inconsistent, therefore, server when generating target head portrait picture, Can be extremely identical as the size of the original head portrait picture by the size adjusting of at least one profile diagram, by least one profile Figure is overlapped with the original head portrait picture respectively, obtains at least one target head portrait picture.
In some embodiments, server can adjust size such as the liter method of sampling in above-mentioned steps 304, that is to say Cv2.pyrUp function can be called to carry out a liter sampling, therefore not to repeat here.
In some embodiments, server is when being overlapped, due at least one profile diagram and the original head portrait figure Picture size is identical, and for any profile diagram, server can be by each pixel in the profile diagram and original head portrait picture The pixel of middle corresponding position carries out numerical value superposition, is carried out above-mentioned steps, an available target head to each pixel As picture, each profile diagram is overlapped with original head portrait picture respectively, at least one available target head portrait picture, Wherein, each target head portrait picture corresponds to a profile diagram.
Fig. 5 is a kind of schematic diagram of target head portrait picture shown according to an exemplary embodiment, referring to Fig. 5, when original When head portrait picture is landscape figure, server 302-207 through the above steps generates mesh according to the profile diagram of original head portrait picture Mark head portrait picture enhances the profile of original head portrait picture in the target head portrait picture, so that generating target head portrait Picture shows a kind of effect of similar cartoon picture, increases the information content that head portrait picture can carry, enriches head portrait The information that picture can express can be with after the target head portrait picture is sent to the applications client in terminal by server So that terminal shows more interesting head portrait picture based on applications client.
In some embodiments, if user has taken true man's image as original head portrait in above-mentioned steps 301 Picture, head portrait processing method of the server based on the embodiment of the present disclosure can will generate target head according to the original head portrait picture As picture, also it is equivalent to carry out cartooning's processing to original head portrait picture, can not only increase head portrait picture can carry Information, but also can preferably protect the portrait privacy of user.
In step 308, terminal receives server in response to head portrait process instruction at least one target head portrait generated Picture shows at least one target head portrait picture in head portrait selection interface.
Optionally, which can be head portrait set interface involved in above-mentioned steps 301, so that when eventually After termination receives at least one target head portrait picture, at least one target head portrait figure is shown in the head portrait set interface Piece, certainly, in some embodiments, which is also possible to another independent user interface, so that working as terminal After receiving at least one target head portrait picture, terminal switches to the head portrait selection interface from head portrait set interface.
In above process, each target head portrait figure can be shown with horizontally disposed way in the head portrait selection interface Piece can show each target head portrait picture, it is also possible to which the mode of nine grids shows each target head in a manner of longitudinal arrangement As picture etc., the embodiment of the present disclosure is not limited the layout type of the head portrait selection interface specifically.
In some embodiments, the trigger button of camera control can also be shown in the head portrait selection interface, and The selection entrance of picture is locally prestored, so that can press by the triggering when user is dissatisfied to each target head portrait picture Button or selection entrance reacquire an original head portrait picture, are sent to server, that is to say and re-execute above-mentioned steps 301- Operation in 308 shows new target head portrait picture in head portrait selection interface.
It in some embodiments, can also include return push-button in the head portrait selection interface, so that when user is to each , can be by the return push-button when target head portrait picture is unsatisfied with, the head portrait set interface being back in above-mentioned steps 301, from And an original head portrait picture can be reacquired, it is sent to server, that is to say and re-execute in above-mentioned steps 301-308 Operation, shows new target head portrait picture in head portrait selection interface.
In a step 309, it when terminal detects the touch control operation to either objective head portrait picture, generates head portrait selection and refers to It enables, sends the head portrait selection instruction.
Wherein, which can carry head portrait mark, and head portrait mark is used for unique identification target head portrait figure Piece, certainly, the head portrait selection instruction can also carry user identifier.
In above process, it when terminal detects touch control operation of the user to either objective head portrait picture, can determine It is identified with head portrait corresponding to the target head portrait picture, head portrait mark and user identifier is carried out according to fixed coded format Coding generates the second message, is head portrait selection instruction by second message compression, and certainly, terminal can also only identify head portrait It is encoded, generates second message, to reduce the information content of data transmission procedure.
In some embodiments, terminal can also encrypt the head portrait selection instruction, such as can be added based on symmetrical The modes such as close algorithm, rivest, shamir, adelman realize encryption, so as to increase the safety of information transmission.
In the step 310, when server receives the head portrait selection instruction, server is according to at least one target Either objective head portrait picture carries out the head portrait selection instruction of selection in head portrait picture, by with mesh corresponding to the head portrait selection instruction Mark head portrait picture is determined as head portrait of the user in applications client.
In above process, server can parse the head portrait selection instruction, obtain entrained in the head portrait selection instruction Head portrait mark, optionally, when also carrying user identifier in the head portrait selection instruction, server directly extract the head portrait selection User identifier in instruction, in some embodiments, when in head portrait selection instruction without carrying user identifier, server can be with The transmission terminal iidentification of head portrait selection instruction is obtained, to obtain and user identifier corresponding to the transmission terminal iidentification.
After server acquisition head portrait mark and user identifier, which can be identified and user identifier foundation pair It should be related to, terminal where which is sent to user, certainly, which can also be sent to and be somebody's turn to do by server The target head portrait picture is determined as user in application client to realize by user's terminal where the user of friend relation each other Head portrait in end, and the head portrait of the user can also be updated in the terminal where the good friend in the user.
In some embodiments, the terminal that server can not immediately to where with the user each other user of friend relation The corresponding relationship is sent, but at interval of target duration, all corresponding relationships generated in the target duration are respectively sent to Terminal where the good friend of corresponding user.Wherein, the target duration can be it is any be greater than 0 numerical value.
In step 311, terminal is shown in applications client using the target head portrait picture as the interactive interface of head portrait.
In above process, it can be terminal and receive the corresponding relationship that server is sent, applied based on the corresponding relationship Display allows terminal to be based on showing in applications client using the target head portrait picture as the interactive interface of head portrait in client The information content that the head portrait of user can carry more is improved with the head portrait of interest out.
The method that the embodiment of the present disclosure provides, by extracting at least one profile diagram of original head portrait picture, so as to Based at least one profile diagram and the original head portrait picture, to generate at least one target head portrait picture, at this at least one In target head portrait picture, the profile of original head portrait picture is enhanced, the target head portrait picture is enabled to carry more information Amount also allows for the information that the head portrait of user can express and more enriches.
Further, the different Gaussian Blur processing and down-sampled processing of fog-level is carried out to original head portrait picture, At least one image collection is generated, so that each image in each image collection has different resolution ratio, improves head As the fineness for the treatment of process, multiple dimensioned (that is to say under different sizes) the processes pixel effect of head portrait treatment process is promoted. In addition, obtaining at least one second head portrait picture at least one image collection row bilateral filtering processing, avoiding and filtering When be lost the profile information of image, realize and improve the accuracy of head portrait treatment process to the edge-protected of each image.
Further, the grayscale image for obtaining at least one second head portrait picture, at least one second head portrait picture to this Grayscale image carry out median filter process, obtain at least one first head portrait picture, realize the noise to the second head portrait picture It removes (that is to say that some pixels are removed in filtering), calculation amount when subsequent contour detecting can be reduced, accelerate contour detecting Speed.
Further, original head portrait picture is filtered and contour detecting, obtains at least one first head portrait figure Piece can get rid of the noise pixel point in original head portrait picture, reduce subsequent contour detecting due to being filtered The calculation amount of process, and by contour detecting, at least one profile diagram of original head portrait picture can be extracted.
Further, for any pixel point of any first head portrait picture, when the value for detecting the pixel is small When targets threshold, which is set to black;When the value for detecting the pixel is greater than or equal to the targets threshold, The pixel is set to white, it can be by targets threshold, by the gray-scale pixel values of script in each first head portrait picture, conversion The monochrome pixels value of binaryzation.
Fig. 6 is a kind of logical construction block diagram of head portrait processing unit shown according to an exemplary embodiment.Reference Fig. 6, The device includes receiving unit 601, extraction unit 602, generation unit 603 and determination unit 604.
Receiving unit 601 is configured as executing the head portrait process instruction for receiving user, includes original in the head portrait process instruction Beginning head portrait picture;
Extraction unit 602 is configured as executing at least one profile diagram for extracting the original head portrait picture;
Generation unit 603 is configured as executing according at least one profile diagram and the original head portrait picture, generate at least One target head portrait picture;
Determination unit 604 is configured as executing according to either objective head portrait figure at least one target head portrait picture Piece carries out the head portrait selection instruction of selection, exists the user is determined as with target head portrait picture corresponding to the head portrait selection instruction Head portrait in applications client.
The device that the embodiment of the present disclosure provides, by extracting at least one profile diagram of original head portrait picture, so as to Based at least one profile diagram and the original head portrait picture, to generate at least one target head portrait picture, at this at least one In target head portrait picture, the profile of original head portrait picture is enhanced, the target head portrait picture is enabled to carry more information Amount also allows for the information that the head portrait of user can express and more enriches.
In a kind of possible embodiment, the device based on Fig. 6 is formed, which includes:
Subelement is filtered, is configured as execution and the original head portrait picture is filtered, obtain at least one First head portrait picture;
Contour detecting subelement is configured as executing at least one first head portrait picture progress contour detecting to this, obtains At least one profile diagram.
In a kind of possible embodiment, the device based on Fig. 6 is formed, which includes:
Bilateral filtering element is configured as executing to the original head portrait picture progress bilateral filtering processing, obtains at least one A second head portrait picture;
Median filtering element is configured as executing the grayscale image for obtaining at least one second head portrait picture, at least to this The grayscale image of one the second head portrait picture carries out median filter process, obtains at least one first head portrait picture.
In a kind of possible embodiment, which is configured as executing:
The different Gaussian Blur processing and down-sampled processing of fog-level is carried out to the original head portrait picture, is generated at least One image collection, each image in each image collection have different resolution ratio;
Bilateral filtering processing is carried out at least one image collection, obtains at least one second head portrait picture.
In a kind of possible embodiment, which is configured to execute:
For any pixel point of any first head portrait picture, when the value for detecting the pixel is less than targets threshold When, which is set to black;
When the value for detecting the pixel is greater than or equal to the targets threshold, which is set to white.
In a kind of possible embodiment, which is configured as executing:
By the size adjusting of at least one profile diagram to identical as the size of the original head portrait picture, by this at least one Profile diagram is overlapped with the original head portrait picture respectively, obtains at least one target head portrait picture.
About the device in above-described embodiment, wherein each unit executes the concrete mode of operation in the related head portrait It is described in detail in the embodiment of processing method, no detailed explanation will be given here.
Fig. 7 is a kind of logical construction block diagram of head portrait processing unit shown according to an exemplary embodiment.Reference Fig. 7, The device includes transmission unit 701 and display unit 702.
According to a fourth aspect of embodiments of the present disclosure, a kind of head portrait processing unit is provided, comprising:
Transmission unit 701 is configured as executing the original head portrait picture of acquisition, be generated at head portrait according to the original head portrait picture Reason instruction, sends the head portrait process instruction;
Display unit 702 is configured as executing reception server in response to the head portrait process instruction generated at least one A target head portrait picture shows at least one target head portrait picture in head portrait selection interface;
The transmission unit 701 is additionally configured to execute when detecting the touch control operation to either objective head portrait picture, raw At head portrait selection instruction, the head portrait selection instruction is sent;
The display unit 702 is additionally configured to execution and shows in the applications client using the target head portrait picture as head The interactive interface of picture.
The device that the embodiment of the present disclosure provides sends head portrait process instruction, so that service by obtaining original head portrait picture Device, which is able to respond, generates at least one target head portrait picture in the head portrait process instruction, which is sent out It send to terminal, so that terminal shows at least one target head portrait picture in head portrait selection interface, when detecting to any mesh When marking the touch control operation of head portrait picture, head portrait selection instruction is generated, the head portrait selection instruction is sent, terminal is answered at this With in client, display is using the target head portrait picture as the interactive interface of head portrait, and in the disclosure, terminal is sending head portrait processing After instruction, the target head portrait picture for carrying more information amount can be shown in head portrait selection interface, also allows for using The information that the head portrait at family can express is more abundant, and also allowing for terminal can show more there is entertaining in applications client The head portrait of property.
About the device in above-described embodiment, wherein each unit executes the concrete mode of operation in the related head portrait It is described in detail in the embodiment of processing method, no detailed explanation will be given here.
It is illustrated so that computer equipment is terminal as an example, Fig. 8 shows what one exemplary embodiment of the disclosure provided The structural block diagram of terminal.Fig. 8 is participated in, terminal 800 may is that smart phone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III, dynamic image expert's compression standard audio level 3), MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image expert's compression standard audio level 4) is broadcast Put device, laptop or desktop computer.Terminal 800 be also possible to referred to as user equipment, portable terminal, laptop terminal, Other titles such as terminal console.
In general, terminal 800 includes: processor 801 and memory 802.
Processor 801 may include one or more processing cores, such as 4 core processors, 8 core processors etc..Place Reason device 801 can use DSP (Digital Signal Processing, Digital Signal Processing), FPGA (Field- Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array, may be programmed Logic array) at least one of example, in hardware realize.Processor 801 also may include primary processor and coprocessor, master Processor is the processor for being handled data in the awake state, also referred to as CPU (Central Processing Unit, central processing unit);Coprocessor is the low power processor for being handled data in the standby state.? In some embodiments, processor 801 can be integrated with GPU (Graphics Processing Unit, image processor), GPU is used to be responsible for the rendering and drafting of content to be shown needed for display screen.In some embodiments, processor 801 can also be wrapped AI (Artificial Intelligence, artificial intelligence) processor is included, the AI processor is for handling related machine learning Calculating operation.
Memory 802 may include one or more computer readable storage mediums, which can To be non-transient.Memory 802 may also include high-speed random access memory and nonvolatile memory, such as one Or multiple disk storage equipments, flash memory device.In some embodiments, the non-transient computer in memory 802 can Storage medium is read for storing at least one instruction, at least one instruction for performed by processor 801 to realize this public affairs Open the head portrait processing method that middle embodiment of the method provides.
In some embodiments, terminal 800 is also optional includes: peripheral device interface 803 and at least one peripheral equipment. It can be connected by bus or signal wire between processor 801, memory 802 and peripheral device interface 803.Each peripheral equipment It can be connected by bus, signal wire or circuit board with peripheral device interface 803.Specifically, peripheral equipment includes: radio circuit 804, at least one of touch display screen 805, camera 806, voicefrequency circuit 807, positioning component 808 and power supply 809.
Peripheral device interface 803 can be used for I/O (Input/Output, input/output) is relevant outside at least one Peripheral equipment is connected to processor 801 and memory 802.In some embodiments, processor 801, memory 802 and peripheral equipment Interface 803 is integrated on same chip or circuit board;In some other embodiments, processor 801, memory 802 and outer Any one or two in peripheral equipment interface 803 can realize on individual chip or circuit board, the present embodiment to this not It is limited.
Radio circuit 804 is for receiving and emitting RF (Radio Frequency, radio frequency) signal, also referred to as electromagnetic signal.It penetrates Frequency circuit 804 is communicated by electromagnetic signal with communication network and other communication equipments.Radio circuit 804 turns electric signal It is changed to electromagnetic signal to be sent, alternatively, the electromagnetic signal received is converted to electric signal.Optionally, radio circuit 804 wraps It includes: antenna system, RF transceiver, one or more amplifiers, tuner, oscillator, digital signal processor, codec chip Group, user identity module card etc..Radio circuit 804 can be carried out by least one wireless communication protocol with other terminals Communication.The wireless communication protocol includes but is not limited to: Metropolitan Area Network (MAN), each third generation mobile communication network (2G, 3G, 4G and 5G), wireless office Domain net and/or WiFi (Wireless Fidelity, Wireless Fidelity) network.In some embodiments, radio circuit 804 may be used also To include the related circuit of NFC (Near Field Communication, wireless near field communication), the disclosure is not subject to this It limits.
Display screen 805 is for showing UI (User Interface, user interface).The UI may include figure, text, figure Mark, video and its their any combination.When display screen 805 is touch display screen, display screen 805 also there is acquisition to show The ability of the touch signal on the surface or surface of screen 805.The touch signal can be used as control signal and be input to processor 801 are handled.At this point, display screen 805 can be also used for providing virtual push button and/or dummy keyboard, also referred to as soft button and/or Soft keyboard.In some embodiments, display screen 805 can be one, and the front panel of terminal 800 is arranged;In other embodiments In, display screen 805 can be at least two, be separately positioned on the different surfaces of terminal 800 or in foldover design;In still other reality It applies in example, display screen 805 can be flexible display screen, be arranged on the curved surface of terminal 800 or on fold plane.Even, it shows Display screen 805 can also be arranged to non-rectangle irregular figure, namely abnormity screen.Display screen 805 can use LCD (Liquid Crystal Display, liquid crystal display), OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) Etc. materials preparation.
CCD camera assembly 806 is for acquiring image or video.Optionally, CCD camera assembly 806 include front camera and Rear camera.In general, the front panel of terminal is arranged in front camera, the back side of terminal is arranged in rear camera.One In a little embodiments, rear camera at least two is main camera, depth of field camera, wide-angle camera, focal length camera shooting respectively Any one in head, to realize that main camera and the fusion of depth of field camera realize background blurring function, main camera and wide-angle Camera fusion realizes that pan-shot and VR (Virtual Reality, virtual reality) shooting function or other fusions are clapped Camera shooting function.In some embodiments, CCD camera assembly 806 can also include flash lamp.Flash lamp can be monochromatic warm flash lamp, It is also possible to double-colored temperature flash lamp.Double-colored temperature flash lamp refers to the combination of warm light flash lamp and cold light flash lamp, can be used for not With the light compensation under colour temperature.
Voicefrequency circuit 807 may include microphone and loudspeaker.Microphone is used to acquire the sound wave of user and environment, and will Sound wave, which is converted to electric signal and is input to processor 801, to be handled, or is input to radio circuit 804 to realize voice communication. For stereo acquisition or the purpose of noise reduction, microphone can be separately positioned on the different parts of terminal 800 to be multiple.Mike Wind can also be array microphone or omnidirectional's acquisition type microphone.Loudspeaker is then used to that processor 801 or radio circuit will to be come from 804 electric signal is converted to sound wave.Loudspeaker can be traditional wafer speaker, be also possible to piezoelectric ceramic loudspeaker.When When loudspeaker is piezoelectric ceramic loudspeaker, the audible sound wave of the mankind can be not only converted electrical signals to, it can also be by telecommunications Number the sound wave that the mankind do not hear is converted to carry out the purposes such as ranging.In some embodiments, voicefrequency circuit 807 can also include Earphone jack.
Positioning component 808 is used for the current geographic position of positioning terminal 800, to realize navigation or LBS (Location Based Service, location based service).Positioning component 808 can be the GPS (Global based on the U.S. Positioning System, global positioning system), the dipper system of China, Russia Gray receive this system or European Union The positioning component of Galileo system.
Power supply 809 is used to be powered for the various components in terminal 800.Power supply 809 can be alternating current, direct current, Disposable battery or rechargeable battery.When power supply 809 includes rechargeable battery, which can support wired charging Or wireless charging.The rechargeable battery can be also used for supporting fast charge technology.
In some embodiments, terminal 800 further includes having one or more sensors 810.The one or more sensors 810 include but is not limited to: acceleration transducer 811, gyro sensor 812, pressure sensor 813, fingerprint sensor 814, Optical sensor 815 and proximity sensor 816.
The acceleration that acceleration transducer 811 can detecte in three reference axis of the coordinate system established with terminal 800 is big It is small.For example, acceleration transducer 811 can be used for detecting component of the acceleration of gravity in three reference axis.Processor 801 can With the acceleration of gravity signal acquired according to acceleration transducer 811, touch display screen 805 is controlled with transverse views or longitudinal view Figure carries out the display of user interface.Acceleration transducer 811 can be also used for the acquisition of game or the exercise data of user.
Gyro sensor 812 can detecte body direction and the rotational angle of terminal 800, and gyro sensor 812 can To cooperate with acquisition user to act the 3D of terminal 800 with acceleration transducer 811.Processor 801 is according to gyro sensor 812 Following function may be implemented in the data of acquisition: when action induction (for example changing UI according to the tilt operation of user), shooting Image stabilization, game control and inertial navigation.
The lower layer of side frame and/or touch display screen 805 in terminal 800 can be set in pressure sensor 813.Work as pressure When the side frame of terminal 800 is arranged in sensor 813, user can detecte to the gripping signal of terminal 800, by processor 801 Right-hand man's identification or prompt operation are carried out according to the gripping signal that pressure sensor 813 acquires.When the setting of pressure sensor 813 exists When the lower layer of touch display screen 805, the pressure operation of touch display screen 805 is realized to UI circle according to user by processor 801 Operability control on face is controlled.Operability control includes button control, scroll bar control, icon control, menu At least one of control.
Fingerprint sensor 814 is used to acquire the fingerprint of user, collected according to fingerprint sensor 814 by processor 801 The identity of fingerprint recognition user, alternatively, by fingerprint sensor 814 according to the identity of collected fingerprint recognition user.It is identifying When the identity of user is trusted identity out, the user is authorized to execute relevant sensitive operation, the sensitive operation packet by processor 801 Include solution lock screen, check encryption information, downloading software, payment and change setting etc..Terminal can be set in fingerprint sensor 814 800 front, the back side or side.When being provided with physical button or manufacturer Logo in terminal 800, fingerprint sensor 814 can be with It is integrated with physical button or manufacturer Logo.
Optical sensor 815 is for acquiring ambient light intensity.In one embodiment, processor 801 can be according to optics The ambient light intensity that sensor 815 acquires controls the display brightness of touch display screen 805.Specifically, when ambient light intensity is higher When, the display brightness of touch display screen 805 is turned up;When ambient light intensity is lower, the display for turning down touch display screen 805 is bright Degree.In another embodiment, the ambient light intensity that processor 801 can also be acquired according to optical sensor 815, dynamic adjust The acquisition parameters of CCD camera assembly 806.
Proximity sensor 816, also referred to as range sensor are generally arranged at the front panel of terminal 800.Proximity sensor 816 For acquiring the distance between the front of user Yu terminal 800.In one embodiment, when proximity sensor 816 detects use When family and the distance between the front of terminal 800 gradually become smaller, touch display screen 805 is controlled from bright screen state by processor 801 It is switched to breath screen state;When proximity sensor 816 detects user and the distance between the front of terminal 800 becomes larger, Touch display screen 805 is controlled by processor 801 and is switched to bright screen state from breath screen state.
It will be understood by those skilled in the art that the restriction of the not structure paired terminal 800 of structure shown in Fig. 8, can wrap It includes than illustrating more or fewer components, perhaps combine certain components or is arranged using different components.
It is illustrated so that computer equipment is server as an example, Fig. 9 is a kind of server that the embodiment of the present disclosure provides Structural schematic diagram, the server 900 can generate bigger difference because configuration or performance are different, may include one or one The above processor (central processing units, CPU) 901 and one or more memory 902, wherein It is stored at least one instruction in the memory 902, which is loaded by the processor 901 and executed on to realize State the head portrait processing method that each head portrait processing method embodiment provides.Certainly, which can also have wired or wireless The components such as network interface, keyboard and input/output interface, to carry out input and output, which can also include other use In the component for realizing functions of the equipments, this will not be repeated here.
In the exemplary embodiment, a kind of storage medium including instruction is additionally provided, the memory for example including instruction, Above-metioned instruction can be executed by the processor of computer equipment (terminal or server) to complete above-mentioned head portrait processing method.It is optional Ground, storage medium can be non-transitorycomputer readable storage medium, for example, the non-transitorycomputer readable storage medium It can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and optical data storage devices etc..
In the exemplary embodiment, a kind of computer program product is additionally provided, including one or more instructs, this Or a plurality of instruction can be executed by the processor of computer equipment (terminal or server), to complete the head portrait in above-described embodiment Processing method.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the disclosure Its embodiment.The disclosure is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or Person's adaptive change follows the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following Claim is pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.

Claims (10)

1. a kind of head portrait processing method characterized by comprising
The head portrait process instruction of user is received, includes original head portrait picture in the head portrait process instruction;
Extract at least one profile diagram of the original head portrait picture;
According at least one described profile diagram and the original head portrait picture, at least one target head portrait picture is generated;
It, will according to the head portrait selection instruction for carrying out selection to either objective head portrait picture at least one described target head portrait picture It is determined as head portrait of the user in applications client with target head portrait picture corresponding to the head portrait selection instruction.
2. head portrait processing method according to claim 1, which is characterized in that described to extract the original head portrait picture extremely A profile diagram includes: less
The original head portrait picture is filtered, at least one first head portrait picture is obtained;
Contour detecting is carried out at least one described first head portrait picture, obtains at least one described profile diagram.
3. head portrait processing method according to claim 2, which is characterized in that described to be filtered to the original head portrait picture Wave processing, obtaining at least one first head portrait picture includes:
Bilateral filtering processing is carried out to the original head portrait picture, obtains at least one second head portrait picture;
The grayscale image for obtaining at least one second head portrait picture, to the grayscale image of at least one second head portrait picture into Row median filter process obtains at least one described first head portrait picture.
4. head portrait processing method according to claim 3, which is characterized in that described double to the original head portrait picture progress Side filtering processing, obtaining at least one second head portrait picture includes:
The different Gaussian Blur processing and down-sampled processing of fog-level is carried out to the original head portrait picture, generates at least one A image collection, each image in each image collection have different resolution ratio;
Bilateral filtering processing is carried out at least one described image collection, obtains at least one described second head portrait picture.
5. head portrait processing method according to claim 2, which is characterized in that described at least one described first head portrait figure Piece carries out contour detecting
For any pixel point of any first head portrait picture, when the value for detecting the pixel is less than targets threshold When, the pixel is set to black;
When the value for detecting the pixel is greater than or equal to the targets threshold, the pixel is set to white.
6. head portrait processing method according to claim 1, which is characterized in that described at least one profile diagram according to and The original head portrait picture, generating at least one target head portrait picture includes:
The size adjusting of at least one profile diagram is extremely identical as the size of the original head portrait picture, by described at least one A profile diagram is overlapped with the original head portrait picture respectively, obtains at least one described target head portrait picture.
7. a kind of head portrait processing method characterized by comprising
Original head portrait picture is obtained, head portrait process instruction is generated according to the original head portrait picture, the head portrait processing is sent and refers to It enables;
Server is received in response to the head portrait process instruction at least one target head portrait picture generated, selects boundary in head portrait At least one described target head portrait picture is shown in face;
When detecting the touch control operation to either objective head portrait picture, head portrait selection instruction is generated, sends the head portrait selection Instruction;
Display is using the target head portrait picture as the interactive interface of head portrait in the applications client.
8. a kind of head portrait processing unit characterized by comprising
Receiving unit is configured as executing the head portrait process instruction for receiving user, includes original head in the head portrait process instruction As picture;
Extraction unit is configured as executing at least one profile diagram for extracting the original head portrait picture;
Generation unit is configured as executing according at least one described profile diagram and the original head portrait picture, generates at least one A target head portrait picture;
Determination unit is configured as execution basis and carries out to either objective head portrait picture at least one described target head portrait picture The head portrait selection instruction of selection is being answered the user is determined as with target head portrait picture corresponding to the head portrait selection instruction With the head portrait in client.
9. a kind of computer equipment characterized by comprising
One or more processors;
For storing one or more memories of one or more of processor-executable instructions;
Wherein, one or more of processors are configured as executing described instruction, to realize such as claim 1 to claim Any one of 6 or claim 7 described in head portrait processing method.
10. a kind of storage medium, which is characterized in that when at least one instruction in the storage medium is by the one of computer equipment When a or multiple processors execute, so that computer equipment is able to carry out such as any one of claim 1 to claim 6 or power Benefit requires head portrait processing method described in 7.
CN201910457165.4A 2019-05-29 2019-05-29 Head portrait processing method and device, computer equipment and storage medium Active CN110189348B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910457165.4A CN110189348B (en) 2019-05-29 2019-05-29 Head portrait processing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910457165.4A CN110189348B (en) 2019-05-29 2019-05-29 Head portrait processing method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110189348A true CN110189348A (en) 2019-08-30
CN110189348B CN110189348B (en) 2020-12-25

Family

ID=67718576

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910457165.4A Active CN110189348B (en) 2019-05-29 2019-05-29 Head portrait processing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110189348B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112148404A (en) * 2020-09-24 2020-12-29 游艺星际(北京)科技有限公司 Head portrait generation method, apparatus, device and storage medium
CN112995927A (en) * 2021-02-09 2021-06-18 广州启生信息技术有限公司 Method and device for processing 5G message user head portrait display
CN113784039A (en) * 2021-08-03 2021-12-10 北京达佳互联信息技术有限公司 Head portrait processing method and device, electronic equipment and computer readable storage medium

Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103021002A (en) * 2011-09-27 2013-04-03 康佳集团股份有限公司 Colorful sketch image generating method
CN103327188A (en) * 2013-06-27 2013-09-25 广东欧珀移动通信有限公司 Self-photographing method with mobile terminal and mobile terminal
CN103745478A (en) * 2014-01-24 2014-04-23 山东农业大学 Machine vision determination method for wheat germination rate
CN104573691A (en) * 2013-10-26 2015-04-29 西安群丰电子信息科技有限公司 Object contour detection method based on phase characteristics
CN104766307A (en) * 2015-03-13 2015-07-08 青岛海信电器股份有限公司 Picture processing method and device
CN105096352A (en) * 2015-08-25 2015-11-25 北京航空航天大学 Significance-driven depth image compression method
CN105260693A (en) * 2015-12-01 2016-01-20 浙江工业大学 Laser two-dimensional code positioning method
CN106887004A (en) * 2017-02-24 2017-06-23 电子科技大学 A kind of method for detecting lane lines based on Block- matching
CN107247549A (en) * 2017-06-16 2017-10-13 北京小米移动软件有限公司 Obtain method, device, terminal and the storage medium of user's head portrait
CN107248148A (en) * 2017-06-14 2017-10-13 上海晔芯电子科技有限公司 Image denoising method and system
US20170344715A1 (en) * 2016-05-28 2017-11-30 Hangzhou Mega Inno of Health Technology Co. Ltd Health managing device and health managing method
CN107451569A (en) * 2017-08-04 2017-12-08 深圳易嘉恩科技有限公司 A kind of automatic identification and the method for cutting bill in scanned copy
CN108072663A (en) * 2017-08-03 2018-05-25 朱林清 Workpiece, defect on-line analysis device
CN108230282A (en) * 2017-11-24 2018-06-29 洛阳师范学院 A kind of multi-focus image fusing method and system based on AGF
CN108614994A (en) * 2018-03-27 2018-10-02 深圳市智能机器人研究院 A kind of Human Head Region Image Segment extracting method and device based on deep learning
CN108620714A (en) * 2018-07-06 2018-10-09 太原科技大学 Welding deviation detecting system based on the molten baths GMAW contour feature and its detection method
CN109102507A (en) * 2018-08-28 2018-12-28 珠海格力智能装备有限公司 Screw thread detection method and device
CN109727195A (en) * 2018-12-25 2019-05-07 成都元点智库科技有限公司 A kind of image super-resolution reconstructing method
CN109791702A (en) * 2016-09-23 2019-05-21 苹果公司 Head portrait creation and editor

Patent Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103021002A (en) * 2011-09-27 2013-04-03 康佳集团股份有限公司 Colorful sketch image generating method
CN103327188A (en) * 2013-06-27 2013-09-25 广东欧珀移动通信有限公司 Self-photographing method with mobile terminal and mobile terminal
CN104573691A (en) * 2013-10-26 2015-04-29 西安群丰电子信息科技有限公司 Object contour detection method based on phase characteristics
CN103745478A (en) * 2014-01-24 2014-04-23 山东农业大学 Machine vision determination method for wheat germination rate
CN104766307A (en) * 2015-03-13 2015-07-08 青岛海信电器股份有限公司 Picture processing method and device
CN105096352A (en) * 2015-08-25 2015-11-25 北京航空航天大学 Significance-driven depth image compression method
CN105260693A (en) * 2015-12-01 2016-01-20 浙江工业大学 Laser two-dimensional code positioning method
US20170344715A1 (en) * 2016-05-28 2017-11-30 Hangzhou Mega Inno of Health Technology Co. Ltd Health managing device and health managing method
CN109791702A (en) * 2016-09-23 2019-05-21 苹果公司 Head portrait creation and editor
CN106887004A (en) * 2017-02-24 2017-06-23 电子科技大学 A kind of method for detecting lane lines based on Block- matching
CN107248148A (en) * 2017-06-14 2017-10-13 上海晔芯电子科技有限公司 Image denoising method and system
CN107247549A (en) * 2017-06-16 2017-10-13 北京小米移动软件有限公司 Obtain method, device, terminal and the storage medium of user's head portrait
CN108072663A (en) * 2017-08-03 2018-05-25 朱林清 Workpiece, defect on-line analysis device
CN107451569A (en) * 2017-08-04 2017-12-08 深圳易嘉恩科技有限公司 A kind of automatic identification and the method for cutting bill in scanned copy
CN108230282A (en) * 2017-11-24 2018-06-29 洛阳师范学院 A kind of multi-focus image fusing method and system based on AGF
CN108614994A (en) * 2018-03-27 2018-10-02 深圳市智能机器人研究院 A kind of Human Head Region Image Segment extracting method and device based on deep learning
CN108620714A (en) * 2018-07-06 2018-10-09 太原科技大学 Welding deviation detecting system based on the molten baths GMAW contour feature and its detection method
CN109102507A (en) * 2018-08-28 2018-12-28 珠海格力智能装备有限公司 Screw thread detection method and device
CN109727195A (en) * 2018-12-25 2019-05-07 成都元点智库科技有限公司 A kind of image super-resolution reconstructing method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112148404A (en) * 2020-09-24 2020-12-29 游艺星际(北京)科技有限公司 Head portrait generation method, apparatus, device and storage medium
CN112148404B (en) * 2020-09-24 2024-03-19 游艺星际(北京)科技有限公司 Head portrait generation method, device, equipment and storage medium
CN112995927A (en) * 2021-02-09 2021-06-18 广州启生信息技术有限公司 Method and device for processing 5G message user head portrait display
CN112995927B (en) * 2021-02-09 2024-02-02 广州启生信息技术有限公司 Method and device for processing 5G message user head portrait display
CN113784039A (en) * 2021-08-03 2021-12-10 北京达佳互联信息技术有限公司 Head portrait processing method and device, electronic equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN110189348B (en) 2020-12-25

Similar Documents

Publication Publication Date Title
CN110502954B (en) Video analysis method and device
CN108594997B (en) Gesture skeleton construction method, device, equipment and storage medium
CN113205568B (en) Image processing method, device, electronic equipment and storage medium
CN108566516B (en) Image processing method, device, storage medium and mobile terminal
CN113538273B (en) Image processing method and image processing apparatus
CN109034102A (en) Human face in-vivo detection method, device, equipment and storage medium
CN107580209B (en) Photographing imaging method and device of mobile terminal
WO2019052329A1 (en) Facial recognition method and related product
CN108900858A (en) A kind of method and apparatus for giving virtual present
CN112907725B (en) Image generation, training of image processing model and image processing method and device
CN108305236A (en) Image enhancement processing method and device
CN112287852B (en) Face image processing method, face image display method, face image processing device and face image display equipment
CN110290421A (en) Frame per second method of adjustment, device, computer equipment and storage medium
CN110189348A (en) Head portrait processing method, device, computer equipment and storage medium
CN112337105B (en) Virtual image generation method, device, terminal and storage medium
CN110033503A (en) Cartoon display method, device, computer equipment and storage medium
CN110956580B (en) Method, device, computer equipment and storage medium for changing face of image
CN110163160A (en) Face identification method, device, equipment and storage medium
CN110149517A (en) Method, apparatus, electronic equipment and the computer storage medium of video processing
CN110807769B (en) Image display control method and device
CN110290426A (en) Method, apparatus, equipment and the storage medium of showing resource
CN115147451A (en) Target tracking method and device thereof
CN109634688A (en) Display methods, device, terminal and the storage medium at session interface
CN110503159A (en) Character recognition method, device, equipment and medium
CN110675473A (en) Method, device, electronic equipment and medium for generating GIF dynamic graph

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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20221228

Address after: 200233 room 1001, building 2, No. 1535, Hongmei Road, Xuhui District, Shanghai

Patentee after: Xingzhen Technology (Shanghai) Co.,Ltd.

Address before: 101d1-7, 1st floor, building 1, No. 6, Shangdi West Road, Haidian District, Beijing 100085

Patentee before: Beijing Dajia Internet Information Technology Co.,Ltd.

TR01 Transfer of patent right