Hi GPUImage community and Brad,
I would like to specify the filter size (radius) of the GPUImageMedianFilter and GPUImageGaussianBlurFilter.
Does that demand specifying GPU commends? Or can it be done through the GPUImage wrapper? If so, how can I do that?
Thanks
This is probably not the place to ask a specific question about this framework, but I can answer you on this.
The GPUImageMedianFilter is a hardcoded 3x3 median filter based on the article "A Fast, Small-Radius GPU Median Filter" by Morgan McGuire in the ShaderX6 book. More on this can be found here, including larger-radius versions of this. Despite being the fastest implementation of this that I have found, it is still incredibly slow to run on all but the fastest iOS devices, so increasing the sampling area will only slow this down further.
The GPUImageGaussianBlurFilter does a 9-hit simple Gaussian blur in two separated passes. The blurSize property allows you to expand or contract the sampling area slightly, but if you go beyond a multiplier of 1.5, you'll start seeing fringe artifacts due to too few samples being used to blur over a large area. I'm working on a couple of ways of expanding the blur area in a performant manner, but that is the limitation of this particular filter.