Question: We'll use matplotlib.pyplot to read in , display, and manipulate a digital image. You should use a color image in this problem. 3 import matplotlib.pyplot
We'll use matplotlib.pyplot to read in display, and manipulate a digital image. You should use a color image in this problem.
import matplotlib.pyplot as plt
img pltimreadsomePicturejpg
plt figure
pltimshow img
a What is the type of img? What is the shape of img?
b Modify the image so that a rectangular block of pixels are red, and display the result using pltimshow.
c Modify the image so that a rectangular block of pixels is green, and display the result using pltimshow.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
