Gaussian Blurring Filter
Filter
RIF_IMAGE_FILTER_GAUSSIAN_BLUR
Description
Gaussian blur (also known as Gaussian smoothing) is the result of blurring an image by a Gaussian function.
Parameters
Parameter |
Type |
Input/Output |
Description |
---|---|---|---|
radius |
uint |
input |
The radius of the region that is used for blurring. For an exact correspondence to the Gaussian blur, the window must be large enough that the Gaussian function falls on the edges of this window at almost 0. The larger the |
sigma |
float |
input |
Parameter of the decrease of the Gaussian function. The larger the value, the slower the Gaussian function decreases, and the more the blur. |
tiling |
uint |
input |
Enables use of local memory. Using of the local video memory can increase performance for large radii. |
Usage Example
rif_image_filter filter = nullptr;
rifContextCreateImageFilter(context, RIF_IMAGE_FILTER_GAUSSIAN_BLUR, &filter);
rifImageFilterSetParameter1f(filter, "sigma", 3.0f);
rifImageFilterSetParameter1u(filter, "radius", 5);
rifCommandQueueAttachImageFilter(queue, filter, inputImage, outputImage);
rifContextExecuteCommandQueue(context, queue, nullptr, nullptr, nullptr);
Results
Input image |
Output image |