Bird
0
0

Why does scipy.ndimage.rotate with reshape=True often produce an output image larger than the input?

hard📝 Conceptual Q10 of 15
SciPy - Image Processing (scipy.ndimage)
Why does scipy.ndimage.rotate with reshape=True often produce an output image larger than the input?
ABecause it adds padding to the image edges by default
BBecause it doubles the image size internally
CBecause it expands the output to fit the entire rotated image without cropping
DBecause it converts the image to a higher resolution
Step-by-Step Solution
Solution:
  1. Step 1: Understand reshape=True behavior

    When reshape=True, the output shape is adjusted to fit the whole rotated image.
  2. Step 2: Reason about output size

    This often results in a larger image to avoid cropping corners after rotation.
  3. Final Answer:

    Because it expands the output to fit the entire rotated image without cropping -> Option C
  4. Quick Check:

    reshape=True expands output to fit rotated image [OK]
Quick Trick: reshape=True fits full rotated image, may enlarge output [OK]
Common Mistakes:
  • Thinking it pads edges unnecessarily
  • Assuming it doubles size always
  • Confusing with resolution change

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SciPy Quizzes