sod_img sod_gaussian_blur_image(sod_img input, int radius, double sigma);
Apply Gaussian Blur effect to a given three-dimensional colrospace (RGB/BGR/YUV, etc.) image. Gaussian blur is often used in image processing to reduce image noise and detail, which can be useful in various contexts such as digital photography, computer graphics, and machine vision. The underlying principle of a Gaussian blur is the use of a Gaussian function, which when applied to an image, creates a smoothing effect. The API achieves this by convolving the image with a Gaussian filter, also known as a kernel. A typical input image after processing should look like the following:
After Processing via sod_gaussian_blur_image()
Please note that this particular implementation of Gaussian Blur is designed to be easy to use and efficient, but it's important to note that the Gaussian blur operation is inherently computationally intensive, especially for larger images or larger blur radius. It is recommended to use this API with care when processing large amounts of images or particularly large individual images to prevent potential performance issues.
The radius of the Gaussian blur. This determines the extent of the blur. A larger radius will result in a more blurred image. The radius is defined in pixels and must be a positive integer.
standard deviation of the Gaussian distribution that is used to create the Gaussian kernel, which in turn is used to perform the blur. The sigma parameter essentially controls the extent of the blur. A larger sigma implies a larger standard deviation, and therefore a wider spreading blur: the blur effect will reach out to more distant pixels.
Gaussian blurred image is returned in an instance of the sod_img object. if something goes wrong during processing, then an empty image is returned via sod_make_empty_image() instead. Once done, you must release the memory allocated to this object via sod_free_image() to avoid memory leaks.