Radeon ProRender

Median Denoiser Filter

Filter

RIF_IMAGE_FILTER_MEDIAN_DENOISE

Description

The median filter is a nonlinear digital filtering technique, often used to remove noise from an image or signal. Median filtering is very widely used in digital image processing because, under certain conditions, it preserves edges while removing noise. The main idea of the median filter is to run through the signal entry by entry, replacing each entry with the median of neighboring entries.

Parameters

Parameter Type Input/Output Description
radius uint input Radius of the filter window.
Value range is [0, 50], default value is 1.

Usage Example

rif_image_filter filter = nullptr;
rifContextCreateImageFilter(context, RIF_IMAGE_FILTER_MEDIAN_DENOISE, &filter);
rifImageFilterSetParameter1u(filter, "radius", 2);
rifCommandQueueAttachImageFilter(queue, filter, inputImage, outputImage);
rifContextExecuteCommandQueue(context, queue, nullptr, nullptr, nullptr);

Results

Input image

Output image (radius = 1)