CN110288520A - Image beautification method, device and electronic equipment - Google Patents
Image beautification method, device and electronic equipment Download PDFInfo
- Publication number
- CN110288520A CN110288520A CN201910580719.XA CN201910580719A CN110288520A CN 110288520 A CN110288520 A CN 110288520A CN 201910580719 A CN201910580719 A CN 201910580719A CN 110288520 A CN110288520 A CN 110288520A
- Authority
- CN
- China
- Prior art keywords
- waist
- image
- key point
- target object
- point
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 47
- 210000001217 buttock Anatomy 0.000 claims abstract description 44
- 238000001514 detection method Methods 0.000 claims abstract description 22
- 210000004705 lumbosacral region Anatomy 0.000 claims abstract description 21
- 238000001914 filtration Methods 0.000 claims description 14
- 238000003708 edge detection Methods 0.000 claims description 13
- 238000012937 correction Methods 0.000 claims description 9
- 238000006243 chemical reaction Methods 0.000 claims description 8
- 230000001052 transient effect Effects 0.000 claims description 6
- 238000004891 communication Methods 0.000 claims description 5
- 238000012545 processing Methods 0.000 abstract description 16
- 238000010586 diagram Methods 0.000 description 12
- 238000004364 calculation method Methods 0.000 description 9
- 238000004590 computer program Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 8
- 238000011156 evaluation Methods 0.000 description 5
- 230000006835 compression Effects 0.000 description 3
- 238000007906 compression Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000006399 behavior Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000005611 electricity Effects 0.000 description 2
- 230000005291 magnetic effect Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- PXFBZOLANLWPMH-UHFFFAOYSA-N 16-Epiaffinine Natural products C1C(C2=CC=CC=C2N2)=C2C(=O)CC2C(=CC)CN(C)C1C2CO PXFBZOLANLWPMH-UHFFFAOYSA-N 0.000 description 1
- 241000406668 Loxodonta cyclotis Species 0.000 description 1
- 241001465754 Metazoa Species 0.000 description 1
- 230000004075 alteration Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000000151 deposition Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 238000010191 image analysis Methods 0.000 description 1
- 238000003709 image segmentation Methods 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000000644 propagated effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/18—Image warping, e.g. rearranging pixels individually
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
A kind of image beautification method, device and electronic equipment are provided in the embodiment of the present disclosure, belong to technical field of image processing, this method comprises: the seat area to target object on target image and shoulder regions execute critical point detection respectively, buttocks key point and shoulder key point are obtained;Based on the buttocks key point and the shoulder key point, the target object waist center point coordinate and upper part of the body height are determined;Using the waist center point coordinate and upper part of the body height, determine that the waist of the target object indicates region;Using the deformation parameter for lumbar region got, centered on the center point coordinate, the image in region, which executes horizontal distortion operation, to be indicated to the waist, forms the beautifying picture comprising waist deformation pattern.By the processing scheme of the disclosure, the aesthetics of image is improved.
Description
Technical field
This disclosure relates to technical field of image processing more particularly to a kind of image beautification method, device and electronic equipment.
Background technique
Image procossing (image processing) is also known as image processing, is needed for being reached with computer to image
As a result technology.Originating from the 1920s, generally Digital Image Processing.The main contents of image processing techniques include figure
As compression, enhancing restore, matching description identification 3 parts, common processing have image digitazation, image coding, image enhancement,
Image restoration, image segmentation and image analysis etc..Image procossing is to be processed image information to meet people using computer
Visual psychology or application demand behavior, be widely used, be chiefly used in mapping science, atmospheric science, astronomy, U.S. figure, make figure
As improving identification etc..
Universal with smart phone, the use of mobile phone taken pictures is also just more and more, during being shot using mobile phone,
Due to a variety of causes such as shooting angle, it will lead to people and shoot the photo to be formed there are Body proportions not to be able to satisfy users' expectation
Problem, as a kind of situation, user wishes that the waist oneself shot in the photo come is thinner, to meet portrait photographs in shape
Aesthetic feeling on body.
Summary of the invention
In view of this, the embodiment of the present disclosure provides a kind of image beautification method, device and electronic equipment, at least partly solve
Problems of the prior art.
In a first aspect, the embodiment of the present disclosure provides a kind of image beautification method, comprising:
The seat area to target object on target image and shoulder regions execute critical point detection respectively, obtain buttocks pass
Key point and shoulder key point;
Based on the buttocks key point and the shoulder key point, determine the target object waist center point coordinate and on
Half body height;
Using the waist center point coordinate and upper part of the body height, determine that the waist of the target object indicates region;
Using the deformation parameter for lumbar region got, centered on the center point coordinate, to the waist
It indicates that the image in region executes horizontal distortion operation, forms the beautifying picture comprising waist deformation pattern.
It is described respectively to the buttocks of target object on target image according to a kind of specific implementation of the embodiment of the present disclosure
Before region and shoulder regions execute critical point detection, the method also includes:
The target image is transformed to gray level image;
Edge detection is carried out to the gray level image, obtains the edge contour of the target object.
It is described that edge detection is carried out to the gray level image according to a kind of specific implementation of the embodiment of the present disclosure, it obtains
To the edge contour of the target object, comprising:
Choose multiple structural elements of different orientation;
Details description is carried out to the gray level image using each structural element in multiple structural elements, to be filtered
Image;
The gray-scale edges of filtering image are determined, to obtain depositing in each grey level in multiple grey levels in filtering image
Pixel number;
Pixel number in each grey level is weighted, and using the average gray after weighting as threshold value;
Binary conversion treatment is carried out to the filtering image based on the threshold value;
Using the image after binary conversion treatment as the edge image of the target object.
It is described to be closed based on the buttocks key point and the shoulder according to a kind of specific implementation of the embodiment of the present disclosure
Key point determines the target object waist center point coordinate and upper part of the body height, comprising:
Obtain the first distance D between buttocks key point and shoulder key point;
By the product of the first distance and predetermined coefficient, as the upper part of the body height.
It is described to be closed based on the buttocks key point and the shoulder according to a kind of specific implementation of the embodiment of the present disclosure
Key point determines the target object waist center point coordinate and upper part of the body height, comprising:
The first average coordinates M1 of buttocks key point and the second average coordinates M2 of shoulder key point are obtained respectively;
Using a1*M1+a2*M2 as the waist center point coordinate, wherein a1 and a2 is waist central point correction factor,
A1 and a2 are all larger than 0, a1+a2=1.
It is described to utilize the waist center point coordinate and the upper part of the body according to a kind of specific implementation of the embodiment of the present disclosure
Height determines that the waist of the target object indicates region, comprising:
The buttocks key point and waist key point are obtained respectively in the length distance N1 and N2 of horizontal plane;
The width in region is indicated using b1*N1+b2*N2 as the waist, wherein b1 and b2 is width correction coefficient, b1
0, b1+b2 < 1 is all larger than with b2;
The height in region is indicated using b3*D as the waist, wherein b3 is altitude correction factor, b3 > 1;
The central point in region is indicated using the waist central point as the waist.
It is described respectively to the buttocks of target object on target image according to a kind of specific implementation of the embodiment of the present disclosure
Region and shoulder regions execute critical point detection, comprising:
Edge detection is executed to target object, obtains the profile point of target object;
It selects any profile point as initial sweep point, establishes the line pointer and column pointer for being directed toward initial sweep point, and
It is directed toward total pointer of line pointer, downwardly directed column pointer to the right;
When based on other scanning elements except profile spot scan initial sweep point, the row of other scanning elements is established accordingly
Pointer, column pointer and total pointer;
Based on the line pointer, column pointer and total pointer, the seat area of target object and the key of shoulder regions are determined
Point.
It is described to be based on the line pointer, column pointer and total pointer according to a kind of specific implementation of the embodiment of the present disclosure,
Determine the seat area of target object and the key point of shoulder regions, comprising:
The line pointer of row coordinate Y=Y0+R0 is obtained on human body contour outline point, wherein Y0 is being averaged for seat area key point
Row coordinate, R0 are the head radius determined according to seat area key point;
The key point Pi (Xi, Yi) for traversing all shoulder regions, if X0-R0 < Xi < X0, it is determined that Pi is target object
Left key point, if X0 < Xi < X0+R0, it is determined that Pi be target object right key point;
From the left key point and right key point finally determined, the seat area of target object and the pass of shoulder regions are determined
Key point.
Second aspect, the embodiment of the present disclosure provide a kind of image beautifying apparatus, comprising:
Detection module, for the seat area and shoulder regions execution key point inspection respectively to target object on target image
It surveys, obtains buttocks key point and shoulder key point;
First determining module determines the target object for being based on the buttocks key point and the shoulder key point
Waist center point coordinate and upper part of the body height;
Second determining module determines the target object for utilizing the waist center point coordinate and upper part of the body height
Waist indicate region;
Beautify module, for using the deformation parameter for lumbar region that gets, with the center point coordinate is
The heart indicates that the image in region executes horizontal distortion operation to the waist, forms the beautifying picture comprising waist deformation pattern.
The third aspect, the embodiment of the present disclosure additionally provide a kind of electronic equipment, which includes:
At least one processor;And
The memory being connect at least one processor communication;Wherein,
The memory is stored with the instruction that can be executed by least one processor, and the instruction is by least one processor
It executes, so that at least one processor is able to carry out the figure in any implementation of aforementioned first aspect or first aspect
As beautification method.
Fourth aspect, the embodiment of the present disclosure additionally provide a kind of non-transient computer readable storage medium, the non-transient meter
Calculation machine readable storage medium storing program for executing stores computer instruction, and the computer instruction is for making the computer execute aforementioned first aspect or the
Image beautification method in any implementation of one side.
5th aspect, the embodiment of the present disclosure additionally provide a kind of computer program product, which includes
The calculation procedure being stored in non-transient computer readable storage medium, the computer program include program instruction, when the program
When instruction is computer-executed, the computer is made to execute the image in aforementioned first aspect or any implementation of first aspect
Beautification method.
Image in the embodiment of the present disclosure beautifies scheme, including respectively to target object on target image seat area and
Shoulder regions execute critical point detection, obtain buttocks key point and shoulder key point;Based on the buttocks key point and the shoulder
Portion's key point determines the target object waist center point coordinate and upper part of the body height;Using the waist center point coordinate and
Upper part of the body height determines that the waist of the target object indicates region;Using the deformation parameter for lumbar region got,
Centered on the center point coordinate, the image in region, which executes horizontal distortion operation, to be indicated to the waist, being formed includes waist
The beautifying picture of deformation pattern.By the scheme of the disclosure, the aesthetics of image is provided.
Detailed description of the invention
It, below will be to needed in the embodiment attached in order to illustrate more clearly of the technical solution of the embodiment of the present disclosure
Figure is briefly described, it should be apparent that, the accompanying drawings in the following description is only some embodiments of the present disclosure, for this field
For those of ordinary skill, without creative efforts, it can also be obtained according to these attached drawings other attached drawings.
Fig. 1 is that a kind of picture that the embodiment of the present disclosure provides beautifies flow diagram;
Fig. 2 is a kind of key point schematic diagram based on human body that the embodiment of the present disclosure provides;
Fig. 3 is that another picture that the embodiment of the present disclosure provides beautifies flow diagram;
Fig. 4 is that another picture that the embodiment of the present disclosure provides beautifies flow diagram;
Fig. 5 is a kind of picture beautifying apparatus structural schematic diagram that the embodiment of the present disclosure provides;
Fig. 6 is the electronic equipment schematic diagram that the embodiment of the present disclosure provides.
Specific embodiment
The embodiment of the present disclosure is described in detail with reference to the accompanying drawing.
Illustrate embodiment of the present disclosure below by way of specific specific example, those skilled in the art can be by this specification
Disclosed content understands other advantages and effect of the disclosure easily.Obviously, described embodiment is only the disclosure
A part of the embodiment, instead of all the embodiments.The disclosure can also be subject to reality by way of a different and different embodiment
It applies or applies, the various details in this specification can also be based on different viewpoints and application, in the spirit without departing from the disclosure
Lower carry out various modifications or alterations.It should be noted that in the absence of conflict, the feature in following embodiment and embodiment can
To be combined with each other.Based on the embodiment in the disclosure, those of ordinary skill in the art are without creative efforts
Every other embodiment obtained belongs to the range of disclosure protection.
It should be noted that the various aspects of embodiment within the scope of the appended claims are described below.Ying Xian
And be clear to, aspect described herein can be embodied in extensive diversified forms, and any specific structure described herein
And/or function is only illustrative.Based on the disclosure, it will be understood by one of ordinary skill in the art that one described herein
Aspect can be independently implemented with any other aspect, and can combine the two or both in these aspects or more in various ways.
For example, carry out facilities and equipments in terms of any number set forth herein can be used and/or practice method.In addition, can make
With other than one or more of aspect set forth herein other structures and/or it is functional implement this equipment and/or
Practice the method.
It should also be noted that, diagram provided in following embodiment only illustrates the basic structure of the disclosure in a schematic way
Think, component count, shape and the size when only display is with component related in the disclosure rather than according to actual implementation in schema are drawn
System, when actual implementation kenel, quantity and the ratio of each component can arbitrarily change for one kind, and its assembly layout kenel can also
It can be increasingly complex.
In addition, in the following description, specific details are provided for a thorough understanding of the examples.However, fields
The skilled person will understand that the aspect can be practiced without these specific details.
The embodiment of the present disclosure provides a kind of image beautification method.Image beautification method provided in this embodiment can be by a meter
Device is calculated to execute, which can be implemented as software, or be embodied as the combination of software and hardware, which can
To be integrally disposed in server, terminal device etc..
Referring to Fig. 1, a kind of image beautification method of embodiment of the present disclosure offer, comprising:
S101, the seat area to target object on target image and shoulder regions execute critical point detection respectively, obtain
Buttocks key point and shoulder key point.
Target image is the image for needing to carry out landscaping treatment, and target image can be to be shot by equipment such as smart phones
The picture of acquisition is also possible to the picture obtained by other means.
Target object is object present in target image, and generally, target object can be people, for example, user is logical
Cross the equipment such as mobile phone have taken one include personage image, the personage in image just constitutes target object.Target object removes
It can be except people, can also be the other kinds of object such as animal.
Target object shows seat area and shoulder regions on target image.It, can be with needle after target image is formed
Critical point detection is executed to seat area and shoulder regions, and then obtains multiple buttocks key points and multiple shoulder regions key
Point.Such as CPM (Convolutional Pose can be used to the critical point detection of seat area and shoulder regions
Machine, convolution gesture detector), the modes such as PAF (Part Affinity Fields, position detection method that part is affine)
Come carry out.The detection method of key point is not construed as limiting herein.
S102 is based on the buttocks key point and the shoulder key point, determines that the target object waist central point is sat
Mark and upper part of the body height.
Referring to fig. 2, buttocks key point and shoulder key point may include the set of keypoints of multiple key points, for example, stern
Portion's key point may include key point P12, P3 and P16, and shoulder key point may include key point P4, P2 and P8.
Buttocks key point and shoulder key point obtained by calculation, can determine the center point coordinate of lumbar region.Tool
Body, the coordinate position of available buttocks key point calculates the central point of buttocks using these key point coordinate informations,
For example the key point coordinate of buttocks is carried out average computation, or be weighted and averaged to key point coordinate.It can also adopt
Other similar fashions are taken to calculate the center point coordinate of seat area.
At the same time, the coordinate position that can also obtain shoulder key point is calculated using these key point coordinate informations
The central point of shoulder out, for example the key point coordinate of shoulder is carried out average computation, or be weighted to key point coordinate
It is average etc..Other similar fashions can also be taken to calculate the center point coordinate of shoulder regions.
It, can by by the center point coordinate T2 (x2, y2) of the center point coordinate T1 (x1, y1) of seat area and shoulder regions
The coordinate T3 (x3, y3) of waist central point is obtained by calculation.For example, x3=0.6*x1+0.4*x2, y3=0.6*y1+
0.4*y2.In this way or the mode similar with this mode, the coordinate T3 of waist central point can be calculated.It obtains
After the center point coordinate of waist, it can be directed to lumbar region based on the center point coordinate and execute respective image processing.
By calculating the distance between shoulder center point coordinate T2 and buttocks central point, the upper half of target object can be obtained
Body height.
S103 determines that the waist of the target object indicates area using the waist center point coordinate and upper part of the body height
Domain.
Other than calculating the center point coordinate of lumbar region, waist can also be calculated using these key point coordinate informations
The size in portion, for example obtain a smallest rectangle using buttocks and shoulder key point coordinate and can make the key of buttocks and shoulder
Point is all in this rectangle inside, and then the point centered on waist centre coordinate, which is compressed in vertical direction
(for example, be compressed to former height in vertical direction 30%) obtains compression rectangle, and then obtains waist based on the compression rectangle
Indicate region.Waist indicates that region can be used to describe the approximate region of waist.Certainly, according to the actual needs, in addition to using
Rectangle indicates except region to describe waist, can also use other figures such as circle, ellipse.
S104, using the deformation parameter for lumbar region got, centered on the center point coordinate, to described
Waist indicates that the image in region executes horizontal distortion operation, forms the beautifying picture comprising waist deformation pattern.
Lumbar region is during forming image on target image, it will usually due to shooting angle etc., lead to waist
The area in portion region wishes that the area ratio of lumbar region is practical compared to bigger or user compared to the area at other positions of body
The area of lumbar region also want small, thus can be by waist area to improve the aesthetics of the waist of target object
The mode that domain is deformed adjusts display of the target object on target image, to achieve the effect that beautification.
Before carrying out deformation, the deformation parameter of lumbar region can be further obtained, deformation parameter is illustrated to waist
The scaling in portion region indicates to execute lumbar region 0.9 times of scaling processing for example, deformation parameter can be 0.9.
Deformation parameter can obtain in several ways, and as a kind of mode, deformation parameter can be according to user corresponding
Interactive interface on the value that inputs determine.Alternatively, alternatively mode, deformation parameter can also be by calculating mesh automatically
The ratio of object body various pieces on targeted graphical is marked to be calculated automatically from.
After obtaining deformation parameter, deformation can be carried out to this lumbar region.For example, lumbar region boundary can be existed
Compressive deformation is carried out in horizontal direction, or lumbar region is pressed by way of stretching lumbar region in vertical direction
Contracting deformation.
By the scheme in the application, can guarantee to carry out effective deformation to the lumbar region of target object, to mention
High overall aesthetic degree of the target object on target image.
Referring to Fig. 3, according to a kind of specific implementation of the embodiment of the present disclosure, respectively to target object on target image
Seat area and shoulder regions execute critical point detection before, the method also includes:
The target image is transformed to gray level image by S301.
In order to reduce the computational efficiency of target image, target image can be converted into gray level image, be based on gray level image
To carry out critical point detection.
S302 carries out edge detection to the gray level image, obtains the edge contour of the target object.
Edge detection can be carried out to gray level image using a variety of methods, referring to fig. 4, in the process for realizing step S302
In, edge detection is carried out to the gray level image, the edge contour of the target object is obtained, may include steps of:
S401 chooses multiple structural elements of different orientation.
Target object can be detected by edge detection operator, if edge detection operator is only with a kind of structure
Element exports in image and contains only a kind of geological information, is unfavorable for the holding of image detail.In order to guarantee that image is examined
The accuracy of survey, selection include the edge detection operator of various structures member.
S402 carries out details description to the gray level image using each structural element in multiple structural elements, obtains
Filtering image.
By using multiple structural elements of different orientation, using each structural element as a kind of scale to image detail into
Row matching can sufficiently keep the various details of image while being filled into the noise of different type and size.
S403 determines that the gray-scale edges of filtering image calculate, to obtain in filtering image each ash in multiple grey levels
Spend pixel number present in rank.
After image filtering, in order to further reduce calculation amount, the image after filtering can be changed into gray scale
Picture present in each gray-level image can be calculated by the way that multiple grey levels are arranged to gray level image in image
Prime number.
S404 is weighted the pixel number in each grey level, and using the average gray after weighting as threshold value.
Number based on pixel in different grey-scale, it may be considered that processing is weighted to grey level based on pixel number,
For example, the grey scale values more for pixel number give biggish weight, the grey scale values setting less for pixel number
Lesser weight, by carrying out mean value calculation to the gray value after weighting, average gray value after being weighted as threshold value,
So as to carry out binary conversion treatment to gray level image based on the average gray value.
S405 carries out binary conversion treatment to the filtering image based on the threshold value.
Based on the threshold value, binary conversion treatment can be carried out to filtering image, for example, for the pixel two-value for being greater than the threshold value
Data 1 are turned to, the pixel two-value for being less than the threshold value turns to 0.
S406, using the image after binary conversion treatment as the edge image of the target object.
By just having obtained the edge image of target object for the corresponding color assignment of data progress after binaryzation,
Such as two-value is turned into 1 pixel assignment as black, the image that two-value turns to 0 is assigned a value of white.
Target object is improved under the premise of reducing system resources consumption by the step in step S401~S406
The accuracy of detection.
It is crucial based on the buttocks key point and the shoulder as another implementation of the embodiment of the present disclosure
Point determines the target object waist center point coordinate and upper part of the body height, can also obtain buttocks key point (for example, buttocks
Center point coordinate) and waist key point (for example, shoulder key point centre coordinate) between first distance D, by described first away from
From the product with predetermined coefficient, as the upper part of the body height.
It is crucial based on the buttocks key point and the shoulder as another implementation of the embodiment of the present disclosure
Point determines the target object waist center point coordinate and upper part of the body height, comprising: obtain buttocks key point respectively first is flat
The second average coordinates M2 of equal coordinate M1 and shoulder key point, using a1*M1+a2*M2 as the waist center point coordinate,
In, a1 and a2 are waist central point correction factor, and the specific value that a1 and a2 are all larger than 0, a1+a2=1, a1 and a2 can basis
It is actual to need to carry out flexible configuration, setting means of a1 and a2 numerical value is not construed as limiting at this.
As another implementation of the embodiment of the present disclosure, the waist center point coordinate and upper part of the body body are utilized
It is long, it determines that the waist of the target object indicates region, may include: to obtain the buttocks key point and waist key point respectively
In the length distance N1 and N2 of horizontal plane;The width in region is indicated using b1*N1+b2*N2 as the waist, wherein a1 and a2
For waist central point correction factor, a1 and a2 are all larger than 0, b1+b2 < 1;The height in region is indicated using b3*D as the waist;
The central point in region is indicated using the waist central point as the waist, wherein b3 is altitude correction factor, b3 > 1.b1,b2
Flexible configuration can be carried out according to the actual needs with the specific value of b3, not to the setting means of b1, b2 and b3 numerical value at this
It limits.
As another implementation of the embodiment of the present disclosure, respectively to the seat area of target object on target image
Critical point detection is executed with shoulder regions, comprising: edge detection is executed to target object, obtains the profile point of target object;Choosing
It selects any profile point and establishes the line pointer and column pointer for being directed toward initial sweep point as initial sweep point, and be directed toward row to the right
Total pointer of pointer, downwardly directed column pointer;When based on other scanning elements except profile spot scan initial sweep point, accordingly
The line pointer for establishing other scanning elements, column pointer and total pointer;Based on the line pointer, column pointer and total pointer, mesh is determined
Mark the seat area of object and the key point of shoulder regions.
As another implementation of the embodiment of the present disclosure, it is based on the line pointer, column pointer and total pointer, is determined
The seat area of target object and the key point of shoulder regions, comprising: obtain row coordinate Y=Y0+R0's on human body contour outline point
Line pointer, wherein Y0 is the average row coordinate of seat area key point, and R0 is the head half determined according to seat area key point
Diameter;The key point Pi (Xi, Yi) for traversing all shoulder regions and seat area, if X0-R0 < Xi < X0, it is determined that Pi is target
The left key point of object, if X0 < Xi < X0+R0, it is determined that Pi is the right key point of target object;From the left key finally determined
In point and right key point, the seat area of target object and the key point of shoulder regions are determined.
Corresponding with above method embodiment, referring to Fig. 5, the disclosure additionally provides a kind of image beautifying apparatus 50, packet
It includes:
Detection module 501, for respectively to target object on target image seat area and shoulder regions execute key
Point detection, obtains buttocks key point and shoulder key point;
First determining module 502 determines the target pair for being based on the buttocks key point and the shoulder key point
As waist center point coordinate and upper part of the body height;
Second determining module 503 determines the target pair for utilizing the waist center point coordinate and upper part of the body height
The waist of elephant indicates region;
Beautify module 504, for being with the center point coordinate using the deformation parameter for lumbar region got
Center indicates that the image in region executes horizontal distortion operation to the waist, forms the beautifying picture comprising waist deformation pattern.
Fig. 5 shown device can it is corresponding execute above method embodiment in content, what the present embodiment was not described in detail
Part, referring to the content recorded in above method embodiment, details are not described herein.
Referring to Fig. 6, the embodiment of the present disclosure additionally provides a kind of electronic equipment 60, which includes:
At least one processor;And
The memory being connect at least one processor communication;Wherein,
The memory is stored with the instruction that can be executed by least one processor, and the instruction is by least one processor
It executes, so that at least one processor is able to carry out image beautification method in preceding method embodiment.
The embodiment of the present disclosure additionally provides a kind of non-transient computer readable storage medium, and the non-transient computer is readable to deposit
Storage media stores computer instruction, and the computer instruction is for executing the computer in preceding method embodiment.
The embodiment of the present disclosure additionally provides a kind of computer program product, and the computer program product is non-temporary including being stored in
Calculation procedure on state computer readable storage medium, the computer program include program instruction, when the program instruction is calculated
When machine executes, the computer is made to execute the image beautification method in preceding method embodiment.
Below with reference to Fig. 6, it illustrates the structural schematic diagrams for the electronic equipment 60 for being suitable for being used to realize the embodiment of the present disclosure.
Electronic equipment in the embodiment of the present disclosure can include but is not limited to such as mobile phone, laptop, Digital Broadcasting Receiver
Device, PDA (personal digital assistant), PAD (tablet computer), PMP (portable media player), car-mounted terminal are (such as vehicle-mounted
Navigation terminal) etc. mobile terminal and such as number TV, desktop computer etc. fixed terminal.Electronics shown in Fig. 6
Equipment is only an example, should not function to the embodiment of the present disclosure and use scope bring any restrictions.
As shown in fig. 6, electronic equipment 60 may include processing unit (such as central processing unit, graphics processor etc.) 601,
It can be loaded into random access storage according to the program being stored in read-only memory (ROM) 602 or from storage device 608
Program in device (RAM) 603 and execute various movements appropriate and processing.In RAM 603, it is also stored with the behaviour of electronic equipment 60
Various programs and data needed for making.Processing unit 601, ROM 602 and RAM 603 are connected with each other by bus 604.It is defeated
Enter/export (I/O) interface 605 and is also connected to bus 604.
In general, following device can connect to I/O interface 605: including such as touch screen, touch tablet, keyboard, mouse, figure
As the input unit 606 of sensor, microphone, accelerometer, gyroscope etc.;Including such as liquid crystal display (LCD), loudspeaking
The output device 607 of device, vibrator etc.;Storage device 608 including such as tape, hard disk etc.;And communication device 609.It is logical
T unit 609 can permit electronic equipment 60 and wirelessly or non-wirelessly be communicated with other equipment to exchange data.Although showing in figure
The electronic equipment 60 with various devices is gone out, it should be understood that being not required for implementing or having all devices shown.
It can alternatively implement or have more or fewer devices.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description
Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium
On computer program, which includes the program code for method shown in execution flow chart.In such reality
It applies in example, which can be downloaded and installed from network by communication device 609, or from storage device 608
It is mounted, or is mounted from ROM 602.When the computer program is executed by processing unit 601, the embodiment of the present disclosure is executed
Method in the above-mentioned function that limits.
It should be noted that the above-mentioned computer-readable medium of the disclosure can be computer-readable signal media or meter
Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not
Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter
The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires
Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage
Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device,
Or above-mentioned any appropriate combination.In the disclosure, computer readable storage medium can be it is any include or storage journey
The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this
In open, computer-readable signal media may include in a base band or as the data-signal that carrier wave a part is propagated,
In carry computer-readable program code.The data-signal of this propagation can take various forms, including but not limited to
Electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer-readable and deposit
Any computer-readable medium other than storage media, the computer-readable signal media can send, propagate or transmit and be used for
By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium
Program code can transmit with any suitable medium, including but not limited to: electric wire, optical cable, RF (radio frequency) etc. are above-mentioned
Any appropriate combination.
Above-mentioned computer-readable medium can be included in above-mentioned electronic equipment;It is also possible to individualism, and not
It is fitted into the electronic equipment.
Above-mentioned computer-readable medium carries one or more program, when said one or multiple programs are by the electricity
When sub- equipment executes, so that the electronic equipment: obtaining at least two internet protocol addresses;Send to Node evaluation equipment includes institute
State the Node evaluation request of at least two internet protocol addresses, wherein the Node evaluation equipment is internet from described at least two
In protocol address, chooses internet protocol address and return;Receive the internet protocol address that the Node evaluation equipment returns;Its
In, the fringe node in acquired internet protocol address instruction content distributing network.
Alternatively, above-mentioned computer-readable medium carries one or more program, when said one or multiple programs
When being executed by the electronic equipment, so that the electronic equipment: receiving the Node evaluation including at least two internet protocol addresses and request;
From at least two internet protocol address, internet protocol address is chosen;Return to the internet protocol address selected;Wherein,
The fringe node in internet protocol address instruction content distributing network received.
The calculating of the operation for executing the disclosure can be write with one or more programming languages or combinations thereof
Machine program code, above procedure design language include object oriented program language-such as Java, Smalltalk, C+
+, it further include conventional procedural programming language-such as " C " language or similar programming language.Program code can
Fully to execute, partly execute on the user computer on the user computer, be executed as an independent software package,
Part executes on the remote computer or executes on a remote computer or server completely on the user computer for part.
In situations involving remote computers, remote computer can pass through the network of any kind --- including local area network (LAN)
Or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as utilize Internet service
Provider is connected by internet).
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the disclosure, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use
The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box
The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually
It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse
Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding
The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction
Combination realize.
Being described in unit involved in the embodiment of the present disclosure can be realized by way of software, can also be by hard
The mode of part is realized.Wherein, the title of unit does not constitute the restriction to the unit itself under certain conditions, for example, the
One acquiring unit is also described as " obtaining the unit of at least two internet protocol addresses ".
It should be appreciated that each section of the disclosure can be realized with hardware, software, firmware or their combination.
The above, the only specific embodiment of the disclosure, but the protection scope of the disclosure is not limited thereto, it is any
Those familiar with the art is in the technical scope that the disclosure discloses, and any changes or substitutions that can be easily thought of, all answers
Cover within the protection scope of the disclosure.Therefore, the protection scope of the disclosure should be subject to the protection scope in claims.
Claims (11)
1. a kind of image beautification method characterized by comprising
The seat area to target object on target image and shoulder regions execute critical point detection respectively, obtain buttocks key point
With shoulder key point;
Based on the buttocks key point and the shoulder key point, the target object waist center point coordinate and the upper part of the body are determined
Height;
Using the waist center point coordinate and upper part of the body height, determine that the waist of the target object indicates region;
Using the deformation parameter for lumbar region got, centered on the center point coordinate, the waist is indicated
The image in region executes horizontal distortion operation, forms the beautifying picture comprising waist deformation pattern.
2. the method according to claim 1, wherein described respectively to the buttocks area of target object on target image
Before domain and shoulder regions execute critical point detection, the method also includes:
The target image is transformed to gray level image;
Edge detection is carried out to the gray level image, obtains the edge contour of the target object.
3. according to the method described in claim 2, it is characterized in that, it is described to the gray level image carry out edge detection, obtain
The edge contour of the target object, comprising:
Choose multiple structural elements of different orientation;
Details description is carried out to the gray level image using each structural element in multiple structural elements, to obtain filtering figure
Picture;
The gray-scale edges of filtering image are determined, to obtain in filtering image in multiple grey levels present in each grey level
Pixel number;
Pixel number in each grey level is weighted, and using the average gray after weighting as threshold value;
Binary conversion treatment is carried out to the filtering image based on the threshold value;
Using the image after binary conversion treatment as the edge image of the target object.
4. the method according to claim 1, wherein described crucial based on the buttocks key point and the shoulder
Point determines the target object waist center point coordinate and upper part of the body height, comprising:
Obtain the first distance D between buttocks key point and shoulder key point;
By the product of the first distance and predetermined coefficient, as the upper part of the body height.
5. according to the method described in claim 4, it is characterized in that, described crucial based on the buttocks key point and the shoulder
Point determines the target object waist center point coordinate and upper part of the body height, comprising:
The first average coordinates M1 of buttocks key point and the second average coordinates M2 of shoulder key point are obtained respectively;
Using a1*M1+a2*M2 as the waist center point coordinate, wherein a1 and a2 be waist central point correction factor, a1 and
A2 is all larger than 0, a1+a2=1.
6. according to the method described in claim 5, it is characterized in that, described utilize the waist center point coordinate and upper part of the body body
It is long, determine that the waist of the target object indicates region, comprising:
The buttocks key point and waist key point are obtained respectively in the length distance N1 and N2 of horizontal plane;
The width in region is indicated using b1*N1+b2*N2 as the waist, wherein b1 and b2 is width correction coefficient, b1 and b2
It is all larger than 0, b1+b2 < 1;
The height in region is indicated using b3*D as the waist, wherein b3 is altitude correction factor, b3 > 1;
The central point in region is indicated using the waist central point as the waist.
7. the method according to claim 1, wherein described respectively to the buttocks area of target object on target image
Domain and shoulder regions execute critical point detection, comprising:
Edge detection is executed to target object, obtains the profile point of target object;
It selects any profile point as initial sweep point, establishes the line pointer and column pointer for being directed toward initial sweep point, and to the right
It is directed toward total pointer of line pointer, downwardly directed column pointer;
When based on other scanning elements except profile spot scan initial sweep point, the row for establishing other scanning elements accordingly refers to
Needle, column pointer and total pointer;
Based on the line pointer, column pointer and total pointer, the seat area of target object and the key point of shoulder regions are determined.
8. the method according to the description of claim 7 is characterized in that described be based on the line pointer, column pointer and total pointer, really
The seat area of object that sets the goal and the key point of shoulder regions, comprising:
The line pointer of row coordinate Y=Y0+R0 is obtained on human body contour outline point, wherein Y0 is that the average row of seat area key point is sat
Mark, R0 are the head radius determined according to seat area key point;
The key point Pi (Xi, Yi) for traversing all shoulder regions, if X0-R0 < Xi < X0, it is determined that Pi is a left side for target object
Key point, if X0 < Xi < X0+R0, it is determined that Pi is the right key point of target object;
From the left key point and right key point finally determined, the seat area of target object and the key of shoulder regions are determined
Point.
9. a kind of image beautifying apparatus characterized by comprising
Detection module, for respectively to target object on target image seat area and shoulder regions execute critical point detection,
Obtain buttocks key point and shoulder key point;
First determining module determines the target object waist for being based on the buttocks key point and the shoulder key point
Center point coordinate and upper part of the body height;
Second determining module determines the waist of the target object for utilizing the waist center point coordinate and upper part of the body height
Portion indicates region;
Beautify module, it is right centered on the center point coordinate for utilizing the deformation parameter for lumbar region got
The waist indicates that the image in region executes horizontal distortion operation, forms the beautifying picture comprising waist deformation pattern.
10. a kind of electronic equipment, which is characterized in that the electronic equipment includes:
At least one processor;And
The memory being connect at least one described processor communication;Wherein,
The memory is stored with the instruction that can be executed by least one described processor, and described instruction is by described at least one
It manages device to execute, so that at least one described processor is able to carry out image beautification method described in aforementioned any claim 1-8.
11. a kind of non-transient computer readable storage medium, which stores computer instruction,
The computer instruction is for making the computer execute image beautification method described in aforementioned any claim 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910580719.XA CN110288520B (en) | 2019-06-29 | 2019-06-29 | Image beautifying method and device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910580719.XA CN110288520B (en) | 2019-06-29 | 2019-06-29 | Image beautifying method and device and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110288520A true CN110288520A (en) | 2019-09-27 |
CN110288520B CN110288520B (en) | 2023-03-31 |
Family
ID=68020158
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910580719.XA Active CN110288520B (en) | 2019-06-29 | 2019-06-29 | Image beautifying method and device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110288520B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111402116A (en) * | 2020-03-11 | 2020-07-10 | 北京字节跳动网络技术有限公司 | Method and device for processing human waist body beautification in picture and electronic equipment |
CN111415382A (en) * | 2020-03-02 | 2020-07-14 | 北京字节跳动网络技术有限公司 | Method and device for processing human body arm body beautification in picture and electronic equipment |
CN111415306A (en) * | 2020-03-11 | 2020-07-14 | 北京字节跳动网络技术有限公司 | Method and device for processing human chest body beautification in picture and electronic equipment |
TWI743843B (en) * | 2019-12-25 | 2021-10-21 | 中國商北京市商湯科技開發有限公司 | Image processing method, image processing device and storage medium thereof |
CN114913549A (en) * | 2022-05-25 | 2022-08-16 | 北京百度网讯科技有限公司 | Image processing method, apparatus, device and medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100278431A1 (en) * | 2009-05-01 | 2010-11-04 | Microsoft Corporation | Systems And Methods For Detecting A Tilt Angle From A Depth Image |
CN103047938A (en) * | 2013-01-05 | 2013-04-17 | 山西省电力公司大同供电分公司 | Method and device for detecting icing thickness of power transmission line |
WO2017084204A1 (en) * | 2015-11-19 | 2017-05-26 | 广州新节奏智能科技有限公司 | Method and system for tracking human body skeleton point in two-dimensional video stream |
CN108830784A (en) * | 2018-05-31 | 2018-11-16 | 北京市商汤科技开发有限公司 | A kind of image processing method, device and computer storage medium |
CN109191414A (en) * | 2018-08-21 | 2019-01-11 | 北京旷视科技有限公司 | A kind of image processing method, device, electronic equipment and storage medium |
CN109344693A (en) * | 2018-08-13 | 2019-02-15 | 华南理工大学 | A kind of face multizone fusion expression recognition method based on deep learning |
-
2019
- 2019-06-29 CN CN201910580719.XA patent/CN110288520B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100278431A1 (en) * | 2009-05-01 | 2010-11-04 | Microsoft Corporation | Systems And Methods For Detecting A Tilt Angle From A Depth Image |
CN103047938A (en) * | 2013-01-05 | 2013-04-17 | 山西省电力公司大同供电分公司 | Method and device for detecting icing thickness of power transmission line |
WO2017084204A1 (en) * | 2015-11-19 | 2017-05-26 | 广州新节奏智能科技有限公司 | Method and system for tracking human body skeleton point in two-dimensional video stream |
CN108830784A (en) * | 2018-05-31 | 2018-11-16 | 北京市商汤科技开发有限公司 | A kind of image processing method, device and computer storage medium |
CN109344693A (en) * | 2018-08-13 | 2019-02-15 | 华南理工大学 | A kind of face multizone fusion expression recognition method based on deep learning |
CN109191414A (en) * | 2018-08-21 | 2019-01-11 | 北京旷视科技有限公司 | A kind of image processing method, device, electronic equipment and storage medium |
Non-Patent Citations (1)
Title |
---|
马旋等: "基于人脸检测和关键点识别的快速人体组件划分", 《计算机应用与软件》 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI743843B (en) * | 2019-12-25 | 2021-10-21 | 中國商北京市商湯科技開發有限公司 | Image processing method, image processing device and storage medium thereof |
US11734829B2 (en) | 2019-12-25 | 2023-08-22 | Beijing Sensetime Technology Development Co., Ltd. | Method and device for processing image, and storage medium |
CN111415382A (en) * | 2020-03-02 | 2020-07-14 | 北京字节跳动网络技术有限公司 | Method and device for processing human body arm body beautification in picture and electronic equipment |
CN111415382B (en) * | 2020-03-02 | 2022-04-05 | 北京字节跳动网络技术有限公司 | Method and device for processing human body arm body beautification in picture and electronic equipment |
CN111402116A (en) * | 2020-03-11 | 2020-07-10 | 北京字节跳动网络技术有限公司 | Method and device for processing human waist body beautification in picture and electronic equipment |
CN111415306A (en) * | 2020-03-11 | 2020-07-14 | 北京字节跳动网络技术有限公司 | Method and device for processing human chest body beautification in picture and electronic equipment |
CN114913549A (en) * | 2022-05-25 | 2022-08-16 | 北京百度网讯科技有限公司 | Image processing method, apparatus, device and medium |
CN114913549B (en) * | 2022-05-25 | 2023-07-07 | 北京百度网讯科技有限公司 | Image processing method, device, equipment and medium |
Also Published As
Publication number | Publication date |
---|---|
CN110288520B (en) | 2023-03-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110288520A (en) | Image beautification method, device and electronic equipment | |
CN110288553A (en) | Image beautification method, device and electronic equipment | |
CN110288551A (en) | Video beautification method, device and electronic equipment | |
CN110298785A (en) | Image beautification method, device and electronic equipment | |
CN110288521A (en) | Image beautification method, device and electronic equipment | |
CN110189246B (en) | Image stylization generation method and device and electronic equipment | |
CN110287891A (en) | Gestural control method, device and electronic equipment based on human body key point | |
CN110378947B (en) | 3D model reconstruction method and device and electronic equipment | |
CN110070551A (en) | Rendering method, device and the electronic equipment of video image | |
CN110288519A (en) | Image beautification method, device and electronic equipment | |
CN109754464A (en) | Method and apparatus for generating information | |
CN109683710B (en) | A kind of palm normal vector determines method, apparatus, equipment and storage medium | |
CN110070495A (en) | Processing method, device and the electronic equipment of image | |
CN110070555A (en) | Image processing method, device, hardware device | |
CN115330925A (en) | Image rendering method and device, electronic equipment and storage medium | |
CN110689478B (en) | Image stylization processing method and device, electronic equipment and readable medium | |
CN115131199A (en) | Training method of image generation model, image generation method, device and equipment | |
CN110264431A (en) | Video beautification method, device and electronic equipment | |
CN110264430A (en) | Video beautification method, device and electronic equipment | |
CN110288552A (en) | Video beautification method, device and electronic equipment | |
US20170171524A1 (en) | Techniques for improving stereo block matching with the pyramid method | |
CN110070585A (en) | Image generating method, device and computer readable storage medium | |
CN110197459B (en) | Image stylization generation method and device and electronic equipment | |
CN110209861A (en) | Image processing method, device, electronic equipment and computer readable storage medium | |
CN109635821A (en) | Feature extracting method, device, equipment and the readable medium of image-region |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |