Bird
0
0

You have a 2D grayscale image with Gaussian noise. You want to smooth the image but preserve edges as much as possible. Which filter and parameters should you use?

hard📝 Application Q8 of 15
SciPy - Image Processing (scipy.ndimage)
You have a 2D grayscale image with Gaussian noise. You want to smooth the image but preserve edges as much as possible. Which filter and parameters should you use?
AApply a uniform filter with size=5 and mode='constant'
BApply a median filter with size=3 and mode='nearest'
CApply a uniform filter with size=3 and mode='reflect'
DApply a median filter with size=7 and mode='wrap'
Step-by-Step Solution
Solution:
  1. Step 1: Understand noise type and filter effects

    Gaussian noise is best reduced by smoothing filters, but uniform filters tend to blur edges. Median filters preserve edges better by using median statistics.
  2. Step 2: Evaluate options

    Apply a median filter with size=3 and mode='nearest' uses median filter with a small window and 'nearest' mode, which preserves edges and reduces noise effectively.
    Options B and C use uniform filters which blur edges.
    Apply a median filter with size=7 and mode='wrap' uses a large median filter window which may oversmooth and mode 'wrap' can cause artifacts.
  3. Final Answer:

    Apply a median filter with size=3 and mode='nearest' -> Option B
  4. Quick Check:

    Median filter with small window preserves edges best [OK]
Quick Trick: Median filter preserves edges better than uniform filter [OK]
Common Mistakes:
  • Using uniform filter for edge-preserving smoothing
  • Choosing too large filter size causing oversmoothing
  • Ignoring mode effects on border handling

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SciPy Quizzes