Recall & Review
beginner
What is the purpose of the
gaussian_filter function in image processing?The
gaussian_filter smooths an image by reducing noise and detail using a Gaussian kernel, which blurs the image gently.Click to reveal answer
beginner
What does the
sigma parameter control in gaussian_filter?The
sigma parameter controls the amount of blurring. A larger sigma means more blur and smoothing.Click to reveal answer
intermediate
How does
gaussian_filter handle edges of an image by default?By default,
gaussian_filter uses 'reflect' mode, which mirrors the image edges to avoid artifacts during filtering.Click to reveal answer
beginner
Write a simple Python code snippet using
scipy.ndimage.gaussian_filter to blur a 2D image array named image with sigma=2.from scipy.ndimage import gaussian_filter
blurred_image = gaussian_filter(image, sigma=2)Click to reveal answer
intermediate
Why might you choose
gaussian_filter over a simple average filter for image smoothing?Because
gaussian_filter weights nearby pixels more than distant ones, it preserves edges better and produces more natural blurring than a simple average filter.Click to reveal answer
What effect does increasing the
sigma value have in gaussian_filter?✗ Incorrect
Increasing
sigma increases the blur by spreading the Gaussian kernel wider.Which library provides the
gaussian_filter function?✗ Incorrect
gaussian_filter is part of the scipy.ndimage module.What is the default mode for handling image edges in
gaussian_filter?✗ Incorrect
The default mode is 'reflect', which mirrors the edges to reduce artifacts.
Which of these is a benefit of using a Gaussian filter over a simple mean filter?
✗ Incorrect
Gaussian filters weight pixels by distance, preserving edges better than mean filters.
If you want less blur with
gaussian_filter, what should you do?✗ Incorrect
Decreasing sigma reduces the blur effect.
Explain how the
gaussian_filter works for image smoothing and why it is preferred over simple averaging.Think about how weighting pixels differently affects the image.
You got /4 concepts.
Describe how you would apply
gaussian_filter to a noisy image and what parameters you might adjust.Focus on the function call and parameter roles.
You got /4 concepts.