CN110288553A - Image beautification method, device and electronic equipment - Google Patents
Image beautification method, device and electronic equipment Download PDFInfo
- Publication number
- CN110288553A CN110288553A CN201910580722.1A CN201910580722A CN110288553A CN 110288553 A CN110288553 A CN 110288553A CN 201910580722 A CN201910580722 A CN 201910580722A CN 110288553 A CN110288553 A CN 110288553A
- Authority
- CN
- China
- Prior art keywords
- key point
- leg
- target object
- point
- image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 49
- 210000002414 leg Anatomy 0.000 claims abstract description 148
- 210000003127 knee Anatomy 0.000 claims abstract description 67
- 210000001217 buttock Anatomy 0.000 claims abstract description 60
- 210000003423 ankle Anatomy 0.000 claims abstract description 56
- 238000001514 detection method Methods 0.000 claims abstract description 27
- 238000003708 edge detection Methods 0.000 claims description 10
- 230000001052 transient effect Effects 0.000 claims description 6
- 238000004891 communication Methods 0.000 claims description 5
- 238000001125 extrusion Methods 0.000 claims description 4
- 230000006399 behavior Effects 0.000 claims description 3
- 238000012545 processing Methods 0.000 abstract description 15
- 230000015572 biosynthetic process Effects 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 12
- 238000004590 computer program Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 8
- 238000004364 calculation method Methods 0.000 description 7
- 238000001914 filtration Methods 0.000 description 7
- 238000011156 evaluation Methods 0.000 description 5
- 238000006243 chemical reaction Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 230000005611 electricity Effects 0.000 description 2
- 230000005291 magnetic effect 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
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression 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
- 210000002683 foot Anatomy 0.000 description 1
- 238000010191 image analysis Methods 0.000 description 1
- 238000003709 image segmentation 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
- 239000011159 matrix material Substances 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
- 230000008569 process Effects 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
-
- G06T5/90—
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30196—Human being; Person
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 buttocks to target object on target image and leg execute critical point detection respectively, buttocks key point, knee key point and ankle key point are obtained;Based on the knee key point and the ankle key point, judge whether the leg of target object is in separated position;When the leg of the target object is in separated position, it is based on the buttocks key point, the knee key point and the ankle key point, determines the expression region of the target object leg;Using the deformation parameter for leg area got, the image in region, which executes, to be indicated to the leg and is squeezed and deformed operation, formation includes the beautifying picture of leg 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 leg 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 buttocks to target object on target image and leg execute critical point detection respectively, obtain buttocks key point, knee
Lid key point and ankle key point;
Based on the knee key point and the ankle key point, judge whether the leg of target object is in separated shape
State;
When the leg of the target object is in separated position, based on the buttocks key point, the knee key point and
The ankle key point determines the expression region of the target object leg;
Using the deformation parameter for leg area got, the image in region, which executes to squeeze, to be indicated to the leg and is become
Shape operation, forms the beautifying picture comprising leg deformation pattern.
It is described to be closed based on the knee key point and the ankle according to a kind of specific implementation of the embodiment of the present disclosure
Key point, judges whether the leg of target object is in after separated position, the method also includes:
When the leg of the target object is in merging phase, using buttocks central point as starting point, in the region of preset length
It is interior, determine that the leg for executing the target object for being squeezed and deformed operation indicates region.
It is described to be closed based on the knee key point and the ankle according to a kind of specific implementation of the embodiment of the present disclosure
Key point, judges whether the leg of target object is in separated position, comprising:
Obtain the first distance between the left knee key point and right knee key point detected;
Obtain the second distance between the left ankle key point detected and right ankle key point;
Judge whether the difference between the second distance and the first distance is greater than first threshold;
If so, determining that the leg of the target object is in separated position.
It is described to be closed based on the knee key point and the ankle according to a kind of specific implementation of the embodiment of the present disclosure
Key point, judges whether the leg of target object is in separated position, comprising:
Buttocks central point is obtained to the third distance between knee center point;
The left key point of buttocks is obtained to the 4th distance between the left key point of knee;
Judge whether the difference between the third distance and the 4th distance is greater than second threshold;
If so, determining that the leg of the target object is in separated position.
It is described when the leg of the target object is in separated position according to a kind of specific implementation of the embodiment of the present disclosure
When, it is based on the buttocks key point, the knee key point and the ankle key point, determines the table of the target object leg
Show region, comprising:
First rectangular area of the first width is set between the buttocks key point and the knee key point;
Second rectangular area of the second width is set between the knee key point and the ankle key point, described
Two width are greater than first width;
Based on first rectangular area and second rectangular area, the expression area of the target object leg is determined
Domain.
According to a kind of specific implementation of the embodiment of the present disclosure, the deformation for leg area that the utilization is got
Parameter indicates that the image in region executes to the leg and is squeezed and deformed operation, comprising:
Respectively in the direction perpendicular to first rectangular area and second rectangular area, to first rectangle region
Domain and second rectangular area execute extrusion deformation operation relevant to the deformation parameter.
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
Critical point detection is executed with leg, 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 buttocks key point, knee key point and foot of target object are determined
Ankle key point.
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 executing critical point detection with leg, 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 wheel of the target object for critical point detection
It is wide.
Second aspect, the embodiment of the present disclosure provide a kind of image beautifying apparatus, comprising:
Detection module is obtained for the buttocks and leg execution critical point detection respectively to target object on target image
Buttocks key point, knee key point and ankle key point;
Judgment module judges that the leg of target object is for being based on the knee key point and the ankle key point
It is no to be in separated position;
Determining module, for when the leg of the target object is in separated position, based on the buttocks key point, described
Knee key point and the ankle key point, determine the expression region of the target object leg;
Beautify module, for indicating region to the leg using the deformation parameter for leg area got
Image, which executes, is squeezed and deformed operation, forms the beautifying picture comprising leg 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 buttocks and leg
Critical point detection is executed, buttocks key point, knee key point and ankle key point are obtained;Based on the knee key point and described
Ankle key point, judges whether the leg of target object is in separated position;When the leg of the target object is in separated position
When, it is based on the buttocks key point, the knee key point and the ankle key point, determines the table of the target object leg
Show region;Using the deformation parameter for leg area got, the image in region, which executes to squeeze, to be indicated to the leg and is become
Shape operation, forms the beautifying picture comprising leg 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 buttocks to target object on target image and leg execute critical point detection respectively, obtain buttocks key
Point, knee key point and ankle 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 leg area on target image.It, can be with needle after target image is formed
Critical point detection is executed to seat area and leg area, and then obtains multiple buttocks key points, knee key point and ankle and closes
Key point.Referring to fig. 2, Fig. 2 shows the human body key points including P1 to P19.Buttocks key point and leg key point may include
The set of keypoints of multiple key points, for example, buttocks key point may include key point P12, P3 and P16, leg key point can
To include knee key point P13, P17, ankle key point P14, P18.Position according to key point distribution is different, and key point can be with
Including left key point and right key point.
Such as CPM (Convolutional Pose can be used to the critical point detection of seat area and leg area
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 knee key point and the ankle key point, judges whether the leg of target object is in point
Open state.
Since the two legs of leg are during actual take pictures, the state for merging or opening may be at, at leg
When merging phase, it directly can indicate that region carries out corresponding beautification operation to leg image by a leg, work as leg
When in separated position, need to execute the two legs in separated position respectively beautification operation.
As an alternative embodiment, judge whether the leg of target object is in separated position referring to Fig. 3, it can
To include the following steps:
S301 obtains the first distance between the left knee key point detected and right knee key point.
By obtaining the coordinate of left knee key point and right knee key point, left knee key point and right knee can be calculated
Distance d1 between key point, as first distance.
S302 obtains the second distance between the left ankle key point detected and right ankle key point.
By obtaining the coordinate of left ankle key point and right ankle key point, left ankle key point and right ankle can be calculated
Distance d2 between key point, as second distance.
S303, judges whether the difference between the second distance and the first distance is greater than first threshold.
Generally, when the leg of target object in the closure state, the value of first distance and second distance relatively,
When the leg of target object is in separated position, first distance and second distance will appear biggish difference.At this point it is possible to be arranged
Whether first threshold is greater than the mode of first threshold by comparing the difference between second distance and first distance, to judge to use
Whether the leg at family is in separated position.
S304, if so, determining that the leg of the target object is in separated position.
Alternatively optional embodiment judges whether the leg of target object is in separated shape referring to fig. 4
State may include steps of:
S401 obtains buttocks central point to the third distance between knee center point.
Specifically, obtaining buttocks central point by way of calculating multiple buttocks key point average values.It is multiple by calculating
The mode of knee key point average value obtains knee center point.It, can by obtaining the coordinate of knee center point and buttocks central point
To calculate buttocks central point to the third distance d3 between knee center point, as third distance.
S402 obtains the left key point of buttocks to the 4th distance between the left key point of knee.
By obtaining the coordinate of knee left key point and the left key point of buttocks, the left key point of buttocks can be calculated to knee
The 4th distance d4 between left key point, as the 4th distance
S403, judges whether the difference between the third distance and the 4th distance is greater than second threshold.
When the leg of target object is in separated position, the 4th distance is typically larger than third distance, can be set at this time
Second threshold, by judging whether the difference between the third distance and the 4th distance is greater than second threshold, Lai Jinyi
Step judges whether leg is in separated position.
S404, if so, determining that the leg of the target object is in separated position.
In addition to aforesaid way judge target object leg whether be in separated position other than, can also use other similar
Mode is judged.
S103, it is crucial based on the buttocks key point, the knee when the leg of the target object is in separated position
Point and the ankle key point, determine the expression region of the target object leg.
When the leg of target object be in separated position need individually for each leg come be arranged indicate region, thus
Improving leg indicates the accuracy in region.
By taking left leg as an example, referring to fig. 2, the key point P12 and left key point P13 of knee on the left of buttocks can be obtained respectively,
Rectangular area is set between P12 and P13, and the length of rectangular area is the distance between P12 to P13, and the width of rectangle is default
Value.In this way, it can be shown that left leg top half.
By obtaining the coordinate of P13 and P14 key point, can obtain between the left key point of knee and the left key point of ankle
Distance, using the distance as the length of the expression region rectangle of left leg lower half portion, by the way that preset width is arranged to the rectangle
Value, can obtain the expression region of left leg lower half portion.
By the way that left leg top half together with the expression region merging technique of lower half portion, has just been obtained the expression area of left leg
Domain.
By a similar method, region setting can be indicated to the right leg of target object.The expression region of right leg and
The expression region of leg is constituted in the expression region entirety of left leg.
It according to the actual needs, can also be using round, oval other than describing leg using rectangle and indicating region
Other figures such as shape.
S104 indicates that the image in region executes to the leg using the deformation parameter for leg area got
It is squeezed and deformed operation, forms the beautifying picture comprising leg deformation pattern.
Leg area is during forming image on target image, it will usually due to shooting angle etc., lead to leg
The area in portion region wishes that the area ratio of leg area is practical compared to bigger or user compared to the area at other positions of body
The area of leg area also want small, thus can be by leg zone to improve the aesthetics of the leg 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 leg area can be further obtained, deformation parameter is illustrated to leg
The scaling in portion region indicates to execute leg area 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 leg area.For example, leg area boundary can be existed
Compressive deformation is carried out in horizontal direction, thus the leg image after being beautified.
By the scheme in the application, can guarantee to carry out effective deformation to the leg area of target object, to mention
High overall aesthetic degree of the target object on target image.
Alternatively situation then may be used when the leg for finding target object by critical point detection is in merging phase
By the way that downward matrix is arranged, can determine and use in the region of preset length directly using the buttocks central point as starting point
Region is indicated in executing the leg for being squeezed and deformed the target object of operation.So, leg area can directly adopt one
A expression region is described.
It is crucial based on the knee key point and the ankle according to a kind of optional implementation of the embodiment of the present disclosure
Point, judges whether the leg of target object is in separated position, comprising: obtains the left knee key point detected and right knee closes
First distance between key point;Obtain the second distance between the left ankle key point detected and right ankle key point;Judgement
Whether the difference between the second distance and the first distance is greater than first threshold;If so, determining the target object
Leg be in separated position.
It is crucial based on the knee key point and the ankle according to a kind of optional implementation of the embodiment of the present disclosure
Point, judges whether the leg of target object is in separated position, comprising: obtains buttocks central point to the between knee center point
Three distances;The left key point of buttocks is obtained to the 4th distance between the left key point of knee;Judge the third distance and described
Whether the difference between four distances is greater than second threshold;If so, determining that the leg of the target object is in separated position.
According to a kind of optional implementation of the embodiment of the present disclosure, when the leg of the target object is in separated position,
Based on the buttocks key point, the knee key point and the ankle key point, the expression of the target object leg is determined
Region, comprising: the first rectangular area of the first width is set between the buttocks key point and the knee key point;Institute
The second rectangular area that the second width is set between knee key point and the ankle key point is stated, second width is greater than institute
State the first width;Based on first rectangular area and second rectangular area, the expression of the target object leg is determined
Region.
According to a kind of optional implementation of the embodiment of the present disclosure, joined using the deformation for leg area got
Number indicates that the image in region executes to the leg and is squeezed and deformed operation, comprising: respectively perpendicular to first rectangular area
With the direction of second rectangular area, first rectangular area and second rectangular area are executed and joined with the deformation
The relevant extrusion deformation operation of number.
It is described respectively to the buttocks of target object on target image according to a kind of optional implementation of the embodiment of the present disclosure
Critical point detection is executed with leg, comprising: edge detection is executed to target object, obtains the profile point of target object;Selection is appointed
One profile point establishes the line pointer and column pointer for being directed toward initial sweep point as initial sweep point, and be directed toward to the right line pointer,
Total pointer of downwardly directed column pointer;When based on other scanning elements except profile spot scan initial sweep point, build accordingly
Found the line pointer, column pointer and total pointer of other scanning elements;Based on the line pointer, column pointer and total pointer, target pair is determined
Buttocks key point, knee key point and the ankle key point of elephant.
It is described respectively to the buttocks of target object on target image according to a kind of optional implementation of the embodiment of the present disclosure
Before executing critical point detection with leg, the method also includes: the target image is transformed to gray level image;To the ash
It spends image and carries out edge detection, obtain the edge contour of the target object for critical point detection.
Edge detection is carried out to the gray level image, the edge contour of the target object is obtained, may include walking as follows
It is rapid:
Firstly, choosing multiple structural elements of different orientation.Target object can be examined by edge detection operator
It surveys, if edge detection operator exports in image only with a kind of structural element and contains only a kind of geological information, be unfavorable for
The holding of image detail.In order to guarantee that the accuracy of image detection, selection include the edge detection operator of various structures member.
Next, carrying out details description to described multiple images using each structural element in multiple structural elements, obtain
To filtering image.It is thin to image using each structural element as a kind of scale by using multiple structural elements of different orientation
Section is matched, and can sufficiently keep the various details of image while being filled into the noise of different type and size.
It is each in multiple grey levels to obtain in filtering image it is next determined that the gray-scale edges of filtering image calculate
Pixel number present in grey level.It, can will be after filtering in order to further reduce calculation amount after image filtering
Image is changed into gray level image, and by the way that multiple grey levels are arranged to gray level image, each grey level can be calculated
Pixel number present in image.
Next, being weighted to 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, and the grey scale values setting less for pixel number is 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
Binary conversion treatment is enough carried out to gray level image based on the average gray value.
Next, carrying out binary conversion treatment to the filtering image based on the threshold value.It, can be to filtering based on the threshold value
Image carries out binary conversion treatment, for example, data 1 are turned to for the pixel two-value for being greater than the threshold value, for being less than the picture of the threshold value
Plain two-value turns to 0.
Next, using the image after binary conversion treatment as the edge image of the target object.By by binaryzation it
Data afterwards carry out corresponding color assignment, have just obtained the edge image of target object, such as the pixel that two-value turns to 1 is assigned
Value is black, and the image that two-value turns to 0 is assigned a value of white.
By above step, under the premise of reducing system resources consumption, the accuracy of target object detection is improved
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 is obtained for the buttocks and leg execution critical point detection respectively to target object on target image
To buttocks key point, knee key point and ankle key point;
Judgment module 502 judges the leg of target object for being based on the knee key point and the ankle key point
Whether separated position is in;
Determining module 503, for when the leg of the target object is in separated position, based on the buttocks key point,
The knee key point and the ankle key point, determine the expression region of the target object leg;
Beautify module 504, for indicating region to the leg using the deformation parameter for leg area got
Image execute be squeezed and deformed operation, formed include leg deformation pattern beautifying picture.
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 buttocks to target object on target image and leg execute critical point detection respectively, obtain buttocks key point, knee closes
Key point and ankle key point;
Based on the knee key point and the ankle key point, judge whether the leg of target object is in separated position;
When the leg of the target object is in separated position, based on the buttocks key point, the knee key point and described
Ankle key point determines the expression region of the target object leg;
Using the deformation parameter for leg area got, the image in region, which executes, to be indicated to the leg and is squeezed and deformed behaviour
Make, forms the beautifying picture comprising leg deformation pattern.
2. the method according to claim 1, wherein described crucial based on the knee key point and the ankle
Point, judges whether the leg of target object is in after separated position, the method also includes:
When the leg of the target object is in merging phase, using buttocks central point as starting point, in the region of preset length, really
The fixed leg for executing the target object of extrusion deformation operation indicates region.
3. the method according to claim 1, wherein described crucial based on the knee key point and the ankle
Point, judges whether the leg of target object is in separated position, comprising:
Obtain the first distance between the left knee key point and right knee key point detected;
Obtain the second distance between the left ankle key point detected and right ankle key point;
Judge whether the difference between the second distance and the first distance is greater than first threshold;
If so, determining that the leg of the target object is in separated position.
4. the method according to claim 1, wherein described crucial based on the knee key point and the ankle
Point, judges whether the leg of target object is in separated position, comprising:
Buttocks central point is obtained to the third distance between knee center point;
The left key point of buttocks is obtained to the 4th distance between the left key point of knee;
Judge whether the difference between the third distance and the 4th distance is greater than second threshold;
If so, determining that the leg of the target object is in separated position.
5. the method according to claim 1, wherein described when the leg of the target object is in separated position
When, it is based on the buttocks key point, the knee key point and the ankle key point, determines the table of the target object leg
Show region, comprising:
First rectangular area of the first width is set between the buttocks key point and the knee key point;
Second rectangular area of the second width is set between the knee key point and the ankle key point, and described second is wide
Degree is greater than first width;
Based on first rectangular area and second rectangular area, the expression region of the target object leg is determined.
6. according to the method described in claim 5, it is characterized in that, the deformation for leg area that the utilization is got is joined
Number indicates that the image in region executes to the leg and is squeezed and deformed operation, comprising:
Respectively in the direction perpendicular to first rectangular area and second rectangular area, to first rectangular area and
Second rectangular area executes extrusion deformation operation relevant to the deformation parameter.
7. the method according to claim 1, wherein it is described respectively to the buttocks of target object on target image and
Leg executes 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, determine that the buttocks key point, knee key point and ankle of target object are closed
Key point.
8. the method according to claim 1, wherein it is described respectively to the buttocks of target object on target image and
Before leg executes 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 for critical point detection.
9. a kind of image beautifying apparatus characterized by comprising
Detection module obtains buttocks for the buttocks and leg execution critical point detection respectively to target object on target image
Key point, knee key point and ankle key point;
Judgment module judges whether the leg of target object is located for being based on the knee key point and the ankle key point
In separated position;
Determining module, for being based on the buttocks key point, the knee when the leg of the target object is in separated position
Key point and the ankle key point, determine the expression region of the target object leg;
Beautify module, for indicating the leg image in region using the deformation parameter for leg area got
It executes and is squeezed and deformed operation, form the beautifying picture comprising leg 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 |
---|---|---|---|
CN201910580722.1A CN110288553A (en) | 2019-06-29 | 2019-06-29 | Image beautification method, device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910580722.1A CN110288553A (en) | 2019-06-29 | 2019-06-29 | Image beautification method, device and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110288553A true CN110288553A (en) | 2019-09-27 |
Family
ID=68020161
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910580722.1A Pending CN110288553A (en) | 2019-06-29 | 2019-06-29 | Image beautification method, device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110288553A (en) |
Cited By (6)
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 |
CN111415306A (en) * | 2020-03-11 | 2020-07-14 | 北京字节跳动网络技术有限公司 | Method and device for processing human chest 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 |
CN111753685A (en) * | 2020-06-12 | 2020-10-09 | 北京字节跳动网络技术有限公司 | Method and device for adjusting human face hairline in image and electronic equipment |
CN112465695A (en) * | 2020-12-01 | 2021-03-09 | 北京达佳互联信息技术有限公司 | Image processing method, image processing device, electronic equipment and storage medium |
CN114419024A (en) * | 2022-01-27 | 2022-04-29 | 广州东利运动科技有限公司 | Intelligent algorithm for judging ankle deformation based on video image analysis |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105451828A (en) * | 2013-06-13 | 2016-03-30 | 生化游戏有限公司 | Report system for physiotherapeutic and rehabilitative video games |
US20180186452A1 (en) * | 2017-01-04 | 2018-07-05 | Beijing Deephi Technology Co., Ltd. | Unmanned Aerial Vehicle Interactive Apparatus and Method Based on Deep Learning Posture Estimation |
CN108830783A (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 |
US20190208850A1 (en) * | 2016-08-10 | 2019-07-11 | Michael J. Weiler | Methods of generating compression garment measurement information for a patient body part and fitting pre-fabricated compression garments thereto |
-
2019
- 2019-06-29 CN CN201910580722.1A patent/CN110288553A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105451828A (en) * | 2013-06-13 | 2016-03-30 | 生化游戏有限公司 | Report system for physiotherapeutic and rehabilitative video games |
US20190208850A1 (en) * | 2016-08-10 | 2019-07-11 | Michael J. Weiler | Methods of generating compression garment measurement information for a patient body part and fitting pre-fabricated compression garments thereto |
US20180186452A1 (en) * | 2017-01-04 | 2018-07-05 | Beijing Deephi Technology Co., Ltd. | Unmanned Aerial Vehicle Interactive Apparatus and Method Based on Deep Learning Posture Estimation |
CN108830783A (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 |
Non-Patent Citations (1)
Title |
---|
马旋: "基于人脸检测和关键点识别的快速人体组件划分", 《计算机应用与软件》 * |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
CN111753685A (en) * | 2020-06-12 | 2020-10-09 | 北京字节跳动网络技术有限公司 | Method and device for adjusting human face hairline in image and electronic equipment |
CN111753685B (en) * | 2020-06-12 | 2024-01-12 | 北京字节跳动网络技术有限公司 | Method and device for adjusting facial hairline in image and electronic equipment |
CN112465695A (en) * | 2020-12-01 | 2021-03-09 | 北京达佳互联信息技术有限公司 | Image processing method, image processing device, electronic equipment and storage medium |
CN112465695B (en) * | 2020-12-01 | 2024-01-02 | 北京达佳互联信息技术有限公司 | Image processing method, device, electronic equipment and storage medium |
CN114419024A (en) * | 2022-01-27 | 2022-04-29 | 广州东利运动科技有限公司 | Intelligent algorithm for judging ankle deformation based on video image analysis |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110288553A (en) | Image beautification method, device and electronic equipment | |
CN110288551A (en) | Video beautification method, device and electronic equipment | |
CN110288520A (en) | Image beautification method, device and electronic equipment | |
CN110298785A (en) | Image beautification method, device and electronic equipment | |
CN110287891A (en) | Gestural control method, device and electronic equipment based on human body key point | |
CN110189246A (en) | Image stylization generation method, device and electronic equipment | |
CN110058685A (en) | Display methods, device, electronic equipment and the computer readable storage medium of virtual objects | |
CN110288521A (en) | Image beautification method, device and electronic equipment | |
CN109767466B (en) | Picture rendering method and device, terminal and corresponding storage medium | |
CN110070551A (en) | Rendering method, device and the electronic equipment of video image | |
CN110222726A (en) | Image processing method, device and electronic equipment | |
CN105827963B (en) | Scene-change detecting method and mobile terminal during one kind is taken pictures | |
CN110378947A (en) | 3D model reconstruction method, device and electronic equipment | |
CN110069974A (en) | Bloom image processing method, device and electronic equipment | |
CN110070495B (en) | Image processing method and device and electronic equipment | |
CN110070499A (en) | Image processing method, device and computer readable storage medium | |
CN110288519A (en) | Image beautification method, device and electronic equipment | |
CN110415276A (en) | Motion information calculation method, device and electronic equipment | |
CN110070515A (en) | Image composition method, device and computer readable storage medium | |
CN110084204A (en) | Image processing method, device and electronic equipment based on target object posture | |
CN115937379A (en) | Special effect generation method and device, electronic equipment and storage medium | |
CN110264430A (en) | Video beautification method, device and electronic equipment | |
US20170171524A1 (en) | Techniques for improving stereo block matching with the pyramid method | |
CN110264431A (en) | Video beautification method, device and electronic equipment | |
CN110288552A (en) | Video beautification method, device and electronic 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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190927 |
|
RJ01 | Rejection of invention patent application after publication |