Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Noise Reduction and Smoothing | Image Processing with OpenCV
Computer Vision Essentials

Свайпніть щоб показати меню

book
Noise Reduction and Smoothing

Noise in images appears as unwanted graininess or distortion, often caused by low lighting, compression artifacts, or sensor limitations. Smoothing techniques help reduce noise while preserving important image details.

Gaussian Blurring (Smoothing Noise)

cv2.GaussianBlur function applies a Gaussian blur, which smooths the image by averaging pixel values using a Gaussian kernel (a weighted average that gives more importance to central pixels):

  • cv2.GaussianBlur(src, ksize, sigmaX):

    • src: the source image to be blurred;

    • ksize: kernel size in the format (width, height), both values must be odd (e.g., (5, 5));

    • sigmaX: standard deviation in the X direction; controls the amount of blur.

  • The function reduces image noise and detail by convolving the image with a Gaussian function, which is useful in tasks like edge detection or pre-processing before thresholding.

Median Blurring (Salt-and-Pepper Noise Removal)

cv2.medianBlur function applies a median filter, which replaces each pixel value with the median value of the neighboring pixels in the kernel window:

  • cv2.medianBlur(src, ksize):

    • src: the source image to be filtered;

    • ksize: size of the square kernel (must be an odd integer, e.g., 3, 5, 7).

  • The median blur is especially effective at removing salt-and-pepper noise, as it preserves edges while eliminating isolated noisy pixels.

Завдання

Swipe to start coding

You are given the image variable of the noisy image of the puppy: noisy puppy

  • Apply Gaussian Blur and store result in gaussian_blurred variable;
  • Apply Gaussian Blur and store result in median_blurred variable.

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 2. Розділ 4
Ми дуже хвилюємося, що щось пішло не так. Що трапилося?

Запитати АІ

expand
ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

book
Noise Reduction and Smoothing

Noise in images appears as unwanted graininess or distortion, often caused by low lighting, compression artifacts, or sensor limitations. Smoothing techniques help reduce noise while preserving important image details.

Gaussian Blurring (Smoothing Noise)

cv2.GaussianBlur function applies a Gaussian blur, which smooths the image by averaging pixel values using a Gaussian kernel (a weighted average that gives more importance to central pixels):

  • cv2.GaussianBlur(src, ksize, sigmaX):

    • src: the source image to be blurred;

    • ksize: kernel size in the format (width, height), both values must be odd (e.g., (5, 5));

    • sigmaX: standard deviation in the X direction; controls the amount of blur.

  • The function reduces image noise and detail by convolving the image with a Gaussian function, which is useful in tasks like edge detection or pre-processing before thresholding.

Median Blurring (Salt-and-Pepper Noise Removal)

cv2.medianBlur function applies a median filter, which replaces each pixel value with the median value of the neighboring pixels in the kernel window:

  • cv2.medianBlur(src, ksize):

    • src: the source image to be filtered;

    • ksize: size of the square kernel (must be an odd integer, e.g., 3, 5, 7).

  • The median blur is especially effective at removing salt-and-pepper noise, as it preserves edges while eliminating isolated noisy pixels.

Завдання

Swipe to start coding

You are given the image variable of the noisy image of the puppy: noisy puppy

  • Apply Gaussian Blur and store result in gaussian_blurred variable;
  • Apply Gaussian Blur and store result in median_blurred variable.

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 2. Розділ 4
Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Ми дуже хвилюємося, що щось пішло не так. Що трапилося?
some-alt