onfirのブログ -5ページ目

onfirのブログ

ブログの説明を入力します。

Earlier in this series, we have seen the use of RenderScript to blur a picture, and by a performance analysis technique Air Jordan 12 to solve the bottleneck of this process. We found that the use RenderScipt, the actual blurring 2013 Air Jordan 4 (IV) Retro operation very quickly. But still can not avoid the bitmap memory space and encoding between Java RenderScript memory space (Marshalling) overhead. In this article, we will not be achieved by blurring function memory space coding, see if you can get better results. I must admit, for a variety of fuzzy algorithms implemented in Java, and I have not done detailed tests. So it's possible that some other algorithm is more efficient than I pick. I selected algorithm from the StackOverflow Yahel Bouaziz answer, he clearly related models, and claimed that this algorithm is particularly fast. Some critics say this method is much faster than other methods. I will not repeat here this method, specific implementation can reference this resource Lane. I do not have a different fuzzy algorithms note explaining how the code works Air Lebron James Shoes Max for Men Yahel, or compare with other implementations. These are not realizing key blurred series. If you would like more information, there is a good Java image Processing Guide, which uses the AWT libraries achieve. Although not directly on the Android, but it is different fuzzy learning algorithm a good starting point. We use a different method to encapsulate Yahel, comprising a TimingLogger. So you can easily assess achieve the effect: private void blurJava (Bitmap bkg, View view, int radius) {TimingLogger tl = new TimingLogger (TAG, Nike shoes online \u0026 quot; blur \u0026 quot;); Bitmap overlay = Bitmap.createBitmap (view.getMeasuredWidth (), view .getMeasuredHeight (), Bitmap.Config.ARGB_8888); tl.addSplit (\u0026 quot; Bitmap.createBitmap () \u0026 quot;); Canvas canvas = new Canvas (overlay); tl.addSplit (\u0026 quot; new Canvas () \u0026 quot;); canvas.drawBitmap (bkg, -view.getLeft (), -view.getTop (), null); tl.addSplit (\u0026 quot; canvas.drawBitmap () \u0026 quot;); Bitmap blurred = fastblur (overlay, radius); tl. Air Jordan 11 addSplit (\u0026 quot; fastblur () \u0026 quot;); view.setBackground (new BitmapDrawable (getResources (), blurred)); tl.addSplit Nike Shoes (\u0026 quot; view.setBackground () \u0026 quot;); tl.dumpToLog ();} run after can be obtained the following effects: You must agree Yehel statement, the effect looks much better. All critical operating results performance then? blur: beginblur: 0 ms, Bitmap.createBitmap () blur: 0 ms, new Canvas () blur: 1 ms, canvas.drawBitmap () blur: 125 ms, fastblur () blur: 0 ms, view.setBackground () blur : end, run RenderScript 126 ms before the blurred image using the same device to be tested to ensure that the program uses the same benchmark. RenderScipt save coding overhead Air Jordan 13 in memory space, the single fuzzy operation Air Jordan 10 time than RenderScript include signal encoding method of operating a long time, two to three times. But this 180-159220 Nike LeBron 7 VII Soldier White Black Running Shoes does not mean Nike Shoes Global that Air Jordan 1 Yehel method is not efficient, it is because there is no running 2012 Cheap Nike Air Jordan 1 High Heels For Sale Beige Pink directly on the GPU, while the GPU just for the implementation of such heavy computing tasks. This result clearly shows that when performing such operations, Air Jordans Men's RenderScript achieve results very promising to bring a significant improvement. And when a large memory overhead between the decoding, thereby obtaining Air Max for Women the effect will be to make people believe there is quite worth the cost. In the next article, we will discuss in depth the frame rate when running animation and explore whether you can make the process more smoothly blurred background. The source of this article can be found here.Android tutorial blurred images (4)