CN107610240A - Head portrait replacement method, device and mobile terminal - Google Patents

Head portrait replacement method, device and mobile terminal Download PDF

Info

Publication number
CN107610240A
CN107610240A CN201710676317.0A CN201710676317A CN107610240A CN 107610240 A CN107610240 A CN 107610240A CN 201710676317 A CN201710676317 A CN 201710676317A CN 107610240 A CN107610240 A CN 107610240A
Authority
CN
China
Prior art keywords
user
replaced
head portrait
image data
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710676317.0A
Other languages
Chinese (zh)
Inventor
张学勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Huantai Technology Co Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201710676317.0A priority Critical patent/CN107610240A/en
Publication of CN107610240A publication Critical patent/CN107610240A/en
Pending legal-status Critical Current

Links

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a kind of head portrait replacement method, device and mobile terminal, wherein, this method includes:The 3 d image data of user's head portrait to be replaced is obtained by structure light;Obtain the 3 d image data of the alternative site of user's selection;The 3 d image data of corresponding position in user's head portrait to be replaced is replaced by the 3 d image data of alternative site, to update the 3 d image data of user's head portrait to be replaced;The 3-D view of user's head portrait and output after being replaced according to the generation of the 3 d image data of user's head portrait to be replaced after renewal.Head portrait replacement method provided in an embodiment of the present invention so that the image of user's head portrait is directly perceived three-dimensional, true after the replacement presented, has provided the user and effect is more really presented, met the demand that user changes head portrait, improve the Experience Degree of user.

Description

