Skip to content

Filter Operators

Image filtering operations.

medianFilter

cpp
GpuImage medianFilter(const GpuImage& input, int kernelSize);

Applies median filter for noise reduction while preserving edges.

bilateralFilter

cpp
GpuImage bilateralFilter(const GpuImage& input, float sigmaSpace, float sigmaColor);

Edge-preserving smoothing filter.

Parameters:

  • sigmaSpace: Spatial extent
  • sigmaColor: Color similarity threshold

boxFilter

cpp
GpuImage boxFilter(const GpuImage& input, int kernelSize);

Applies box (mean) filter.

sharpen

cpp
GpuImage sharpen(const GpuImage& input, float strength = 1.0f);

Sharpens image using unsharp masking.

Performance

Filter4K ImageSpeedup
Median 3×32.5 ms11.4×
Bilateral4.8 ms37.6×
Box 5×50.8 ms31.5×
Sharpen1.1 ms38.3×

Back to API

Released under the MIT License.