0
0
SciPydata~5 mins

Image filtering (gaussian_filter) in SciPy - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
AInverts the image colors
BSharpens the image
CIncreases the blur effect
DRemoves the image edges
Which library provides the gaussian_filter function?
Ascipy.ndimage
Bmatplotlib
Cnumpy
Dpandas
What is the default mode for handling image edges in gaussian_filter?
Aconstant
Breflect
Cnearest
Dwrap
Which of these is a benefit of using a Gaussian filter over a simple mean filter?
AIt completely removes noise
BIt sharpens the image
CIt increases image contrast
DIt preserves edges better
If you want less blur with gaussian_filter, what should you do?
ADecrease sigma
BIncrease sigma
CIncrease image size
DUse a different image format
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.