CN108734121A - It takes pictures beautification method, device, storage medium and terminal device - Google Patents

It takes pictures beautification method, device, storage medium and terminal device Download PDF

Info

Publication number
CN108734121A
CN108734121A CN201810468504.4A CN201810468504A CN108734121A CN 108734121 A CN108734121 A CN 108734121A CN 201810468504 A CN201810468504 A CN 201810468504A CN 108734121 A CN108734121 A CN 108734121A
Authority
CN
China
Prior art keywords
repaired
data
dimensional data
beautified
dimensional
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
CN201810468504.4A
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.)
Shanghai Jinsheng Communication 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 CN201810468504.4A priority Critical patent/CN108734121A/en
Publication of CN108734121A publication Critical patent/CN108734121A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/64Three-dimensional objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map

Landscapes

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

Abstract

The one kind provided in the embodiment of the present application is taken pictures beautification method, device, storage medium and terminal device, this method by identification camera take user when beautifying position, pass through the identification camera obtain described in position to be beautified position three-dimensional data;The position three-dimensional data is identified by preset standard identification model, with the position to be repaired at the position to be beautified of the determination user;Repair process is carried out according to the position to be repaired and the position three-dimensional data.By using above-mentioned technical proposal, the position to be repaired that beautification position can be treated according to position three-dimensional data is repaired, can accurately be beautified to position to be repaired, landscaping effect is truer.

Description

