0% found this document useful (0 votes)
6 views5 pages

Lab 3

The document outlines a lab exercise for a Digital Image Processing course at the National University of Science & Technology. It includes tasks such as converting colored images to grayscale, finding image sizes, writing images to text files, and manipulating images using MATLAB commands. The lab aims to enhance students' understanding of basic image operations and MATLAB programming.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views5 pages

Lab 3

The document outlines a lab exercise for a Digital Image Processing course at the National University of Science & Technology. It includes tasks such as converting colored images to grayscale, finding image sizes, writing images to text files, and manipulating images using MATLAB commands. The lab aims to enhance students' understanding of basic image operations and MATLAB programming.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

NATIONAL UNIVERSITY OF SCIENCE & TECHNOLOGY,

ISLAMABAD

MILITARY COLLEGE OF SIGNALS, RAWALPINDI

DIGITAL IMAGE PROCESSING


LAB # 3

NC SHAIZA AKHTAR
BESE-27 C
Basic Image Operation
Question # 1
Load coloured image and convert it into gray scale image (gray_img) and display both
images. You can use built in images from MATLAB toolbox.
(C:\Program Files\MATLAB\R2013a\toolbox\images\imdemos)

Question # 2
Find the size of grayscale image in last question.

Question # 3
Load coloured image and then write the image into a text file and observe output.
Question # 4
What is the outcome of this command fp = gray_img(end: −1 :1, :) ?
This command flips the image upside down. end:-1:1 means reversing the rows, keeping
columns unchanged. The flipped image is stored in fp.
Question # 5
Write MATLAB code to produce mirror image of the input image. Display both images.

Question # 6
Write MATLAB code to produce negative of input image. Display both images.
Question # 7
Write a new M-function to reduce the number of grey levels in a given image to 8. The
input to your function should be a grey-scale image and the output should be another grey-
scale image.

You might also like