Question
pythonArrays, Grids and Plotting The program prettyface.py (below) displays an image of a critter. Write some additional code to: i) create a new image, cropped_face,
pythonArrays, Grids and Plotting
The program prettyface.py (below) displays an image of a critter. Write some additional code to: i) create a new image, cropped_face, which crops the image by 50 pixels on each side, and display the new image ii) create a new image, cropped_pixel_face, which slices the cropped_face image to show every 10th pixel in each dimension, and display the new image
prettyface.py
import matplotlib.pyplot as plt from scipy import ndimage from scipy import misc face = misc.face(gray=True) plt.imshow(face, cmap=plt.cm.gray) plt.show()
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started