CN110097622A - Render method, apparatus, electronic equipment and the computer readable storage medium of image - Google Patents

Render method, apparatus, electronic equipment and the computer readable storage medium of image Download PDF

Info

Publication number
CN110097622A
CN110097622A CN201910331282.6A CN201910331282A CN110097622A CN 110097622 A CN110097622 A CN 110097622A CN 201910331282 A CN201910331282 A CN 201910331282A CN 110097622 A CN110097622 A CN 110097622A
Authority
CN
China
Prior art keywords
parameter
image
target object
rendering
computer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910331282.6A
Other languages
Chinese (zh)
Other versions
CN110097622B (en
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.)
Douyin Vision Co Ltd
Douyin Vision Beijing 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 CN201910331282.6A priority Critical patent/CN110097622B/en
Publication of CN110097622A publication Critical patent/CN110097622A/en
Priority to PCT/CN2020/074443 priority patent/WO2020215854A1/en
Application granted granted Critical
Publication of CN110097622B publication Critical patent/CN110097622B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computer Graphics (AREA)
  • Image Processing (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The present disclosure discloses a kind of method, apparatus, electronic equipment and computer readable storage mediums for rendering image.Wherein the method for the rendering image includes: acquisition image;Determine the first parameter of the target object in described image;Determine the second parameter of the target object in described image;According to the first parameter described in second parameters revision;According to the target object in the revised first parameter rendering described image.The embodiment of the present disclosure can correct the first parameter of the target object by taking the technical solution according to the other parameters of the target object in image, and render the target object according to revised first parameter, and rendering mode is more flexible.

Description

Render method, apparatus, electronic equipment and the computer readable storage medium of image
Technical field
This disclosure relates to field of information processing more particularly to a kind of method, apparatus, electronic equipment and calculating for rendering image Machine readable storage medium storing program for executing.
Background technique
With the development of computer technology, the application range of intelligent terminal has obtained extensive raising, such as can pass through Intelligent terminal shoots image and video etc..
Intelligent terminal also has powerful data-handling capacity simultaneously, such as is being carried out using intelligent terminal to target object When shooting, image obtained can be shot to intelligent terminal by image segmentation algorithm and be handled in real time, to identify Shoot the target object in image.For handling video by human body image partitioning algorithm, the computer equipments such as intelligent terminal Each frame image that video can be handled in real time by human body image partitioning algorithm, accurately identifies the who object wheel in image Wide and who object each key point, it is this so as to the position in the picture such as face, right hand of determining who object Identification has been able to be accurate to Pixel-level.
In the prior art, additionally it is possible to " U.S. face " be carried out to the who object identified from image, such as by preset Rendering parameter renders to achieve the effect that beautification face object, as an example, the target that can preset face object is wide Parameter is spent, when the inclined bowlder of face of the who object in described image, is then rendered in image according to the target width parameter The face of who object is to achieve the effect that " thin face ", but face object biggish for the distance between two is according to Target width parameter carry out " thin face " Rendering operations, may can not achieve the effect that beautification even run counter to desire, this be because It is inflexible for the rendering mode that is rendered in the prior art according to preset rendering parameter to the face object in image, do not have There is the difference between the face object for considering different individuals.
Summary of the invention
The embodiment of the present disclosure provides the method for rendering image, device, electronic equipment and computer readable storage medium, energy Enough the first parameters that the target object is corrected according to the other parameters of the target object in image, and according to revised institute It states the first parameter and renders the target object, rendering mode is more flexible.
In a first aspect, the embodiment of the present disclosure provides a kind of method for rendering image characterized by comprising obtain image; Determine the first parameter of the target object in described image;Determine the second parameter of the target object in described image;Root According to the first parameter described in second parameters revision;According to the mesh in the revised first parameter rendering described image Mark object.
Further, the second parameter of the target object in described image is determined, comprising: according to preset first pair It should be related to, determine second parameter corresponding with first parameter.
Further, the first parameter of the target object in described image is determined, comprising: according to the preset second corresponding pass System determines first parameter corresponding with second parameter.
Further, the first parameter according to second parameters revision, comprising: according to second parameter determine with The modification rule of first parameter association;First parameter is corrected according to the modification rule.
Further, the modification rule includes the value range of first parameter;It is corrected according to the modification rule First parameter, comprising: first parameter is corrected according to the value range.
Further, before the first parameter according to second parameters revision, the method also includes: determine with The corresponding target component of first parameter;First parameter is corrected according to the value range, comprising: is joined in the target In the case that number belongs to the value range, the target component is determined as revised first parameter.
Further, first parameter is corrected according to the value range, comprising: be not belonging to institute in the target component In the case where stating value range, first parameter is corrected according to the boundary value of the value range and the target component.
Further, the modification rule is included in the corresponding amendment type of first parameter;It is advised according to the amendment Then correct first parameter, comprising: first parameter is corrected according to the amendment type.
Second aspect, the embodiment of the present disclosure provides a kind of device for rendering image it is characterised by comprising: image obtains mould Block, for obtaining image;First parameter determination module, for determining the first parameter of the target object in described image;Second Parameter determination module, for determining the second parameter of the target object in described image;Correction module, for according to First parameter described in second parameters revision;Rendering module, for according in the revised first parameter rendering described image The target object.
Further, second parameter determination module is also used to: according to preset first corresponding relationship, it is determining with it is described Corresponding second parameter of first parameter.
Further, first parameter determination module is also used to: according to preset second corresponding relationship, it is determining with it is described Corresponding first parameter of second parameter.
Further, the correction module is also used to: according to second parameter determination and first parameter association Modification rule;First parameter is corrected according to the modification rule.
Further, the modification rule includes the value range of first parameter;The correction module is also used to: root First parameter is corrected according to the value range.
Further, the correction module is also used to: determining target component corresponding with first parameter;In the mesh In the case that mark parameter belongs to the value range, the target component is determined as revised first parameter.
Further, the correction module is also used to: in the case where the target component is not belonging to the value range, First parameter is corrected according to the boundary value of the value range and the target component.
Further, the modification rule is included in the corresponding amendment type of first parameter;The correction module is also For: first parameter is corrected according to the amendment type.
The third aspect, the embodiment of the present disclosure provide a kind of electronic equipment, comprising: memory, it is computer-readable for storing Instruction;And one or more processors, for running the computer-readable instruction, so that the processor is realized when running The method of any rendering image in aforementioned first aspect.
Fourth aspect, the embodiment of the present disclosure provide a kind of non-transient computer readable storage medium, which is characterized in that described Non-transient computer readable storage medium stores computer instruction, when the computer instruction is computer-executed, so that institute The method for stating any rendering image that computer executes in aforementioned first aspect.
The present disclosure discloses a kind of method, apparatus, electronic equipment and computer readable storage mediums for rendering image.Wherein The method of the rendering image characterized by comprising obtain image;Determine the first ginseng of the target object in described image Number;Determine the second parameter of the target object in described image;According to the first parameter described in second parameters revision;Root According to the target object in the revised first parameter rendering described image.The embodiment of the present disclosure provides rendering image Method, device, electronic equipment and computer readable storage medium, can according to the other parameters of the target object in image come The first parameter of the target object is corrected, and the target object, rendering side are rendered according to revised first parameter Formula is more flexible.
Above description is only the general introduction of disclosed technique scheme, in order to better understand the technological means of the disclosure, and It can be implemented in accordance with the contents of the specification, and to allow the above and other objects, features and advantages of the disclosure can be brighter Show understandable, it is special below to lift preferred embodiment, and cooperate attached drawing, detailed description are as follows.
Detailed description of the invention
In order to illustrate more clearly of the embodiment of the present disclosure or technical solution in the prior art, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is this public affairs The some embodiments opened for those of ordinary skill in the art without creative efforts, can be with root Other attached drawings are obtained according to these attached drawings.
Fig. 1 is the flow chart of the embodiment one of the method for the rendering image that the embodiment of the present disclosure provides;
Fig. 2 is the flow chart of the embodiment two of the method for the rendering image that the embodiment of the present disclosure provides;
Fig. 3 is the structural schematic diagram of the embodiment of the device for the rendering image that the embodiment of the present disclosure provides;
Fig. 4 is the structural schematic diagram of the electronic equipment provided according to the embodiment of the present disclosure.
Specific embodiment
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 diagram 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.
Fig. 1 is the flow chart of the embodiment of the method one for the rendering image that the embodiment of the present disclosure provides, provided in this embodiment The method for rendering image can render the device of image by one to execute, which can be implemented as software, can be implemented as Hardware, is also implemented as the combination of software and hardware, such as the device of the rendering image includes computer equipment (such as intelligence Energy terminal), thus the method for executing the rendering image provided in this embodiment by the computer equipment.
As shown in Figure 1, the method for the rendering image of the embodiment of the present disclosure includes the following steps:
Step S101 obtains image;
In step s101, the device for rendering image obtains image, is realized with will pass through current and/or subsequent step The method for rendering image.The device of the rendering image may include filming apparatus, thus image packet acquired in step S101 Include the image of filming apparatus shooting;The device of the rendering image can not include filming apparatus, but communicate with filming apparatus Connection, so that obtaining image in step S101 includes the image for obtaining filming apparatus shooting by the communication connection;The wash with watercolours The device for contaminating image can also obtain image from preset storage location, be realized with will pass through current and/or subsequent step Render image method, the embodiment of the present disclosure to obtain image mode without limitation.
It will be understood by those skilled in the art that video is made of a series of images frame, each picture frame is referred to as figure Picture, therefore it includes that image is obtained from video that step S101, which obtains image,.
Step S102 determines the first parameter of the target object in described image;
Optionally, the target object includes who object, or the key position object including human body, for example including face Portion's object, face object, trunk object, arm object etc..As described in disclosure background technique, computer in the prior art is set It is standby that there is powerful data-handling capacity, such as the pixel region of the target object in image can be identified by image segmentation algorithm Domain and/or key point can also identify the key point of the target object in image by other key point location technologies, therefore, Described in the device of rendering image in the embodiment of the present disclosure can be determined based on image segmentation algorithm and/or key point location technology First parameter of target object and/or the target object in image.
As understood by those skilled in the art, the image in the embodiment of the present disclosure is made of pixel, can pass through position Parameter and color parameter characterize each pixel in image, so that image segmentation algorithm above-mentioned can be based on the pixel of image Location parameter and/or color parameter determine the pixel region of the target object in described image, key point location skill above-mentioned Art can by the location parameter of preset crucial point feature (such as color characteristic and/or shape feature) and the pixel of image and/ Or color parameter is matched, to determine the key point of target object.A kind of typical characteristic manner be by five-tuple (x, y, R, g, b) indicate a pixel of image, location parameter of the coordinate x and y therein as one pixel, face therein Colouring component r, g and b are numerical value of the pixel on rgb space, and r, g and b superposition can be obtained to the color of the pixel. It is, of course, also possible to indicate the location parameter and color parameter of pixel by other means, such as pass through polar coordinates or UV coordinate Deng the location parameter for indicating pixel, the color parameter of pixel, the embodiment of the present disclosure are indicated according to Lab space or the space CMY etc. It does not limit this.
As an example, target object and/or the target pair are determined in described image based on image segmentation algorithm The first parameter of elephant, wherein common image segmentation algorithm can according to the similitude of the color parameter of the pixel in image or Homogeney divides an image into region, is then determined as pixel included by the region after merging by way of region merging technique The pixel region of the target object, so can be determined based on the pixel region target object key point and other First parameter of the target object;The target can also be determined according to the color characteristic and/or shape feature of target object The fundamental region of object, then according to the discontinuity of the color parameter of the target object and mutability from the fundamental region The profile of target object described in set off in search carries out extension spatially according to the position of its profile, that is to say, that according to image The feature point, line, surface area that carries out image segmentation to determine the profile of the target object, in the profile of the target object Domain is the pixel region of the target object, and then the key point of the target object can be determined based on the pixel region With the first parameter of target object described in other.It is, of course, also possible to using other image segmentation algorithms, the embodiment of the present disclosure pair Without limitation, any existing or future image segmentation algorithm is used equally for the embodiment of the present disclosure to all kinds of image segmentation algorithms In, to determine the first parameter of target object and/or the target object in described image.
As another example, color characteristic and/or shape feature based on target object simultaneously pass through crucial point location skill Art determines the first parameter of target object and/or the target object, wherein for example described target object includes the face of human body Object, then the profile key point of the face object can be characterized by color characteristic and/or shape feature, then according to institute State color characteristic and/or shape feature in described image with the location parameter of the pixel of described image and/or color parameter into Row feature extraction, to determine the profile key point of the face object, due to key point only occupy in the picture it is very small Area (usually only several sizes to tens pixels), color characteristic corresponding with key point and/or shape feature are being schemed As upper occupied region be generally also it is very limited and local, there are two types of feature extraction modes at present: (1) along profile Vertical one-dimensional range image feature extraction;(2) the two dimensional range image characteristics extraction of key point Square Neighborhood, above two side There are many kinds of implementation methods for formula, such as ASM and AAM class method, statistics energy function class method, regression analysis, deep learning Method, classifier methods, batch extracting method etc., the embodiment of the present disclosure is not specifically limited.Identifying that the face is right After the profile key point of elephant, be also based on the color parameter of the profile key point and the target object discontinuity and Mutability find target object profile, or based on the face object profile key point determine the target object its His the first parameter.
In the embodiment of the present disclosure, optionally, the first parameter of the target object includes but is not limited in following parameter It is one or more: color parameter, location parameter, length parameter, width parameter, form parameter, scale parameter, type parameter, table Feelings parameter, pose parameter, other parameters.Optionally, the pixel in the pixel region of the target object in image can be passed through Location parameter and/or color parameter calculate, and characterize, or determine the first parameter of the target object.As an example, First parameter of the target object includes the length parameter of eye object, and the length parameter includes left eye object or right eye The length of the tail of the eye of object to inner eye corner (such as characterizes the length parameter by pixel quantity, then the length parameter The tail of the eye including left eye object or right eye object is to the pixel quantity between inner eye corner);As another example, the mesh First parameter of mark object includes the scale parameter of eye object, and the scale parameter includes left eye object or right eye object Ratio between the width of face corresponding to the tail of the eye to the length of inner eye corner and the eye object;Show as another Example, the first parameter of the target object includes the color parameter of face object, and the color parameter includes the face object Pixel region in all pixels color parameter average value (such as based on RGB channel characterization pixel color parameter, then The color parameter of the face object is (r, g, b), and wherein r is that all pixels are logical in r in the pixel region of the face object The sum of numerical value on road is divided by the quantity of all pixels, and correspondingly, g and b are also calculated in the manner described above).As another reality Example is applied, the first parameter of the target object includes the type parameter of face object, and the type parameter includes round face type, point Face type, standard face type can be according to the facial width and the face at the corners of the mouth extending transversely line of the face object The ratio of facial width at the cheekbone of object determines first parameter, such as when the ratio determines less than 0.6 described the One parameter is sharp face type, determines that first parameter is round face type when the ratio is greater than 0.8, other then determine described the One parameter is standard face type.The embodiment of the present disclosure does not limit the form and content of the first parameter of the target object Fixed, the first parameter of the target object includes any parameter that can characterize the target object.
Step S103 determines the second parameter of the target object in described image;
In the embodiment of the present disclosure, optionally, the second parameter of the target object in described image includes but is not limited to One or more of following parameter: color parameter, location parameter, length parameter, width parameter, form parameter, scale parameter, Type parameter, expression parameter, pose parameter, other parameters.On how to determined from described image the target object and/or Second parameter of the target object is referred in step S102 about the determination target object and/or the target pair The identical or corresponding description of the first parameter of elephant, details are not described herein again.Optionally, second parameter and first parameter be not Together.
It is worth noting that although being numbered in the embodiment of the present disclosure to step, the simultaneously unawareness of the sequence of number Taste the sequencing of step, by taking step S102 and step S103 as an example, step S102 can be executed before step S103, can To execute after step s 103, step S102 and step S103 also may be performed simultaneously.
In an alternative embodiment, step S103: determining the second parameter of the target object in described image, It include: that second parameter corresponding with first parameter is determined according to preset first corresponding relationship.Such as it is first carried out Step S102: determining the first parameter of the target object in described image, if the first parameter of the target object includes people The color parameter of the face object of body, first corresponding relationship indicate that the second parameter corresponding with the color parameter includes face Shape parameter, then determining the shape of face parameter of the face object in step s 103.Wherein realize the first preset relation example Such as after determining first parameter in step s 102, it can pass through inquiry by way of storing mapping table The mode of the mapping table determines the second parameter corresponding with first parameter.
In another optional embodiment, step S102: determining the first parameter of the target object in described image, packet It includes: according to preset second corresponding relationship, determining first parameter corresponding with second parameter.As previously mentioned, step S102 can be executed after step s 103, executed step S103: being determined second of the target object in described image After parameter, if the second parameter of the target object includes the hair style parameter of who object, second corresponding relationship refers to Show that the first parameter corresponding with the hair style parameter includes shape of face parameter, then determining the who object in step s 102 Shape of face parameter.Implementation about second corresponding relationship may refer to about the identical of the first corresponding relationship or accordingly retouch It states, details are not described herein again.
Step S104, according to the first parameter described in second parameters revision;
Join in the first parameter that the target object in described image has been determined by step S102 and step S103 and second After number, the first parameter according to second parameters revision in step S104.As described in disclosure background technique, such as When carrying out the beauty operation of " thin face " for the face of who object, it is often based on preset target width parameters revision image In face object facial width parameter, but this correcting mode does not account for different individuals and may have different spies Sign, and unified target component is all made of for different individuals and is modified and possibly can not obtain preferable correction effect, because This will correct first parameter according to the second parameter of the target object, so as to needle in the step S104 Realize the amendment to first parameter, to the feature of the target object in image to obtain preferable correction effect.
In an alternative embodiment, the first parameter according to second parameters revision, comprising: according to described The determining modification rule with first parameter association of two parameters;First parameter is corrected according to the modification rule.Wherein, The modification rule can be preset modification rule.As an example, the first parameter of the target object includes face Second parameter of the camber parameter of object, the target object includes the shape of face parameter of face's object, if in step s 103 The identified shape of face parameter is round face, and round face is suitble to flat eyebrow and/or thick eyebrow, therefore the preset modification rule can be with Including being flat eyebrow and/or thick eyebrow by the camber parameters revision of the target object, optionally, the modification rule can be by right Answer the mode of relation table to be stored in advance, after determining second parameter, by inquire the mapping table it is determining with it is described The corresponding modification rule of second parameter, wherein the modification rule and first parameter association.
Optionally, the modification rule includes the value range of first parameter;Institute is corrected according to the modification rule State the first parameter, comprising: first parameter is corrected according to the value range.Based on previous embodiment, such as the target First parameter of object includes the camber parameter of face's object, and the second parameter of the target object includes the shape of face of face's object Parameter, since round face is suitble to thick eyebrow, the modification rule includes the width range of revised camber, the width range Minimum widith and maximum width for example including camber, thus being joined according to the modification rule to first parameter, that is, camber When number is modified, it is ensured that the width of the camber in the revised camber parameter is more than or equal to the width range In minimum widith and the maximum width that is less than or equal in the width range, such as can be by the face object The width correction of camber in camber parameter is the minimum widith of the width range, maximum width or median.
Optionally, before the first parameter according to second parameters revision, the method also includes: determining and institute State the corresponding target component of the first parameter;First parameter is corrected according to the value range, comprising: in the target component In the case where belonging to the value range, the target component is determined as revised first parameter.Optionally, according to The value range corrects first parameter, comprising: in the case where the target component is not belonging to the value range, root First parameter is corrected according to the boundary value of the value range and the target component.In the embodiment of the present disclosure, with described The corresponding target component of one parameter is for example including color parameter, location parameter, length parameter, width parameter, form parameter, ratio Parameter, type parameter, expression parameter, pose parameter, other parameters etc., such as the target component be it is preset, can pass through Comparison and analysis to great amount of images determine the target component, such as when first parameter is carried out according to the target component When amendment, greater probability will obtain preferable correction effect.
As an example, the first parameter of the target object includes the facial length parameter of who object, such as will be described 60 pixel of pixel quantity between chin key point and top key point in the face contour key point of who object is determined as The facial length parameter of the who object;Second parameter of the target object includes the height parameter of the who object, Such as the height parameter is 500 pixels);According to the modification rule that the height parameter determines include: facial length parameter with The ratio of height parameter is [0.125,0.2], therefore can determine the value range of the facial length parameter according to the rule It is 62.5 pixels to 100 pictures for the value range that 62.5 pixels to 100 pixels or the rule include the facial length parameter Element, so as to correct first parameter according to the value range, such as by 60 pixel according to algorithm appropriate or Person's rule be adapted to 62.5 pixels to 100 pixels in the range of (such as the facial length parameter is directly modified to 62.5, 100 pixels etc.).If the method further defines target component corresponding with the i.e. facial length parameter of first parameter, example If the target component is that 65 pixels (can determine target component corresponding with first parameter, example according to default rule If the facial width parameter of the who object is 50 pixels, aforementioned default rule includes will be corresponding in facial length parameter Target component is determined as 1.3 times i.e. 65 pixels of the facial width parameter), since 65 pixels belong to 62.5 pixels to 100 pictures The range of element, therefore the target component i.e. 65 pixels can be determined as to the i.e. facial length ginseng of revised first parameter Number;If the target component is that (such as the facial width parameter of the who object is 50 pixels to 60 pixels, aforementioned preset Rule includes that will be determined as 1.2 times i.e. 60 pixels of the facial width parameter in the corresponding target component of facial length parameter), It, can be according to the target component i.e. 60 pixels and institute since 60 pixels are not belonging to the range of 62.5 pixels to 100 pixels Boundary value i.e. 62.5 pixels and/or 100 pixels of range are stated to correct the facial length parameter (such as by first parameter I.e. facial length parameter is modified to the average value of a boundary value of the target component and the range).
Optionally, the modification rule includes amendment type corresponding with first parameter;According to the modification rule Correct first parameter, comprising: first parameter is corrected according to the amendment type.As an example, in step s 102 First parameter of the determining target object includes the eye parameter of face object, such as the eye parameter includes the face The profile parameters of eyes in portion's object, canthus location parameter, eye-length parameter, eye shadow color parameter and/or eyes are most wide Locate width parameter;Second parameter of the target object determined in step s 103 includes the shape of face ginseng of the face object Number, such as the shape of face parameter are sharp face, and sharp face is suitble to " slim eye " type, i.e., included by the described modification rule with it is described The corresponding amendment type of eye parameter is " slim eye " type, therefore will be repaired according to " slim eye " type in step S104 The just described eye parameter, such as according to " slim eye " types entail, the canthus location parameter in the eye parameter is modified to The tail of the eye is higher than inner eye corner, and the ratio of eye-length parameter and facial width is modified to and reaches preset ratio etc..
Step S105, according to the target object in the revised first parameter rendering described image.
First parameter is had modified in step S104, thus in step s105 can be according to revised described One parameter renders the target object in described image, with image processing functions such as realizations " U.S. face ".At S105 pairs of step During the target object is rendered, described image can be carried out using existing or future image processing techniques Processing, such as the polar plot of image is established by color space conversion and image is smoothed, according to the first parameter Type and content etc. the variation of location parameter and/or color parameter is carried out to the pixel in the region of the who object in image Deng details are not described herein again.
By the technical solution of the embodiment of the present disclosure, in the first parameter and the second parameter for determining the target object in image Afterwards, can the first parameter according to second parameters revision, and based on revised first parameter rendering described image in Target object, that is to say, that the of the target object is corrected according to other features of the target object in described image One parameter simultaneously renders the target object, hence for different target objects can using unique, difference, or more First parameter appropriate renders the target object, and rendering mode is more flexible.
Fig. 2 is the flow chart of the embodiment of the method two for the rendering image that the embodiment of the present disclosure provides, in this method embodiment In two, in step S105: after the target object in the revised first parameter rendering described image, also wrapping Include step S201;Show described image;And/or storage described image.Due to realizing rendering described image in step s105 In target object function, such as to the filming apparatus shooting described image in who object carried out U.S. face etc. Image procossing, then in step s 201, which can be shown and/or be stored, so that user's energy Image effect and persistence after enough instantaneously browsing renderings image by rendering.
Fig. 3 show the structural schematic diagram of 300 embodiment of device of the rendering image of embodiment of the present disclosure offer, such as Fig. 3 Shown, the device 300 for rendering image includes image collection module 301, the first parameter determination module 302, and the second parameter determines mould Block 303, correction module 304 and rendering module 305.Wherein, described image obtains module 301 and is used for for obtaining image;It is described First parameter determination module 302, for determining the first parameter of the target object in described image;Second parameter determines mould Block 303, for determining the second parameter of the target object in described image;The correction module 304, for according to First parameter described in second parameters revision;The rendering module 305, for according to the revised first parameter rendering The target object in image.
In an alternative embodiment, the device of the rendering image further include: display module 305 and/or storage mould Block 306, wherein the display module 305 is for showing described image, and the memory module 306 is for storing described image.
The method that Fig. 3 shown device can execute Fig. 1 and/or embodiment illustrated in fig. 2, the portion that the present embodiment is not described in detail Point, it can refer to the related description to Fig. 1 and/or embodiment illustrated in fig. 2.The implementation procedure and technical effect of the technical solution referring to Description in Fig. 1 and/or embodiment illustrated in fig. 2, details are not described herein.
Below with reference to Fig. 4, it illustrates the structural representations for the electronic equipment 300 for being suitable for being used to realize the embodiment of the present disclosure Figure.Electronic equipment in the embodiment of the present disclosure can include but is not limited to such as mobile phone, laptop, digital broadcasting and connect Receive device, PDA (personal digital assistant), PAD (tablet computer), PMP (portable media player), car-mounted terminal (such as vehicle Carry navigation terminal) etc. mobile terminal and such as number TV, desktop computer etc. fixed terminal.Electricity shown in Fig. 4 Sub- equipment is only an example, should not function to the embodiment of the present disclosure and use scope bring any restrictions.
As shown in figure 4, electronic equipment 400 may include processing unit (such as central processing unit, graphics processor etc.) 401, random access can be loaded into according to the program being stored in read-only memory (ROM) 402 or from storage device 408 Program in memory (RAM) 403 and execute various movements appropriate and processing.In RAM 403, it is also stored with electronic equipment Various programs and data needed for 400 operations.Processing unit 401, ROM 402 and RAM 403 pass through bus or communication line 404 are connected with each other.Input/output (I/O) interface 405 is also connected to bus or communication line 404.
In general, following device can connect to I/O interface 405: including such as touch screen, touch tablet, keyboard, mouse, figure As the input unit 406 of sensor, microphone, accelerometer, gyroscope etc.;Including such as liquid crystal display (LCD), loudspeaking The output device 407 of device, vibrator etc.;Storage device 408 including such as tape, hard disk etc.;And communication device 409.It is logical T unit 409 can permit electronic equipment 400 and wirelessly or non-wirelessly be communicated with other equipment to exchange data.Although Fig. 4 shows The electronic equipment 400 with various devices is gone out, it should be understood that being not required for implementing or having all dresses shown It sets.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 409, or from storage device 408 It is mounted, or is mounted from ROM 402.When the computer program is executed by processing unit 401, 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 method that the electronic equipment executes the rendering image in above-described embodiment.
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 be complete It executes, partly executed on the user computer on the user computer entirely, being executed as an independent software package, part Part executes on the remote computer or executes on a remote computer or server completely on the user computer.It is relating to And in the situation of remote computer, remote computer can pass through the network of any kind --- including local area network (LAN) or extensively Domain net (WAN)-be connected to subscriber computer, or, it may be connected to outer computer (such as utilize ISP To be 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.
Above description is only the preferred embodiment of the disclosure and the explanation to institute's application technology principle.Those skilled in the art Member is it should be appreciated that the open scope involved in the disclosure, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic Scheme, while should also cover in the case where not departing from design disclosed above, it is carried out by above-mentioned technical characteristic or its equivalent feature Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed in the disclosure Can technical characteristic replaced mutually and the technical solution that is formed.

Claims (11)

1. a kind of method for rendering image characterized by comprising
Obtain image;
Determine the first parameter of the target object in described image;
Determine the second parameter of the target object in described image;
According to the first parameter described in second parameters revision;
According to the target object in the revised first parameter rendering described image.
2. the method for rendering image according to claim 1, which is characterized in that determine the target pair in described image The second parameter of elephant, comprising:
According to preset first corresponding relationship, second parameter corresponding with first parameter is determined.
3. the method for rendering image according to claim 1, which is characterized in that determine the target object in described image First parameter, comprising:
According to preset second corresponding relationship, first parameter corresponding with second parameter is determined.
4. the method for rendering image according to claim 1 to 3, which is characterized in that repaired according to second parameter Just described first parameter, comprising:
According to the determining modification rule with first parameter association of second parameter;
First parameter is corrected according to the modification rule.
5. the method for rendering image according to claim 4, which is characterized in that the modification rule includes first ginseng Several value ranges;
First parameter is corrected according to the modification rule, comprising:
First parameter is corrected according to the value range.
6. the method for rendering image according to claim 5, which is characterized in that according to second parameters revision Before first parameter, the method also includes:
Determine target component corresponding with first parameter;
First parameter is corrected according to the value range, comprising:
In the case where the target component belongs to the value range, the target component is determined as revised described One parameter.
7. the method for rendering image according to claim 6, which is characterized in that according to value range amendment described the One parameter, comprising:
In the case where the target component is not belonging to the value range, according to the boundary value of the value range and the mesh Mark the first parameter described in parameters revision.
8. the method for rendering image according to claim 4, which is characterized in that the modification rule is included in described first The corresponding amendment type of parameter;
First parameter is corrected according to the modification rule, comprising:
First parameter is corrected according to the amendment type.
9. a kind of device for rendering image characterized by comprising
Image collection module, for obtaining image;
First parameter determination module, for determining the first parameter of the target object in described image;
Second parameter determination module, for determining the second parameter of the target object in described image;
Correction module is used for the first parameter according to second parameters revision;
Rendering module, for according to the target object in the revised first parameter rendering described image.
10. a kind of electronic equipment, comprising:
Memory, for storing computer-readable instruction;And
Processor, for running the computer-readable instruction, so that realizing according to claim 1-8 when the processor is run Any one of described in rendering image method.
11. a kind of non-transient computer readable storage medium, for storing computer-readable instruction, when the computer-readable finger When order is executed by computer, so that the method that the computer perform claim requires rendering image described in any one of 1-8.
CN201910331282.6A 2019-04-23 2019-04-23 Method and device for rendering image, electronic equipment and computer readable storage medium Active CN110097622B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910331282.6A CN110097622B (en) 2019-04-23 2019-04-23 Method and device for rendering image, electronic equipment and computer readable storage medium
PCT/CN2020/074443 WO2020215854A1 (en) 2019-04-23 2020-02-06 Method and apparatus for rendering image, electronic device, and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910331282.6A CN110097622B (en) 2019-04-23 2019-04-23 Method and device for rendering image, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110097622A true CN110097622A (en) 2019-08-06
CN110097622B CN110097622B (en) 2022-02-25

Family

ID=67445687

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910331282.6A Active CN110097622B (en) 2019-04-23 2019-04-23 Method and device for rendering image, electronic equipment and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN110097622B (en)
WO (1) WO2020215854A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020215854A1 (en) * 2019-04-23 2020-10-29 北京字节跳动网络技术有限公司 Method and apparatus for rendering image, electronic device, and computer readable storage medium

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040021779A1 (en) * 2002-07-30 2004-02-05 Canon Kabushiki Kaisha Image processing apparatus, image processing method, recording medium thereof, and program thereof
US20070092160A1 (en) * 2003-06-11 2007-04-26 Kose Corporation Skin evaluation method and image simulation method
US20100123802A1 (en) * 2008-11-19 2010-05-20 Samsung Digital Imaging Co., Ltd. Digital image signal processing method for performing color correction and digital image signal processing apparatus operating according to the digital image signal processing method
JP2013179464A (en) * 2012-02-28 2013-09-09 Nikon Corp Electronic camera
CN103605975A (en) * 2013-11-28 2014-02-26 小米科技有限责任公司 Image processing method and device and terminal device
CN104715236A (en) * 2015-03-06 2015-06-17 广东欧珀移动通信有限公司 Face beautifying photographing method and device
CN105279487A (en) * 2015-10-15 2016-01-27 广东欧珀移动通信有限公司 Beauty tool screening method and system
CN106169172A (en) * 2016-07-08 2016-11-30 深圳天珑无线科技有限公司 A kind of method and system of image procossing
CN107886484A (en) * 2017-11-30 2018-04-06 广东欧珀移动通信有限公司 U.S. face method, apparatus, computer-readable recording medium and electronic equipment
CN108229278A (en) * 2017-04-14 2018-06-29 深圳市商汤科技有限公司 Face image processing process, device and electronic equipment
CN108665521A (en) * 2018-05-16 2018-10-16 京东方科技集团股份有限公司 Image rendering method, device, system, computer readable storage medium and equipment
CN108765352A (en) * 2018-06-01 2018-11-06 联想(北京)有限公司 Image processing method and electronic equipment
CN108876732A (en) * 2018-05-25 2018-11-23 北京小米移动软件有限公司 Face U.S. face method and device
CN109419140A (en) * 2017-08-31 2019-03-05 丽宝大数据股份有限公司 Recommend eyebrow shape display methods and electronic device
CN109584151A (en) * 2018-11-30 2019-04-05 腾讯科技(深圳)有限公司 Method for beautifying faces, device, terminal and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107680033B (en) * 2017-09-08 2021-02-19 北京小米移动软件有限公司 Picture processing method and device
CN108734126B (en) * 2018-05-21 2020-11-13 深圳市梦网科技发展有限公司 Beautifying method, beautifying device and terminal equipment
CN108921856B (en) * 2018-06-14 2022-02-08 北京微播视界科技有限公司 Image cropping method and device, electronic equipment and computer readable storage medium
CN110097622B (en) * 2019-04-23 2022-02-25 北京字节跳动网络技术有限公司 Method and device for rendering image, electronic equipment and computer readable storage medium

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040021779A1 (en) * 2002-07-30 2004-02-05 Canon Kabushiki Kaisha Image processing apparatus, image processing method, recording medium thereof, and program thereof
US20070092160A1 (en) * 2003-06-11 2007-04-26 Kose Corporation Skin evaluation method and image simulation method
US20100123802A1 (en) * 2008-11-19 2010-05-20 Samsung Digital Imaging Co., Ltd. Digital image signal processing method for performing color correction and digital image signal processing apparatus operating according to the digital image signal processing method
JP2013179464A (en) * 2012-02-28 2013-09-09 Nikon Corp Electronic camera
CN103605975A (en) * 2013-11-28 2014-02-26 小米科技有限责任公司 Image processing method and device and terminal device
CN104715236A (en) * 2015-03-06 2015-06-17 广东欧珀移动通信有限公司 Face beautifying photographing method and device
CN105279487A (en) * 2015-10-15 2016-01-27 广东欧珀移动通信有限公司 Beauty tool screening method and system
CN106169172A (en) * 2016-07-08 2016-11-30 深圳天珑无线科技有限公司 A kind of method and system of image procossing
CN108229278A (en) * 2017-04-14 2018-06-29 深圳市商汤科技有限公司 Face image processing process, device and electronic equipment
CN109419140A (en) * 2017-08-31 2019-03-05 丽宝大数据股份有限公司 Recommend eyebrow shape display methods and electronic device
CN107886484A (en) * 2017-11-30 2018-04-06 广东欧珀移动通信有限公司 U.S. face method, apparatus, computer-readable recording medium and electronic equipment
CN108665521A (en) * 2018-05-16 2018-10-16 京东方科技集团股份有限公司 Image rendering method, device, system, computer readable storage medium and equipment
CN108876732A (en) * 2018-05-25 2018-11-23 北京小米移动软件有限公司 Face U.S. face method and device
CN108765352A (en) * 2018-06-01 2018-11-06 联想(北京)有限公司 Image processing method and electronic equipment
CN109584151A (en) * 2018-11-30 2019-04-05 腾讯科技(深圳)有限公司 Method for beautifying faces, device, terminal and storage medium

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
DEMING ZHAI .ETAL: "Joint Gaze Correction and Face Beautification for Conference Video Using Dual Sparsity Prior", 《IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS》 *
刘先觉 主编: "《现代建筑理论 建筑结合人文科学自然科学与技术科学的新成就》", 30 September 1999, 中国建筑工业出版社 *
张美玲 等: "面部吸引力提升的定量分析与实现", 《北京化工大学学报(自然科学版)》 *
李阳帆: "东方女性人脸妆容推荐算法研究", 《中国优秀硕士论文全文库——信息科技辑》 *
邵萌 等: "《超精密位移定位平台控制系统设计》", 30 June 2018 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020215854A1 (en) * 2019-04-23 2020-10-29 北京字节跳动网络技术有限公司 Method and apparatus for rendering image, electronic device, and computer readable storage medium

Also Published As

Publication number Publication date
CN110097622B (en) 2022-02-25
WO2020215854A1 (en) 2020-10-29

Similar Documents

Publication Publication Date Title
US11734851B2 (en) Face key point detection method and apparatus, storage medium, and electronic device
US20230401682A1 (en) Styled image generation method, model training method, apparatus, device, and medium
CN110058685A (en) Display methods, device, electronic equipment and the computer readable storage medium of virtual objects
CN110047122A (en) Render method, apparatus, electronic equipment and the computer readable storage medium of image
CN110047124A (en) Method, apparatus, electronic equipment and the computer readable storage medium of render video
CN110062176A (en) Generate method, apparatus, electronic equipment and the computer readable storage medium of video
CN109087377B (en) Method and apparatus for handling image
CN110062157A (en) Render method, apparatus, electronic equipment and the computer readable storage medium of image
CN110070499A (en) Image processing method, device and computer readable storage medium
CN110084154A (en) Render method, apparatus, electronic equipment and the computer readable storage medium of image
CN110070551A (en) Rendering method, device and the electronic equipment of video image
US20240104810A1 (en) Method and apparatus for processing portrait image
CN110070063A (en) Action identification method, device and the electronic equipment of target object
CN110288519A (en) Image beautification method, device and electronic equipment
CN110070555A (en) Image processing method, device, hardware device
CN110035236A (en) Image processing method, device and electronic equipment
CN109981989A (en) Render method, apparatus, electronic equipment and the computer readable storage medium of image
CN110069125A (en) The control method and device of virtual objects
CN110047126B (en) Method, apparatus, electronic device, and computer-readable storage medium for rendering image
CN110097622A (en) Render method, apparatus, electronic equipment and the computer readable storage medium of image
CN110059739A (en) Image composition method, device, electronic equipment and computer readable storage medium
CN110264431A (en) Video beautification method, device and electronic equipment
CN110288552A (en) Video beautification method, device and electronic equipment
CN110288691A (en) Render method, apparatus, electronic equipment and the computer readable storage medium of image
CN110069126A (en) The control method and device of virtual objects

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: Tiktok vision (Beijing) Co.,Ltd.