Recall & Review
beginner
What is the role of a NumPy array in basic image manipulation?
A NumPy array stores image data as numbers, usually representing colors or brightness. This lets us change images by changing numbers in the array.
Click to reveal answer
beginner
How can you flip an image horizontally using NumPy?
You can flip an image horizontally by reversing the columns of the array using slicing like image[:, ::-1].
Click to reveal answer
beginner
What does changing the values in a NumPy image array do to the image?
Changing values changes the colors or brightness of pixels, which changes how the image looks.
Click to reveal answer
beginner
How do you crop an image using NumPy arrays?
Cropping means selecting a smaller part of the array using slicing, like image[50:150, 30:130] to get a rectangle.
Click to reveal answer
beginner
Why is it useful to convert images to arrays for manipulation?
Arrays let us use math and programming to change images easily and quickly, like adjusting brightness or flipping.Click to reveal answer
Which NumPy slicing operation flips an image vertically?
✗ Incorrect
image[::-1, :] reverses the rows, flipping the image vertically.
How do you select a 100x100 pixel crop from the top-left corner of an image array?
✗ Incorrect
image[0:100, 0:100] selects the first 100 rows and columns, cropping the top-left.
What happens if you add 50 to all values in an image array?
✗ Incorrect
Adding 50 increases pixel brightness, making the image brighter.
Which NumPy operation would invert the colors of a grayscale image with values 0-255?
✗ Incorrect
Subtracting pixel values from 255 inverts grayscale colors.
What does image[:, ::-1] do to an image array?
✗ Incorrect
image[:, ::-1] reverses columns, flipping the image horizontally.
Explain how you can flip, crop, and brighten an image using NumPy arrays.
Think about how slicing changes the array shape and how adding changes pixel values.
You got /3 concepts.
Describe why images are represented as arrays and how this helps in image manipulation.
Consider how computers see images as numbers.
You got /3 concepts.