Take an image as input and then
display that image
Course Title : Digital Image Processing Lab
Course Code : CSE-406
Submitted to
Dr. Md. Golam Moazzam
Professor, Department of CSE
Dr. Morium Akter
Professor, Department of CSE
Submitted by
Name Class Roll Exam Roll
Sudipta Singha 408 202220
October 25, 2024
Objective
The objective of this lab report is to demonstrate the process of reading and displaying
an image using Python. This includes utilizing Python libraries such as matplotlib and
Pillow to load images from a file and visualize them effectively. The purpose of the report
is to provide a clear understanding of the image handling techniques in Python for basic
image processing.
Python code
1
2 from PIL import Image
3 import matplotlib . pyplot as plt
4
5 image = Image . open ( ’ Tux . jpeg ’)
6
7 plt . imshow ( image )
8 plt . axis ( ’ off ’)
9 plt . show ()
1
Output
Figure 1: Output