Head portrait replacement method, device and mobile terminal
Technical field
The present invention relates to field of terminal technology, more particularly to a kind of head portrait replacement method, device and mobile terminal.
Background technology
With the development of terminal technology, the mobile terminal such as mobile phone, tablet personal computer is more and more general in daily life And wherein, camera function has turned into an indispensable functional module in intelligent terminal field, built-in bat in intelligent terminal According to function so that user can whenever and wherever possible be recorded by intelligent terminal and share the animation of oneself and scenery beautiful at one's side.
With the popularization of internet, people often in online browsing or deliver photo, and in order to attractive in appearance, people are often Online photo is subjected to beautification operation.For example, oneself or others' face are replaced, to form new composograph, However, in correlation technique, the face in two dimensional image is replaced typically by the mode of textures, is generated in this way The ratio of face after replacement is easily uncoordinated in other body part ratios of user, the face after the replacement showed Effect is not true enough, and Consumer's Experience is undesirable.
The content of the invention
The purpose of the present invention is intended at least solve one of above-mentioned technical problem to a certain extent.
Therefore, first purpose of the present invention is to propose a kind of head portrait replacement method, what this method to be presented replaces It is directly perceived three-dimensional, true to change the image of rear user's head portrait, has provided the user and effect is more really presented, met user and change head The demand of picture, improve the Experience Degree of user.
Second object of the present invention is to propose a kind of head portrait alternative.
Third object of the present invention is to propose a kind of computer-readable recording medium.
Fourth object of the present invention is to propose a kind of mobile terminal.
The 5th purpose of the present invention is to propose a kind of computer program.
To achieve these goals, the head portrait replacement method of first aspect present invention embodiment, including:Obtained by structure light Take the 3 d image data of user's head portrait to be replaced;Obtain the 3 d image data of the alternative site of user's selection;By described The 3 d image data of alternative site replaces the 3 d image data of corresponding position in user's head portrait to be replaced, to update State the 3 d image data of user's head portrait to be replaced;Given birth to according to the 3 d image data of user's head portrait to be replaced after renewal The 3-D view of user's head portrait and output after into replacement.
Head portrait replacement method according to embodiments of the present invention, the 3-D view of user's head portrait to be replaced is obtained by structure light Data, and the 3 d image data of the alternative site of user's selection is obtained, then, pass through the 3-D view number of the alternative site According to the 3 d image data for replacing corresponding position in user's head portrait to be replaced, to update the three of user's head portrait to be replaced Dimensional data image, and according to user's head portrait after the generation replacement of the 3 d image data of user's head portrait to be replaced after renewal 3-D view and output.As a result, the image of user's head portrait is directly perceived three-dimensional, true after the replacement presented, carried for user Supply that effect is more really presented, met the demand that user changes head portrait, improve the Experience Degree of user.
To achieve these goals, the head portrait alternative of second aspect of the present invention embodiment, including:First obtains mould Block, for obtaining the 3 d image data of user's head portrait to be replaced by structure light;Second acquisition module, for obtaining user's choosing The 3 d image data for the alternative site selected;Update module, for replacing institute by the 3 d image data of the alternative site The 3 d image data of corresponding position in user's head portrait to be replaced is stated, to update the 3-D view number of user's head portrait to be replaced According to;Image generation module, for being used after being replaced according to the generation of the 3 d image data of user's head portrait to be replaced after renewal The 3-D view of account picture and output.
Head portrait alternative according to embodiments of the present invention, the 3-D view of user's head portrait to be replaced is obtained by structure light Data, and the 3 d image data of the alternative site of user's selection is obtained, then, pass through the 3-D view number of the alternative site According to the 3 d image data for replacing corresponding position in user's head portrait to be replaced, to update the three of user's head portrait to be replaced Dimensional data image, and according to user's head portrait after the generation replacement of the 3 d image data of user's head portrait to be replaced after renewal 3-D view and output.As a result, the image of user's head portrait is directly perceived three-dimensional, true after the replacement presented, carried for user Supply that effect is more really presented, met the demand that user changes head portrait, improve the Experience Degree of user.
To achieve these goals, third aspect present invention embodiment provides one or more and can perform comprising computer The non-volatile computer readable storage medium storing program for executing of instruction, when the computer executable instructions are executed by one or more processors When so that the head portrait replacement method of the computing device first aspect present invention embodiment.
To achieve these goals, the mobile terminal of fourth aspect present invention embodiment, the mobile terminal include storage Device and processor, computer-readable instruction is stored in the memory, when the instruction is by the computing device so that institute State the head portrait replacement method of computing device first aspect present invention embodiment.
Mobile terminal according to embodiments of the present invention, the 3-D view number of user's head portrait to be replaced is obtained by structure light According to, and the 3 d image data of the alternative site of user's selection is obtained, then, pass through the 3 d image data of the alternative site The 3 d image data of corresponding position in user's head portrait to be replaced is replaced, to update the three-dimensional of user's head portrait to be replaced View data, and according to user's head portrait after the generation replacement of the 3 d image data of user's head portrait to be replaced after renewal 3-D view simultaneously exports.As a result, the image of user's head portrait is directly perceived three-dimensional, true after the replacement presented, provide the user Effect is more really presented, meets the demand that user changes head portrait, improves the Experience Degree of user.
Fifth aspect present invention embodiment provides a kind of computer program product, when in the computer program product When instruction processing unit performs, a kind of head portrait replacement method is performed, methods described includes:Obtained by structure light and to be replaced use account The 3 d image data of picture;Obtain the 3 d image data of the alternative site of user's selection;Pass through the three-dimensional of the alternative site View data replaces the 3 d image data of corresponding position in user's head portrait to be replaced, and described to be replaced account is used to update The 3 d image data of picture;Account is used after being replaced according to the generation of the 3 d image data of user's head portrait to be replaced after renewal The 3-D view of picture and output.
The additional aspect of the present invention and advantage will be set forth in part in the description, and will partly become from the following description Obtain substantially, or recognized by the practice of the present invention.
Brief description of the drawings
Of the invention above-mentioned and/or additional aspect and advantage will become from the following description of the accompanying drawings of embodiments Substantially and it is readily appreciated that, wherein,
Fig. 1 is the flow chart of head portrait replacement method according to an embodiment of the invention;
Fig. 2 is the flow chart of head portrait replacement method in accordance with another embodiment of the present invention;
Fig. 3 is the structural representation of head portrait alternative according to an embodiment of the invention
Fig. 4 is the structural representation of head portrait alternative in accordance with another embodiment of the present invention;
Fig. 5 is the structural representation according to the head portrait alternative of another embodiment of the invention;
Fig. 6 is the schematic diagram of image processing circuit according to an embodiment of the invention.
Embodiment
Embodiments of the invention are described below in detail, the example of the embodiment is shown in the drawings, wherein from beginning to end Same or similar label represents same or similar element or the element with same or like function.Below with reference to attached The embodiment of figure description is exemplary, it is intended to for explaining the present invention, and is not considered as limiting the invention.
Below with reference to the accompanying drawings the head portrait replacement method of the embodiment of the present invention, device, mobile terminal and computer-readable are described Storage medium.
Fig. 1 is the flow chart of head portrait replacement method according to an embodiment of the invention.The head portrait replacement side of the embodiment Method application is in the terminal.Wherein, terminal, which can include mobile phone, tablet personal computer, intelligent wearable equipment etc., has various operation systems The hardware device of system.
As shown in figure 1, the head portrait replacement method comprises the following steps:
S11, the 3 d image data of user's head portrait to be replaced is obtained by structure light.
Wherein, structure light is the set of the projection in known spatial direction.
Wherein, the pattern of structure light can include:Structure light pattern, line-structured light pattern, multiple line structure optical mode, face Structure optical mode and phase method pattern.
, wherein it is desired to understand, user to be replaced can be the owner of terminal, or other users.
In one embodiment of the invention,, can when user has the demand for replacing head portrait during using terminal By structured light projector to user's projective structure light to be replaced, then, the knot of user's head portrait to be replaced is obtained by camera Structure light image, and according to the depth image of structure light image generation user's head portrait to be replaced, and obtained and treated according to depth image Replace the 3 d image data of user's head portrait.
Wherein, the process of the 3 d image data of user's head portrait to be replaced is obtained according to depth image can pass through prior art Realize, here is omitted.
Wherein, structured light projector can arrive the structured light projection of luminous point, line, grating, grid or speckle isotype The laser of structured light projection equipment, instrument or generation laser beam on testee.
That is, the embodiment is in the terminal, the structure light for the structure light that can project certain pattern has been pre-configured with The projector.
Wherein, the type of structure light can be divided into homogeneous texture light and heterogeneous texture light.
As a kind of exemplary embodiment, when being irradiated by light in order to avoid the eyes of user, dazzling sensation is produced, Consumer's Experience is improved, the three-dimensional information of user body parts can also be obtained by non-structural light, specifically, knot can be passed through Structure light projector projects heterogeneous texture light to user body parts.
Wherein, structure light heterogeneous, can be formed by a variety of methods.
For example structured light projector can irradiate frosted glass by infrared laser light source, so as in user body parts institute Region form structure light heterogeneous.
Or structured light projector can form structure heterogeneous by way of diffraction optical element is projected Light.Specifically, by single or multiple diffraction optical elements after being collimated by single LASER Light Source, in user body parts institute Region form structure light heterogeneous.
Or structured light projector can also directly by the laser array that is randomly distributed by diffraction optical element, Region where user body parts forms the speckle that is randomly distributed consistent with laser array, i.e., structure light heterogeneous. In this way, the details of speckle can also be controlled to be distributed, be not construed as limiting herein.
S12, obtain the 3 d image data of the alternative site of user's selection.
Wherein, alternative site can be whole head, or the position such as eyes, nose, face, ear, the implementation Example is not construed as limiting to alternative site, and user can unrestricted choice alternative site according to demand.
, wherein it is desired to understand, alternative site can be the alternative site of the target person pre-saved in terminal, It can not be the alternative site of the target person pre-saved in terminal.
Wherein, target person can be star, game, cartoon figure etc., and the embodiment is not limited this.
As a kind of exemplary embodiment, when target person is not the personage that terminal pre-saves, knot can be passed through Structure light projector is to target person projective structure light, then, the structure light image of target person head portrait is obtained by camera, and The depth image of target person head portrait is generated according to structure light image, and the three of target person head portrait are obtained according to depth image Dimensional data image.
That is, during using terminal, in the personage pre-saved during target person is not terminal, pass through Structure light in terminal can obtain the 3 d image data of two personage's head portraits, and the replacement portion that can be selected according to user respectively Alternative site in two personages is replaced by position, it is achieved thereby that replacing the effect of head portrait.
For example, user to be replaced is A, with the head portrait for needing to replace with user A head portrait user B, intelligent hand is being used During machine, user can be taken pictures by smart mobile phone to user A, to obtain the 3 d image data of user's A head portraits, and User A is taken pictures by smart mobile phone, to obtain the 3 d image data of user's B head portraits, then, smart mobile phone according to The 3 d image datas of family A head portraits replaces the 3 d image data of user's B head portraits, so as to realize by user B head portrait replace to User A, wherein it is desired to explanation, the smart mobile phone includes structure light design.
As a kind of exemplary embodiment, the personage pre-saved in the target person selected by user is terminal When, the alternative site of the target person of user's selection can be received, then, by according to the 3 d image data storehouse of personage of prestoring, Obtain the 3 d image data of the alternative site of the target person of user's selection.
For example, during using smart mobile phone, the nose that user wants to look at star A is substituted on the nose of oneself Effect, now, after the 3 d image data of user's head portrait is obtained, user can choose star A nose, now, smart mobile phone The 3 d image data of star A nose will be obtained from the personage's 3 d image data storehouse pre-saved.
S13, the 3-D view of corresponding position in user's head portrait to be replaced is replaced by the 3 d image data of alternative site Data, to update the 3 d image data of user's head portrait to be replaced.
, can after the 3 d image data of alternative site of user's selection is obtained as a kind of exemplary embodiment According to alternative site, the storage location of corresponding position in the 3 d image data of user's head portrait to be replaced is obtained, and according to replacement The 3 d image data and storage location at position replace the former 3 d image data of corresponding position in user's head portrait to be replaced, with more The 3 d image data of new user's head portrait to be replaced.
S14, the three-dimensional of user's head portrait after being replaced according to the generation of the 3 d image data of user's head portrait to be replaced after renewal Image simultaneously exports.
For example, during using smart mobile phone, user wants to look at that star A nose is substituted into the nose of oneself On effect, now, obtain user's head portrait 3 d image data after, user can choose star A nose, now, intelligence Mobile phone will obtain the 3 d image data of star A nose from the personage's 3 d image data storehouse pre-saved, and pass through star A The 3 d image data of nose replace the 3 d image data of nose corresponded in user's head portrait, to update the three-dimensional of user's head portrait View data, then, the image of the head portrait after user's renewal is generated simultaneously according to the 3 d image data of user's head portrait after renewal Output.Accordingly, star A nose is included in the image of user's head portrait shown in smart mobile phone.
Head portrait replacement method according to embodiments of the present invention, the 3-D view of user's head portrait to be replaced is obtained by structure light Data, and the 3 d image data of the alternative site of user's selection is obtained, then, replaced by the 3 d image data of alternative site The 3 d image data of corresponding position in user's head portrait to be replaced is changed, to update the 3 d image data of user's head portrait to be replaced, And the 3-D view of user's head portrait and defeated after being replaced according to the generation of the 3 d image data of user's head portrait to be replaced after renewal Go out.As a result, the image of user's head portrait is directly perceived three-dimensional, true after the replacement presented, provide the user more real Effect is presented, meets the demand that user changes head portrait, improves the Experience Degree of user.
Fig. 2 is the flow chart of head portrait replacement method in accordance with another embodiment of the present invention.The head portrait of the embodiment is replaced Method application is in the terminal.Wherein, terminal, which can include mobile phone, personal call, tablet personal computer, intelligent wearable equipment etc., has The hardware device of various operating systems.
As shown in Fig. 2 the head portrait replacement method comprises the following steps:
S21, the 3 d image data of user's head portrait to be replaced is obtained by structure light.
S22, obtain the 3 d image data of the alternative site of user's selection.
, wherein it is desired to explanation, step S21-S22 is identical with abovementioned steps S11-S12, foregoing to step S11-S12 Explanation be also applied for step S21-S22, here is omitted.
S23, the 3 d image data of alternative site is entered according to the image parameter of corresponding component in user's head portrait to be replaced Row adjustment.
Wherein, image parameter can include but is not limited to dimension information and angle information.
Specifically, in order that the alternative site after must replacing is adapted to user to be replaced, the replacement portion of user's selection is being obtained After the 3 d image data of position, the image parameter with the alternative site corresponding position in user's head portrait to be replaced, and root can be obtained Angle rotation and/or scaled are carried out according to image parameter.
As a kind of exemplary embodiment, can be determined according to the dimension information of corresponding position in user's head portrait to be replaced The dimension information of alternative site is if appropriate for user's head portrait to be replaced, if it is not, then according to right in user's head portrait to be replaced The dimension information at position is answered to carry out scaled to the 3 d image data of alternative site, to obtain the alternative site after adjusting 3 d image data.
As a kind of exemplary embodiment, if true according to the angle information of corresponding position in user's head portrait to be replaced Surely need to select alternative site and rotate, then the angle rotation amount to alternative site is determined according to angle information, and revolve according to angle Turn amount and angle rotation is carried out to the 3 d image data of alternative site, to obtain the 3-D view number of the alternative site after adjusting According to.
S24, corresponding position in user's head portrait to be replaced is replaced by the 3 d image data of the alternative site after adjustment 3 d image data, to update the 3 d image data of user's head portrait to be replaced.
, can be according to replacement after being adjusted to the 3 d image data of alternative site as a kind of exemplary embodiment Position, the storage location of corresponding position in the 3 d image data of user's head portrait to be replaced is obtained, and according to the replacement after adjustment The 3 d image data and storage location at position replace the former 3 d image data of corresponding position in user's head portrait to be replaced, with more The 3 d image data of new user's head portrait to be replaced.
S25, the three-dimensional of user's head portrait after being replaced according to the generation of the 3 d image data of user's head portrait to be replaced after renewal Image simultaneously exports.
Head portrait replacement method according to embodiments of the present invention, the 3-D view of user's head portrait to be replaced is obtained by structure light Data, and the 3 d image data of the alternative site of user's selection is obtained, then, according to corresponding position in user's head portrait to be replaced Image parameter the 3 d image data of alternative site is adjusted, and the 3-D view number for passing through the alternative site after adjustment According to the 3 d image data for replacing corresponding position in user's head portrait to be replaced, to update the 3-D view number of user's head portrait to be replaced According to, and according to the 3 d image data of user's head portrait to be replaced after renewal generation replace after user's head portrait 3-D view simultaneously Output.As a result, alternative site be dimensioned for replacing after user so that the image of user's head portrait is more after the replacement presented Add truly, meet the demand that user changes head portrait, improve the Experience Degree of user.
In order to realize above-described embodiment, the invention also provides a kind of head portrait alternative of embodiment of the present invention.
Fig. 3 is the structural representation of the head portrait alternative of the embodiment of the present invention according to an embodiment of the invention.
As shown in figure 3, the head portrait alternative of the embodiment of the present invention can obtain including the first acquisition module 110, second Modulus block 120, update module 130 and image generation module 140, wherein:
First acquisition module 110 is used for the 3 d image data that user's head portrait to be replaced is obtained by structure light.
Second acquisition module 120 is used for the 3 d image data for obtaining the alternative site of user's selection.
Update module 130 is used to replace corresponding position in user's head portrait to be replaced by the 3 d image data of alternative site 3 d image data, to update the 3 d image data of user's head portrait to be replaced.
Image generation module 140 is used for after being replaced according to the generation of the 3 d image data of user's head portrait to be replaced after renewal The 3-D view of user's head portrait and output.
In one embodiment of the invention, the second acquisition module 120 is specifically used for:Receive the target person of user's selection Alternative site, and according to the 3 d image data storehouse for the personage that prestores, obtain the alternative site of the target person of user's selection 3 d image data.
In the implementation of the present invention, update module 130 is specifically used for:According to alternative site, user to be replaced is obtained The storage location of corresponding position in the 3 d image data of head portrait, and according to the 3 d image data and storage location of alternative site The former 3 d image data of corresponding position in user's head portrait to be replaced is replaced, to update the 3-D view number of user's head portrait to be replaced According to.
In one embodiment of the invention, in order that obtaining alternative site is more suitable for user's head portrait to be replaced, in Fig. 3 institutes On the basis of showing, as shown in figure 4, the device can also include adjusting module 150, wherein:
Three-dimensional of the adjusting module 150 for the image parameter according to corresponding component in user's head portrait to be replaced to alternative site View data is adjusted.
Wherein, image parameter can include but is not limited to dimension information and angle information.
Specifically, in order that the alternative site after must replacing is adapted to user to be replaced, the replacement portion of user's selection is being obtained After the 3 d image data of position, adjusting module 150 can obtain the figure with the alternative site corresponding position in user's head portrait to be replaced Angle rotation and/or scaled are carried out as parameter, and according to image parameter.
As a kind of exemplary embodiment, adjusting module 150 can be according to corresponding position in user's head portrait to be replaced Dimension information determines the dimension information of alternative site if appropriate for user's head portrait to be replaced, if it is not, then according to be replaced The dimension information of corresponding position carries out scaled to the 3 d image data of alternative site in user's head portrait, after obtaining adjustment Alternative site 3 d image data.
As a kind of exemplary embodiment, if adjusting module 150 is according to corresponding position in user's head portrait to be replaced Angle information determine to need to select alternative site to rotate, then determined according to angle information to the angle rotation amount of alternative site, And angle rotation is carried out to the 3 d image data of alternative site according to angle rotation amount, to obtain the alternative site after adjusting 3 d image data.
In one embodiment of the invention, in order to accurately obtain the 3 d image data of user's head portrait to be replaced, in Fig. 4 On the basis of shown, as shown in figure 5, the first acquisition module 110 can include control unit 111, first acquisition unit 112, life Into unit 113 and second acquisition unit 114, wherein:
Control unit 111 is used to pass through structured light projector to user's projective structure light to be replaced.
First acquisition unit 112 is used for the structure light image that user's head portrait to be replaced is obtained by camera.
Generation unit 113 is used for the depth image that user's head portrait to be replaced is generated according to structure light image.
Second acquisition unit 114 is used for the 3 d image data that user's head portrait to be replaced is obtained according to depth image.
, wherein it is desired to illustrate, control unit 111, first acquisition unit in the device embodiment shown in above-mentioned Fig. 5 112nd, generation unit 113 and the structure of second acquisition unit 114 are further included in the device embodiment of earlier figures 3, to this The present invention is not construed as limiting.
, wherein it is desired to explanation, the foregoing explanation to head portrait replacement method embodiment are also applied for the embodiment Head portrait alternative, its realization principle is similar, and here is omitted.
Head portrait alternative according to embodiments of the present invention, the 3-D view of user's head portrait to be replaced is obtained by structure light Data, and the 3 d image data of the alternative site of user's selection is obtained, then, replaced by the 3 d image data of alternative site The 3 d image data of corresponding position in user's head portrait to be replaced is changed, to update the 3 d image data of user's head portrait to be replaced, And the 3-D view of user's head portrait and defeated after being replaced according to the generation of the 3 d image data of user's head portrait to be replaced after renewal Go out.As a result, the image of user's head portrait is directly perceived three-dimensional, true after the replacement presented, provide the user more real Effect is presented, meets the demand that user changes head portrait, improves the Experience Degree of user.
In order to realize above-described embodiment, the present invention also proposes a kind of mobile terminal.
A kind of mobile terminal, include the head portrait alternative of second aspect of the present invention embodiment.
Mobile terminal according to embodiments of the present invention, the 3-D view number of user's head portrait to be replaced is obtained by structure light According to, and the 3 d image data of the alternative site of user's selection is obtained, then, replaced by the 3 d image data of alternative site The 3 d image data of corresponding position in user's head portrait to be replaced, to update the 3 d image data of user's head portrait to be replaced, with And the 3-D view of user's head portrait and output after being replaced according to the generation of the 3 d image data of user's head portrait to be replaced after renewal. As a result, the image of user's head portrait is directly perceived three-dimensional, true after the replacement presented, more real presentation has been provided the user Effect, the demand that user changes head portrait is met, improve the Experience Degree of user.
The embodiment of the present invention additionally provides a kind of computer-readable recording medium, and one or more can perform comprising computer The non-volatile computer readable storage medium storing program for executing of instruction, when computer executable instructions are executed by one or more processors, So that the head portrait replacement method that computing device is foregoing.
In order to realize above-described embodiment, the present invention also proposes a kind of mobile terminal.
Above-mentioned mobile terminal includes image processing circuit, and image processing circuit can utilize hardware and/or component software Realize, it may include define the various processing units of ISP (Image Signal Processing, picture signal processing) pipeline.Figure 6 be the schematic diagram of image processing circuit according to an embodiment of the invention.As shown in fig. 6, for purposes of illustration only, only show and this The various aspects of the related image processing techniques of inventive embodiments.
As shown in fig. 6, the image processing circuit of mobile terminal 600 includes imaging device 610, ISP processors 630 and control Logic device 640.Imaging device 610 may include the camera and structure with one or more lens 612, imaging sensor 614 Light projector 616.Structured light projector 616 is by structured light projection to measured object.Wherein, the structured light patterns can be laser strip Line, Gray code, sine streak or, speckle pattern of random alignment etc..Imaging sensor 614 catches projection to measured object shape Into structure light image, and structure light image is sent to ISP processors 630, structure light image entered by ISP processors 630 Row demodulation obtains the depth information of measured object.Meanwhile imaging sensor 614 can also catch the color information of measured object.Certainly, The structure light image and color information of measured object can also be caught respectively by two imaging sensors 614.
Wherein, by taking pattern light as an example, ISP processors 630 are demodulated to structure light image, are specifically included, from this The speckle image of measured object is gathered in structure light image, by the speckle image of measured object with reference speckle image according to pre-defined algorithm View data calculating is carried out, each speckle point for obtaining speckle image on measured object dissipates relative to reference to the reference in speckle image The displacement of spot.The depth value of each speckle point of speckle image is calculated using trigonometry conversion, and according to the depth Angle value obtains the depth information of measured object.
It is, of course, also possible to obtain the depth image by the method for binocular vision or based on jet lag TOF method Information etc., is not limited herein, as long as can obtain or belong to this by the method for the depth information that measured object is calculated The scope that embodiment includes.
After the color information that ISP processors 630 receive the measured object that imaging sensor 614 captures, it can be tested View data corresponding to the color information of thing is handled.ISP processors 630 are analyzed view data can be used for obtaining It is determined that and/or imaging device 610 one or more control parameters image statistics.Imaging sensor 614 may include color Color filter array (such as Bayer filters), imaging sensor 614 can obtain to be caught with each imaging pixel of imaging sensor 614 Luminous intensity and wavelength information, and provide one group of raw image data being handled by ISP processors 630.
ISP processors 630 handle raw image data pixel by pixel in various formats.For example, each image pixel can Bit depth with 8,10,12 or 14 bits, ISP processors 630 can be carried out at one or more images to raw image data Reason operation, image statistics of the collection on view data.Wherein, image processing operations can be by identical or different bit depth Precision is carried out.
ISP processors 630 can also receive pixel data from video memory 620.Video memory 620 can be memory device The independent private memory in a part, storage device or electronic equipment put, and may include DMA (Direct Memory Access, direct direct memory access (DMA)) feature.
When receiving raw image data, ISP processors 630 can carry out one or more image processing operations.
After ISP processors 630 get color information and the depth information of measured object, it can be merged, obtained 3-D view.Wherein, can be extracted by least one of appearance profile extracting method or contour feature extracting method corresponding The feature of measured object.Such as pass through active shape model method ASM, active appearance models method AAM, PCA PCA, discrete The methods of cosine transform method DCT, the feature of measured object is extracted, is not limited herein.It will be extracted respectively from depth information again The feature of measured object and feature progress registration and the Fusion Features processing that measured object is extracted from color information.Herein refer to Fusion treatment can be the feature that will be extracted in depth information and color information directly combination or by different images Middle identical feature combines after carrying out weight setting, it is possibility to have other amalgamation modes, finally according to the feature after fusion, generation 3-D view.
The view data of 3-D view can be transmitted to video memory 620, to carry out other place before shown Reason.ISP processors 630 from the reception processing data of video memory 620, and to processing data carry out original domain in and RGB and Image real time transfer in YCbCr color spaces.The view data of 3-D view may be output to display 660, so that user sees See and/or further handled by graphics engine or GPU (Graphics Processing Unit, graphics processor).In addition, The output of ISP processors 630 also can be transmitted to video memory 620, and display 660 can read from video memory 620 and scheme As data.In one embodiment, video memory 620 can be configured as realizing one or more frame buffers.In addition, ISP The output of processor 630 can be transmitted to encoder/decoder 650, so as to encoding/decoding image data.The view data of coding It can be saved, and be decompressed before being shown in the equipment of display 660.Encoder/decoder 650 can be by CPU or GPU or association Processor is realized.
The image statistics that ISP processors 630 determine, which can be transmitted, gives the unit of control logic device 640.Control logic device 640 It may include the processor and/or microcontroller for performing one or more routines (such as firmware), one or more routines can be according to connecing The image statistics of receipts, determine the control parameter of imaging device 610.
It it is below the step of realizing head portrait replacement method with image processing techniques in Fig. 6:
S11', obtain the 3 d image data of user's head portrait to be replaced;
S12', obtain the 3 d image data of the alternative site of user's selection;
S13', the 3-D view of corresponding position in user's head portrait to be replaced is replaced by the 3 d image data of alternative site Data, to update the 3 d image data of user's head portrait to be replaced;
S14', the three-dimensional of user's head portrait after being replaced according to the generation of the 3 d image data of user's head portrait to be replaced after renewal Image simultaneously exports.
, wherein it is desired to explanation, the foregoing explanation to head portrait replacement method embodiment is also using the embodiment Mobile terminal, its realization principle is similar, and here is omitted.
, wherein it is desired to explanation, above-mentioned that head portrait as shown in Figure 2 is can also carry out with image processing techniques in Fig. 6 Replacement method.
A kind of computer program product, when the instruction processing unit in computer program product performs, perform foregoing head As replacement method.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means specific features, structure, material or the spy for combining the embodiment or example description Point is contained at least one embodiment or example of the present invention.In this manual, to the schematic representation of above-mentioned term not Identical embodiment or example must be directed to.Moreover, specific features, structure, material or the feature of description can be with office Combined in an appropriate manner in one or more embodiments or example.In addition, in the case of not conflicting, the skill of this area Art personnel can be tied the different embodiments or example and the feature of different embodiments or example described in this specification Close and combine.
In addition, term " first ", " second " are only used for describing purpose, and it is not intended that instruction or hint relative importance Or the implicit quantity for indicating indicated technical characteristic.Thus, define " first ", the feature of " second " can be expressed or Implicitly include at least one this feature.In the description of the invention, " multiple " are meant that at least two, such as two, three It is individual etc., unless otherwise specifically defined.
Any process or method described otherwise above description in flow chart or herein is construed as, and represents to include Module, fragment or the portion of the code of the executable instruction of one or more the step of being used to realize specific logical function or process Point, and the scope of the preferred embodiment of the present invention includes other realization, wherein can not press shown or discuss suitable Sequence, including according to involved function by it is basic simultaneously in the way of or in the opposite order, carry out perform function, this should be of the invention Embodiment person of ordinary skill in the field understood.
Expression or logic and/or step described otherwise above herein in flow charts, for example, being considered use In the order list for the executable instruction for realizing logic function, may be embodied in any computer-readable medium, for Instruction execution system, device or equipment (such as computer based system including the system of processor or other can be held from instruction The system of row system, device or equipment instruction fetch and execute instruction) use, or combine these instruction execution systems, device or set It is standby and use.For the purpose of this specification, " computer-readable medium " can any can be included, store, communicate, propagate or pass Defeated program is for instruction execution system, device or equipment or the dress used with reference to these instruction execution systems, device or equipment Put.The more specifically example (non-exhaustive list) of computer-readable medium includes following:Electricity with one or more wiring Connecting portion (electronic installation), portable computer diskette box (magnetic device), random access memory (RAM), read-only storage (ROM), erasable edit read-only storage (EPROM or flash memory), fiber device, and portable optic disk is read-only deposits Reservoir (CDROM).In addition, computer-readable medium can even is that can the paper of print routine thereon or other suitable be situated between Matter, because can then enter edlin, interpretation or if necessary with other for example by carrying out optical scanner to paper or other media Suitable method is handled electronically to obtain program, is then stored in computer storage.
It should be appreciated that each several part of the present invention can be realized with hardware, software, firmware or combinations thereof.Above-mentioned In embodiment, software that multiple steps or method can be performed in memory and by suitable instruction execution system with storage Or firmware is realized.If, and in another embodiment, can be with well known in the art for example, realized with hardware Any one of row technology or their combination are realized:With the logic gates for realizing logic function to data-signal Discrete logic, have suitable combinational logic gate circuit application specific integrated circuit, programmable gate array (PGA), scene Programmable gate array (FPGA) etc..
Those skilled in the art are appreciated that to realize all or part of step that above-described embodiment method carries Suddenly be can by program come instruct correlation hardware complete, program can be stored in a kind of computer-readable recording medium In, the program upon execution, including one or a combination set of the step of embodiment of the method.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing module, can also That unit is individually physically present, can also two or more units be integrated in a module.Above-mentioned integrated mould Block can both be realized in the form of hardware, can also be realized in the form of software function module.If integrated module with The form of software function module realize and be used as independent production marketing or in use, can also be stored in one it is computer-readable Take in storage medium.
Storage medium mentioned above can be read-only storage, disk or CD etc..Although have been shown and retouch above Embodiments of the invention are stated, it is to be understood that above-described embodiment is exemplary, it is impossible to be interpreted as the limit to the present invention System, one of ordinary skill in the art can be changed to above-described embodiment, change, replace and become within the scope of the invention Type.

