How it works...

cv2.GaussianBlur is used to apply a Gaussian filter to the image. This function takes an input image, kernel size in (kernel width, kernel height) format, and standard deviations along width and height. The kernel size should be a positive, odd number.

If the standard deviation along height isn't specified or is set to zero, the value of X standard deviation is used for both directions. Also standard deviations can be computed from kernel sizes if we change X standard deviation to zero.

To apply median blurring, you need to use the cv2.medianBlur function. It accepts an input image as the first argument, and a kernel size as the second. Kernel size must be a positive, odd number.

Bilateral filtering is presented with the cv2.bilateralFilter function. It takes an input image, window size and color, and spatial sigma values. If the window size is negative, it's computed from spatial sigma values.

The various outputs of the preceding codes should appear as follows: