Android-UltimateGPUImage icon indicating copy to clipboard operation
Android-UltimateGPUImage copied to clipboard

Filter Chain

Open oguzgu opened this issue 8 years ago • 1 comments

Hi,

How can i create a filter chain?

I need multiple outputs with different filters and blend them to single frame?

oguzgu avatar Nov 28 '17 21:11 oguzgu

After you define a new custom class which extends from GPUImageFilterGroup class, u can use multiple filter by adding it in new class constructor method, like this:

    public GPUImageSobelEdgeDetection() {
        super();
        addFilter(new GPUImageGrayscaleFilter());
        addFilter(new GPUImage3x3TextureSamplingFilter(SOBEL_EDGE_DETECTION));
    }

and that class's instance is what u need in where u want to set a multi-filter.

More easy way to handle this problem is to use a simple function which I'm dealing with. So the upper method is the only option for now...

Windsander avatar Jan 11 '18 03:01 Windsander