You can read an image in Python using Matplotlib by following the given code. If you want to learn Computer Vision then I will highly recommend you to read This book.
![How to read image in Python using Matplotlib](https://aihints.com/wp-content/uploads/2022/06/How-to-read-image-in-Python-using-Matplotlib.png)
Step 1
If Matplotlib library is not installed, then first install it using this code.
pip install matplotlib
Step 2
The image should be in the same folder in which the code file is running. Otherwise, add the location before the image name.
# Import the required module import matplotlib.pyplot as plt import matplotlib.image as mpimg # Read the Image img = mpimg.imread("boy.jpg") # Display the Image plt.imshow(img)
Output:
![](https://aihints.com/wp-content/uploads/2022/06/image-1.png)