CN104537697A - Implementation method for progressively blurred animation - Google Patents

Implementation method for progressively blurred animation Download PDF

Info

Publication number
CN104537697A
CN104537697A CN201410789484.2A CN201410789484A CN104537697A CN 104537697 A CN104537697 A CN 104537697A CN 201410789484 A CN201410789484 A CN 201410789484A CN 104537697 A CN104537697 A CN 104537697A
Authority
CN
China
Prior art keywords
separation
key frame
picture
animation
fuzzy
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410789484.2A
Other languages
Chinese (zh)
Inventor
邓裕强
黄爱华
邓伟明
陶冶刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou jiubang century science and Technology Co Ltd
Original Assignee
JIUBANG COMPUTER TECHNOLOGY (GUANGZHOU) 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 JIUBANG COMPUTER TECHNOLOGY (GUANGZHOU) Co Ltd filed Critical JIUBANG COMPUTER TECHNOLOGY (GUANGZHOU) Co Ltd
Priority to CN201410789484.2A priority Critical patent/CN104537697A/en
Publication of CN104537697A publication Critical patent/CN104537697A/en
Pending legal-status Critical Current

Links

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The invention provides an implementation method for a progressively blurred animation. The method comprises the steps that an animation is divided into T phases first, wherein keyframes of T+1 phases are included; the maximum blurring radius of keyframe images of the animation is preset as R; the ith keyframe blurred image and the (i+1)th keyframe blurred image are obtained through blurring treatment according to the formula: blurring radius r=i*R/T; the progress p=(r-i*R/T)/(R/T) of a transition frame image located between the ith demarcation point and the (i+1)th demarcation point is obtained, the keyframe blurred image at the (i+1)th demarcation point is mixed to the keyframe blurred image at the ith demarcation point with the progress p as opaqueness, and then a transition frame blurred image is obtained; the keyframe blurred images at all the demarcation points and the transition frame blurred images between the demarcation points are sequentially displayed to obtain the progressively blurred animation. By means of the method, the frame image blurring treatment process in the animation process is simplified, and the animation display effect is smooth.

Description

