I am trying to implement a real time blur on a SurfaceView or GlSurfaceView getting a camera feed and came across this: Grafika https://github.com/google/grafika
It has a feature that lets you apply a real time blur filter but the blur is not strong enough as demonstrated here: https://www.youtube.com/watch?v=kH9kCP2T5Gg
The Grafika class uses a The Grafika class uses a 3x3 filter kernel, which to my understanding is a floating point value that when edited a certain applies a desired effect to the View.
Here is the blur code:
'case CameraCaptureActivity.FILTER_BLUR:
programType = Texture2dProgram.ProgramType.TEXTURE_EXT_FILT;
kernel = new float[] {
1f/16f, 2f/16f, 1f/16f,
2f/16f, 4f/16f, 2f/16f,
1f/16f, 2f/16f, 1f/16f };
break;'
Does anyone have any idea on how to play with those numbers to strengthen the blur?
Sharpen has completely different fractions:
'kernel = new float[] {
0f, -1f, 0f,
-1f, 5f, -1f,
0f, -1f, 0f };'
and I cant quite figure out the pattern. Any help would be appreciated.