0% found this document useful (0 votes)
18 views4 pages

R7020E Lab1

The document introduces basic concepts and tasks for an image processing lab, including loading and modifying images, noise removal, edge detection, and template matching. The lab consists of 4 tasks - the first covers loading, visualizing and processing an image; the second applies filters to remove noise; the third detects edges; the fourth finds a template within an image using correlation.

Uploaded by

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

R7020E Lab1

The document introduces basic concepts and tasks for an image processing lab, including loading and modifying images, noise removal, edge detection, and template matching. The lab consists of 4 tasks - the first covers loading, visualizing and processing an image; the second applies filters to remove noise; the third detects edges; the fourth finds a template within an image using correlation.

Uploaded by

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

R7020E

Computer Vision and Image Processing


Lab 1: Basic Image Processing

1 Lab Scope and Aim


The aim of this lab is to introduce the students the basic concepts and functionalities in image
processing including tasks of digital image understanding, pixel transformations and image filter-
ing with kernels. The assignments include tasks around image restoration for noise removal, edge
detection and thresholding and template matching.

Prerequisites: The students should have a good background in the following areas:

Theoretical: Topics from Lectures 2-4 and related ’Further Reading’ book material
Practical: Matlab Image processing toolbox: https: // www. mathworks. com/ help/ images/
Practical: Peter Corke Machine Vision Toolbox: https: // petercorke. com/ toolboxes/ machine-vision-toolbox/

Lab Supplementary material: This lab is accompanied with the supplementary material to
support the assignments
1. Download lab1.zip file from Canvas and unzip it. The folder names correspond to the number
of each Task.
Lab Examination: There will be 1 to 1 discussions for each assignment on a specified time slot
where the students will provide substantial comments on their solutions and results. Moreover, the
students should upload their code solutions in Canvas.

2 Assignments
Task 1 (Getting familiar with images and processing tools) In this task you should load,
visualize and process images using predefined functions (Figure 1).

Given
• ’Barbara’ image in two formats (.mat and .png).

• Use any preferred function from Matlab toolboxes.

ToDo
• Load and visualize ’Barbara’image using 3 different ways 1).mat file, 2) .png file with Image
Processing Toolbox from Matlab, 3) .png file with Peter Corke toolbox in Matlab.

• Convert to grayscale.

• Check image size, number of channels, and convert between classes e.g. double to uint8 and
vice versa.

• Image scale down to half and quarter size.

• Modify brightness and visualize their respective image histograms of the grayscale image in
its original size.

• Investigate other functions in matlab related to filtering, binarization, edge detection (e.g.
’fspecial’, ’imfilter’, ’imerode’, ’imadjust’, ’imhist’, ’histeq’, ’edge’, ’im2bw’, . . . )

Updated: September 2023


R7020E
Computer Vision and Image Processing
Lab 1: Basic Image Processing

Figure 1: Load and process Barbara image

Task 2 (Image Restoration - Noise Filtering) In this task you will be using filtering kernels
for noisy image restoration (Figure 2).

Figure 2: Original flower image that will be used for the noise restoration task

Given

Updated: September 2023


R7020E
Computer Vision and Image Processing
Lab 1: Basic Image Processing

• Image flower.mat

ToDo
• Corrupt image with Gaussian noise of zero mean and such variance, where the noisy image
to have 20dB Signal to Noise Ratio. Apply moving average and median filter to remove the
noise from the image.
• Corrupt image with salt and pepper noise of 20%. Apply moving average and median filter
to remove the noise from the image.
• Corrupt the image with Gaussian noise of zero mean and such variance, where the noisy
image to have 20dB Signal to Noise Ratio, followed by salt and pepper noise of 20%. Try
to restore image with a) moving average filter, b) median filter, c) sequential use of moving
average and median filter, based on your preferred order.
In all cases comment your findings.

Task 3 (Edge Detection) In this task, you will find the edges of an image (Figure 3).

Figure 3: Original clock image that will be used for the edge detection task

Given
• Image clock.

ToDo
• Use 3 different edge detection kernels (masks) and report your findings.
• Convert the resulting edge images to binary images using global thresholding method. Visu-
alize the results and comment on the threshold value selection.

Updated: September 2023


R7020E
Computer Vision and Image Processing
Lab 1: Basic Image Processing

Task 4 (Template matching - Matching by correlation similarity measure) In this task,


you will find a specific object of interest (template) within another image that includes the object
(Figure 4).

Figure 4: Identify the stop sign template in the original image

Given

• Original image and template image.

• Hint: Could you apply any morphological operation at some point of the processing pipeline?

ToDo

• Use the normalized correlation coefficient for similarity measure and visualize the location of
the template.

Updated: September 2023

You might also like