It takes pictures beautification method, device, storage medium and terminal device
Technical field
The invention relates to terminal device technical field more particularly to one kind take pictures beautification method, device, storage be situated between Matter and terminal device.
Background technology
With the development of terminal device, it is equipped with camera on most terminal device, is carried out by terminal device Taking pictures becomes a very universal function.Due to shooting environmental or the hardware problem of terminal device, lead to the picture of shooting not Photographer can be allowed to be satisfied with, so generally landscaping treatment can be carried out to the picture of shooting according to image algorithm, but if beautify journey Image serious distortion can then be led to by spending depth so that the photo shot is very untrue, so needing to current image Beautification technology optimizes.
Invention content
One kind provided by the embodiments of the present application is taken pictures beautification method, device, storage medium and terminal device, can make to take pictures Image landscaping effect it is truer.
It takes pictures beautification method in a first aspect, the embodiment of the present application provides one kind, including:
Identification camera take user when beautifying position, by the identification camera obtain described in wait beautifying The position three-dimensional data at position;
The position three-dimensional data is identified by preset standard identification model, U.S. is waited for the determination user Change the position to be repaired at position;
Repair process is carried out according to the position to be repaired and the position three-dimensional data.
Second aspect, the embodiment of the present application provide one kind and take pictures beautifying apparatus, including:
Three-dimensional data acquisition module, for identification camera take user when beautifying position, pass through the knowledge The position three-dimensional data at position to be beautified described in other camera acquisition;
Position determination module, for the position three-dimensional data to be identified by preset standard identification model, with Determine the position to be repaired at the position to be beautified of the user;
Repair process module, for carrying out repair process according to the position to be repaired and the position three-dimensional data.
The third aspect, the embodiment of the present application provide a kind of computer readable storage medium, are stored thereon with computer journey Sequence realizes the beautification method of taking pictures as described in the embodiment of the present application when the program is executed by processor.
Fourth aspect, the embodiment of the present application provide a kind of terminal device, including memory, processor and are stored in storage It can realize on device and when the computer program of processor operation, the processor execute the computer program as the application is real Apply the beautification method of taking pictures described in example.
The one kind provided in the embodiment of the present application is taken pictures beautification scheme, and U.S. is waited for by take user in identification camera When changing position, pass through the position three-dimensional data at position to be beautified described in identification camera acquisition;Known by preset standard The position three-dimensional data is identified in other model, with the position to be repaired at the position to be beautified of the determination user;According to The position to be repaired carries out repair process with the position three-dimensional data.It, can be according to portion by using above-mentioned technical proposal The position to be repaired that position three-dimensional data treats beautification position is repaired, and can accurately be beautified to position to be repaired, is beautified Effect is truer.
Description of the drawings
Fig. 1 is a kind of flow diagram for beautification method of taking pictures provided by the embodiments of the present application;
Fig. 2 is a kind of schematic diagram of a scenario for beautification method of taking pictures provided by the embodiments of the present application;
Fig. 3 is that another kind provided by the embodiments of the present application is taken pictures the flow diagram of beautification method;
Fig. 4 is that another kind provided by the embodiments of the present application is taken pictures the flow diagram of beautification method;
Fig. 5 is that another kind provided by the embodiments of the present application is taken pictures the flow diagram of beautification method;
Fig. 6 is a kind of schematic diagram of initial three-dimensional data provided by the embodiments of the present application;
Fig. 7 is that another kind provided by the embodiments of the present application is taken pictures the flow diagram of beautification method;
Fig. 8 is a kind of structure diagram for beautifying apparatus of taking pictures provided by the embodiments of the present application;
Fig. 9 is a kind of structural schematic diagram of terminal device provided by the embodiments of the present application;
Figure 10 is the structural schematic diagram of another terminal device provided by the embodiments of the present application.
Specific implementation mode
Further illustrate the technical solution of the application below with reference to the accompanying drawings and specific embodiments.It is appreciated that It is that specific embodiment described herein is used only for explaining the application, rather than the restriction to the application.It further needs exist for illustrating , illustrate only for ease of description, in attached drawing and the relevant part of the application rather than entire infrastructure.
It should be mentioned that some exemplary embodiments are described as before exemplary embodiment is discussed in greater detail The processing described as flow chart or method.Although each step is described as the processing of sequence, many of which by flow chart Step can be implemented concurrently, concomitantly or simultaneously.In addition, the sequence of each step can be rearranged.When its operation The processing can be terminated when completion, it is also possible to the additional step being not included in attached drawing.The processing can be with Corresponding to method, function, regulation, subroutine, subprogram etc..
Three-dimensional camera is gradually universal to be opened, and more and more terminal devices all use three-dimensional camera, three-dimensional camera More information can be collected compared to traditional camera, the embodiment of the present application can acquire face by three-dimensional camera Three-dimensional data, and face is beautified according to three-dimensional data, can obtain more really beautifying photo.
Fig. 1 is a kind of flow diagram for beautification method of taking pictures provided by the embodiments of the present application, and this method can be by taking pictures Beautifying apparatus executes, and wherein the device can be generally integrated in terminal device, also may be used by software and or hardware realization It is equipped in the equipment of operating system with being integrated in other.As shown in Figure 1, this method includes:
S110, identification camera take user when beautifying position, by the identification camera obtain described in The position three-dimensional data at position to be beautified.
Wherein, the position to be beautified is the body part for needing to carry out landscaping treatment of user's shooting.It is described to wait beautifying Position is to be shot by identification camera, the position to be beautified for the user that captured picture includes.Illustratively, such as The photo of fruit user shooting is face self-timer picture, then the position to be beautified includes the face of user.
The identification camera can be the camera on terminal device, can be the front camera of terminal device, and/ Or rear camera.Illustratively, it is generally provided at least one camera in existing terminal device, before generally all including Set camera and rear camera.If the user of shooting is the currently used person of terminal device, the identification camera can be with It is the front camera of terminal device, so that user can recognize the picture of shooting by the screen of terminal device.For another example, it claps The currently used person of the user taken the photograph not instead of terminal device, other users, then the identification camera can be terminal device Rear camera;The currently used person of present terminal equipment shoots the position to be beautified of other users by terminal device.
Traditional camera carries out shooting acquired image being usually 2-D data, i.e., is arranged with line-column matrix rule Pixel color-values (rgb value) or gray value set.Further include taking in the three-dimensional data compared to 2-D data Position to be beautified depth data, that is, the different spaces point at the position to be beautified of the user shot is at a distance from camera, institute The spatial information of captured object can be indicated with three-dimensional data.The identification camera can carry range sensor Camera, range sensor can obtain the different spaces point on captured object at a distance from camera, can so obtain Get the three-dimensional data at the position to be beautified of shooting.
The position three-dimensional data includes:The three-dimensional data at the position to be beautified of the identification camera shooting.Institute State one group of three-dimensional data that position three-dimensional data can be acquired when beautification position is static.Position three-dimensional data can also be Acquired multigroup three-dimensional data when beautifying position and being dynamic.
S111, the position three-dimensional data is identified by preset standard identification model, with the determination user Position to be beautified position to be repaired.
The position three-dimensional data is actually the set of one or more groups of data, needs further exist for the collection according to data Close come the analysis and identification position three-dimensional data actually it is corresponding be position to be beautified the position repaired of needs.
The standard identification model can be the model for including reference data corresponding with position to be beautified.Illustratively, If the position to be beautified is face, standard identification model includes the facial model as standard, i.e., preset completeer Beautiful facial model, can according to perfect facial model as standard identification model come determine active user face it is to be repaired Reset is set.
The standard identification model can be pre-stored in terminal device, or be pre-stored in background server.In needs pair When position three-dimensional data is identified, the standard identification model to prestore is called to carry out recognition site three-dimensional data, to determine shooting The position to be repaired at position to be beautified.
The position to be repaired can be with reference data there are gap, repaired to approach reference data Position, optionally, the position to be repaired may include that the position of the out-of-flatness on position to be beautified, the out-of-flatness position are: Depth data variation is loftier and is not inconsistent the position of the rule of standardization identification model, can be the portion of recess or protrusion Position.
Illustratively, as shown in Fig. 2, if position to be beautified is face, i.e. user has taken use by identification camera The face at family, and a small pox has been grown on the bridge of the nose of the user, so there are one the positions of protrusion for meeting on the nose of user 113, and it is the facial model of standard that standard identification model, which includes, the lines of the bridge of the nose of standard are more smooth, do not have and compare The position of lofty protrusion, so the position 113 of the protrusion can be determined as position to be repaired.
S112, repair process is carried out according to the position to be repaired and the position three-dimensional data.
Wherein it is possible to repair process is carried out to the position to be repaired of the position three-dimensional data according to standard identification model, So that be repaired be closely located to corresponding position in standard identification model.Illustratively, if the position to be repaired is injustice Out-of-flatness position in the three-dimensional data of position can then be attributed to smooth by whole position according to standard identification model.
Optionally, carrying out repair process according to the position to be repaired and the position three-dimensional data can be according to following side Formula is implemented:
Image is adjusted according to the position to be repaired and the position three-dimensional data;Wherein, the image is The identification camera shoots the two dimensional image that the position to be beautified of the user is generated.
Although identification camera can obtain position three-dimensional data, what end user needed is usually two dimensional image, So adjusting image according to position to be repaired and the position three-dimensional data.
The image is the picture captured by identification camera, the photosensitive sensor induction shooting in identification camera Picture in light, and correspondingly generate corresponding electric signal, corresponding digital two dimensional image generated after analog-to-digital conversion, such as Described previously, two dimensional image is generally the color-values of the pixel arranged with line-column matrix rule or the set of gray value. So the color-values or gray value of the pixel of image can be adjusted according to position to be repaired and the position three-dimensional data, So as to which the position to be repaired in image is repaired.
The one kind provided in the embodiment of the present application is taken pictures beautification method, and U.S. is waited for by take user in identification camera When changing position, pass through the position three-dimensional data at position to be beautified described in identification camera acquisition;Known by preset standard The position three-dimensional data is identified in other model, with the position to be repaired at the position to be beautified of the determination user;According to The position to be repaired carries out repair process with the position three-dimensional data.It, can be according to portion by using above-mentioned technical proposal The position to be repaired that position three-dimensional data treats beautification position is repaired, and can accurately be beautified to position to be repaired, is beautified Effect is truer.
Fig. 3 is that another kind provided by the embodiments of the present application is taken pictures the flow diagram of beautification method, in above-described embodiment institute On the basis of the technical solution of offer, to adjusting the behaviour of image according to the position to be repaired and the position three-dimensional data It is optimized, optionally, as shown in figure 3, this method includes:
S120, identification camera take user when beautifying position, by the identification camera obtain described in The position three-dimensional data at position to be beautified.
S121, the position three-dimensional data is identified by preset standard identification model, with the determination user Position to be beautified position to be repaired.
The specific implementation mode of aforesaid operations can refer to associated description above, and details are not described herein.
S122, imaging point of the spatial point of the position to be repaired in image is determined;Wherein, the image The two dimensional image that the position to be beautified of the user generates is shot by the identification camera, the imaging point is the imaging Pixel in image.
Identification camera is taking the position three-dimensional data at the position to be beautified, and generates corresponding two dimensional image When, there is corresponding imaging point at position to be beautified in the spatial point of real space at image, has in spatial point and imaging point Corresponding mapping relations.Mapping relations can be determined according to the image-forming principle of identification camera, be not limited thereto.
So the spatial point of position to be repaired also has corresponding imaging point in image, it can be true according to mapping relations Imaging point of the spatial point of fixed position to be repaired in image.
S123, determined according to the depth data of the spatial point of position to be repaired corresponding imaging point at picture value.
In order to allow human eye to see, image, the imaging point have corresponding at picture value in image;Imaging Value can be color-values or gray value, be color-values at picture value, if image is black if image is cromogram Bai Tu is then gray value at picture value.Color-values or gray value are not limited at picture value, it can be according to the image actually generated Type is determined.
When imaging point of the position to be repaired in image is determined, then can to the imaging point of position to be repaired at Picture value is adjusted, so as to beautify image.
So the difference of the depth data of spatial point to be repaired, the effect of imaging is also different, so according to waiting for The depth data of the spatial point of reparation come determine corresponding imaging point at picture value, can further make the imaging point after adjustment It is truer at picture value.
Illustratively, as shown in Fig. 2, if the position to be repaired is the small pox of face, the region of small pox can generally compare The skin color of user is partially red.Simultaneously in imaging with the trend of the protrusion in small pox region, the red presented also has The trend gradually changed.And if in the region of not small pox, the skin color of the face of imaging will present smooth variation and become Gesture.So picture value can be adjusted to be beautified according to the depth data in small pox region dynamic, the landscaping effect of realization can be more Really.
Imaging point of the embodiment of the present application by the spatial point of the determination position to be repaired in image, Yi Jigen According to the depth data of the spatial point of position to be repaired determine corresponding imaging point at picture value, further according to position to be repaired Depth data come adjust imaging point at picture value, the imaging effect of the position after reparation can be made more natural, the effect of landscaping treatment Fruit is truer.
Fig. 4 is that another kind provided by the embodiments of the present application is taken pictures the flow diagram of beautification method, in above-described embodiment institute On the basis of the technical solution of offer, to according to the depth data of the spatial point of position to be repaired determine corresponding imaging point at The operation of picture value is optimized, optionally, as shown in figure 4, this method includes:
S130, identification camera take user when beautifying position, by the identification camera obtain described in The position three-dimensional data at position to be beautified.
S131, the position three-dimensional data is identified by preset standard identification model, with the determination user Position to be beautified position to be repaired.
S132, imaging point of the spatial point of the position to be repaired in image is determined;Wherein, the image The two dimensional image that the position to be beautified of the user generates is shot by the identification camera, the imaging point is the imaging Pixel in image.
The specific implementation mode of aforesaid operations can refer to associated description above, and details are not described herein.
S133, the reference spatial point for determining position to be repaired, and determine the ginseng with reference to spatial point in image Examine imaging point.
Wherein, it is described with reference to spatial point be can be able to be to be repaired as the spatial point of the position of the reference at picture value The consecutive points of position, the consecutive points are the spatial point around the spatial point of the position to be repaired.
Under normal circumstances, the color of the skin area of people is all to be distributed relatively uniformly.So can be according to reference to space Point is as the reference at picture value for adjusting position to be repaired.It illustratively, as shown in Fig. 2, can be according to the week in small pox region 113 The spatial point enclosed is used as with reference to spatial point, with adjust small pox region imaging point at picture value.
S134, it is created as fitting at picture value with the reference imaging point according to the depth data with reference to spatial point Function.
Due to the difference of depth data, lighting effect is different, also different at picture value in being imaged picture.It is exemplary The imaging color on ground, the eye socket position of people obviously can be deeper than the imaging color of malar, because the depth data of eye socket is more than The depth data of cheekbone.So depth data and imaging point at having certain imaging relations between picture value.
It can be according to the depth data of reference spatial point and being created as fitting letter at picture value for corresponding reference imaging point Number, imaging fitting function can determine the imaging relations between depth data and reference imaging point.
S135, according to reference to spatial point depth data determine the position to be repaired spatial point analog depth number According to.
The analog depth data are the depth data being adjusted according to the depth data with reference to spatial point, that is, are met The depth data of the rule of standard identification model.It can be according to depth data, position coordinates and the reset to be repaired with reference to spatial point The position coordinates for the spatial point set adjust the depth data with reference to spatial point.
Illustratively, if position to be repaired is small pox region, the depth data in small pox region is compared to reference to space Point variation is loftier, it is possible to adjust the depth data of position to be repaired according to the depth data with reference to spatial point, make For analog depth data.
S136, it is determined according to the analog depth data of the imaging fitting function and the spatial point of the position to be repaired Corresponding imaging point at picture value.
Wherein it is possible to be that the analog depth data of the spatial point of the position to be repaired are updated to imaging according to surrounding to intend Close function in, can obtain corresponding imaging point at picture value.According to the spatial point of imaging fitting function and position to be repaired Analog depth data determine at picture value, it will meet imaging fitting function determine imaging relations, that is, meet with reference to spatial point Imaging relations;And due to analog depth data fit standard, so its corresponding can also be complied with standard at picture value.
Illustratively, the small pox on the face if position to be repaired is behaved, according to the skin around small pox region at As relationship, by being adjusted at picture value to meet the imaging relations of surrounding for small pox region, the imaging in the small pox region after reparation Effect can be close to the color of the skin of surrounding.
It should be noted that the execution sequence of operation S135 is not limited to as shown in the figure, to hold before operating S134 Row.
The embodiment of the present application is by the reference spatial point of determination position to be repaired, and according to the depth with reference to spatial point Data and reference imaging value being adjusted at picture value come the imaging point to position to be repaired, can make the imaging of position to be repaired Value meets the imaging relations with reference to spatial point, and compared to the false virtualization sense in the landscaping effect of two dimensional image, the application is real It is more natural to the landscaping effect at position to be repaired to apply example.
Fig. 5 is that another kind provided by the embodiments of the present application is taken pictures the flow diagram of beautification method, in above-mentioned arbitrary implementation On the basis of the technical solution that example is provided, to three dimension of position by position to be beautified described in identification camera acquisition According to operation be optimized, optionally, as shown in figure 5, this method includes:
S140, identification camera take user when beautifying position, by the identification camera obtain described in The site depth data and position infrared data at position to be beautified.
The identification camera is three-dimensional (3D, Three Dimensional) camera, and three-dimensional camera includes a variety of Hardware configuration, it may include:Infrared sensor, range sensor and camera lens etc..
The site depth data are the collection of distance value of the spatial point apart from identification camera included by position to be beautified It closes;The site depth data at position to be beautified can be obtained by the range sensor in identification camera.
The position infrared data is the set of the infrared data of the space point reflection included by position to be beautified.Wherein, When shooting, wherein infrared sensor emits infrared signal to position to be beautified to three-dimensional camera, and position to be beautified can be to infrared Information is reflected, and the imaging at position to be beautified may be implemented according to the infrared data of the reflection received for infrared sensor.
S141, according to the site depth data determine described in position to be beautified initial three-dimensional data.
Wherein, include the distance value of spatial point included by position to be beautified in site depth data, it is possible to root The initial three-dimensional data at position to be beautified is determined according to site depth data.Illustratively, as shown in fig. 6, figure midpoint a, b, c and d For four spatial points, X, Y and Z axis representation space, the wherein depth data of Z axis representation space point, X and Y-axis representation space point Plan-position coordinate.The depth data of its midpoint a is maximum, that is, distances of the point a apart from identification camera is farthest, can from figure To see that plane coordinates and depth data according to four spatial points can form a three-dimensional centrum, to according to multiple skies Between the plane coordinates of site depth data and spatial point put can determine initial three-dimensional data.
It is initial three-dimensional but if be blocked at certain details at position to be beautified or there is a situation where loss of data The problem of corresponding details position will appear shortage of data in data, so needing further exist for according to position infrared data to initial Three-dimensional data is corrected.
S142, the initial three-dimensional data is corrected according to the position infrared data, to obtain described waiting beautifying The position three-dimensional data at position.
Wherein, for the spatial point included by position to be beautified, the depth data and infrared data of each spatial point are one by one It is corresponding.It, can be by the initial of entirety according to its corresponding infrared data for the depth data of the spatial point of shortage of data Three-dimensional data is weighed and is compared, and then carries out feature completion to the spatial point of missing.Infrared signal is a kind of electromagnetic wave, people Eye can not see infrared signal, but if night or environment it is dark there is no visible light when, infrared light still can be with It is propagated, so in dark environment, more visible imaging can also be generated according to infrared data;And then it can be according to portion Position infrared data is corrected initial three-dimensional data.
It is alternatively possible to fit correlation function is established according to the depth data of consecutive points and infrared data, and according to fitting The position infrared data of relation function and dead space point calculates corresponding depth data, and then the position three after being corrected Dimension data;Wherein, dead space point is the spatial point of depth data missing, and adjacent space point is the adjacent sky of dead space point Between point.
S143, the position three-dimensional data is identified by preset standard identification model, with the determination user Position to be beautified position to be repaired.
S144, repair process is carried out according to the position to be repaired and the position three-dimensional data.
The specific implementation mode of aforesaid operations can refer to associated description above, and details are not described herein.
Although shooting the image at position to be beautified by common camera, that is, the two-dimemsional number at the position to be beautified obtained According to can also identify the posture at position to be beautified by image procossing identification technology.But 2-D data only includes flat image Data, it is acquired if user shoots the posture at position to be beautified in dark environment for the more demanding of light In the data of flat image may the accurate position to be repaired of None- identified, so the accuracy of 2-D data is relatively low.
The embodiment of the present application by according to the site depth data determine described in position to be beautified initial three-dimensional data, The initial three-dimensional data is corrected according to the position infrared data, it is three-dimensional with the position for obtaining the position to be beautified Data;It is identified in the position of dark, initial three-dimensional data can be also corrected by position infrared data, obtained Complete position three-dimensional data, and then the accuracy of the identification of position to be repaired can be improved.
Fig. 7 is that another kind provided by the embodiments of the present application is taken pictures the flow diagram of beautification method, in above-mentioned arbitrary implementation On the basis of the technical solution that example is provided, to being known to the position three-dimensional data by preset standard identification model Not, it is optimized with the operation of the position to be repaired at the position to be beautified of the determination user, optionally, as shown in fig. 7, should Method includes:
S150, identification camera take user when beautifying position, by the identification camera obtain described in The position three-dimensional data at position to be beautified.
Specific implementation mode can refer to associated description above, and details are not described herein.
S151, the position three-dimensional data is identified by preset standard identification model, with the determination position The classification information of three-dimensional data.
S152, reference data is determined according to the classification information, and waiting for the user is determined according to the reference data Beautify the position to be repaired at position.
Wherein, when user takes pictures, the difference at the position to be beautified taken pictures, or the posture at position to be beautified are different, right The model for the standard answered is also different.For example, the face of user's shooting is when laughing, many regions can deform upon, and micro- Too large deformation will not occur for face area when laughing at, so the reference data of the facial photo of the facial photo and smile laughed is It is different.
The reference data is the site model of standard corresponding with classification information;The standard identification model include to Few one reference data.
S153, repair process is carried out according to the position to be repaired and the position three-dimensional data.
Specific implementation mode can refer to associated description above, and details are not described herein.
The embodiment of the present application is determined as standard by the classification information of determining position three-dimensional data further according to classification information Site model reference data, can further standard identification model identification accuracy, further increase area to be repaired Repair accuracy.
Optionally, the standard identification model includes Classification and Identification model;Correspondingly, mould is being identified by preset standard Before the position three-dimensional data is identified in type, further include:Default sample data is input in default grader and is carried out Training, obtains Classification and Identification model.
Wherein, the Classification and Identification model is used to be determined according to the position three-dimensional data at the position to be beautified taken and correspond to Classification information;The default sample data includes the sample three-dimensional data at position to be beautified and corresponding classification information.
Wherein, the default sample data may include multiple and different sample data, and different sample datas corresponds to The difference position to be beautified of acquisition, corresponding sample three-dimensional data and corresponding classification information;Illustratively, if waiting beautifying Position is head, and default sample data can be different the sample three-dimensional data of face's photograph and corresponding classification information.
If the position three-dimensional data be identified by Classification and Identification model, with position to be beautified described in determination Classification information, and according to the classification information determine described in position to be beautified classification information, then corresponding default sample number According to including position to be beautified sample three-dimensional data and corresponding classification information.So by sample three-dimensional data and corresponding Classification information is preset in grader as default sample data input value and is trained, to obtain Classification and Identification model, Ke Yigen It is identified according to the position three-dimensional data of input, determines corresponding classification information.
The default grader can be neural network, be carried out by presetting default sample data input value in grader Training;Default grader can extract the characteristic of sample three-dimensional data, since sample three-dimensional data is labelled with corresponding class Other information, it is possible to which corresponding site categories information to be beautified is determined according to the characteristic of extraction.
After being trained to default grader by default sample data, obtained Classification and Identification model can be to different The posture that the position to be beautified of user is made is identified, and determines corresponding classification information;Can to position three-dimensional data into Row feature extraction simultaneously carries out the determining corresponding classification information of classification, can improve the accuracy of the determination of reference data.
Fig. 8 is a kind of structure diagram for beautifying apparatus of taking pictures provided by the embodiments of the present application, which can execute and take pictures Beautification method, as shown in figure 8, the device includes:
Three-dimensional data acquisition module 210, for identification camera take user when beautifying position, by described The position three-dimensional data at position to be beautified described in identification camera acquisition;
Position determination module 211, for the position three-dimensional data to be identified by preset standard identification model, With the position to be repaired at the position to be beautified of the determination user;
Repair process module 212, for carrying out repair process according to the position to be repaired and the position three-dimensional data.
The one kind provided in the embodiment of the present application is taken pictures beautifying apparatus, and U.S. is waited for by take user in identification camera When changing position, pass through the position three-dimensional data at position to be beautified described in identification camera acquisition;Known by preset standard The position three-dimensional data is identified in other model, with the position to be repaired at the position to be beautified of the determination user;According to The position to be repaired carries out repair process with the position three-dimensional data.It, can be according to portion by using above-mentioned technical proposal The position to be repaired that position three-dimensional data treats beautification position is repaired, and can accurately be beautified to position to be repaired, is beautified Effect is truer.
Optionally, repair process module is specifically used for:
Image is adjusted according to the position to be repaired and the position three-dimensional data;Wherein, the image is The identification camera shoots the two dimensional image that the position to be beautified of the user is generated.
Optionally, repair process module specifically includes:
Imaging point determining module, for determining imaging point of the spatial point of the position to be repaired in image;Its In, the imaging point is the pixel in the image;
At picture value determining module, the depth data for the spatial point according to position to be repaired determines corresponding imaging point At picture value.
Optionally, it is specifically used at picture value determining module:
It determines the reference spatial point of position to be repaired, and determines the reference imaging with reference to spatial point in image Point;
It is created as fitting function at picture value with the reference imaging point according to the depth data with reference to spatial point;
The analog depth data of the spatial point of the position to be repaired are determined according to the depth data with reference to spatial point;
It is determined and is corresponded to according to the analog depth data of the imaging fitting function and the spatial point of the position to be repaired Imaging point at picture value.
Optionally, the identification camera is three-dimensional camera;Correspondingly, three-dimensional data acquisition module is specifically used for:
Pass through the site depth data and position infrared data at position to be beautified described in identification camera acquisition;
According to the initial three-dimensional data at position to be beautified described in site depth data determination;
The initial three-dimensional data is corrected according to the position infrared data, to obtain the position to be beautified Position three-dimensional data.
Optionally, position determination module is specifically used for:
The position three-dimensional data is identified by preset standard identification model, with determination three dimension of position According to classification information;
Reference data is determined according to the classification information, and determines that the user's waits for beautification portion according to the reference data The position to be repaired of position.
Optionally, the standard identification model includes that Classification and Identification model further includes correspondingly:
Training module, for before the position three-dimensional data is identified by preset standard identification model, Default sample data is input in default grader and is trained, Classification and Identification model is obtained;
Wherein, the Classification and Identification model is used to be determined according to the position three-dimensional data at the position to be beautified taken and correspond to Classification information;The default sample data includes the sample three-dimensional data at position to be beautified and corresponding classification information.
A kind of storage medium including computer executable instructions that the embodiment of the present application is provided, computer are executable The beautification operation of taking pictures being not limited to the described above is instructed, the beautification side of taking pictures that the application any embodiment is provided can also be performed Relevant operation in method.
The embodiment of the present application also provides a kind of storage medium including computer executable instructions, and the computer is executable When being executed by computer processor for executing beautification method of taking pictures, this method includes for instruction:
Identification camera take user when beautifying position, by the identification camera obtain described in wait beautifying The position three-dimensional data at position;
The position three-dimensional data is identified by preset standard identification model, U.S. is waited for the determination user Change the position to be repaired at position;
Repair process is carried out according to the position to be repaired and the position three-dimensional data.
Storage medium --- any various types of memory devices or storage device.Term " storage medium " is intended to wrap It includes:Install medium, such as CD-ROM, floppy disk or magnetic tape equipment;Computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, blue Bath (Rambus) RAM etc.;Nonvolatile memory, such as flash memory, magnetic medium (such as hard disk or optical storage);The memory component etc. of register or other similar types.Storage medium can further include other Memory of type or combinations thereof.In addition, storage medium can be located at program in the first computer system being wherein performed, Or can be located in different second computer systems, second computer system is connected to the by network (such as internet) One computer system.Second computer system can provide program instruction to the first computer for executing." storage is situated between term Matter " may include may reside in different location two of (such as in different computer systems by network connection) or More storage mediums.Storage medium can store the program instruction that can be executed by one or more processors and (such as implement For computer program).
The embodiment of the present application provides a kind of terminal device, and bat provided by the embodiments of the present application can be integrated in the terminal device According to beautifying apparatus.
Fig. 9 is a kind of structural schematic diagram of terminal device provided by the embodiments of the present application, and the embodiment of the present application provides one Kind of terminal device 30, including memory 31, processor 32 and are stored in the computer that can be run on memory 31 and in processor Program, the processor realize the beautification method of taking pictures described in above-described embodiment when executing the computer program.The application is real The terminal device for applying example offer, can make the landscaping effect for the image taken pictures truer.
Figure 10 is a kind of structural schematic diagram of terminal device provided by the embodiments of the present application.As shown in Figure 10, which sets It is standby to may include:Shell (not shown), touch screen (not shown), touch key-press (not shown), memory 301, central processing unit (Central Processing Unit, CPU) 302 (also known as processor, hereinafter referred to as CPU), circuit board (not shown) and power circuit (not shown).The circuit board is placed in the space interior that the shell surrounds;Institute It states CPU302 and the memory 301 is arranged on the circuit board;The power circuit, for being each of the terminal device A circuit or device power supply;The memory 301, for storing executable program code;The CPU302 passes through described in reading The executable program code stored in memory 301 runs computer program corresponding with the executable program code, with Realize following steps:
Identification camera take user when beautifying position, by the identification camera obtain described in wait beautifying The position three-dimensional data at position;
The position three-dimensional data is identified by preset standard identification model, U.S. is waited for the determination user Change the position to be repaired at position;
Repair process is carried out according to the position to be repaired and the position three-dimensional data.
The terminal device further includes:Peripheral Interface 303, RF (Radio Frequency, radio frequency) circuit 305, audio-frequency electric Road 306, loud speaker 311, power management chip 308, input/output (I/O) subsystem 309, touch screen 312, other input/controls Control equipment 310 and outside port 304, these components are communicated by one or more communication bus or signal wire 307.
It should be understood that graphic terminal 300 is only an example of terminal device, and terminal device 300 Can have than shown in the drawings more or less component, can combine two or more components, or can be with It is configured with different components.Various parts shown in the drawings can be including one or more signal processings and/or special It is realized in the combination of hardware, software or hardware and software including integrated circuit.
Just the terminal device provided in this embodiment for realizing beautification of taking pictures is described in detail below, which sets For by taking mobile phone as an example.
Memory 301, the memory 301 can be by access such as CPU302, Peripheral Interfaces 303, and the memory 301 can Can also include nonvolatile memory to include high-speed random access memory, such as one or more disk memory, Flush memory device or other volatile solid-state parts.
The peripheral hardware that outputs and inputs of equipment can be connected to CPU302 and deposited by Peripheral Interface 303, the Peripheral Interface 303 Reservoir 301.
I/O subsystems 309, the I/O subsystems 309 can be by the input/output peripherals in equipment, such as touch screen 312 With other input/control devicess 310, it is connected to Peripheral Interface 303.I/O subsystems 309 may include 3091 He of display controller One or more input controllers 3092 for controlling other input/control devicess 310.Wherein, one or more input controls Device 3092 processed receives electric signal from other input/control devicess 310 or sends electric signal to other input/control devicess 310, Other input/control devicess 310 may include physical button (pressing button, rocker buttons etc.), dial, slide switch, behaviour Vertical pole clicks idler wheel.It is worth noting that input controller 3092 can with it is following any one connect:Keyboard, infrared port, The indicating equipment of USB interface and such as mouse.
Touch screen 312, the touch screen 312 are the input interface and output interface between subscriber terminal equipment and user, Visual output is shown to user, visual output may include figure, text, icon, video etc..
Display controller 3091 in I/O subsystems 309 receives electric signal from touch screen 312 or is sent out to touch screen 312 Electric signals.Touch screen 312 detects the contact on touch screen, and the contact detected is converted to and is shown by display controller 3091 The interaction of user interface object on touch screen 312, that is, realize human-computer interaction, the user interface being shown on touch screen 312 Object can be the icon of running game, be networked to the icon etc. of corresponding network.It is worth noting that equipment can also include light Mouse, light mouse are the extensions for the touch sensitive surface for not showing the touch sensitive surface visually exported, or formed by touch screen.
RF circuits 305 are mainly used for establishing the communication of mobile phone and wireless network (i.e. network side), realize mobile phone and wireless network The data receiver of network and transmission.Such as transmitting-receiving short message, Email etc..Specifically, RF circuits 305 receive and send RF letters Number, RF signals are also referred to as electromagnetic signal, and RF circuits 305 convert electrical signals to electromagnetic signal or electromagnetic signal is converted to telecommunications Number, and communicated with communication network and other equipment by the electromagnetic signal.RF circuits 305 may include for executing The known circuit of these functions comprising but it is not limited to antenna system, RF transceivers, one or more amplifiers, tuner, one A or multiple oscillators, digital signal processor, CODEC (COder-DECoder, coder) chipset, user identifier mould Block (Subscriber Identity Module, SIM) etc..
Voicefrequency circuit 306 is mainly used for receiving audio data from Peripheral Interface 303, which is converted to telecommunications Number, and the electric signal is sent to loud speaker 311.
Loud speaker 311, the voice signal for receiving mobile phone from wireless network by RF circuits 305, is reduced to sound And play the sound to user.
Power management chip 308, the hardware for being connected by CPU302, I/O subsystem and Peripheral Interface are powered And power management.
Terminal device provided by the embodiments of the present application can make the landscaping effect for the image taken pictures truer.
Beautifying apparatus of taking pictures, storage medium and the terminal device provided in above-described embodiment, which can perform the application, arbitrarily to be implemented The beautification method of taking pictures that example is provided has and executes the corresponding function module of this method and advantageous effect.Not in above-described embodiment In detailed description technical detail, reference can be made to the beautification method of taking pictures that the application any embodiment is provided.
Note that above are only preferred embodiment and the institute's application technology principle of the application.It will be appreciated by those skilled in the art that The application is not limited to specific embodiment described here, can carry out for a person skilled in the art it is various it is apparent variation, The protection domain readjusted and substituted without departing from the application.Therefore, although being carried out to the application by above example It is described in further detail, but the application is not limited only to above example, in the case where not departing from the application design, also May include other more equivalent embodiments, and scope of the present application is determined by scope of the appended claims.

