Bird
0
0

What will be the shape of the output image after applying scipy.ndimage.rotate(img, 90, reshape=False) if the input image img has shape (100, 200)?

medium📝 Predict Output Q4 of 15
SciPy - Image Processing (scipy.ndimage)
What will be the shape of the output image after applying scipy.ndimage.rotate(img, 90, reshape=False) if the input image img has shape (100, 200)?
A(100, 100)
B(200, 100)
C(100, 200)
D(141, 141)
Step-by-Step Solution
Solution:
  1. Step 1: Understand reshape parameter effect

    When reshape=False, the output image keeps the same shape as input.
  2. Step 2: Apply to given shape

    Input shape is (100, 200), so output shape remains (100, 200) despite rotation.
  3. Final Answer:

    (100, 200) -> Option C
  4. Quick Check:

    reshape=False keeps original shape [OK]
Quick Trick: reshape=False keeps output shape same as input [OK]
Common Mistakes:
  • Assuming shape swaps on 90 degree rotation
  • Ignoring reshape parameter
  • Expecting output to auto-fit rotated image

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SciPy Quizzes