I think StackBlur is a great library to use, especially on its ability to blur an image as the way you want. I have not used GPUImage library, but coworker said that StackBlur is slower than GPUImage. I dont find any information on the web. Anyone has insight on this? Thanks!
Asked
Active
Viewed 1,138 times
1
-
3In your place, I wouldn't dare questionning the absolute superiority of GPUImage. It's written by a Stack Overflow moderator, and you'll quickly find yourself banned upon him encountering the slightest criticism. – Mar 22 '13 at 08:49
-
2Didn't try myself, but if you look at [StackBluriOS](https://github.com/tomsoft1/StackBluriOS/blob/master/Classes/UIImage%2BStackBlur.m) and [GPUImageFastBlurFilter](https://github.com/BradLarson/GPUImage/blob/master/framework/Source/GPUImageFastBlurFilter.h) you see that the first is CPU bound while the second is running fragment shaders on the GPU. Given that the GPU is faster at performing similar operations over large blocks of data (in this case, a blur on an image), I expect it to be faster. The best way to know is to give it a try and time the results. – Jano Mar 22 '13 at 15:21
-
@Jano Thanks for the CPU and GPU explanation. I suspect running directly on GPU is faster than CPU processing as well, especially GPU is directly used for display. Very good to know. I will measure it myself when i have tim. – trillions Mar 22 '13 at 21:37
-
@borrrden I care because I really need to know the reason for why and/or why not :) – trillions Mar 22 '13 at 21:38
-
1@H2CO3 hahah, I didn't realize who developed GPUImage, but very nice to know! :) As a small potato as I am, I think they have enough tolerance on my questions ;) – trillions Mar 22 '13 at 21:40
-
How to become a Overflow moderator? I want to be one too :) – trillions Mar 22 '13 at 21:41
-
1@nanshi Firstly, by being able to google the answer to questions like this. Secondly, having some good amount of reputation here and on Meta. Thirdly, being elected by the community - the elections have just been held, retry in one year. – Mar 22 '13 at 21:43
-
1@H2CO3 Thanks a lot! :) In reality, no comparison answer can be found on google for my question, so I posted it here, quick way to reach all the experts :) – trillions Mar 22 '13 at 21:45
-
@nanshi I am not talking about this question. I am talking about the one in which you asked "how to become a SO moderator". – Mar 22 '13 at 21:48
-
1If you care so much, then you should test them both out yourself. – borrrden Mar 23 '13 at 01:16
-
@borrrden I agree...but only when i have the time..will do – trillions Mar 24 '13 at 05:45
-
3I do have some relative benchmarks on other image processing operations compared to CPU-side filters here: http://stackoverflow.com/a/6628208/19679 . StackBlur is an interesting case, though, because they are using integral images to generate their blurs. This can lead to constant time for filtering operations as the blur radius increases, as opposed to normal Gaussian blurs which become much more expensive with larger blur radii. I can't use integral images in my blurs, so there may actually be a crossover point in performance here. – Brad Larson Mar 25 '13 at 18:45
-
@BradLarson thanks a lot for your reply as well as the bench mark work. Do you mean that StackBlur's performance is actually not bad and may be even faster when applying a large blur radii since it is a O(c) algorithm? I am very new to the area, thanks a lot for any help you offer to me! Appreciated! :) – trillions Mar 26 '13 at 19:48
1 Answers
3
We were using GPUImage to apply blur effect to our images and decided to try stackblur to see if we can get better performance from it.
After the implementation, we first did simulator tests and stackblur did have better performance, especially with larger images. But when we tried it on actual devices the performance was much worse than GPUImage

Efesus
- 197
- 2
- 17
-
-
4That might have to do with the fact that the Simulator does software emulation of some OpenGL ES shader capabilities. Even on my Core i7 MacBook Pro, certain shaders run far slower in the Simulator than on the latest iOS devices. Likewise, the ARM processors in the iOS devices are nowhere near as powerful as current desktop CPUs, so CPU-side implementations will be much faster in the Simulator. – Brad Larson Jun 25 '13 at 22:58
-
@BradLarson thanks Brad for your input too! i guess i asked a fun question! ;) – trillions Jun 30 '13 at 23:19