Claims (10)

  1. The beautification method 1. one kind is taken pictures, which is characterized in that including:
    Identification camera take user when beautifying position, pass through the identification camera obtain described in position to be beautified Position three-dimensional data;
    The position three-dimensional data is identified by preset standard identification model, beautification portion is waited for the determination user The position to be repaired of position;
    Repair process is carried out according to the position to be repaired and the position three-dimensional data.
  2. 2. the method as described in claim 1, which is characterized in that according to the position to be repaired and the position three-dimensional data into Row repair process includes:
    Image is adjusted according to the position to be repaired and the position three-dimensional data;Wherein, the image is described Identification camera shoots the two dimensional image that the position to be beautified of the user is generated.
  3. 3. method as claimed in claim 2, which is characterized in that according to the position to be repaired and the position three-dimensional data tune Whole image includes:
    Determine imaging point of the spatial point of the position to be repaired in image;Wherein, the imaging point is the imaging Pixel in image;
    According to the depth data of the spatial point of position to be repaired determine corresponding imaging point at picture value.
  4. 4. method as claimed in claim 3, which is characterized in that according to the determination pair of the depth data of the spatial point of position to be repaired The imaging point answered includes at picture value:
    It determines the reference spatial point of position to be repaired, and determines the reference imaging point with reference to spatial point in image;
    It is created as fitting function at picture value with the reference imaging point according to the depth data with reference to spatial point;
    The analog depth data of the spatial point of the position to be repaired are determined according to the depth data with reference to spatial point;
    According to it is described imaging fitting function and the position to be repaired spatial point analog depth data determine it is corresponding at Picture point at picture value.
  5. 5. such as Claims 1-4 any one of them method, which is characterized in that the identification camera is three-dimensional camera;Phase Ying Di, the position three-dimensional data by position to be beautified described in identification camera acquisition include:
    Pass through the site depth data and position infrared data at position to be beautified described in identification camera acquisition;
    According to the initial three-dimensional data at position to be beautified described in site depth data determination;
    The initial three-dimensional data is corrected according to the position infrared data, to obtain the position at the position to be beautified Three-dimensional data.
  6. 6. the method as described in Claims 1-4, which is characterized in that by preset standard identification model to the position three Dimension data is identified, and the position to be repaired with the position to be beautified of the determination user includes:
    The position three-dimensional data is identified by preset standard identification model, with the determination position three-dimensional data Classification information;
    Reference data is determined according to the classification information, and determine according to the reference data position to be beautified of the user Position to be repaired.
  7. 7. such as claim 6 any one of them method, which is characterized in that the standard identification model includes Classification and Identification mould Type;Correspondingly, before the position three-dimensional data is identified by preset standard identification model, further include:
    Default sample data is input in default grader and is trained, Classification and Identification model is obtained;
    Wherein, the Classification and Identification model is used to determine corresponding class according to the position three-dimensional data at the position to be beautified taken Other information;
    The default sample data includes the sample three-dimensional data at position to be beautified and corresponding classification information.
  8. The beautifying apparatus 8. one kind is taken pictures, which is characterized in that including:
    Three-dimensional data acquisition module, for identification camera take user when beautifying position, by it is described identification take the photograph The position three-dimensional data at position to be beautified as described in head acquisition;
    Position determination module, for the position three-dimensional data to be identified by preset standard identification model, with determination The position to be repaired at the position to be beautified of the user;
    Repair process module, for carrying out repair process according to the position to be repaired and the position three-dimensional data.
  9. 9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is held by processor The beautification method of taking pictures as described in any one of claim 1-7 is realized when row.
  10. 10. a kind of terminal device, which is characterized in that including memory, processor and storage are on a memory and can be in processor The computer program of operation, which is characterized in that the processor realizes that claim 1-7 such as appoints when executing the computer program Beautification method of taking pictures described in one.