Claims (12)

1. a kind of head portrait replacement method, it is characterised in that comprise the following steps:
The 3 d image data of user's head portrait to be replaced is obtained by structure light;
Obtain the 3 d image data of the alternative site of user's selection;
The 3-D view of corresponding position in user's head portrait to be replaced is replaced by the 3 d image data of the alternative site Data, to update the 3 d image data of user's head portrait to be replaced;
The 3-D view of user's head portrait after being replaced according to the generation of the 3 d image data of user's head portrait to be replaced after renewal And export.
2. the method as described in claim 1, it is characterised in that the 3-D view number of the alternative site for obtaining user's selection According to, including:
Receive the alternative site of the target person of user's selection;
According to the 3 d image data storehouse for the personage that prestores, the three of the alternative site of the target person of user's selection is obtained Dimensional data image.
3. the method as described in claim 1, it is characterised in that the 3 d image data by the alternative site is replaced The 3 d image data of corresponding position in user's head portrait to be replaced, to update the 3-D view of user's head portrait to be replaced Data, including:
According to the alternative site, the storage position of corresponding position in the 3 d image data of user's head portrait to be replaced is obtained Put;
Replaced according to the 3 d image data of the alternative site and the storage location corresponding in user's head portrait to be replaced The former 3 d image data at position, to update the 3 d image data of user's head portrait to be replaced.
4. method as claimed in claim 3, it is characterised in that replaced in the 3 d image data by the alternative site Change the 3 d image data of corresponding position in the user to be replaced, with update the 3 d image data of the user to be replaced it Before, methods described also includes:
The 3 d image data of the alternative site is entered according to the image parameter of corresponding component in user's head portrait to be replaced Row adjustment.
5. the method as described in claim any one of 1-4, it is characterised in that described to obtain user's to be replaced by structure light 3 d image data, including:
By structured light projector to user's projective structure light to be replaced;
The structure light image of user's head portrait to be replaced is obtained by camera;
The depth image of user's head portrait to be replaced is generated according to the structure light image;
The 3 d image data of user's head portrait to be replaced is obtained according to the depth image.
A kind of 6. head portrait alternative, it is characterised in that including:
First acquisition module, for obtaining the 3 d image data of user's head portrait to be replaced by structure light;
Second acquisition module, the 3 d image data of the alternative site for obtaining user's selection;
Update module, portion is corresponded to for being replaced by the 3 d image data of the alternative site in user's head portrait to be replaced The 3 d image data of position, to update the 3 d image data of user's head portrait to be replaced;
Image generation module, for being used after being replaced according to the generation of the 3 d image data of user's head portrait to be replaced after renewal The 3-D view of account picture and output.
7. device as claimed in claim 6, it is characterised in that second acquisition module, be specifically used for:
Receive the alternative site of the target person of user's selection;
According to the 3 d image data storehouse for the personage that prestores, the three of the alternative site of the target person of user's selection is obtained Dimensional data image.
8. device as claimed in claim 6, it is characterised in that the update module, be specifically used for:
According to the alternative site, the storage position of corresponding position in the 3 d image data of user's head portrait to be replaced is obtained Put;
Replaced according to the 3 d image data of the alternative site and the storage location corresponding in user's head portrait to be replaced The former 3 d image data at position, to update the 3 d image data of user's head portrait to be replaced.
9. device as claimed in claim 8, it is characterised in that described device also includes:
Adjusting module, for according to the image parameter of corresponding component in user's head portrait to be replaced to the three of the alternative site Dimensional data image is adjusted.
10. the device as described in claim any one of 6-9, it is characterised in that first acquisition module, including:
Control unit, for by structured light projector to user's projective structure light to be replaced;
First acquisition unit, for obtaining the structure light image of user's head portrait to be replaced by camera;
Generation unit, for generating the depth image of user's head portrait to be replaced according to the structure light image;
Second acquisition unit, for obtaining the 3 d image data of user's head portrait to be replaced according to the depth image.
11. one or more includes the non-volatile computer readable storage medium storing program for executing of computer executable instructions, when the calculating When machine executable instruction is executed by one or more processors so that the computing device such as any one of claim 1 to 5 Described head portrait replacement method.
12. a kind of mobile terminal, including memory and processor, computer-readable instruction is stored in the memory, it is described When instruction is by the computing device so that head portrait of the computing device as any one of claim 1 to 5 is replaced Method.
CN201710676317.0A 2017-08-09 2017-08-09 Head portrait replacement method, device and mobile terminal Pending CN107610240A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710676317.0A CN107610240A (en) 2017-08-09 2017-08-09 Head portrait replacement method, device and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710676317.0A CN107610240A (en) 2017-08-09 2017-08-09 Head portrait replacement method, device and mobile terminal

