Port iOS GPUImageBilateralFilter to Android

170 views Asked by At

I developed iOS app using GPUImage including GPUImageBilateralFilter.
Now I am going to port the iOS app to Android, but I've found there is no GPUImageBilateralFilter in Android GPUImage library.
How can I port this filter in Android?

1

There are 1 answers

2
Brad Larson On BEST ANSWER

Well, you do have the entire source code for that filter right here. I talk a little more about that here and here, but it's a relatively simple bilateral blur. It uses a hardcoded set of 9 Gaussian samples about a central pixel, split into horizontal and vertical passes.

All you need to do is take the vertex and fragment shaders from the GPUImage repository and write your own implementation of a two-pass filter that does this within whatever Android framework you're using. If they've already got a separated Gaussian blur, that shouldn't be too hard to do.