A kind of implementation method of progressive fuzzy animation
Technical field
The present invention relates to technical field of image processing, be specifically related to a kind of implementation method of progressive fuzzy animation.
Background technology
Current technical field of image processing, many employings are fuzzy instead of shade expression layers relation, but because fuzzy calculating is relatively complicated, compare shade operand and want high a lot, if apply in animation effect, because the performance of animation requires real-time, namely to meet p.s. the picture refreshing of more than 30 times visual card just can not be caused to pause, discontinuous, this needs equipment to have stronger processing power.Traditional fuzzy algorithm computationally has certain complicacy, and computation complexity and screen resolution are directly proportional, and especially on high resolution large screen mobile phone, realizes progressively fuzzyly having very strong challenge.
Summary of the invention
Object of the present invention, overcomes the deficiencies in the prior art exactly, provides a kind of and optimizes the image blurring drawing process of animation frame, realizes the implementation method of the progressive fuzzy animation of smooth progressive fuzzy animation effect.
In order to achieve the above object, adopt following technical scheme: a kind of implementation method of progressive fuzzy animation, said method comprising the steps of:
First animation is divided into T stage, it comprises the separation i in T+1 stage, and 0≤i≤T, as key frame;
The maximum blur radius presetting animation key frame images is R;
When being in i-th separation, the blur radius r=iR/T of the key frame images of this separation;
According to gained blur radius r, Fuzzy Processing is carried out to the key frame images of i-th separation, draw the key frame blurred picture of i-th separation; In like manner, the key frame blurred picture of the i-th+1 separation can be obtained;
Ask the transition frames blurred picture be between i-th separation and the i-th+1 separation:
Transition frames image is first asked to be in progress p=(r-iR/T)/(R/T) between i-th separation and the i-th+1 separation, 0%≤p≤100%;
By the key frame blurred picture of the i-th+1 separation using progress p as opacity, be mixed on the key frame blurred picture of i-th separation, draw transition frames blurred picture;
Transition frames blurred picture between the key frame blurred picture of each separation and separation is presented successively, draws progressive fuzzy animation.
Further, described detailed process of carrying out Fuzzy Processing to the key frame images of i-th separation according to gained blur radius r is as follows:
First time Fuzzy Processing: to each pixel of key frame images, get the pixel of its landscape blur radius [-r, r], use one dimension Gaussian function as weight, calculate color weighted mean and, be filled in interim picture;
Second time Fuzzy Processing: to each pixel of interim picture, get the pixel of its longitudinal blur radius scope [-r, r], use one dimension Gaussian function as weight, calculate color weighted mean and, be filled in result picture, i.e. the key frame blurred picture that draws of Fuzzy Processing.
Preferably, described Fuzzy Processing is programmed by the shading language GLSL of OpenGL, and graphic process unit GPU performs fuzzy algorithm.
Preferably, the process of described Fuzzy Processing also comprises:
Sample frequency is reduced to key frame images, uses the interim picture than key frame images reduced size, the key frame images of separation narrowed down to the size of interim picture and make first time Fuzzy Processing.
Preferably, the process of described Fuzzy Processing also comprises:
Sample frequency is reduced to result picture, uses and the same large-sized result picture of interim picture, after interim picture does second time Fuzzy Processing is plotted to result picture, then result picture is carried out amplification drafting according to former key frame images size.
Preferably, during described first time Fuzzy Processing, limit calculation weighted mean and calculated amount, namely when blur radius is r, get equably in [-r, r] scope k pixel to calculate weighted mean and.
Compared with prior art, beneficial effect of the present invention is: the present invention, by dividing animation, according to the maximum blur radius of the animation key frame images preset, draws the key frame blurred picture of each separation; Again the key frame blurred picture of the key frame blurred picture of last separation and a rear separation is carried out transparent hybrid processing, draw the transition frames blurred picture between separation; Transition frames blurred picture between the key frame blurred picture of each separation and separation is arranged in order and presents, draw progressive fuzzy animation, simplify the key frame images Fuzzy Processing process in animation process, with meet p.s. the picture refreshing of more than 30 times visual card can not be caused to pause, incoherent animation represents effect; In addition, the fuzzy rendering algorithm of key frame images is optimized, one dimension Gaussian blurring function is adopted to carry out Fuzzy Processing to key frame images in two steps, to replace the Gaussian Blur algorithm of two dimension, simplify the Fuzzy Processing algorithm of key frame images, accelerate the process that Fuzzy Processing is drawn, represent smooth effect to meet animation.
Accompanying drawing explanation
The process flow diagram of the implementation method of the progressive fuzzy animation of Fig. 1 the present invention.
Embodiment
Describe the present invention in detail below in conjunction with accompanying drawing and specific implementation method, be used for explaining the present invention in exemplary embodiment and description of the present invention, but not as a limitation of the invention.
As shown in Figure 1, a kind of implementation method of progressive fuzzy animation, said method comprising the steps of:
S101: first animation is divided into T stage, it comprises the separation i in T+1 stage, and 0≤i≤T, as key frame;
S102: the maximum blur radius presetting animation key frame images is R;
S103: when being in i-th separation, blur radius r (the i)=iR/T of the key frame images of this separation; When being in the i-th+1 separation, blur radius r (i+1)=(i+1) R/T of the key frame images of this separation;
S104: according to gained blur radius r (i), r (i+1) respectively to i-th, the key frame images of an i+1 separation carries out Fuzzy Processing;
S105: first time Fuzzy Processing: to each pixel of key frame images, get the pixel of its landscape blur radius [-r, r], use one dimension Gaussian function as weight, calculate color weighted mean and, be filled in interim picture;
S106: second time Fuzzy Processing: to each pixel of interim picture, get the pixel of its longitudinal blur radius scope [-r, r], use one dimension Gaussian function as weight, calculate color weighted mean and, be filled in result picture, i.e. the key frame blurred picture that draws of Fuzzy Processing;
One dimension Gaussian function formula is:
Because two-dimensional Gaussian function is the product of two one dimension Gaussian functions, i.e. G (x, y)=f (x) × f (y), therefore adopt the mode of twice process, approximate treatment number of times is from 4r 2become 4r, greatly reduce the number of times of computing, when r is larger, optimize more obvious;
Described Fuzzy Processing is programmed by the shading language GLSL of OpenGL, and graphic process unit GPU performs fuzzy algorithm, and GPU has the good advantage of concurrency, is more suitable for performing fuzzy image processing algorithm of Denging than CPU; In addition, this require that and uses the frame buffer zone Frame Buffer of OpenGL to serve as interim picture.
In order to further optimize, sample frequency be reduced to key frame images, uses the interim picture than key frame images reduced size, the key frame images of separation narrowed down to the size of interim picture and make first time Fuzzy Processing.For OpenGL, the operation reduced is only change picture vertex position, does not need unnecessary calculating and unnecessary interim picture; If adopt programming language execution algorithm on CPU such as C, then should when traversal pixel interlacing every column processing.
In order to further optimize, sample frequency is reduced to result picture, use and the same large-sized result picture of interim picture, after interim picture does second time Fuzzy Processing is plotted to result picture, then result picture is carried out amplification drafting according to former key frame images size; During drafting, the bilinear filtering of OpenGL opens, and therefore can not cause mosaic phenomenon.According to the effect of practice, it is enough good that the length of the length of key frame images and wide relative interim picture and wide ratio are located at 4 ~ 8 within the scope of this.
In order to further optimize, first time Fuzzy Processing time, limit calculation weighted mean and calculated amount, namely when blur radius is r, get equably in [-r, r] scope k pixel to calculate weighted mean with.
In order to further optimize, when allowing to get medium rendering quality (such as during progressive fuzzy animation), adopt tent function to replace one dimension Gaussian function, calculated amount is less.
S107: ask the transition frames blurred picture be between i-th separation and the i-th+1 separation, transition frames image is first asked to be in progress p=(r-iR/T)/(R/T) between i-th separation and the i-th+1 separation, 0%≤p≤100%;
S108: by the key frame blurred picture of the i-th+1 separation using progress p as opacity, be mixed on the key frame blurred picture of i-th separation, draw transition frames blurred picture;
S109: presented successively by the transition frames blurred picture between the key frame blurred picture of each separation and separation, draws progressive fuzzy animation.
Preferably, consider the restriction of internal memory or video memory (when using GPU program), can not preserve simultaneously T+1 open fuzzy after picture, two buffer memory picture P1 and P2 are only used to store blurred picture as round-robin queue, when animation proceeds to a previous or rear adjacent phases from a stage, only need to upgrade a wherein buffer memory picture.
The present invention, by dividing animation, according to the maximum blur radius of the animation key frame images preset, draws the key frame blurred picture of each separation; Again the key frame blurred picture of the key frame blurred picture of last separation and a rear separation is carried out transparent hybrid processing, draw the transition frames blurred picture between separation; Transition frames blurred picture between the key frame blurred picture of each separation and separation is arranged in order and presents, draw progressive fuzzy animation, simplify the key frame images Fuzzy Processing process in animation process, with meet p.s. the picture refreshing of more than 30 times visual card can not be caused to pause, incoherent animation represents effect; In addition, the fuzzy rendering algorithm of key frame images is optimized, one dimension Gaussian blurring function is adopted to carry out Fuzzy Processing to key frame images in two steps, to replace the Gaussian Blur algorithm of two dimension, simplify the Fuzzy Processing algorithm of key frame images, accelerate the process that Fuzzy Processing is drawn, represent smooth effect to meet animation.
Progressive animation of the present invention can be supported alternately, the position that animation can touch according to user, and become large direction towards blur radius and carry out, the direction that also can diminish towards blur radius is carried out.
If the function described in the present embodiment using the form of SFU software functional unit realize and as independently production marketing or use time, can be stored in a computing equipment read/write memory medium.Based on such understanding, the part of the part that the embodiment of the present invention contributes to prior art or this technical scheme can embody with the form of software product, this software product is stored in a storage medium, comprising some instructions in order to make a computing equipment (can be personal computer, server, mobile computing device or the network equipment etc.) perform all or part of step of method described in each embodiment of the present invention.And aforesaid storage medium comprises: USB flash disk, portable hard drive, ROM (read-only memory) (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. various can be program code stored medium.In this instructions, each embodiment adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiment, between each embodiment same or similar part mutually see.
To the above-mentioned explanation of the disclosed embodiments, professional and technical personnel in the field are realized or uses the present invention.To be apparent for those skilled in the art to the multiple amendment of these embodiments, General Principle as defined herein can without departing from the spirit or scope of the present invention, realize in other embodiments.Therefore, the present invention can not be restricted to these embodiments shown in this article, but will meet the widest scope consistent with principle disclosed herein and features of novelty.

Claims (6)

1. an implementation method for progressive fuzzy animation, is characterized in that, said method comprising the steps of:
First animation is divided into T stage, it comprises the separation i in T+1 stage, and 0≤i≤T, as key frame;
The maximum blur radius presetting animation key frame images is R;
When being in i-th separation, the blur radius r=iR/T of the key frame images of this separation;
According to gained blur radius r, Fuzzy Processing is carried out to the key frame images of i-th separation, draw the key frame blurred picture of i-th separation; In like manner, the key frame blurred picture of the i-th+1 separation can be obtained;
Ask the transition frames blurred picture be between i-th separation and the i-th+1 separation:
Transition frames image is first asked to be in progress p=(r-iR/T)/(R/T) between i-th separation and the i-th+1 separation, 0%≤p≤100%;
By the key frame blurred picture of the i-th+1 separation using progress p as opacity, be mixed on the key frame blurred picture of i-th separation, draw transition frames blurred picture;
Transition frames blurred picture between the key frame blurred picture of each separation and separation is presented successively, draws progressive fuzzy animation.
2. the implementation method of progressive fuzzy animation as claimed in claim 1, is characterized in that, described detailed process of carrying out Fuzzy Processing to the key frame images of i-th separation according to gained blur radius r is as follows:
First time Fuzzy Processing: to each pixel of key frame images, get the pixel of its landscape blur radius [-r, r], use one dimension Gaussian function as weight, calculate color weighted mean and, be filled in interim picture;
Second time Fuzzy Processing: to each pixel of interim picture, get the pixel of its longitudinal blur radius scope [-r, r], use one dimension Gaussian function as weight, calculate color weighted mean and, be filled in result picture, i.e. the key frame blurred picture that draws of Fuzzy Processing.
3. the implementation method of progressive fuzzy animation as claimed in claim 2, is characterized in that, described Fuzzy Processing is programmed by the shading language GLSL of OpenGL, and graphic process unit GPU performs fuzzy algorithm.
4. the implementation method of progressive fuzzy animation as claimed in claim 2, it is characterized in that, the process of described Fuzzy Processing also comprises:
Sample frequency is reduced to key frame images, uses the interim picture than key frame images reduced size, the key frame images of separation narrowed down to the size of interim picture and make first time Fuzzy Processing.
5. the implementation method of progressive fuzzy animation as claimed in claim 4, it is characterized in that, the process of described Fuzzy Processing also comprises:
Sample frequency is reduced to result picture, uses and the same large-sized result picture of interim picture, after interim picture does second time Fuzzy Processing is plotted to result picture, then result picture is carried out amplification drafting according to former key frame images size.
6. the implementation method of progressive fuzzy animation as claimed in claim 2, is characterized in that, during described first time Fuzzy Processing, limit calculation weighted mean and calculated amount, namely when blur radius is r, get equably in [-r, r] scope k pixel to calculate weighted mean and.
CN201410789484.2A 2014-12-17 2014-12-17 Implementation method for progressively blurred animation Pending CN104537697A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410789484.2A CN104537697A (en) 2014-12-17 2014-12-17 Implementation method for progressively blurred animation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410789484.2A CN104537697A (en) 2014-12-17 2014-12-17 Implementation method for progressively blurred animation

Publications (1)

Publication Number Publication Date
CN104537697A true CN104537697A (en) 2015-04-22

Family

ID=52853216

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410789484.2A Pending CN104537697A (en) 2014-12-17 2014-12-17 Implementation method for progressively blurred animation

Country Status (1)

Country Link
CN (1) CN104537697A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106339983A (en) * 2016-08-17 2017-01-18 乐视控股(北京)有限公司 Blurring animation realization method through Gaussian blurring and blurring animation realization device thereof
CN107240071A (en) * 2016-03-29 2017-10-10 掌赢信息科技(上海)有限公司 A kind of image blurring processing method and electronic equipment
CN108122194A (en) * 2017-11-28 2018-06-05 沈阳美行科技有限公司 A kind of method and device of image luminescence
CN108564539A (en) * 2018-01-04 2018-09-21 网宿科技股份有限公司 A kind of method and apparatus of display image
CN108765271A (en) * 2018-05-30 2018-11-06 北京小米移动软件有限公司 Image processing method and equipment
CN110335223A (en) * 2019-06-21 2019-10-15 北京奇艺世纪科技有限公司 The fuzzy dynamic effect implementation method of image, device, electronic equipment and storage medium
CN113223448A (en) * 2019-06-04 2021-08-06 广州硅芯电子科技有限公司 System and method for reducing motion blur in LED display systems

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7586498B2 (en) * 2004-02-26 2009-09-08 Samsung Electronics Co., Ltd. Color temperature conversion method, medium, and apparatus for pixel brightness-based color correction
CN103034973A (en) * 2012-12-05 2013-04-10 焦点科技股份有限公司 Self-adaptive image scaling method based on bicubic interpolation
CN104123742A (en) * 2014-07-21 2014-10-29 徐才 Method and player for translating static cartoon picture into two dimensional animation
CN104144301A (en) * 2014-07-30 2014-11-12 厦门美图之家科技有限公司 Method for transition special effects on basis of mixed modes

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7586498B2 (en) * 2004-02-26 2009-09-08 Samsung Electronics Co., Ltd. Color temperature conversion method, medium, and apparatus for pixel brightness-based color correction
CN103034973A (en) * 2012-12-05 2013-04-10 焦点科技股份有限公司 Self-adaptive image scaling method based on bicubic interpolation
CN104123742A (en) * 2014-07-21 2014-10-29 徐才 Method and player for translating static cartoon picture into two dimensional animation
CN104144301A (en) * 2014-07-30 2014-11-12 厦门美图之家科技有限公司 Method for transition special effects on basis of mixed modes

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
丁怡心等: "高斯模糊算法优化及实现", 《现代计算机》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107240071A (en) * 2016-03-29 2017-10-10 掌赢信息科技(上海)有限公司 A kind of image blurring processing method and electronic equipment
CN106339983A (en) * 2016-08-17 2017-01-18 乐视控股(北京)有限公司 Blurring animation realization method through Gaussian blurring and blurring animation realization device thereof
CN108122194A (en) * 2017-11-28 2018-06-05 沈阳美行科技有限公司 A kind of method and device of image luminescence
CN108564539A (en) * 2018-01-04 2018-09-21 网宿科技股份有限公司 A kind of method and apparatus of display image
CN108765271A (en) * 2018-05-30 2018-11-06 北京小米移动软件有限公司 Image processing method and equipment
CN108765271B (en) * 2018-05-30 2022-06-03 北京小米移动软件有限公司 Image processing method and apparatus
CN113223448A (en) * 2019-06-04 2021-08-06 广州硅芯电子科技有限公司 System and method for reducing motion blur in LED display systems
CN110335223A (en) * 2019-06-21 2019-10-15 北京奇艺世纪科技有限公司 The fuzzy dynamic effect implementation method of image, device, electronic equipment and storage medium
CN110335223B (en) * 2019-06-21 2022-08-05 北京奇艺世纪科技有限公司 Image blurring effect implementation method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN104537697A (en) Implementation method for progressively blurred animation
CN109389661B (en) Animation file conversion method and device
CN107729996A (en) Zero coefficient skips convolutional neural networks engine
US20120189221A1 (en) Image File Generation Device, Image Processing Device, Image File Generation Method, And Image Processing Method.
JP2014515856A (en) Pixel value compression for graphics processing
JP2020500357A5 (en)
CN104937927A (en) Real-time automatic conversion of 2-dimensional images or video to 3-dimensional stereo images or video
Hou et al. Deep feature consistent deep image transformations: Downscaling, decolorization and HDR tone mapping
CN108012091A (en) Image processing method, device, equipment and its storage medium
US7679620B2 (en) Image processing using saltating samples
CN106339983A (en) Blurring animation realization method through Gaussian blurring and blurring animation realization device thereof
RU2014153030A (en) METHOD, DEVICE AND ANIMATION PLAYER
Wu et al. Image autoregressive interpolation model using GPU-parallel optimization
CN102622723A (en) Image interpolation based on CUDA (compute unified device architecture) and edge detection
CN106997608A (en) A kind of method and device for generating halation result figure
Li et al. High-resolution network for photorealistic style transfer
CN109636894B (en) Dynamic three-dimensional thermodynamic calculation method and system based on pixel rasterization
Ma et al. Efficient antialiased edit propagation for images and videos
Zhao et al. Real-time edge-aware weighted median filtering on the GPU
Huang et al. Image style transfer for autonomous multi-robot systems
Brix et al. Visualization of large volumetric multi-channel microscopy data streams on standard PCs
Li et al. Image stylization with enhanced structure on GPU
GB2574721A (en) Image rendering
CN103729866B (en) Water color style non-photorealistic rendering method and device
Liu et al. Structure-preserving image completion with multi-level dynamic patches

Legal Events

Date Code Title Description
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20170904

Address after: 510055, tower 17, A tower, Zhonghua International Center, No. three, 33 Zhongshan Road, Yuexiu District, Guangdong, Guangzhou, China

Applicant after: Guangzhou jiubang century science and Technology Co Ltd

Address before: 510055 A, block 16-17, China International Center, No. three, Zhongshan Road, Guangzhou, Guangdong, China

Applicant before: Jiubang computer technology (Guangzhou) Co., Ltd.

TA01 Transfer of patent application right
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20150422

WD01 Invention patent application deemed withdrawn after publication