Publications (1)

Publication Number Publication Date
CN107610240A true CN107610240A (en) 2018-01-19

Family

ID=61064611

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710676317.0A Pending CN107610240A (en) 2017-08-09 2017-08-09 Head portrait replacement method, device and mobile terminal

Country Status (1)

Country Link
CN (1) CN107610240A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109242802A (en) * 2018-09-28 2019-01-18 Oppo广东移动通信有限公司 Image processing method, device, electronic equipment and computer-readable medium
US11074733B2 (en) 2019-03-15 2021-07-27 Neocortext, Inc. Face-swapping apparatus and method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080024523A1 (en) * 2006-07-27 2008-01-31 Canon Kabushiki Kaisha Generating images combining real and virtual images
CN103258316A (en) * 2013-03-29 2013-08-21 东莞宇龙通信科技有限公司 Method and device for picture processing
US20150055886A1 (en) * 2013-08-20 2015-02-26 Samsung Techwin Co., Ltd. Image fusion system and method
CN104915634A (en) * 2015-02-16 2015-09-16 百度在线网络技术(北京)有限公司 Image generation method based on face recognition technology and apparatus
CN106952336A (en) * 2017-03-13 2017-07-14 武汉山骁科技有限公司 A kind of mankind's three-dimensional head portrait production method for protecting feature

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080024523A1 (en) * 2006-07-27 2008-01-31 Canon Kabushiki Kaisha Generating images combining real and virtual images
CN103258316A (en) * 2013-03-29 2013-08-21 东莞宇龙通信科技有限公司 Method and device for picture processing
US20150055886A1 (en) * 2013-08-20 2015-02-26 Samsung Techwin Co., Ltd. Image fusion system and method
CN104915634A (en) * 2015-02-16 2015-09-16 百度在线网络技术(北京)有限公司 Image generation method based on face recognition technology and apparatus
CN106952336A (en) * 2017-03-13 2017-07-14 武汉山骁科技有限公司 A kind of mankind's three-dimensional head portrait production method for protecting feature

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109242802A (en) * 2018-09-28 2019-01-18 Oppo广东移动通信有限公司 Image processing method, device, electronic equipment and computer-readable medium
CN109242802B (en) * 2018-09-28 2021-06-15 Oppo广东移动通信有限公司 Image processing method, image processing device, electronic equipment and computer readable medium
US11074733B2 (en) 2019-03-15 2021-07-27 Neocortext, Inc. Face-swapping apparatus and method

