CN110047122A - 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 PDFInfo
- Publication number
- CN110047122A CN110047122A CN201910274185.8A CN201910274185A CN110047122A CN 110047122 A CN110047122 A CN 110047122A CN 201910274185 A CN201910274185 A CN 201910274185A CN 110047122 A CN110047122 A CN 110047122A
- Authority
- CN
- China
- Prior art keywords
- image
- rendering
- pixel
- parameter
- target object
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 57
- 238000009877 rendering Methods 0.000 claims abstract description 172
- 230000004927 fusion Effects 0.000 claims description 23
- 238000004422 calculation algorithm Methods 0.000 claims description 12
- 238000003709 image segmentation Methods 0.000 claims description 11
- 230000001052 transient effect Effects 0.000 claims description 2
- 230000000694 effects Effects 0.000 abstract description 13
- 230000006870 function Effects 0.000 description 10
- 238000010586 diagram Methods 0.000 description 9
- 238000004891 communication Methods 0.000 description 6
- 238000012545 processing Methods 0.000 description 5
- 238000004590 computer program Methods 0.000 description 3
- 230000005611 electricity Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000000605 extraction Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000001914 filtration Methods 0.000 description 2
- 230000005291 magnetic effect Effects 0.000 description 2
- 238000000638 solvent extraction Methods 0.000 description 2
- 241000208340 Araliaceae Species 0.000 description 1
- 244000174681 Michelia champaca Species 0.000 description 1
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 description 1
- 235000003140 Panax quinquefolius Nutrition 0.000 description 1
- 230000004075 alteration Effects 0.000 description 1
- 230000003796 beauty Effects 0.000 description 1
- 238000012512 characterization method Methods 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 238000010612 desalination reaction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 235000008434 ginseng Nutrition 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 210000000056 organ Anatomy 0.000 description 1
- 238000012805 post-processing Methods 0.000 description 1
- 230000000644 propagated effect Effects 0.000 description 1
- 238000000611 regression analysis Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/005—General purpose rendering architectures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/194—Segmentation; Edge detection involving foreground-background segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10016—Video; Image sequence
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10024—Color image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30196—Human being; Person
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Computer Graphics (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: to obtain the first image;Determine the target object and background image in the first image;The target object in the first image is rendered according to the first rendering parameter;The background image in the first image is rendered according to the second rendering parameter.The embodiment of the present disclosure can identify the target object and background image in image by taking the technical solution, and render the target object and background image respectively according to rendering parameter, the rendering effect of rich image.
Description
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 identify human body contour outline in image and
Each key point of human body, such as the position etc. that can identify the face of human body, the right hand etc. in the picture, this identification can
Enough it is accurate to Pixel-level.
In the prior art, the image in photo or video can be rendered by the rendering parameter of setting, such as is being set
Image can be rendered according to the filter corresponding rendering parameter after filter, so that the photo or video of display have filter
Effect, or described image is simulated by feeling of unreality rendering (non photorealistic rendering, NPR) etc.
The artistic styles such as sketch, cartoon, but above-mentioned rendering mode is similarly handled whole image, rendering effect is single.
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
It enough identifies the target object and background image in image, and the target object and back is rendered according to different rendering parameters respectively
Scape image, the rendering effect of rich image.
In a first aspect, the embodiment of the present disclosure provides a kind of method for rendering image characterized by comprising obtain first
Image;Determine the target object and background image in the first image;The first image is rendered according to the first rendering parameter
In target object;The background image in the first image is rendered according to the second rendering parameter.
Further, the background image includes the image in the first image in addition to the target object.
Further, the target object and background image in the first image are determined, comprising: pass through image segmentation algorithm
It is foreground pixel and background pixel by the pixel classifications of the first image;Described in target object in the first image corresponds to
Foreground pixel;Background image in the first image corresponds to the background pixel.
Further, the target object in the first image is rendered according to the first rendering parameter, comprising: according to described the
One rendering parameter renders the foreground pixel.
Further, first rendering parameter includes color coefficient;According to first rendering parameter rendering it is described before
Scene element, comprising: by the color coefficient multiplied by the corresponding color parameter of the foreground pixel.
Further, which is characterized in that the background image in the first image, packet are rendered according to the second rendering parameter
It includes: the background pixel is rendered according to second rendering parameter.
Further, second rendering parameter includes pixel fusion area information;According to the second rendering parameter wash with watercolours
Contaminate the background pixel, comprising: the background pixel is divided by multiple pixel fusions according to the pixel fusion area information
Region;The color parameter of pixel in each pixel fusion region in the multiple pixel fusion region is rendered into described every
The average value of the color parameter of each pixel in a pixel fusion region.
Further, the target object includes human body, the key position of the human body, object or the object
Key position.
Further, the first image of the acquisition, comprising: the first image is obtained from video;The method is also wrapped
It includes: obtaining the second image from the video;Determine the target object and background image in second image;According to described
One rendering parameter renders the target object in second image;It is rendered in second image according to second rendering parameter
Background image.
Second aspect, the embodiment of the present disclosure provide a kind of device for rendering image characterized by comprising image obtains
Module, for obtaining the first image;Determining module, for determining target object and background image in the first image;Wash with watercolours
Module is contaminated, for rendering the target object in the first image according to the first rendering parameter;The rendering module, is also used to root
According to the background image in the second rendering parameter rendering the first image.
Further, the background image includes the image in the first image in addition to the target object.
The determining module is also used to through image segmentation algorithm be foreground pixel by the pixel classifications of the first image
And background pixel;Target object in the first image corresponds to the foreground pixel;Background image in the first image
The corresponding background pixel.
Further, the rendering module is also used to render the foreground pixel according to first rendering parameter.
Further, first rendering parameter includes color coefficient;The rendering module is also used to through the color
Coefficient is multiplied by the corresponding color parameter of the foreground pixel.
Further, which is characterized in that the rendering module is also used to render the back according to second rendering parameter
Scene element.
Further, second rendering parameter includes pixel fusion area information;The rendering module is also used to basis
The background pixel is divided into multiple pixel fusion regions by the pixel fusion area information;By the multiple pixel fusion area
The color parameter of the pixel in each pixel fusion region in domain is rendered into each pixel in each pixel fusion region
Color parameter average value.
Further, the target object includes human body, the key position of the human body, object or the object
Key position.
Further, described image obtains module and is also used to obtain the first image from video;From the video
Obtain the second image;The determining module is also used to determine the target object and background image in second image;The wash with watercolours
Dye module is also used to render the target object in second image according to first rendering parameter;According to second rendering
Parameter renders the background image in second image.
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 the first image;Determine the target object in the first image
And background image;The target object in the first image is rendered according to the first rendering parameter;It is rendered according to the second rendering parameter
Background image in the first image.The embodiment of the present disclosure provides the method for rendering image, device, electronic equipment, and calculates
Machine readable storage medium storing program for executing can identify target object and background image in image, and described in being rendered respectively according to rendering parameter
Target object and background image, the rendering effect of rich image.
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 of the method for the rendering image that the embodiment of the present disclosure provides;
Fig. 2 is the structural schematic diagram of the embodiment of the device for the rendering image that the embodiment of the present disclosure provides;
Fig. 3 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 for the rendering image that the embodiment of the present disclosure provides, wash with watercolours provided in this embodiment
The method for contaminating image can render the device of image by one to execute, which can be implemented as software, can be implemented as hard
Part, is also implemented as the combination of software and hardware, such as the device of the rendering image includes that computer equipment is (such as intelligent
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 the first image;
In step s101, the device for rendering image obtains the first image, to carry out to the first image of acquisition
Rendering.The device of the rendering image may include filming apparatus, so that the first image acquired in step S101 includes the bat
Take the photograph the image for preview of device generation, or the image including filming apparatus shooting;The device of the rendering image can be with
Do not include filming apparatus, but communicated to connect with filming apparatus, so that obtaining the first image in step S101 includes by described
Communication connection obtains the image for preview that the filming apparatus generates, or including obtaining the shooting by the communication connection
The image of device shooting;The device of the rendering image can also obtain image from preset storage location and answer the image of acquisition
With the embodiment of the present disclosure provide rendering image method, the embodiment of the present disclosure to obtain the first image mode without limitation.
Also, it will be understood by those skilled in the art that video includes a series of images frame, each picture frame is referred to as
The device of image, the rendering image that the embodiment of the present disclosure provides can also be to one or more picture frame application disclosure of video
The method for the rendering image that embodiment provides, such as the device of the rendering image can apply each picture frame of video
The method for the rendering image that the embodiment of the present disclosure provides.
Step S102 determines target object and background image in the first image;
Optionally, the target object includes human body, the key position of the human body, the pass of object or the object
Key position, wherein the key position of the human body may include one or more organ, joint or the position of human body;Institute
The key position for stating object may include one or more positions of object.Optionally, the background image includes described first
Image in image in addition to the target object.As an optional example, the identified target object includes institute
Region of the target object in the first image is stated, the identified background image includes in the first image except described
Region other than the region of target object, each region are corresponding with respective pixel.
As an optional embodiment, the target object and background image in the first image are determined, comprising: pass through
The pixel classifications of the first image are foreground pixel and background pixel by image segmentation algorithm;Target in the first image
Object corresponds to the foreground pixel;Background image in the first image corresponds to the background pixel.
As understood by those skilled in the art, the image in the embodiment of the present disclosure includes multiple pixels, it is believed that figure
It seem to be made of multiple pixels.In aforementioned optional embodiment, by image segmentation algorithm by the picture of the first image
Element is classified as foreground pixel and background pixel, such as can be each pixel configuration label information of the first image, for
Its corresponding label information is labeled as foreground pixel when it is classified as foreground pixel by the pixel in the first image,
When it is classified as background pixel, its corresponding label information is labeled as background pixel, so that the foreground pixel be made
For the corresponding pixel of the target object, using the background pixel as the corresponding pixel of the background image.
It by the pixel classifications of the first image is being foreground pixel and background pixel above by image segmentation algorithm
In the process, region can be divided an image into according to the similitude or homogeney of color of image parameter, then passes through region merging technique
Mode pixel included by the region after merging is determined as foreground pixel, and it is the pixel other than foreground pixel in image is true
It is set to background pixel;The profile that prospect can also be found according to the discontinuity and mutability of color of image parameter, according to its wheel
Wide position carries out extension spatially, that is to say, that before carrying out image segmentation according to the feature point, line, surface of image to determine
The profile of scape, and the pixel in profile is determined as foreground pixel, and the pixel other than foreground pixel in image is determined as carrying on the back
Scene element.It is, of course, also possible to which using other image segmentation algorithms, the embodiment of the present disclosure does not limit all kinds of image segmentation algorithms
Fixed, any existing or future image segmentation algorithm is used equally in the embodiment of the present disclosure, will be in the first image
Pixel classifications are foreground pixel and background pixel.
The example of the embodiment of the present disclosure is not limited as one, the target object includes human body, then can pass through
Color characteristic and/or shape feature characterize the human body, then according to the color characteristic and/or shape in the first image
Shape feature is matched and is positioned, and to determine the profile of the human body, and then the pixel within the profile of the human body is made
For foreground pixel or as the corresponding pixel of the target object, using the pixel other than the profile of the human body as background picture
Element or as the corresponding pixel of the background image.In an optional example, the color characteristic and/or shape feature
It may include the color characteristic and/or shape feature of the key point of the human body, thus in the first image according to
The color characteristic and/or shape feature of the key point of human body are matched and are positioned, to determine the pass of the profile of the human body
Key point, due to the key point of human body only occupy in the picture very small area (usually only several to tens pixels it is big
It is small), occupied region is generally also very on the image for color characteristic corresponding with the key point of human body and/or shape feature
Limited and local, there are two types of feature extraction modes at present: (1) the one-dimensional range image feature extraction vertical along profile;
(2) the two dimensional range image characteristics extraction of key point Square Neighborhood, above two mode there are many kinds of implementation method, such as ASM and
AAM class method, statistics energy function class method, regression analysis, deep learning method, classifier methods, batch extracting side
Method etc., the embodiment of the present disclosure are not specifically limited.It can be to the key after the profile key point for identifying the personage
Point is extended with the profile of the determination human body, so using the pixel within the profile of the human body as foreground pixel or
As the corresponding pixel of the target object, using the pixel other than the profile of the human body as background pixel or as described
The corresponding pixel of background image.
Optionally, pixel included by the image in the embodiment of the present disclosure, can by location parameter and color parameter come
Characterization, a kind of typical characteristic manner are that a pixel of image, coordinate therein are indicated by five-tuple (x, y, r, g, b)
Location parameter of the x and y as one pixel, color component r, g and b therein are number of the pixel on rgb space
R, g and b superposition can be obtained the color of the pixel by value.Optionally, the location parameter of pixel further includes depth coordinate z,
Such as part filming apparatus in shooting process, can recorde the depth of pixel in the prior art, it, can hence for a pixel
To indicate the location parameter of one pixel by (x, y, z).Optionally, it can also be indicated by other color spaces
The color parameter of the pixel, such as color of the pixel on the space LAB is indicated by (L, a, b), wherein L is indicated bright
Degree, a indicate red green degree, and b indicates champac color degree.It is, of course, also possible to indicate the pixel of described image using other modes
Location parameter and color parameter, the embodiment of the present disclosure do not limit this.
Step S103 renders the target object in the first image according to the first rendering parameter;
The target object in the first image has been determined in step s 102, and then in step s 103, has passed through first
Rendering parameter renders the target object in determining the first image.Optionally, due in the first image
Target object corresponds to foreground pixel, then in step s 103, rendering the mesh in the first image according to the first rendering parameter
Marking object includes rendering the foreground pixel by first rendering parameter.Optionally, first rendering parameter includes face
Colour system number, in step s 103 can by the color coefficient multiplied by the color parameter of the corresponding pixel of the target object,
To realize the rendering to the target object;Optionally, first rendering parameter includes filter params, thus in step S103
In can according to the filter params be the target object add filtering effects to realize the rendering to the target object;It can
Choosing, first rendering parameter includes genre parameters, so that institute can be rendered according to the genre parameters in step s 103
Target object is stated, such as the target object is rendered into cartoon style, wax crayon style, ink and wash style etc.;Optionally, described
One rendering parameter includes beauty parameter, thus in step s 103 to the target object (e.g. human body or face etc.) into
Row U.S. face.It is worth noting that the first rendering parameter in the embodiment of the present disclosure can also include various in addition to the implementation
The parameter of form can adjust the position of the corresponding pixel of the target object when by the first rendering parameter post-processing object object
Parameter and/or color parameter are set, the embodiment of the present disclosure is not specifically limited the form of first rendering parameter.
Step S104 renders the background image in the first image according to the second rendering parameter.
The background image in the first image has been determined in step s 102, and then in step S104, has passed through second
Rendering parameter renders the background image in determining the first image.Optionally, due in the first image
Background image corresponds to background pixel, then rendering the back in the first image according to the second rendering parameter in step S104
Scape image includes rendering the background pixel by second rendering parameter.Optionally, second rendering parameter includes face
Colour system number, in step S104 can by the color coefficient multiplied by the color parameter of the corresponding pixel of the background image,
To realize the rendering to the background image;Optionally, second rendering parameter includes filter params, thus in step S104
In can according to the filter params be the background image add filtering effects to realize the rendering to the background image;It can
Choosing, second rendering parameter includes genre parameters, to can render institute according to the genre parameters in step S104
Background image is stated, such as the background image is rendered into cartoon style, wax crayon style, ink and wash style etc.;Optionally, described
Two rendering parameters include pixel fusion area information, thus will be described according to the pixel fusion area information in step S104
Background pixel is divided into multiple pixel fusion regions, and will be in each pixel fusion region in the multiple pixel fusion region
Pixel color parameter be rendered into each pixel in each pixel fusion region color parameter average value, in this way may be used
Background image to be rendered into the effect of desalination or mosaic, to can more protrude the target object in the first image.Value
It must illustrate, the second rendering parameter in the embodiment of the present disclosure can also include various forms of ginsengs in addition to the implementation
Number, by the second rendering parameter render background image when, can adjust the corresponding pixel of the background image location parameter and/
Or color parameter, the embodiment of the present disclosure are not specifically limited the form of second rendering parameter.
By the method for the rendering image that the embodiment of the present disclosure provides, the target object and Background in image can be identified
Picture, and the target object and background image are rendered according to the first rendering parameter and the second rendering parameter respectively, rich image
Rendering effect.
As an example, first rendering parameter includes color coefficient, and the vector value of the color coefficient is 1, from
And when being rendered by first rendering parameter to the target object, do not change the corresponding pixel of the target object
Color parameter;Second rendering parameter include virtualization parameter, thus by second rendering parameter to the background
When image is rendered, the background image can be made fuzzyyer, in this example, pass through the first rendering parameter to the mesh
It after mark object is rendered, can guarantee the clear display of the target object, pass through the second rendering parameter to the background
After image is rendered, background can be blurred, can guarantee more clearly to show the target object, bring more abundant wash with watercolours
Contaminate effect.
As another example, in step S103 according to the target pair in the first rendering parameter rendering the first image
As and step S104 according to the second rendering parameter render the first image in background image after, the method also includes:
It is handled by juncture area of the graph cut to the target object and the background image.Due to passing through the first wash with watercolours respectively
It contaminates parameter and the second rendering parameter and renders the target object and background image, in the target object and the background image
Juncture area is it is possible that unsmooth, therefore for the juncture area of the target object and background image (such as the mesh
Mark the color parameter and location parameter of the corresponding pixel of juncture area of object and background image) graph cut is applied, it can make
The first image after the first rendering parameter and the rendering of the second rendering parameter obtains more natural display effect.
In another optional embodiment, it includes: that described is obtained from video that the first image is obtained in step S101
One image.After step slol, the image rendering method that the embodiment of the present disclosure provides further include: the is obtained from the video
Two images;Determine the target object and background image in second image;According to first rendering parameter rendering described the
Target object in two images;The background image in second image is rendered according to second rendering parameter.It is another at this
In a optional embodiment, the target object and background image in second image are determined, be referred to step S102: determining
The identical or corresponding description of target object and background image in the first image;Institute is rendered according to first rendering parameter
The target object in the second image is stated, and the background image in second image is rendered according to second rendering parameter,
The identical of the target object and background image in the first image can be respectively referred to render in step S103 and step S104
Or corresponding description, details are not described herein again.In another optional embodiment, the first image and are obtained from the video
Two images, and according to the mesh in the target object and second image in identical first parameter rendering the first image
Object is marked, the target object in the first image and second image is enabled to have and first rendering parameter pair
The identical render style answered;The background image and second figure in the first image are rendered according to identical second parameter
Background object as in enables to the background image in the first image and second image to have and second wash with watercolours
Contaminate the corresponding identical render style of parameter.Further, it can be rendered in the video by first rendering parameter
Target object in all images, and the Background in all images in the video is rendered by second rendering parameter
Picture, to make the target object in the video by rendering that there is identical rendering corresponding with first rendering parameter
Style, and it is corresponding identical as second rendering parameter that the background image in the video by rendering is also had
Render style.
Fig. 2 show the structural schematic diagram of 200 embodiment of device of the rendering image of embodiment of the present disclosure offer, such as Fig. 2
Shown, described device includes image collection module 201, determining module 202 and rendering module 203.Wherein, described image obtains
Module 201, for obtaining the first image;The determining module 202, for determining target object and back in the first image
Scape image;The rendering module 203, for according to the first rendering parameter render the first image in target object, and
The background image in the first image is rendered according to the second rendering parameter.
In an alternative embodiment, the acquisition module 201 is also used for obtaining the first image from video
In obtaining the second image from the video;The determining module 202 is also used to determine the target object in second image
And background image;The rendering module 203 is also used to render the target in second image according to first rendering parameter
Object, and the background image in second image is rendered according to second rendering parameter.
The method that Fig. 2 shown device can execute embodiment illustrated in fig. 1, the part that the present embodiment is not described in detail can join
Examine the related description to embodiment illustrated in fig. 1.In implementation procedure and the technical effect embodiment shown in Figure 1 of the technical solution
Description, details are not described herein.
Below with reference to Fig. 3, 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. 3
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 3, electronic equipment 300 may include processing unit (such as central processing unit, graphics processor etc.)
301, random access can be loaded into according to the program being stored in read-only memory (ROM) 302 or from storage device 308
Program in memory (RAM) 303 and execute various movements appropriate and processing.In RAM 303, it is also stored with electronic equipment
Various programs and data needed for 300 operations.Processing unit 301, ROM 302 and RAM 303 pass through bus or communication line
304 are connected with each other.Input/output (I/O) interface 305 is also connected to bus or communication line 304.
In general, following device can connect to I/O interface 305: including such as touch screen, touch tablet, keyboard, mouse, figure
As the input unit 306 of sensor, microphone, accelerometer, gyroscope etc.;Including such as liquid crystal display (LCD), loudspeaking
The output device 307 of device, vibrator etc.;Storage device 308 including such as tape, hard disk etc.;And communication device 309.It is logical
T unit 309 can permit electronic equipment 300 and wirelessly or non-wirelessly be communicated with other equipment to exchange data.Although Fig. 3 shows
The electronic equipment 300 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 309, or from storage device 308
It is mounted, or is mounted from ROM 302.When the computer program is executed by processing unit 301, 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 (12)
1. a kind of method for rendering image characterized by comprising
Obtain the first image;
Determine the target object and background image in the first image;
The target object in the first image is rendered according to the first rendering parameter;
The background image in the first image is rendered according to the second rendering parameter.
2. the method for rendering image according to claim 1, which is characterized in that the background image includes first figure
Image as in addition to the target object.
3. the method for rendering image according to claim 1, which is characterized in that determine the target pair in the first image
As and background image, comprising:
By image segmentation algorithm by the pixel classifications of the first image be foreground pixel and background pixel;
Target object in the first image corresponds to the foreground pixel;
Background image in the first image corresponds to the background pixel.
4. the method for rendering image according to claim 3, which is characterized in that according to the first rendering parameter rendering described the
Target object in one image, comprising:
The foreground pixel is rendered according to first rendering parameter.
5. the method for rendering image according to claim 4, which is characterized in that first rendering parameter includes cie system of color representation cie
Number;
The foreground pixel is rendered according to first rendering parameter, comprising:
By the color coefficient multiplied by the corresponding color parameter of the foreground pixel.
6. according to the method for the rendering image any in claim 3-5, which is characterized in that according to the second rendering parameter wash with watercolours
Contaminate the background image in the first image, comprising:
The background pixel is rendered according to second rendering parameter.
7. the method for rendering image according to claim 6, which is characterized in that second rendering parameter includes that pixel is melted
Close area information;
The background pixel is rendered according to second rendering parameter, comprising:
The background pixel is divided into multiple pixel fusion regions according to the pixel fusion area information;
The color parameter of pixel in each pixel fusion region in the multiple pixel fusion region is rendered into described every
The average value of the color parameter of each pixel in a pixel fusion region.
8. the method for rendering image according to claim 1, which is characterized in that the target object includes human body, described
The key position of human body, the key position of object or the object.
9. the method for rendering image according to claim 1, which is characterized in that the first image of the acquisition, comprising:
The first image is obtained from video;
The method also includes:
The second image is obtained from the video;
Determine the target object and background image in second image;
The target object in second image is rendered according to first rendering parameter;
The background image in second image is rendered according to second rendering parameter.
10. a kind of device for rendering image characterized by comprising
Image collection module, for obtaining the first image;
Determining module, for determining target object and background image in the first image;
Rendering module, for rendering the target object in the first image according to the first rendering parameter;
The rendering module is also used to render the background image in the first image according to the second rendering parameter.
11. 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-9 when the processor is run
Any one of described in rendering image method.
12. 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-9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910274185.8A CN110047122A (en) | 2019-04-04 | 2019-04-04 | Render method, apparatus, electronic equipment and the computer readable storage medium of image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910274185.8A CN110047122A (en) | 2019-04-04 | 2019-04-04 | Render method, apparatus, electronic equipment and the computer readable storage medium of image |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110047122A true CN110047122A (en) | 2019-07-23 |
Family
ID=67276339
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910274185.8A Pending CN110047122A (en) | 2019-04-04 | 2019-04-04 | Render method, apparatus, electronic equipment and the computer readable storage medium of image |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110047122A (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111179399A (en) * | 2019-12-19 | 2020-05-19 | 无锡量子云数字新媒体科技有限公司 | Image rendering method, device and system and storage medium |
CN111798554A (en) * | 2020-07-24 | 2020-10-20 | 上海米哈游天命科技有限公司 | Rendering parameter determination method, device, equipment and storage medium |
CN112241941A (en) * | 2020-10-20 | 2021-01-19 | 北京字跳网络技术有限公司 | Method, device, equipment and computer readable medium for acquiring image |
CN112347301A (en) * | 2019-08-09 | 2021-02-09 | 北京字节跳动网络技术有限公司 | Image special effect processing method and device, electronic equipment and computer readable storage medium |
CN112785699A (en) * | 2019-11-07 | 2021-05-11 | 阿里巴巴集团控股有限公司 | Image drawing method and apparatus |
CN112929682A (en) * | 2021-01-21 | 2021-06-08 | 广州虎牙科技有限公司 | Method, device and system for transparently processing image background and electronic equipment |
CN113470138A (en) * | 2021-06-30 | 2021-10-01 | 维沃移动通信有限公司 | Image generation method and device, electronic equipment and readable storage medium |
WO2022088927A1 (en) * | 2020-10-30 | 2022-05-05 | 北京字跳网络技术有限公司 | Image-based lighting effect processing method and apparatus, and device, and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104375797A (en) * | 2014-11-17 | 2015-02-25 | 联想(北京)有限公司 | Information processing method and electronic equipment |
CN106713988A (en) * | 2016-12-09 | 2017-05-24 | 福建星网视易信息系统有限公司 | Beautifying method and system for virtual scene live |
CN107369188A (en) * | 2017-07-12 | 2017-11-21 | 北京奇虎科技有限公司 | The synthetic method and device of image |
CN108665510A (en) * | 2018-05-14 | 2018-10-16 | Oppo广东移动通信有限公司 | Rendering intent, device, storage medium and the terminal of continuous shooting image |
-
2019
- 2019-04-04 CN CN201910274185.8A patent/CN110047122A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104375797A (en) * | 2014-11-17 | 2015-02-25 | 联想(北京)有限公司 | Information processing method and electronic equipment |
CN106713988A (en) * | 2016-12-09 | 2017-05-24 | 福建星网视易信息系统有限公司 | Beautifying method and system for virtual scene live |
CN107369188A (en) * | 2017-07-12 | 2017-11-21 | 北京奇虎科技有限公司 | The synthetic method and device of image |
CN108665510A (en) * | 2018-05-14 | 2018-10-16 | Oppo广东移动通信有限公司 | Rendering intent, device, storage medium and the terminal of continuous shooting image |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112347301A (en) * | 2019-08-09 | 2021-02-09 | 北京字节跳动网络技术有限公司 | Image special effect processing method and device, electronic equipment and computer readable storage medium |
CN112785699A (en) * | 2019-11-07 | 2021-05-11 | 阿里巴巴集团控股有限公司 | Image drawing method and apparatus |
CN111179399A (en) * | 2019-12-19 | 2020-05-19 | 无锡量子云数字新媒体科技有限公司 | Image rendering method, device and system and storage medium |
CN111798554A (en) * | 2020-07-24 | 2020-10-20 | 上海米哈游天命科技有限公司 | Rendering parameter determination method, device, equipment and storage medium |
CN112241941A (en) * | 2020-10-20 | 2021-01-19 | 北京字跳网络技术有限公司 | Method, device, equipment and computer readable medium for acquiring image |
CN112241941B (en) * | 2020-10-20 | 2024-03-22 | 北京字跳网络技术有限公司 | Method, apparatus, device and computer readable medium for acquiring image |
WO2022088927A1 (en) * | 2020-10-30 | 2022-05-05 | 北京字跳网络技术有限公司 | Image-based lighting effect processing method and apparatus, and device, and storage medium |
CN112929682A (en) * | 2021-01-21 | 2021-06-08 | 广州虎牙科技有限公司 | Method, device and system for transparently processing image background and electronic equipment |
CN112929682B (en) * | 2021-01-21 | 2023-03-24 | 广州虎牙科技有限公司 | Method, device and system for transparently processing image background and electronic equipment |
CN113470138A (en) * | 2021-06-30 | 2021-10-01 | 维沃移动通信有限公司 | Image generation method and device, electronic equipment and readable storage medium |
CN113470138B (en) * | 2021-06-30 | 2024-05-24 | 维沃移动通信有限公司 | Image generation method and device, electronic equipment and readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110047122A (en) | Render method, apparatus, electronic equipment and the computer readable storage medium of image | |
CN110163080B (en) | Face key point detection method and device, storage medium and electronic equipment | |
CN110047124A (en) | Method, apparatus, electronic equipment and the computer readable storage medium of render video | |
CN112241714B (en) | Method and device for identifying designated area in image, readable medium and electronic equipment | |
CN107491771A (en) | Method for detecting human face and device | |
CN110163237A (en) | Model training and image processing method, device, medium, electronic equipment | |
CN110062157A (en) | Render method, apparatus, electronic equipment and the computer readable storage medium of image | |
CN107204034B (en) | A kind of image processing method and terminal | |
CN104574358B (en) | From the method and apparatus for focusing heap image progress scene cut | |
CN106550243A (en) | Live video processing method, device and electronic equipment | |
CN110058685A (en) | Display methods, device, electronic equipment and the computer readable storage medium of virtual objects | |
CN110084154A (en) | Render method, apparatus, electronic equipment and the computer readable storage medium of image | |
CN109840881A (en) | A kind of 3D special efficacy image generating method, device and equipment | |
CN107911753A (en) | Method and apparatus for adding digital watermarking in video | |
CN109087377B (en) | Method and apparatus for handling image | |
CN111681177B (en) | Video processing method and device, computer readable storage medium and electronic equipment | |
Lee et al. | Correction of the overexposed region in digital color image | |
EP4425423A1 (en) | Image processing method and apparatus, device, storage medium and program product | |
CN110335195A (en) | Body color method of adjustment, device, electronic equipment and storage medium | |
CN109981989A (en) | Render method, apparatus, electronic equipment and the computer readable storage medium of image | |
CN108171167A (en) | For exporting the method and apparatus of image | |
CN108595211A (en) | Method and apparatus for output data | |
CN110047126A (en) | Render method, apparatus, electronic equipment and the computer readable storage medium of image | |
JP2024505713A (en) | Image processing method, device, equipment and readable storage medium | |
CN109510943A (en) | Method and apparatus for shooting image |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20201225 Address after: 100190 1309, 13th floor, building 4, Zijin Digital Park, Haidian District, Beijing Applicant after: Beijing volcano Engine Technology Co.,Ltd. Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing. Applicant before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd. |
|
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190723 |