CN105139356B - The frosted glass effect processing method and device of a kind of image data - Google Patents

The frosted glass effect processing method and device of a kind of image data Download PDF

Info

Publication number
CN105139356B
CN105139356B CN201510526281.9A CN201510526281A CN105139356B CN 105139356 B CN105139356 B CN 105139356B CN 201510526281 A CN201510526281 A CN 201510526281A CN 105139356 B CN105139356 B CN 105139356B
Authority
CN
China
Prior art keywords
image data
frame buffer
buffer zone
fuzzy
drawn
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.)
Active
Application number
CN201510526281.9A
Other languages
Chinese (zh)
Other versions
CN105139356A (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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing Hammer Numeral Science And 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 Hammer Numeral Science And Technology Co Ltd filed Critical Beijing Hammer Numeral Science And Technology Co Ltd
Priority to CN201510526281.9A priority Critical patent/CN105139356B/en
Publication of CN105139356A publication Critical patent/CN105139356A/en
Application granted granted Critical
Publication of CN105139356B publication Critical patent/CN105139356B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention provides a kind of the frosted glass effect processing method and device of image data.Method is applied in GPU, and the GPU is pre-created the first frame buffer zone and one group of new frame buffer zone, and the image data drawn in first frame buffer zone is used to show;Method includes:Image data to be drawn is plotted in first frame buffer zone;After described in the completion in first frame buffer zone wait the drafting for the image data drawn, the image data to be drawn described in drafting in one group of new frame buffer zone, and complete the Fuzzy Processing to the image data to be drawn according to Gaussian Blur algorithm;Image data after Fuzzy Processing is plotted in the image data drawn in first frame buffer zone.The present invention completes the processing operations such as the Fuzzy Processing of image data for the drafting of image data to be drawn and according to Gaussian Blur algorithm in GPU, substantially increases the treatment effeciency of the frosted glass effect of image data.

Description

The frosted glass effect processing method and device of a kind of image data
Technical field
The present invention relates to image data processing technology fields, are imitated more specifically to a kind of frosted glass of image data Fruit treating method and apparatus.
Background technology
Gaussian Blur (Gaussian Blur) refers to adjust pixel color value according to Gaussian curve, selectively to picture number According to being obscured.Specifically, Gaussian Blur can get up the pixel color value around certain point by Gaussian curve statistics, using number Average weighted computational methods obtain the color value of this curve on, finally leave the profile of image.Wherein, using the certain point as The range size at center is known as blur radius, and blur radius is bigger, and the image of generation is fuzzyyer.
The processing method of the frosted glass effect of existing image data be by CPU (Central Processing Unit, Central processing unit) it is obtained from GPU (Graphic Processing Unit, graphics processor) and treats fuzzy image data, into And it treats fuzzy image data according to Gaussian Blur algorithm and is obscured.When the mould of fuzzy image data is treated in CPU completions After paste, the image data after CPU will be obscured again sends back GPU, and output display is completed by GPU.
However the present inventor sends out after studying the processing method of the frosted glass effect of existing image data It is existing, treat fuzzy image data since CPU needs are obtained from GPU, and will it is fuzzy after image data retransmit back GPU progress Output display, i.e. there are a large amount of data interaction processes between CPU and GPU, this greatly reduces the frosted glass of image data The treatment effeciency of effect.
Invention content
In view of this, the present invention provides a kind of the frosted glass effect processing method and device of image data, existing to solve The problem for the treatment of effeciency of the frosted glass effect of image data is low.Technical solution is as follows:
Based on an aspect of of the present present invention, the present invention provides a kind of frosted glass effect processing method of image data, is applied to In graphics processor GPU, the GPU is pre-created the first frame buffer zone and one group of new frame buffer zone, and the first frame is delayed The image data drawn in area is rushed to be used to show;The method includes:
Image data to be drawn is plotted in first frame buffer zone;
It is new at described one group after described in completed in first frame buffer zone wait the drafting for the image data drawn Image data to be drawn described in being drawn in frame buffer zone, and completed according to Gaussian Blur algorithm to the picture number to be drawn According to Fuzzy Processing;
Image data after Fuzzy Processing is plotted in the image data drawn in first frame buffer zone.
Preferably, the GPU is pre-created one group of new frame buffer zone and includes:The GPU is calculated according to the Gaussian Blur The blurring process of method creates the corresponding at least one new frame buffer zone of blurring process with the Gaussian Blur algorithm.
Preferably, delay when the GPU is created with the corresponding multiple new frames of the blurring process of the Gaussian Blur algorithm Area is rushed, when the multiple new frame buffer zone includes at least the second frame buffer zone, third frame buffer zone;
The image data to be drawn described in drafting in one group of new frame buffer zone, and calculated according to Gaussian Blur Method completion includes the Fuzzy Processing of the image data to be drawn:
Image data to be drawn described in being drawn in second frame buffer zone;
According to the blurring process of the Gaussian Blur algorithm, to the image data for completing to draw in second frame buffer zone Perform the first Fuzzy Calculation;
It, will be after the first Fuzzy Calculation after being completed in second frame buffer zone to the first Fuzzy Calculation of image data Image data be plotted to third frame buffer zone;
According to the blurring process of the Gaussian Blur algorithm, in the third frame buffer zone after the first Fuzzy Calculation Image data performs the second Fuzzy Calculation.
Preferably, it is completed in one group of new frame buffer zone described in drafting after the image data drawn, the side Method further includes:
Determine to need the fuzzy region of fuzzy image data in first frame buffer zone;
It is described at this time that the Fuzzy Processing of the image data to be drawn is specifically included according to the completion of Gaussian Blur algorithm:
It determines to treat fuzzy image data in one group of new frame buffer zone corresponding with the fuzzy region;
Treat that fuzzy image data carries out Fuzzy Processing to described according to Gaussian Blur algorithm.
Preferably, the image data by after Fuzzy Processing is plotted to the picture number drawn in first frame buffer zone Before upper, the method further includes:
Determine to need the fuzzy region of fuzzy image data in first frame buffer zone;
The image data by after Fuzzy Processing described at this time is plotted to the image data drawn in first frame buffer zone On specifically include:
It is found from the image data after the Fuzzy Processing and corresponding with the fuzzy region has completed Fuzzy Processing Image data afterwards;
The image data completed after Fuzzy Processing is plotted in first frame buffer zone need it is fuzzy In the fuzzy region of image data, fuzzy image data is needed to cover in first frame buffer zone.
Preferably, before the image data to be drawn described in drafting in one group of new frame buffer zone, the side Method further includes:
The canvas size of the image data to be drawn is reduced N times, the N is more than or equal to 1.
Based on another aspect of the present invention, the present invention also provides a kind of frosted glass effect process devices of image data, should For in graphics processor GPU, described device to include:
Frame buffer zone creating unit is delayed for creating the first frame buffer zone and one group of new frame buffer zone, the first frame The image data drawn in area is rushed to be used to show;
First drawing unit, for image data to be drawn to be plotted in first frame buffer zone;
Second drawing unit, for image data to be drawn described in the drafting in one group of new frame buffer zone;
Fuzzy Processing unit, for completing the fuzzy place to the image data to be drawn according to Gaussian Blur algorithm Reason;
Third drawing unit, for the image data after Fuzzy Processing to be plotted to what is drawn in first frame buffer zone In image data.
Preferably, the frame buffer zone creating unit is specifically used for, according to the blurring process of the Gaussian Blur algorithm, wound It builds and the corresponding at least one new frame buffer zone of the blurring process of the Gaussian Blur algorithm.
Preferably, when frame buffer zone creating unit establishment is corresponding with the blurring process of the Gaussian Blur algorithm Multiple new frame buffer zones, when the multiple new frame buffer zone includes at least the second frame buffer zone, third frame buffer zone;
Second drawing unit is specifically used for, the picture number to be drawn described in drafting in second frame buffer zone According to;
The Fuzzy Processing unit is specifically used for, according to the blurring process of the Gaussian Blur algorithm, to second frame The image data drawn is completed in buffering area and performs the first Fuzzy Calculation;
Second drawing unit is specifically used for, and the image data after the first Fuzzy Calculation is plotted to third frame buffering Area;
The Fuzzy Processing unit is specifically used for, according to the blurring process of the Gaussian Blur algorithm, to the third frame Image data in buffering area after the first Fuzzy Calculation performs the second Fuzzy Calculation.
Preferably, it further includes:
First determination unit, for determining to need the fuzzy region of fuzzy image data in first frame buffer zone;
The Fuzzy Processing unit is specifically used for, and determines one group of new frame buffer zone corresponding with the fuzzy region In treat fuzzy image data;Treat that fuzzy image data carries out Fuzzy Processing to described according to Gaussian Blur algorithm.
Preferably, it further includes:
Second determination unit, for determining to need the fuzzy region of fuzzy image data in first frame buffer zone;
The third drawing unit is specifically used for, and is found from the image data after the Fuzzy Processing and the confusion region The corresponding image data completed after Fuzzy Processing in domain;
The image data completed after Fuzzy Processing is plotted in first frame buffer zone need it is fuzzy In the fuzzy region of image data, fuzzy image data is needed to cover in first frame buffer zone.
Preferably, it further includes:
Painting canvas adjustment unit, for by the canvas size of the image data to be drawn reduce N times, the N more than etc. In 1.
Using the above-mentioned technical proposal of the present invention, in the frosted glass effect processing method of image data provided by the invention, Drafting for image data to be drawn and according to Gaussian Blur algorithm to processing operations such as the Fuzzy Processings of image data All it is to be completed in GPU (Graphic Processing Unit, graphics processor).The invention avoids between CPU and GPU A large amount of data interaction process, and the processing of the frosted glass effect of image data is only completed by GPU, substantially increase figure As the treatment effeciency of the frosted glass effect of data.
Description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of invention, for those of ordinary skill in the art, without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is a kind of flow chart of the frosted glass effect processing method of image data provided by the invention;
Fig. 2 is a kind of another flow chart of the frosted glass effect processing method of image data provided by the invention;
Fig. 3 is a kind of another flow chart of the frosted glass effect processing method of image data provided by the invention;
Fig. 4 is a kind of structure diagram of the frosted glass effect process device of image data provided by the invention.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other without making creative work Embodiment shall fall within the protection scope of the present invention.
Referring to Fig. 1, one kind of the frosted glass effect processing method it illustrates a kind of image data provided by the invention Flow chart, this method are applied in GPU, and following methods step of the present invention is all to perform completion by GPU, and method specifically includes:
Step 101, the first frame buffer zone and one group of new frame buffer zone are pre-created.Wherein, first frame buffer zone The image data of middle drafting is used to show.
It should be noted that perform the image data progress Fuzzy Processing for treating drafting for the first time for GPU in the present invention When, the GPU in the present invention needs to be created first for the first frame buffer zone of display image data and one group of new frame buffering Area.When GPU subsequently performs the Fuzzy Processing of image data again, then GPU without creating the first frame buffer zone and one group again New frame buffer zone, and can be directly based upon and create existing first frame buffer zone and one group of new frame buffer zone continues to execute The Fuzzy Processing of corresponding data.
Specifically in the present invention, it is 0 that the first frame buffer zone, which can mark, i.e. No. 0 frame buffer zone.This hair The content being plotted in bright in the FrameBuffer 0 can be eventually displayed on the display screen of system.
One group of new frame buffer zone that the present invention creates includes at least a new frame buffer zone.Specifically, meeting of the invention According to the blurring process of the Gaussian Blur algorithm, the blurring process corresponding at least one with the Gaussian Blur algorithm is created A new frame buffer zone.
In practical applications, the blurring process of Gaussian Blur algorithm is for example including first to image data in the height direction Fuzzy Calculation is carried out, Fuzzy Calculation is being carried out in the direction of the width to image data, then the mould of Gaussian Blur algorithm at this time Paste process should include two Fuzzy Calculation processes of short transverse Fuzzy Calculation and width direction Fuzzy Calculation.It is so corresponding, this Invention can create two new frame buffer zones corresponding with two Fuzzy Calculation processes, such as the second frame buffer zone FrameBuffer 1 and third frame buffer zone FrameBuffer 2.
Certainly, if the Gaussian Blur algorithm applied in the present invention is a kind of whole Fuzzy Calculation to image data Method, at this point, the present invention only need to create a new frame buffer zone, such as FrameBuffer 1, in the FrameBuffer 1 Image data to be drawn described in drafting, and complete the Fuzzy Processing to described image data according to Gaussian Blur algorithm.
Step 102, image data to be drawn is plotted in the first frame buffer zone.
In the present invention, it is assumed that image data to be drawn is View A, the present invention first draws the content of View A Into the first frame buffer zone.
Step 103, after described in the completion in first frame buffer zone wait the drafting for the image data drawn, described Image data to be drawn described in being drawn in one group of new frame buffer zone, and wait to draw to described according to the completion of Gaussian Blur algorithm Image data Fuzzy Processing.
Specifically in the present invention, when the present invention only create there are one new frame buffer zone FrameBuffer 1 when, the present invention A View A can be drawn again in the new FrameBuffer 1, and mould is carried out to View A according to Gaussian Blur algorithm Paste processing.
When blurring process of the present invention according to Gaussian Blur algorithm, multiple new frame buffer zones are created, such as create the During two frame buffer zone FrameBuffer 1 and third frame buffer zone FrameBuffer 2, the present invention can exist first Image data View A to be drawn described in being drawn in FrameBuffer 1, and then according to the fuzzy of the Gaussian Blur algorithm Process performs the first Fuzzy Calculation to the image data View A for completing to draw in the FrameBuffer 1, obtains View A-1.Wherein, the first Fuzzy Calculation can be the Fuzzy Calculation to View A short transverses.
It further, will after the present invention is completed in FrameBuffer 1 to the first Fuzzy Calculation of image data View A Image data View A-1 after the first Fuzzy Calculation are plotted in FrameBuffer 2.At this point, GPU continue according to it is described The blurring process of Gaussian Blur algorithm, to the image data View A- in the FrameBuffer 2 after the first Fuzzy Calculation 1 performs the second Fuzzy Calculation, obtains View A-2.Wherein, the second Fuzzy Calculation can be to View A-1 width directions into One step Fuzzy Calculation.
The View A-2 that the present invention obtains after Fuzzy Calculation twice, the picture number obtained after as final Fuzzy Processing According to.
It should be noted that in the present invention, the present invention is completed according to Gaussian Blur algorithm to the picture number to be drawn According to Fuzzy Processing specific implementation means can be use OpenGL (Open Graphics Library, open graphic library) Shader (tinter) treat drafting image data carry out Fuzzy Processing.
Step 104, the image data after Fuzzy Processing is plotted to the image data drawn in first frame buffer zone On.
After the Fuzzy Processing of image data for treating drafting is completed in one group of new frame buffer zone of establishment, by fuzzy place Image data after reason is plotted in the image data drawn in the first frame buffer zone, and the image data after Fuzzy Processing is covered The image data in the first frame buffer zone is covered, realizes the frosted glass effect of image data.
Therefore the above-mentioned technical proposal of the application present invention, the frosted glass effect processing method of image data provided by the invention In, drafting for image data to be drawn and the processing such as the Fuzzy Processing of image data are grasped according to Gaussian Blur algorithm All completed in GPU.The invention avoids data interaction process a large amount of between CPU and GPU, and only by GPU The processing of the frosted glass effect of image data is completed, substantially increases the treatment effeciency of the frosted glass effect of image data.
Referring to Fig. 2, it illustrates the present invention to provide a kind of another stream of the frosted glass effect processing method of image data Cheng Tu, including:
Step 201, image data to be drawn is plotted in the first frame buffer zone.
The image data drawn in wherein described first frame buffering area is used to show.
Step 202, after described in the completion in first frame buffer zone wait the drafting for the image data drawn, described Image data to be drawn described in being drawn in one group of new frame buffer zone.
The implementation method of the corresponding steps in step 201 to step 202 such as previous embodiment in the present embodiment is identical, hair Details are not described herein by a person of good sense.
Step 203, determine to need the fuzzy region of fuzzy image data in first frame buffer zone.
In practical applications, need to only Fuzzy Processing be carried out, such as to picture number to some regions in image data sometimes The data that title bar and bottom label field in put place carry out Fuzzy Processing, and the present invention is just without to image data at this time View A carry out whole Fuzzy Processing, and only need to be to only needing to carry out the image data of (i.e. fuzzy region) at Fuzzy Processing position Fuzzy Processing is carried out, the treatment effeciency that image data carries out Fuzzy Processing can be greatly improved in this way.Therefore, the present invention exists It is completed in one group of new frame buffer zone described in drafting after the image data View A drawn, it is first determined in the first frame buffer zone Need the fuzzy region of fuzzy image data.
Step 204, it determines to treat fuzzy picture number in one group of new frame buffer zone corresponding with the fuzzy region According to.
After the fuzzy region of fuzzy image data is needed in determining the first frame buffer zone, delay in one group of new frame It rushes in area, determines corresponding with the fuzzy region to treat fuzzy image data.
Because the image data drawn respectively in the first frame buffer zone and the one group of new frame buffer zone created in the present invention It is duplicate, then in the fuzzy region determined in the first frame buffer zone, as one group of new frame buffer zone Need to carry out the fuzzy region of Fuzzy Processing, the image data in the fuzzy region as currently treats fuzzy image data.
Step 205, treat that fuzzy image data carries out Fuzzy Processing to described according to Gaussian Blur algorithm.
Step 206, the image data after Fuzzy Processing is plotted to the image data drawn in first frame buffer zone On.
In the present invention, because only having carried out mould to the image data in fuzzy region in one group of new frame buffer zone Paste processing, then the image data in the fuzzy region after Fuzzy Processing is directly just plotted to first frame in step 206 and is delayed It rushes in area in the image data in phase ambiguity region, to override the image data in phase ambiguity region in the first frame buffer zone, Realize the frosted glass effect of image data.
The image data that the embodiment of the present invention need not treat drafting carries out whole Fuzzy Processing, but pointedly to fuzzy The image data in region is handled, and the data volume of processing greatly reduces, therefore is further improved image data and obscured The treatment effect of processing.
Referring to Fig. 3, it illustrates the present invention to provide a kind of the first-class again of frosted glass effect processing method of image data Cheng Tu, including:
Step 301, image data to be drawn is plotted in the first frame buffer zone.
The image data drawn in wherein described first frame buffering area is used to show
Step 302, after described in the completion in first frame buffer zone wait the drafting for the image data drawn, described Image data to be drawn described in being drawn in one group of new frame buffer zone, and wait to draw to described according to the completion of Gaussian Blur algorithm Image data Fuzzy Processing.
Step 303, determine to need the fuzzy region of fuzzy image data in first frame buffer zone.
Step 304, the image data completed after Fuzzy Processing is plotted in first frame buffer zone needs In the fuzzy region for the image data to be obscured, fuzzy image data is needed to cover in first frame buffer zone.
In the present embodiment, the present invention completes in one group of new frame buffer zone obscures place to the entirety of image data Reason, and then further according to actual demand, determine to need the fuzzy region of fuzzy image data, last root in the first frame buffer zone According to fuzzy region, the image data after Fuzzy Processing will have been completed it has been plotted in the first frame buffer zone to need fuzzy picture number According to fuzzy region on, fuzzy image data is needed in the first frame buffer zone to cover.Since the present invention has been completed To the whole Fuzzy Processing of image data, then for active user, no matter want which panel region in image data carries out Fuzzy Processing need to only call the picture number after completion Fuzzy Processing corresponding with fuzzy region from one group of new frame buffer zone According to, further improve image data carry out Fuzzy Processing treatment effeciency.
In addition on the basis of above-described embodiment, the present invention is in step 103 or step 202 or step 302 described one Before image data to be drawn described in being drawn in the new frame buffer zone of group, the present invention can also include step 100:It waits to paint by described The canvas size of the image data of system reduces N times, and the N is more than or equal to 1.
The canvas size of image data decides the size of the drawing area of image data in the present invention.In practical application When, if after completing drawing image data on a certain size painting canvas, then the canvas size is adjusted, then painting canvas is big Small bigger, image data inherently can be more clear, and canvas size is smaller, and image data inherently can be fuzzyyer.Therefore, it is of the invention The canvas size of image data to be drawn first can be reduced N times, i.e., in certain journey after one group of new frame buffer zone is created Simple fuzzy control processing is carried out to image data first on degree, for the image data of subsequent processing, compared to original Beginning image data, data volume can reduce, then also just reduce the image data amount of subsequent processing, improve image data into The treatment effeciency of row Fuzzy Processing.
Based on a kind of frosted glass effect processing method of image data provided by the invention above, the present invention also provides one kind The frosted glass effect process device of image data, which is applied in GPU, as shown in figure 4, device includes:It creates frame buffer zone Build unit 100, the first drawing unit 200, the second drawing unit 300, Fuzzy Processing unit 400 and third drawing unit 500.Its In,
Frame buffer zone creating unit 100, for creating the first frame buffer zone and one group of new frame buffer zone, the first frame The image data drawn in buffering area is used to show;
First drawing unit 200, for image data to be drawn to be plotted in preset first frame buffer zone;
Second drawing unit 300, for image data to be drawn described in the drafting in one group of new frame buffer zone;
Fuzzy Processing unit 400, for being completed according to Gaussian Blur algorithm to the fuzzy of the image data to be drawn Processing;
Third drawing unit 500 is painted for the image data after Fuzzy Processing to be plotted in first frame buffer zone In the image data of system.
Wherein preferably, the frame buffer zone creating unit 100 is specifically used for, according to the fuzzy of the Gaussian Blur algorithm Process creates the corresponding at least one new frame buffer zone of blurring process with the Gaussian Blur algorithm.
When the frame buffer zone creating unit 100 establishment is corresponding multiple with the blurring process of the Gaussian Blur algorithm New frame buffer zone, when the multiple new frame buffer zone includes at least the second frame buffer zone, third frame buffer zone;
Second drawing unit 300 is specifically used for, the image to be drawn described in drafting in second frame buffer zone Data;
The Fuzzy Processing unit 400 is specifically used for, according to the blurring process of the Gaussian Blur algorithm, to described second The image data drawn is completed in frame buffer zone and performs the first Fuzzy Calculation;
Second drawing unit 300 is specifically used for, and the image data after the first Fuzzy Calculation is plotted to third frame Buffering area;
The Fuzzy Processing unit 400 is specifically used for, according to the blurring process of the Gaussian Blur algorithm, to the third Image data in frame buffer zone after the first Fuzzy Calculation performs the second Fuzzy Calculation.
Wherein optional, the frosted glass effect process device of image data provided by the invention can also include:
First determination unit 600, for determining to need the confusion region of fuzzy image data in first frame buffer zone Domain;
The Fuzzy Processing unit 400 is specifically used for, and determines that one group of new frame corresponding with the fuzzy region delays It rushes in area and treats fuzzy image data;Treat that fuzzy image data carries out Fuzzy Processing to described according to Gaussian Blur algorithm.
It is wherein optional, it can also include:
Second determination unit 700, for determining to need the confusion region of fuzzy image data in first frame buffer zone Domain;
The third drawing unit 500 is specifically used for, and is found from the image data after the Fuzzy Processing and the mould Paste the corresponding image data completed after Fuzzy Processing in region;
The image data completed after Fuzzy Processing is plotted in first frame buffer zone need it is fuzzy In the fuzzy region of image data, fuzzy image data is needed to cover in first frame buffer zone.
It is wherein optional, it can also include:
Painting canvas adjustment unit 800, for the canvas size of the image data to be drawn to be reduced N times, the N is more than Equal to 1.
It should be noted that each embodiment in this specification is described by the way of progressive, each embodiment weight Point explanation is all difference from other examples, and just to refer each other for identical similar part between each embodiment. For device class embodiment, since it is basicly similar to embodiment of the method, so description is fairly simple, related part is joined See the part explanation of embodiment of the method.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, term " comprising ", "comprising" or its any other variant meaning Covering non-exclusive inclusion, so that process, method, article or equipment including a series of elements not only include that A little elements, but also including other elements that are not explicitly listed or further include for this process, method, article or The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged Except also there are other identical elements in the process, method, article or apparatus that includes the element.
The frosted glass effect processing method to a kind of image data provided by the present invention and device have carried out in detail above It introduces, specific case used herein is expounded the principle of the present invention and embodiment, the explanation of above example It is merely used to help understand the method and its core concept of the present invention;Meanwhile for those of ordinary skill in the art, according to this The thought of invention, there will be changes in specific embodiments and applications, in conclusion the content of the present specification should It is interpreted as limitation of the present invention.

Claims (8)

1. the frosted glass effect processing method of a kind of image data, which is characterized in that described applied in graphics processor GPU GPU is pre-created the first frame buffer zone and one group of new frame buffer zone, the image data drawn in first frame buffer zone For showing;The method includes:
Image data to be drawn is plotted in first frame buffer zone;
After described in the completion in first frame buffer zone wait the drafting for the image data drawn, delay in one group of new frame Image data to be drawn described in drawing is rushed in area, and is completed according to Gaussian Blur algorithm to the image data to be drawn Fuzzy Processing;
Image data after Fuzzy Processing is plotted in the image data drawn in first frame buffer zone;
Wherein, the GPU is pre-created one group of new frame buffer zone and includes:Moulds of the GPU according to the Gaussian Blur algorithm Paste process creates the corresponding at least one new frame buffer zone of blurring process with the Gaussian Blur algorithm;
It is described more when GPU establishments and the corresponding multiple new frame buffer zones of blurring process of the Gaussian Blur algorithm When a new frame buffer zone includes at least the second frame buffer zone, third frame buffer zone;
The image data to be drawn described in drafting in one group of new frame buffer zone, and it is complete according to Gaussian Blur algorithm The Fuzzy Processing of the image data to be drawn includes in pairs:
Image data to be drawn described in being drawn in second frame buffer zone;
According to the blurring process of the Gaussian Blur algorithm, the image data for completing to draw in second frame buffer zone is performed First Fuzzy Calculation;
After being completed in second frame buffer zone to the first Fuzzy Calculation of image data, by the figure after the first Fuzzy Calculation As data are plotted to third frame buffer zone;
According to the blurring process of the Gaussian Blur algorithm, to the image in the third frame buffer zone after the first Fuzzy Calculation Data perform the second Fuzzy Calculation.
2. it according to the method described in claim 1, it is characterized in that, is completed described in drafting in one group of new frame buffer zone After the image data drawn, the method further includes:
Determine to need the fuzzy region of fuzzy image data in first frame buffer zone;
It is described at this time that the Fuzzy Processing of the image data to be drawn is specifically included according to the completion of Gaussian Blur algorithm:
It determines to treat fuzzy image data in one group of new frame buffer zone corresponding with the fuzzy region;
Treat that fuzzy image data carries out Fuzzy Processing to described according to Gaussian Blur algorithm.
3. according to the method described in claim 1, it is characterized in that, the image data by after Fuzzy Processing be plotted to it is described Before in the image data drawn in first frame buffer zone, the method further includes:
Determine to need the fuzzy region of fuzzy image data in first frame buffer zone;
The image data by after Fuzzy Processing described at this time, which is plotted in the image data drawn in first frame buffer zone, to be had Body includes:
Found from the image data after the Fuzzy Processing it is corresponding with the fuzzy region completed Fuzzy Processing after Image data;
The image data completed after Fuzzy Processing, which is plotted in first frame buffer zone, needs fuzzy image In the fuzzy region of data, fuzzy image data is needed to cover in first frame buffer zone.
4. according to claim 1-3 any one of them methods, which is characterized in that described in one group of new frame buffer zone Before image data to be drawn described in drafting, the method further includes:
The canvas size of the image data to be drawn is reduced N times, the N is more than or equal to 1.
5. the frosted glass effect process device of a kind of image data, which is characterized in that described applied in graphics processor GPU Device includes:
Frame buffer zone creating unit, for creating the first frame buffer zone and one group of new frame buffer zone, first frame buffer zone The image data of middle drafting is used to show;
First drawing unit, for image data to be drawn to be plotted in first frame buffer zone;
Second drawing unit, for image data to be drawn described in the drafting in one group of new frame buffer zone;
Fuzzy Processing unit, for completing the Fuzzy Processing to the image data to be drawn according to Gaussian Blur algorithm;
Third drawing unit, for the image data after Fuzzy Processing to be plotted to the image drawn in first frame buffer zone In data;
Wherein, the frame buffer zone creating unit is specifically used for, according to the blurring process of the Gaussian Blur algorithm, establishment and institute State the corresponding at least one new frame buffer zone of blurring process of Gaussian Blur algorithm;
When the frame buffer zone creating unit creates the corresponding multiple new frames of blurring process with the Gaussian Blur algorithm Buffering area, when the multiple new frame buffer zone includes at least the second frame buffer zone, third frame buffer zone;
Second drawing unit is specifically used for, the image data to be drawn described in drafting in second frame buffer zone;
The Fuzzy Processing unit is specifically used for, and according to the blurring process of the Gaussian Blur algorithm, second frame is buffered The image data drawn is completed in area and performs the first Fuzzy Calculation;
Second drawing unit is specifically used for, and the image data after the first Fuzzy Calculation is plotted to third frame buffer zone;
The Fuzzy Processing unit is specifically used for, and according to the blurring process of the Gaussian Blur algorithm, the third frame is buffered Image data in area after the first Fuzzy Calculation performs the second Fuzzy Calculation.
6. device according to claim 5, which is characterized in that further include:
First determination unit, for determining to need the fuzzy region of fuzzy image data in first frame buffer zone;
The Fuzzy Processing unit is specifically used for, and determines to treat in one group of new frame buffer zone corresponding with the fuzzy region Fuzzy image data;Treat that fuzzy image data carries out Fuzzy Processing to described according to Gaussian Blur algorithm.
7. device according to claim 5, which is characterized in that further include:
Second determination unit, for determining to need the fuzzy region of fuzzy image data in first frame buffer zone;
The third drawing unit is specifically used for, and is found from the image data after the Fuzzy Processing and the fuzzy region pair That answers has completed the image data after Fuzzy Processing;
The image data completed after Fuzzy Processing, which is plotted in first frame buffer zone, needs fuzzy image In the fuzzy region of data, fuzzy image data is needed to cover in first frame buffer zone.
8. according to claim 5-7 any one of them devices, which is characterized in that further include:
Painting canvas adjustment unit, for the canvas size of the image data to be drawn to be reduced N times, the N is more than or equal to 1.
CN201510526281.9A 2015-08-25 2015-08-25 The frosted glass effect processing method and device of a kind of image data Active CN105139356B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510526281.9A CN105139356B (en) 2015-08-25 2015-08-25 The frosted glass effect processing method and device of a kind of image data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510526281.9A CN105139356B (en) 2015-08-25 2015-08-25 The frosted glass effect processing method and device of a kind of image data

Publications (2)

Publication Number Publication Date
CN105139356A CN105139356A (en) 2015-12-09
CN105139356B true CN105139356B (en) 2018-06-22

Family

ID=54724689

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510526281.9A Active CN105139356B (en) 2015-08-25 2015-08-25 The frosted glass effect processing method and device of a kind of image data

Country Status (1)

Country Link
CN (1) CN105139356B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106548500A (en) * 2016-09-26 2017-03-29 中国电子科技集团公司第二十九研究所 A kind of two-dimension situation image processing method and device based on GPU
CN108133464A (en) * 2017-12-18 2018-06-08 美的集团股份有限公司 Processing method, terminal and the computer readable storage medium of frosted glass effect

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102597950A (en) * 2009-09-03 2012-07-18 先进微装置公司 Hardware-based scheduling of GPU work
CN103020888A (en) * 2012-12-05 2013-04-03 广东威创视讯科技股份有限公司 Image translation updating display method and system
CN103559078A (en) * 2013-11-08 2014-02-05 华为技术有限公司 GPU (Graphics Processing Unit) virtualization realization method as well as vertex data caching method and related device
CN104318511A (en) * 2014-10-24 2015-01-28 江西创成电子有限公司 Computer graphics card and image processing method thereof
CN104574452A (en) * 2013-10-10 2015-04-29 腾讯科技(深圳)有限公司 Generating method and device for window background

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103093416B (en) * 2013-01-28 2015-11-25 成都索贝数码科技股份有限公司 A kind of real time field depth analogy method of graphic based processor fuzzy partition
US9230518B2 (en) * 2013-09-10 2016-01-05 Qualcomm Incorporated Fault-tolerant preemption mechanism at arbitrary control points for graphics processing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102597950A (en) * 2009-09-03 2012-07-18 先进微装置公司 Hardware-based scheduling of GPU work
CN103020888A (en) * 2012-12-05 2013-04-03 广东威创视讯科技股份有限公司 Image translation updating display method and system
CN104574452A (en) * 2013-10-10 2015-04-29 腾讯科技(深圳)有限公司 Generating method and device for window background
CN103559078A (en) * 2013-11-08 2014-02-05 华为技术有限公司 GPU (Graphics Processing Unit) virtualization realization method as well as vertex data caching method and related device
CN104318511A (en) * 2014-10-24 2015-01-28 江西创成电子有限公司 Computer graphics card and image processing method thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于GPU的图像处理算法研究;张春 等;《西南师范大学学报(自然科学版)》;20130731;第38卷(第7期);第3.2节 *

Also Published As

Publication number Publication date
CN105139356A (en) 2015-12-09

Similar Documents

Publication Publication Date Title
CN105185284B (en) Dynamic frame in variable refresh rate system repeats
CN105139356B (en) The frosted glass effect processing method and device of a kind of image data
CN109992226A (en) Image display method and device and spliced display screen
SG11201903476UA (en) Method and apparatus for animating images on mobile devices
CN106575302B (en) Method and system for frame pacing
US20210225329A1 (en) Image display method, display system and computer-readable storage medium
CN102306391A (en) OpenGL (open graphics library)-based inverted image display processing device and method
WO2005045558A3 (en) Dynamic window anatomy
CN104537697A (en) Implementation method for progressively blurred animation
JP6024753B2 (en) Exposure enhancement method and apparatus for defogging image
CN104392409B (en) A kind of accelerated method of image beauty
CN103247064A (en) Three-dimensional dynamic graphical generating method, device and mobile terminal
CN106528030B (en) A kind of combination display methods, apparatus and system
CN107393494A (en) A kind of font dot matrix display methods and storage device based on LCDs
CN109663357A (en) Game special implementation method and device
EP2034438A2 (en) Spatial diffusion in images
CN104361851B (en) The method for refreshing of display screen, system and displaying screen controller
CN109859111A (en) A kind of blind deblurring method of single image based on MAP method
CN104657097A (en) Method and device for displaying wave-shaped dynamic image
US9348552B2 (en) Network appliance for transcoding or enriching virtual desktop infrastructure desktop images
CN102842119A (en) Quick document image super-resolution method based on image matting and edge enhancement
CN107193952A (en) Optimize the method for HTML5 Canvas performances based on multithreading
WO2023024660A1 (en) Image enhancement method and apparatus
CN104637030B (en) A kind of image enhancement processing method and device
Mishiba et al. Seam merging for image resizing with structure preservation

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20190124

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

Patentee after: BEIJING ZIJIE TIAODONG NETWORK TECHNOLOGY CO., LTD.

Address before: Room 309 and 310, Building 3, 33 D, 99 Kechuang 14th Street, Beijing Economic and Technological Development Zone, 100176

Patentee before: Beijing hammer numeral science and technology company limited

TR01 Transfer of patent right