Similar Documents

Publication Publication Date Title
US11087521B1 (en) Systems and methods for rendering avatars with deep appearance models
Ichim et al. Dynamic 3D avatar creation from hand-held video input
US11694392B2 (en) Environment synthesis for lighting an object
EP3096208B1 (en) Image processing for head mounted display devices
CN107481304A (en) The method and its device of virtual image are built in scene of game
CN109675315A (en) Generation method, device, processor and the terminal of avatar model
US20120113106A1 (en) Method and apparatus for generating face avatar
CN108765272A (en) Image processing method, device, electronic equipment and readable storage medium storing program for executing
CN108550185A (en) Beautifying faces treating method and apparatus
CN108876708A (en) Image processing method, device, electronic equipment and storage medium
US11204495B2 (en) Device and method for generating a model of an object with superposition image data in a virtual environment
CN107656611A (en) Somatic sensation television game implementation method and device, terminal device
CN107395974A (en) Image processing system and method
CN107507269A (en) Personalized three-dimensional model generating method, device and terminal device
CN107481318A (en) Replacement method, device and the terminal device of user's head portrait
JP2009064356A (en) Program, information storage medium, and image generation system
CN107493411B (en) Image processing system and method
US20220114784A1 (en) Device and method for generating a model of an object with superposition image data in a virtual environment
CN107517346A (en) Photographic method, device and mobile device based on structure light
CN107370951A (en) Image processing system and method
CN107469355A (en) Game image creation method and device, terminal device
WO2015152028A1 (en) Makeup assistance device and recording medium
CN107437268A (en) Photographic method, device, mobile terminal and computer-readable storage medium
Hilsmann et al. Going beyond free viewpoint: creating animatable volumetric video of human performances
CN107610240A (en) Head portrait replacement method, device and mobile terminal

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20211210

Address after: 518057 Fuan Science and Technology Building, Block B, No. 13, Yuehai Street, Nanshan District, Shenzhen City, Guangdong Province, 207-2

Applicant after: Shenzhen Huantai Technology Co.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180119