Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Recall & Review
beginner
What is the main purpose of blurring or smoothing an image?
Blurring or smoothing reduces noise and small details in an image, making it easier to analyze or process by removing unwanted variations.
Click to reveal answer
beginner
How does Gaussian blur work on an image?
Gaussian blur uses a weighted average where pixels near the center have more influence, following a bell-shaped curve, to smooth the image gently.
Click to reveal answer
intermediate
What makes median blur different from Gaussian blur?
Median blur replaces each pixel with the median value of its neighbors, which is very effective at removing salt-and-pepper noise without blurring edges much.
Click to reveal answer
intermediate
Explain the bilateral filter and its advantage.
Bilateral filter smooths images while keeping edges sharp by considering both spatial closeness and pixel intensity difference, preserving important details.
Click to reveal answer
beginner
Which blurring method is best for removing salt-and-pepper noise?
Median blur is best for salt-and-pepper noise because it replaces pixels with the median of neighbors, effectively removing outliers without blurring edges.
Click to reveal answer
Which blurring technique uses a bell-shaped curve to weight neighboring pixels?
ABox blur
BMedian blur
CBilateral filter
DGaussian blur
✗ Incorrect
Gaussian blur weights pixels based on a Gaussian (bell-shaped) distribution, giving more importance to closer pixels.
Which filter is best at preserving edges while smoothing?
AGaussian blur
BBilateral filter
CMedian blur
DAverage blur
✗ Incorrect
Bilateral filter preserves edges by considering both spatial closeness and intensity differences.
What does median blur replace each pixel with?
AMedian of neighbors
BMean of neighbors
CMaximum of neighbors
DMinimum of neighbors
✗ Incorrect
Median blur replaces each pixel with the median value of its neighboring pixels.
Which noise type is median blur especially good at removing?
AGaussian noise
BSpeckle noise
CSalt-and-pepper noise
DPoisson noise
✗ Incorrect
Median blur effectively removes salt-and-pepper noise by replacing outlier pixels.
What is a downside of Gaussian blur compared to median blur?
AIt blurs edges more
BIt cannot remove noise
CIt is slower to compute
DIt only works on color images
✗ Incorrect
Gaussian blur smooths edges more, which can reduce sharpness compared to median blur.
Describe the differences between Gaussian, median, and bilateral blurring methods and when you might use each.
Think about how each method treats edges and noise.
You got /6 concepts.
Explain why bilateral filtering is useful in image processing compared to simple Gaussian blur.
Focus on edge preservation and noise smoothing.
You got /4 concepts.
Practice
(1/5)
1. Which filter is best for removing salt-and-pepper noise while preserving edges in an image?
Salt-and-pepper noise appears as random black and white pixels, which median filters handle well by replacing each pixel with the median of neighbors.
Step 2: Compare filters for edge preservation
Median filters remove noise without blurring edges, unlike Gaussian filters which blur edges, and bilateral filters which are more complex but less effective for salt-and-pepper noise.
Final Answer:
Median filter -> Option B
Quick Check:
Salt-and-pepper noise = Median filter [OK]
Hint: Median filter excels at salt-and-pepper noise removal [OK]
Common Mistakes:
Choosing Gaussian filter which blurs edges
Confusing bilateral filter with median filter
Using box filter which blurs noise and edges
2. Which of the following is the correct OpenCV function call to apply a Gaussian blur with a 5x5 kernel on an image stored in img?
easy
A. cv2.GaussianBlur(img, (5,5), 0)
B. cv2.medianBlur(img, 5)
C. cv2.blur(img, (5,5))
D. cv2.bilateralFilter(img, 5, 75, 75)
Solution
Step 1: Identify Gaussian blur function syntax
OpenCV's GaussianBlur requires the image, kernel size as a tuple, and sigma (0 means auto).
Step 2: Match options to syntax
cv2.GaussianBlur(img, (5,5), 0) matches the correct function and parameters for Gaussian blur with 5x5 kernel.
Hint: GaussianBlur uses tuple kernel size and sigma parameter [OK]
Common Mistakes:
Using medianBlur for Gaussian blur
Passing kernel size as single integer instead of tuple
Confusing bilateralFilter parameters
3. What will be the effect of applying a bilateral filter with parameters d=9, sigmaColor=75, sigmaSpace=75 on a noisy image?
medium
A. Sharpens edges and increases noise
B. Blurs the entire image uniformly
C. Removes only salt-and-pepper noise
D. Smooths noise while preserving edges
Solution
Step 1: Understand bilateral filter parameters
d controls neighborhood size; sigmaColor controls color similarity; sigmaSpace controls spatial closeness. Together they smooth noise but keep edges sharp.
Step 2: Analyze filter effect on noisy image
Bilateral filter smooths noise while preserving edges, unlike Gaussian which blurs edges or median which targets salt-and-pepper noise.
Hint: Bilateral filter smooths noise but keeps edges sharp [OK]
Common Mistakes:
Thinking bilateral filter blurs edges
Confusing bilateral with median filter
Assuming it only removes salt-and-pepper noise
4. You applied a median filter with kernel size 3 on an image but the noise is still visible. What is the likely mistake?
medium
A. Median filter does not remove noise
B. Kernel size must be even number
C. Kernel size is too small to remove noise effectively
D. Median filter blurs edges too much
Solution
Step 1: Understand median filter kernel size effect
Small kernel sizes may not cover enough pixels to remove noise effectively.
Step 2: Identify correct kernel size usage
Median filter kernels must be odd-sized and larger kernels remove more noise but may blur details.
Final Answer:
Kernel size is too small to remove noise effectively -> Option C
Quick Check:
Increase kernel size for better noise removal [OK]
Hint: Use larger odd kernel sizes for stronger noise removal [OK]
Common Mistakes:
Using even kernel sizes (invalid)
Expecting median filter to blur edges heavily
Thinking median filter can't remove noise
5. You want to denoise a photo with both Gaussian noise and preserve sharp edges of objects. Which sequence of filters should you apply for best results?
hard
A. Apply Gaussian blur first, then bilateral filter
B. Apply median filter first, then Gaussian blur
C. Apply bilateral filter first, then median filter
D. Apply median filter only
Solution
Step 1: Understand noise types and filter strengths
Gaussian noise is best reduced by Gaussian blur; bilateral filter preserves edges while smoothing remaining noise.
Step 2: Determine filter order for best effect
Applying Gaussian blur first reduces Gaussian noise; then bilateral filter smooths while preserving edges, improving overall quality.
Final Answer:
Apply Gaussian blur first, then bilateral filter -> Option A