Bird
0
0

Which of the following is the correct way to call scipy.ndimage.zoom to double the size of an image array img with linear interpolation?

easy📝 Syntax Q12 of 15
SciPy - Image Processing (scipy.ndimage)
Which of the following is the correct way to call scipy.ndimage.zoom to double the size of an image array img with linear interpolation?
Azoom(img, zoom=2, order=1)
Bzoom(img, scale=2, order=1)
Czoom(img, zoom=2, interpolation='linear')
Dzoom(img, factor=2, order=1)
Step-by-Step Solution
Solution:
  1. Step 1: Check parameter names in scipy.ndimage.zoom

    The correct parameter for resizing factor is zoom, not scale or factor.
  2. Step 2: Check interpolation order

    Order=1 means linear interpolation, which is correct. The parameter interpolation does not exist.
  3. Final Answer:

    zoom(img, zoom=2, order=1) -> Option A
  4. Quick Check:

    zoom param + order=1 for linear [OK]
Quick Trick: Use zoom= factor and order= interpolation level [OK]
Common Mistakes:
  • Using wrong parameter names like scale or factor
  • Using interpolation='linear' which is invalid
  • Confusing order values with interpolation strings

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SciPy Quizzes