Blurring is the process of reducing the sharpness of an image, effectively blending the colors and intensities of adjacent pixels. It is used to reduce Noise
Gamma Correction
Gamma correction is a nonlinear operation used to adjust the brightness of an image. The formula for gamma correction is:

Blurring
Blurring is a technique used to reduce noise or detail in an image, often for smoothing or softening the image.
Techniques
- Average (Mean) Blurring
- Gaussian Blurring
- Median Blurring
1. Using Kernel (filter2D)
filter2D (src, dst, ddepth, kernel)
Parameters:Â Â
Src – The source image to apply the filter on.
Dst – Name of the output image after applying the filter
Ddepth – Depth of the output image [ -1 will give the output image depth as same as the input image]
Kernel – The 2d matrix we want the image to convolve with.
2. Using blur
cv2.blur() function performs averaging by calculating the mean of all pixel values in a given neighborhood and replacing the central pixel with this mean.
The size of the kernel (ksize) determines the extent of the blur: larger kernels produce a stronger blurring effect.
This method is useful for reducing noise and smoothing images but can result in loss of detail.
blurred_image = cv2.blur(src, ksize)
Otherwise termed to be box filter

3. Using Gaussian Blur

cv2.GaussianBlur(src, ksize, sigmaX, sigmaY=None, borderType=cv2.BORDER_DEFAULT)
src: The input image on which Gaussian Blur is to be applied. It should be a NumPy array representing the image.
ksize: The size of the Gaussian kernel. It should be a tuple of two integers (width, height), and both values must be odd numbers (e.g., (3, 3), (5, 5)).sigmaX: The standard deviation in the x-direction. If zero, it is computed from ksize.sigmaY: The standard deviation in the y-direction. If zero, it is set equal to sigmaX. If sigmaY is None, the function assumes sigmaY is equal to sigmaX.borderType: The type of border to be used. This parameter specifies how the borders of the image are handled. The default is cv2.BORDER_DEFAULT.

4. Use Median Blur
cv2.medianBlur(src, ksize)
src: The source image on which the median blur is to be applied. This should be a grayscale or color image (NumPy array).
ksize: The size of the kernel (or window) used for the median filtering. It must be an odd integer (e.g., 3, 5, 7, etc.). Larger values will result in more blurring.
Views: 0