Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
35 views2 pages

DIP Lab2

This document outlines the objectives and tasks for a digital image processing lab. The lab aims to familiarize students with digital image sampling techniques through hands-on MATLAB exercises. Students will downsample, upsample, and interpolate images using various methods like nearest neighbor, bilinear, and bicubic. Tasks involve reading, manipulating, and displaying digital images to observe the effects of sampling and interpolation algorithms.

Uploaded by

anzar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views2 pages

DIP Lab2

This document outlines the objectives and tasks for a digital image processing lab. The lab aims to familiarize students with digital image sampling techniques through hands-on MATLAB exercises. Students will downsample, upsample, and interpolate images using various methods like nearest neighbor, bilinear, and bicubic. Tasks involve reading, manipulating, and displaying digital images to observe the effects of sampling and interpolation algorithms.

Uploaded by

anzar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

Lab #2

University of Lahore

Digital Image Processing

Digital Image Sampling

Marks:- 10
Objective:
By the end of this lab students will be able to know the basics of digital images
sampling by different techniques.

Pre-Lab Tasks:

MATLAB Commands
Downsample:- Downsample input signal
Upsample
fir1:- FIR filter design using the window method.
Imresize
Interp

In-Lab Tasks:

Task-1a):
i. Read an image file rice.png in a variable x by using
x=imread(rice.png)
ii. Display the image.
iii. Downsample image x by a factor 2.
iv. Display fourier transforms of both original and downsampled images and try to
find differences in both images.

Task-1b):
i. Read image file cameraman.tif.
ii. Downsample it by factor 8 and upsample it and observe the result.
iii. Again downsample the image to get 32x32 image.
iv. Upsamle the image by factor 2 and observe the result.

Task-2:
Read image file cameraman.tif.
Perform Nearest Neighbor interpolation by using imresize matlab function.
Perform Bilinear interpolation by using imresize matlab function.
Lab #2

Perform Bicubic interpolation by using imresize matlab function.

Task-3:
Read image file cameraman.tif

i. Make a horizontally flipped version of the image by reversing the order of each
column. Similarly, create a vertically flipped image. Print your results.

ii. Now, create a "negative" of the image by subtracting each pixel from 255 (here's
an example of where conversion to double is necessary.) Print the result.

iii. Finally, multiply each pixel of the original image by 1.5, and print the result.

Task-4:
Repeat Task-1 but now implement it by using interp function of matlab.

Task-5:
Perform Nearest Neighbor interpolation without using any matlab built-in
function.

You might also like