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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access