CN110288521A - Image beautification method, device and electronic equipment - Google Patents

Image beautification method, device and electronic equipment Download PDF

Info

Publication number
CN110288521A
CN110288521A CN201910580726.XA CN201910580726A CN110288521A CN 110288521 A CN110288521 A CN 110288521A CN 201910580726 A CN201910580726 A CN 201910580726A CN 110288521 A CN110288521 A CN 110288521A
Authority
CN
China
Prior art keywords
leg
image
point
key point
target image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910580726.XA
Other languages
Chinese (zh)
Inventor
黄佳斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910580726.XA priority Critical patent/CN110288521A/en
Publication of CN110288521A publication Critical patent/CN110288521A/en
Pending legal-status Critical Current

Links

Classifications

    • G06T3/18
    • G06T3/04
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands

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 and leg key point are obtained;Based on the buttocks key point and the leg key point, determine that the leg of target object indicates region and the background area for indicating the corresponding target object in region;It indicates that the image of region and the background area executes stretcher strain operation in vertical direction using the deformation parameter for leg got, while to the leg on the target image, forms the beautifying picture comprising leg deformation pattern;Trimming operation is executed to the target image after stretching, is consistent the target image after cutting and the target image before stretching dimensionally.By the scheme of the disclosure, the aesthetics of image is improved.

Description

Image beautification method, device and electronic equipment
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 longer, 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 and leg Portion's key point;
Based on the buttocks key point and the leg key point, determine that the leg of target object indicates region and the table Show that the background area of the corresponding target object in region, the background area and the expression region keep one in vertical direction It causes, the background area covers the edge of the target image, the vertical direction and the leg in the horizontal direction Extending direction is consistent;
Region is indicated using the deformation parameter for leg got, while to the leg on the target image And the image of the background area executes stretcher strain operation in vertical direction, forms the beautification figure comprising leg deformation pattern Picture;
Trimming operation is executed to the target image after stretching, makes the target image after cutting and the target figure before stretching As being dimensionally consistent.
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, obtains buttocks key point and leg key point, comprising:
Crucial detection is executed to the leg of the target object, obtains knee key point and ankle key point;
Using the knee key point and the ankle key point as the leg key point.
It is described to be closed based on the buttocks key point and the leg according to a kind of specific implementation of the embodiment of the present disclosure Key point determines that the leg of target object indicates region and the background area for indicating the corresponding target object in region, comprising:
Obtain the first nodal point of the set of keypoints of the knee key point and ankle key point composition;
Obtain the second central point of the buttocks set of keypoints;
Based on the first nodal point and second central point, the vertical direction and leg length of the leg are determined;
Vertical direction and leg length based on the leg determine that the leg indicates region and the background area.
According to a kind of specific implementation of the embodiment of the present disclosure, the vertical direction and leg based on the leg are long Degree determines that the leg indicates region and the background area, comprising:
Obtain the centre distance d between the first nodal point and second central point;
Establish using second central point as starting point, length be γ * d, cover leg key point the first rectangular area, In, γ is preset stretch ratio, γ > 1;
First rectangular area, which is determined as the leg, indicates region.
According to a kind of specific implementation of the embodiment of the present disclosure, the vertical direction and leg based on the leg are long Degree determines that the leg indicates region and the background area, comprising:
Obtain the centre distance d between the first nodal point and second central point;
To establish using second central point as starting point, length be γ * d, the horizontal width phase of width and the target image The second same rectangular area;
Second rectangular area is determined as the background area.
According to a kind of specific implementation of the embodiment of the present disclosure, the deformation for leg that the utilization is got is joined Number, while the image of region and the background area executes in vertical direction to be indicated to the leg on the target image Stretcher strain operation, comprising:
Image pixel and the adjacent area below the background area in the background area are obtained, it is described adjacent Region includes all picture materials of the target image below background area;
Based on the deformation parameter, interpolation operation is carried out to the pixel in the background area, forms the deformation that height is f Image;
Picture material in the adjacent area is moved down into (f- γ * d) a distance, and after mobile complete, with The strain image is spliced.
According to a kind of specific implementation of the embodiment of the present disclosure, the target image after described pair of stretching executes cutting Operation, comprising:
To the image in the region that the adjacent area bottom level is (f- γ * d), width is the target image width Execute delete operation;
Using the image of the adjacent area after execution delete operation as the component part of the target image.
According to a kind of specific implementation of the embodiment of the present disclosure, respectively to the buttocks and leg of target object on target image Portion 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 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 and leg key point;
Determining module determines the leg table of target object for being based on the buttocks key point and the leg key point Show region and the background area for indicating the corresponding target object in region, the background area is with the expression region vertical It is consistent on direction, the background area covers the edge of the target image, the vertical direction in the horizontal direction It is consistent with the extending direction of the leg;
Beautify module, for utilizing the deformation parameter for leg got, while to the institute on the target image Stating leg indicates that the image of region and the background area executes stretcher strain operation in vertical direction, is formed and is become comprising leg The beautifying picture of shape image;
Module is cut, trimming operation is executed to the target image after stretching, makes the target image after cutting and stretching Preceding target image is dimensionally consistent.
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 and leg key point are obtained;Based on the buttocks key point and the leg key point, Determine that the leg of target object indicates region and the background area for indicating the corresponding target object in region, the background area It is consistent in vertical direction with the expression region, the background area covers the target image in the horizontal direction Edge, the vertical direction is consistent with the extending direction of the leg;Using the deformation parameter for leg got, together When the image of region and the background area executes stretching in vertical direction to be indicated to the leg on the target image Deformation operation forms the beautifying picture comprising leg deformation pattern;Trimming operation is executed to the target image after stretching, is made The target image before target image and stretching after cutting is dimensionally consistent.By the scheme of the disclosure, figure is improved The aesthetics of picture.
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 and leg 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 buttocks and leg on target image.After target image is formed, can for buttocks and Leg executes critical point detection, and then obtains multiple buttocks key points, knee key point and ankle key point.Referring to fig. 2, Fig. 2 Show the human body key point including P1 to P19.Wherein, buttocks key point and leg key point may include multiple key points Set of keypoints, for example, buttocks key point may include key point P12, P3 and P16, leg key point may include that knee closes Key point P13, P17, ankle key point P14, P18.Position according to key point distribution is different, and key point may include left key point With right key point.
It can be using such as CPM (Convolutional Pose Machine, volume to the critical point detection of buttocks and leg Product gesture detector), the modes such as PAF (Part Affinity Fields, part affine position detection method) carry out.Herein The detection method of key point is not construed as limiting.
S102, be based on the buttocks key point and the leg key point, determine target object leg indicate region and The background area for indicating the corresponding target object in region, the background area is protected in vertical direction with the expression region It holds unanimously, the background area covers the edge of the target image, the vertical direction and the leg in the horizontal direction The extending direction in portion is consistent.
After obtaining buttocks key point and leg key point, it can be determined based on buttocks key point and leg key point Leg indicates region, indicates region based on leg, and beautification operation can be executed to the leg of target object.
Other than obtaining leg and indicating region, in order to guarantee during indicating that region executes beautification to leg, leg Indicate that the corresponding background area in region indicates that region executes similar beautification and converts with leg, it is also necessary to while obtaining leg expression The background area of the corresponding target object in region.
As a kind of mode, the first center of the set of keypoints of available knee key point and ankle key point composition Point, and obtain the second central point of buttocks set of keypoints.By carrying out line to first nodal point and the second central point, even The direction of line just constitutes the vertical direction of leg, will by calculating the distance between first nodal point and the second central point d Calculated distance can obtain leg length multiplied by preset coefficient gamma.
After getting the vertical direction and leg length of leg, available foundation is with second central point Point, length are γ * d, cover the first rectangular area of leg key point, wherein γ is preset stretch ratio, and γ > 1 can be with First rectangular area, which is determined as the leg, indicates region.
At the same time, establish using second central point as starting point, length be γ * d, width and the target image water The second rectangular area of same size is put down, second rectangular area is determined as the background area.
S103, using the deformation parameter for leg got, while to the leg table on the target image Show that the image of region and the background area executes stretcher strain operation in vertical direction, is formed comprising leg deformation pattern Beautifying picture.
Leg is during forming image on target image, it will usually due to shooting angle etc., lead to leg Length compares length of the length than actual leg that smaller or user wishes leg compared to the length at other positions of body It also to grow, to improve the aesthetics of the leg of target object, can be adjusted by way of being deformed to leg thus Display of the whole target object on target image, to achieve the effect that beautification.
Before carrying out deformation, the deformation parameter of leg can be further obtained, deformation parameter is illustrated to leg Scaling indicates to execute leg 1.2 times of stretch processing for example, deformation parameter can be 1.2.
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.
It, can be to indicating region and described to the leg on the target image simultaneously after obtaining deformation parameter The image of background area executes stretcher strain operation in vertical direction, forms the beautifying picture comprising leg deformation pattern.
As an example, the image of region and the background area executes stretching in vertical direction to be indicated for leg Deformation operation can first obtain image pixel and the adjacent area below the background area in the background area, The adjacent area includes all picture materials of the target image below background area.By the deformation parameter got, to original Vertical direction height γ * d is that the pixel in background area carries out interpolation operation, and then generates the drawing effect of image, is formed high Degree is the strain image of f.
After background area stretches, the picture material in adjacent area can be tied up, for this purpose, by the figure in the adjacent area As content moves down (f- γ * d) a distance, and after mobile complete, is spliced with the strain image, ultimately formed Image after beautification.
S104 executes trimming operation to the target image after stretching, before making the target image after cutting and stretching Target image is dimensionally consistent.
After the stretched operation of target image, it will lead to the image after stretching and be dimensionally larger than former target image, For this reason, it may be necessary to execute trimming operation to the target image after stretching.Specifically, can be to the adjacent area bottom level (f- γ * d), width be the target image width region in image execute delete operation, will execute delete operation after Adjacent area component part of the image as the target image.
By the scheme in the application, can guarantee to carry out effective deformation to the leg of target object, to improve Overall aesthetic degree of the target object on target image.
As a kind of optional implementation of the embodiment of the present disclosure, respectively to the buttocks and leg of target object on target image Portion executes critical point detection can be to the leg of the target object during obtaining buttocks key point and leg key point Crucial detection is executed, knee key point and ankle key point are obtained, the knee key point and the ankle key point are made For the leg key point.
The buttocks key point and the leg are based on as a kind of optional implementation of the embodiment of the present disclosure referring to Fig. 3 Portion's key point determines that the leg of target object indicates region, may include steps of:
S301 obtains the first nodal point of the set of keypoints of the knee key point and ankle key point composition.
Specifically, the coordinate of all knee key points and ankle key point can be carried out mean value calculation, first is obtained The coordinate of central point.
S302 obtains the second central point of the buttocks set of keypoints.
The coordinate of all buttocks key points is subjected to mean value calculation, the coordinate of available second central point.
S303 is based on the first nodal point and second central point, determines vertical direction and the leg of the leg Length.
By carrying out line to first nodal point and the second central point, the direction of line just constitutes the Vertical Square of leg To, by calculate the distance between first nodal point and the second central point d, will be by calculated distance multiplied by preset coefficient γ can obtain leg length.
S304, vertical direction and leg length based on the leg determine that the leg indicates region and the background Region.
Specifically, center between the first nodal point being calculated in available step S303 and the second central point away from From d, to establish using second central point as starting point, length be γ * d, covers the first rectangular area of leg key point, wherein γ is preset stretch ratio, and γ > 1, the first rectangular area, which is determined as the leg, indicates region.
Other than obtaining leg and indicating region, it is also necessary to the corresponding background area in leg is determined, referring to fig. 4, as this A kind of optional implementation of open embodiment, the vertical direction and leg length based on the leg determine background area Domain, comprising:
S401 obtains the centre distance d between the first nodal point and second central point;
S402, to establish using second central point as starting point, length be γ * d, the level of width and the target image is wide Spend identical second rectangular area;
Second rectangular area is determined as the background area by S403.
As a kind of optional implementation of the embodiment of the present disclosure, the deformation for leg that the utilization is got is joined Number, while the image of region and the background area executes in vertical direction to be indicated to the leg on the target image Stretcher strain operation, comprising:
Image pixel and the adjacent area below the background area in the background area are obtained, it is described adjacent Region includes all picture materials of the target image below background area;
Based on the deformation parameter, interpolation operation is carried out to the pixel in the background area, forms the deformation that height is f Image;
Picture material in the adjacent area is moved down into (f- γ * d) a distance, and after mobile complete, with The strain image is spliced.
As a kind of optional implementation of the embodiment of the present disclosure, the target image after described pair of stretching executes cutting Operation, comprising: to the figure in the region that the adjacent area bottom level is (f- γ * d), width is the target image width As executing delete operation;Using the image of the adjacent area after execution delete operation as the component part of the target image.
As a kind of optional implementation of the embodiment of the present disclosure, respectively to the buttocks and leg of target object on target image Portion executes critical point detection, comprising:
Edge detection is executed to target object, obtains the profile point of target object;Any profile point is selected to sweep as starting Described point, establish be directed toward initial sweep point line pointer and column pointer, and to the right be directed toward line pointer, downwardly directed column pointer it is total 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, buttocks key point, the knee of target object are determined Key point and ankle key point.
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, comprising:
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 and leg key point;
Determining module 502 determines the leg of target object for being based on the buttocks key point and the leg key point Indicate that region and the background area for indicating the corresponding target object in region, the background area and the expression region are being hung down Histogram is consistent upwards, and the background area covers the edge of the target image, the Vertical Square in the horizontal direction To consistent with the extending direction of the leg;
Beautify module 503, for utilizing the deformation parameter for leg got, while on the target image The leg indicates that the image of region and the background area executes stretcher strain operation in vertical direction, and being formed includes leg The beautifying picture of deformation pattern;
Module 504 is cut, trimming operation is executed to the target image after stretching, makes the target image after cutting and drawing Target image before stretching dimensionally is consistent.
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 (12)

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 and leg is closed Key point;
Based on the buttocks key point and the leg key point, determine that the leg of target object indicates region and the expression area The background area of the corresponding target object in domain, the background area are consistent in vertical direction with the expression region, institute State the edge that background area covers the target image in the horizontal direction, the extension side of the vertical direction and the leg To consistent;
Region and institute are indicated using the deformation parameter for leg got, while to the leg on the target image The image for stating background area executes stretcher strain operation in vertical direction, forms the beautifying picture comprising leg deformation pattern;
Trimming operation is executed to the target image after stretching, the target image after cutting and the target image before stretching is made to exist It is consistent in size.
2. 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, obtains buttocks key point and leg key point, comprising:
Crucial detection is executed to the leg of the target object, obtains knee key point and ankle key point;
Using the knee key point and the ankle key point as the leg key point.
3. according to the method described in claim 2, it is characterized in that, described crucial based on the buttocks key point and the leg Point determines that the leg of target object indicates region and the background area for indicating the corresponding target object in region, comprising:
Obtain the first nodal point of the set of keypoints of the knee key point and ankle key point composition;
Obtain the second central point of the buttocks set of keypoints;
Based on the first nodal point and second central point, the vertical direction and leg length of the leg are determined;
Vertical direction and leg length based on the leg determine that the leg indicates region and the background area.
4. according to the method described in claim 3, it is characterized in that, the vertical direction and leg based on the leg are long Degree determines that the leg indicates region and the background area, comprising:
Obtain the centre distance d between the first nodal point and second central point;
Establish using second central point as starting point, length be γ * d, cover leg key point the first rectangular area, wherein γ is preset stretch ratio, γ > 1;
First rectangular area, which is determined as the leg, indicates region.
5. according to the method described in claim 3, it is characterized in that, the vertical direction and leg based on the leg are long Degree determines that the leg indicates region and the background area, comprising:
Obtain the centre distance d between the first nodal point and second central point;
To establish using second central point as starting point, length be γ * d, width is identical with the horizontal width of the target image Second rectangular area;
Second rectangular area is determined as the background area.
6. according to the method described in claim 4, it is characterized in that, the deformation parameter for leg that the utilization is got, The image of region and the background area executes drawing in vertical direction to be indicated to the leg on the target image simultaneously Stretch deformation operation, comprising:
Obtain image pixel and the adjacent area below the background area, the adjacent area in the background area All picture materials including target image below background area;
Based on the deformation parameter, interpolation operation is carried out to the pixel in the background area, forms the deformation map that height is f Picture;
Picture material in the adjacent area is moved down into (f- γ * d) a distance, and after mobile complete, and it is described Strain image is spliced.
7. according to the method described in claim 6, it is characterized in that, the target image after described pair of stretching executes and cuts behaviour Make, comprising:
Image in the region that the adjacent area bottom level is (f- γ * d), width is the target image width is executed Delete operation;
Using the image of the adjacent area after execution delete operation as the component part of the target image.
8. the method according to claim 1, wherein the buttocks to target object on target image and leg respectively 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, determine that the buttocks key point, knee key point and ankle of target object are closed Key point.
9. 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.
10. 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 and leg key point;
Determining module determines the leg expression area of target object for being based on the buttocks key point and the leg key point Domain and the background area for indicating the corresponding target object in region, the background area and the expression region are in vertical direction On be consistent, the background area covers the edge of the target image, the vertical direction and institute in the horizontal direction The extending direction for stating leg is consistent;
Beautify module, for utilizing the deformation parameter for leg got, while to the leg on the target image Portion indicates that the image of region and the background area executes stretcher strain operation in vertical direction, and being formed includes leg deformation pattern The beautifying picture of picture;
Module is cut, trimming operation is executed to the target image after stretching, before making the target image after cutting and stretching Target image is dimensionally consistent.
11. 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-9.
12. 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-9.
CN201910580726.XA 2019-06-29 2019-06-29 Image beautification method, device and electronic equipment Pending CN110288521A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910580726.XA CN110288521A (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
CN201910580726.XA CN110288521A (en) 2019-06-29 2019-06-29 Image beautification method, device and electronic equipment

Publications (1)

Publication Number Publication Date
CN110288521A true CN110288521A (en) 2019-09-27

Family

ID=68019874

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910580726.XA Pending CN110288521A (en) 2019-06-29 2019-06-29 Image beautification method, device and electronic equipment

Country Status (1)

Country Link
CN (1) CN110288521A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
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
CN112465695A (en) * 2020-12-01 2021-03-09 北京达佳互联信息技术有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN113033341A (en) * 2021-03-09 2021-06-25 北京达佳互联信息技术有限公司 Image processing method, image processing device, electronic equipment and storage medium
TWI743843B (en) * 2019-12-25 2021-10-21 中國商北京市商湯科技開發有限公司 Image processing method, image processing device and storage medium thereof
CN113033341B (en) * 2021-03-09 2024-04-19 北京达佳互联信息技术有限公司 Image processing method, device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009031155A2 (en) * 2007-09-06 2009-03-12 Yeda Research And Development Co. Ltd. Modelization of objects in images
CN102750724A (en) * 2012-04-13 2012-10-24 广州市赛百威电脑有限公司 Three-dimensional and panoramic system automatic-generation method based on images
CN103047938A (en) * 2013-01-05 2013-04-17 山西省电力公司大同供电分公司 Method and device for detecting icing thickness of power transmission line
US20140147003A1 (en) * 2012-11-23 2014-05-29 Nokia Corporation Method and Apparatus for Facial Image Processing
CN109191414A (en) * 2018-08-21 2019-01-11 北京旷视科技有限公司 A kind of image processing method, device, electronic equipment and storage medium
CN109359618A (en) * 2018-10-30 2019-02-19 北京市商汤科技开发有限公司 A kind of image processing method and its device, equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009031155A2 (en) * 2007-09-06 2009-03-12 Yeda Research And Development Co. Ltd. Modelization of objects in images
CN102750724A (en) * 2012-04-13 2012-10-24 广州市赛百威电脑有限公司 Three-dimensional and panoramic system automatic-generation method based on images
US20140147003A1 (en) * 2012-11-23 2014-05-29 Nokia Corporation Method and Apparatus for Facial Image Processing
CN103047938A (en) * 2013-01-05 2013-04-17 山西省电力公司大同供电分公司 Method and device for detecting icing thickness of power transmission line
CN109191414A (en) * 2018-08-21 2019-01-11 北京旷视科技有限公司 A kind of image processing method, device, electronic equipment and storage medium
CN109359618A (en) * 2018-10-30 2019-02-19 北京市商汤科技开发有限公司 A kind of image processing method and its device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
马旋等: "基于人脸检测和关键点识别的快速人体组件划分", 《计算机应用与软件》 *

Cited By (7)

* Cited by examiner, † Cited by third party
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
CN111402116A (en) * 2020-03-11 2020-07-10 北京字节跳动网络技术有限公司 Method and device for processing human waist body beautification in picture 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
CN113033341A (en) * 2021-03-09 2021-06-25 北京达佳互联信息技术有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN113033341B (en) * 2021-03-09 2024-04-19 北京达佳互联信息技术有限公司 Image processing method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110288553A (en) Image beautification method, device and electronic equipment
CN110766777B (en) Method and device for generating virtual image, electronic equipment and storage medium
CN110189246B (en) Image stylization generation method and 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
CN110288521A (en) Image beautification method, device and electronic equipment
CN109064390A (en) A kind of image processing method, image processing apparatus and mobile terminal
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
CN110070499A (en) Image processing method, device and computer readable storage medium
CN115937379A (en) Special effect generation method and device, electronic equipment and storage medium
CN110070515A (en) Image composition method, device and computer readable storage medium
CN110084154B (en) Method and device for rendering image, electronic equipment and computer readable storage medium
CN110264430B (en) Video beautifying method and device and electronic equipment
CN113052923B (en) Tone mapping method, tone mapping apparatus, electronic device, and storage medium
CN113538304B (en) Training method and device for image enhancement model, and image enhancement method and device
CN110197459B (en) Image stylization generation method and device and electronic equipment
CN110264431A (en) Video beautification method, device and electronic equipment
CN110288552A (en) Video beautification method, device and electronic equipment
CN110689478B (en) Image stylization processing method and device, electronic equipment and readable medium
CN110378948B (en) 3D model reconstruction method and device and electronic equipment
CN110209861A (en) Image processing method, device, electronic equipment and computer readable storage medium
CN116681765A (en) Method for determining identification position in image, method for training model, device and equipment
CN109977925A (en) Expression determines method, apparatus 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