我使用GPUImage开发了iOS应用程序,包括GPUImageBilateralFilter
现在我要将iOS应用程序移植到Android,但我发现Android GPUImage库中没有GPUImageBilateralFilter。
如何在Android中移植此过滤器?
答案 0 :(得分:0)
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.