CN201810468504.4A 2018-05-16 2018-05-16 It takes pictures beautification method, device, storage medium and terminal device Pending CN108734121A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810468504.4A CN108734121A (en) 2018-05-16 2018-05-16 It takes pictures beautification method, device, storage medium and terminal device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810468504.4A CN108734121A (en) 2018-05-16 2018-05-16 It takes pictures beautification method, device, storage medium and terminal device

Publications (1)

Publication Number Publication Date
CN108734121A true CN108734121A (en) 2018-11-02

Family

ID=63937390

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810468504.4A Pending CN108734121A (en) 2018-05-16 2018-05-16 It takes pictures beautification method, device, storage medium and terminal device

Country Status (1)

Country Link
CN (1) CN108734121A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112330571A (en) * 2020-11-27 2021-02-05 维沃移动通信有限公司 Image processing method and device and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104318603A (en) * 2014-09-12 2015-01-28 上海明穆电子科技有限公司 Method and system for generating 3D model by calling picture from mobile phone photo album
CN105598450A (en) * 2016-02-02 2016-05-25 陕西天元智能再制造股份有限公司 Laser three-dimensional profiling repair method for damaged components and parts
CN107948499A (en) * 2017-10-31 2018-04-20 维沃移动通信有限公司 A kind of image capturing method and mobile terminal
CN108009982A (en) * 2017-12-18 2018-05-08 信利光电股份有限公司 A kind of photo beautification method, device, equipment and computer-readable recording medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104318603A (en) * 2014-09-12 2015-01-28 上海明穆电子科技有限公司 Method and system for generating 3D model by calling picture from mobile phone photo album
CN105598450A (en) * 2016-02-02 2016-05-25 陕西天元智能再制造股份有限公司 Laser three-dimensional profiling repair method for damaged components and parts
CN107948499A (en) * 2017-10-31 2018-04-20 维沃移动通信有限公司 A kind of image capturing method and mobile terminal
CN108009982A (en) * 2017-12-18 2018-05-08 信利光电股份有限公司 A kind of photo beautification method, device, equipment and computer-readable recording medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112330571A (en) * 2020-11-27 2021-02-05 维沃移动通信有限公司 Image processing method and device and electronic equipment

