DATA170
Exploring Data

Activity 7

Array Indexing

  1. Write a Python program that uses numpy and imageio to crop an image. The program should read an image file and write a new cropped version of the image. The cropped image should be half the size of the input image and should be the pixels in the center of the input image.

    For example, the image:

    orginial

    cropped would be:

    cropped