Similar Documents

Publication Publication Date Title
US11138434B2 (en) Electronic device for providing shooting mode based on virtual character and operation method thereof
CN109547701B (en) Image shooting method and device, storage medium and electronic equipment
CN108681402A (en) Identify exchange method, device, storage medium and terminal device
CN108646920A (en) Identify exchange method, device, storage medium and terminal device
CN107995428B (en) Image processing method, image processing device, storage medium and mobile terminal
CN113454974A (en) Method for determining dial plate image and electronic equipment thereof
CN109741281B (en) Image processing method, image processing device, storage medium and terminal
CN109348135A (en) Photographic method, device, storage medium and terminal device
CN109741288A (en) Image processing method, device, storage medium and electronic equipment
CN108491780B (en) Image beautification processing method and device, storage medium and terminal equipment
CN109784252A (en) Image processing method, device, storage medium and electronic equipment
CN108494996B (en) Image processing method, device, storage medium and mobile terminal
CN112581358B (en) Training method of image processing model, image processing method and device
CN110349526A (en) Augmented reality adjusting method, device, storage medium and augmented reality equipment
CN109618098A (en) A kind of portrait face method of adjustment, device, storage medium and terminal
CN108665510B (en) Rendering method and device of continuous shooting image, storage medium and terminal
CN109348206A (en) Image white balancing treatment method, device, storage medium and mobile terminal
US11284020B2 (en) Apparatus and method for displaying graphic elements according to object
US11144197B2 (en) Electronic device performing function according to gesture input and operation method thereof
US20220086328A1 (en) Electronic device and method for connecting ground node to camera module
CN110349271B (en) Lens color adjustment method, device, storage medium and augmented reality equipment
CN108921815A (en) It takes pictures exchange method, device, storage medium and terminal device
CN114298123A (en) Clustering method and device, electronic equipment and readable storage medium
CN109561291A (en) Color temperature compensating method, device, storage medium and mobile terminal
CN108765321B (en) Shooting repair method and device, storage medium and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20190108

Address after: Room 2101, 600 Longhuazhong Road, Xuhui District, Shanghai, 2002

Applicant after: Shanghai Jinsheng Communication Technology Co., Ltd.

Address before: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant before: OPPO Guangdong Mobile Communications Co., Ltd.

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

Application publication date: 20181102