Você está na página 1de 22

# St.

## Francis Institute of Technology, Mumbai-400 103

A.Y. 2013-2014
Class: BE-ITA/ITB, Semester: VII
Subject: Digital Signal and Image Processing
Experiment 1: MATLAB Introduction and Plotting of Basic discrete
Signals.

Date: _________

## 1. Aim: Introduction to MATLAB and Plotting of Basic discrete Signals.

2. Requirements
PC with MatLab 7.8.0.347 (R2009a) version or above
3. Pre-Experiment Exercise
Familiarity with MATLAB and study of discrete time signals and their
classification
4. Laboratory Exercise
A) Procedure
(a)
Open new mfile.
(b)
Write a program code for displaying discrete time signals such as
(n), u(n), r(n),rising exponential and decreasing exponential.
(c)Use subplot to display the signals
(d)
Save mfile. Run it and observe the results
(e) Insert title, legends, x-label and y-label in each graph.
5. Post-Experiment Exercise
A) Theory
1) Elaborate on Discrete time signals and classify them
2) Write the mathematical definitions of signals studied in the lab
B) Observations:
Observe the plotted signals w. r. t. their mathematical
representations. Reflect on what is studied
C) Related Questions
1)

## Comment on why to use discrete time signals over analog signals?

Page | 1

1) Comment on what is performed and results obtained
2) List down the applications (if any) of the topic studied
_____________________________

Page | 2

## St. Francis Institute of Technology, Mumbai-400 103

A.Y. 2013-2014
Class: BE-ITA/ITB, Semester: VII
Subject: Digital Signal and Image Processing
Experiment 2: linear, circular, linear using circular convolution

Date:

_________

## 1. Aim: Program to implement Linear Convolution, Circular Convolution

and Linear Convolution using Circular Convolution.
2. Requirements
PC with MatLab 7.8.0.347 (R2009a) version or above
3. Pre-Experiment Exercise
Study of Discrete time systems and their classifications, Impulse
response and convolution
4. Laboratory Exercise
A) Procedure
(a)
(b)

## Open new mfile.

Write a program code for accepting 4 pt. 1D signal array from user
and calculate linear, circular, linear using circular and 2D convolution.
(c)
Accept user choices at the beginning of program such as
accept 0 to perform and display the result of linear convolution
accept 1 to perform and display the result of circular convolution
accept 2 to perform and display the result of linear using circular
convolution
(d)
(e)

## Plot the results of convolution

Save mfile, run the program, provide proper inputs and observe the
results.
B) Observations:
Observe the difference between the results of circular and linear
convolution. Reflect on what is studied

Page | 3

5. Post-Experiment Exercise
A) Theory
1) Define convolution
2) Solve the example for input signal entered by user. and tally
analytical results with your program output
B) Observations:
Observe the difference between the results of circular and linear
convolution. Reflect on what is studied.
C) Related Questions
1) What is the significance of circular convolution?
2) Prove that 2D convolution is separable
1)
2)

## Comment on what is performed and results obtained

List down the applications (if any) of the topic studied
_____________________________

## St. Francis Institute of Technology, Mumbai-400 103

Page | 4

A.Y. 2013-2014
Class: BE-ITA/ITB, Semester: VII
Subject: Digital Signal and Image Processing
Experiment 3: DFT and Inverse DFT
Date: _________

## 1. Aim: Program to find Discrete Fourier transform and inverse

Discrete Fourier transform.
2. Requirements
PC with MatLab 7.8.0.347 (R2009a) version or above
3. Pre-Experiment Exercise
Study of 1D/2D DFT and IDFT.
4. Laboratory Exercise
Procedure
(a) Open new mfile.
(b) Write a program code for accepting 4 pt. 1D signal array from user
to calculate 1D DFT (FFT function ) and to plot Magnitude and phase
spectrum of DFT
(c) Next accept two 1D, 4 pt. signal arrays from user to calculate 1D
IDFT (IFFT function ) and to plot Magnitude and phase spectrum of
IDFT
(d) Accept user choices at the beginning of program such as
accept 0 to perform and display the result of 1D DFT
accept 1 to perform and display the result of 1D IDFT
Save the mfile, run the program, provide proper inputs and
observe the results.
5. Post-Experiment Exercise
A) Theory
1) Define 1D, 2D DFT and state convolution property
2) Solve the example for input signal entered by user. and
tally analytical results with your program output
3) Comment the program code wherever necessary as per

Page | 5

B) Observations:
Observe the plot of 1D DFT and 1-D IDFT. And Reflect on what is
studied.
C) Related Questions
1) State and prove three properties of 1D DFT.
1) Comment on what is performed and results obtained
2) List down the applications (if any) of the topic studied
__________________________

Page | 6

## St. Francis Institute of Technology, Mumbai-400 103

A.Y. 2013-2014
Class: BE-ITA/ITB, Semester: VII
Subject: Digital Signal and Image Processing
Experiment 4: Linear filtering using FFT based overlap save method
Date: _________

## 1. Aim: Program to implement Linear filtering using FFT based overlap

save method.
2. Requirements
PC with MatLab 7.8.0.347 (R2009a) version or above
3. Pre-Experiment Exercise
Study of overlap save and overlap add methods of linear filtering of
longer signals study of convolution property of DFT x(n)*h(n) =
X(k).H(k)
4. Laboratory Exercise
Procedure
(a) Open new mfile.
(b) Write a program code for accepting two signals from user for
convolution of first longer 1D signal array with another shorter
signal array with 4 samples.
(c) Implement five steps of overlap save algorithm
(d) In step IV of algorithm, perform circular convolution of segmented
blocks of long input signal with shorter signal using FFT (use DFT
convolution property)
(e) Save mfile, run the program, provide proper inputs and observe the
results.
5. Post-Experiment Exercise
A) Theory
1) List down steps in the Overlap Save Algorithm for filtering
of long signals
2) Solve the example for input signals entered by user. and
tally analytical results with your program output
Page | 7

## 3) Comment the program code wherever necessary as per

B) Observations:
Observe the results obtained. Reflect on what is studied.
C) Related Questions
1) List down the steps in the Overlap Add Algorithm for
filtering of long signals
2) Solve the example taken in this experiment using OverlapAdd method and confirm that you get same results.
3) Differentiate between Overlap Add and Overlap Save
methods
1) Comment on what is performed and results obtained
2) List down the applications (if any) of the topic studied
__________________________

Page | 8

## St. Francis Institute of Technology, Mumbai-400 103

A.Y. 2013-2014
Class: BE-ITA/ITB, Semester: VII
Subject: Digital Signal and Image Processing
Experiment 5: Image Transforms (2D DFT and 2D DCT)
Date: _________

1. Aim: Program to find forward & inverse DFT and DCT of an Image.
2. Requirements
PC with MatLab 7.8.0.347 (R2009a) version or above
3. Pre-Experiment Exercise
Study of image transforms such as discrete fourier (DFT) and
discrete cosine (DCT) transform.
4. Laboratory Exercise
Procedure A]
(a) Open new mfile. and
(b) Write a program code to accept user choices at the beginning of
program such as
accept 0 to perform and display the result of 2D DFT
accept 1 to perform and display the result of 2D IDFT
accept 2 to perform and display the result of 2D DCT
accept 3 to perform and display the result of 2D IDCT
(c)
(d)
(e)
(f)
(g)

## Choose an image to implement DFT and DCT image transforms

Transform the given image using Discrete Cosine Transform (FFT2)
Set all the pixels less than threshold (assume value e.g. 50) to zero
Find inverse of transformed image using Matlab function IFFT2
Save the mfile, run the program, provide proper inputs and observe
the results.

Page | 9

B]
(a) Transform the image given in the part A of the experiment using
Discrete Cosine Transform (DCT2)
(b) Set all the pixels less than threshold (assume value e.g. 50) to zero
(c) Find inverse of transformed image using Matlab function IDCT2
(d) Display original image, transformed image and inverse transformed
image
(e) Save the mfile, run the program, provide proper inputs and observe
the results.
5. Post-Experiment Exercise
A) Theory
1) State Formulae of (1D/2D) DFT and DCT and also write
down 4 pt and 8 pt DFT and DCT matrices
2) Solve the example for input signal entered by user and tally
analytical results with your program output
3) Comment the program code wherever necessary as per
B) Observations:
Observe the images before and after the transforms
C) Related Questions
1) How Cosine transform is different from Fourier transform?
2) List down Properties of 2-D DFT and DCT.
1) Comment on what is performed and results obtained
2) List down the applications (if any) of the topic studied
__________________________

Page | 10

## St. Francis Institute of Technology, Mumbai-400 103

A.Y. 2013-2014
Class: BE-ITA/ITB, Semester: VII
Subject: Digital Signal and Image Processing
Experiment 6: Discrete Wavelet Transforms (DWT)
Date: _________

## 1. Aim: Program to perform 2-scale DWT of a sequence and also

perform forward & inverse DWT of an Image
2. Requirements
PC with MatLab 7.8.0.347 (R2009a) version or above
3. Pre-Experiment Exercise
Study of discrete wavelet transform (DCT) for 1-D sequence and 2-D
image. Study of Haar
transform
4. Laboratory Exercise
Procedure A]
(a) Open new mfile. and
(b) Write a program code to accept user choices at the beginning of
program such as
accept 0 to perform and display the result of 1D DWT
accept 1 to perform and display the result of 1D IDWT
accept 2 to perform and display the result of 1-Scale 2D DWT
accept 3 to perform and display the result of 2-Scale 2D DWT
accept 4 to perform and display the result of 2D IDWT
(c) Input an 4-pt sequence to implement discrete wavelet transforms
(d) Transform the given image using discrete wavelet transform (dwt)
(e) Find inverse of transformed sequence using Matlab function Idwt
Page | 11

(f) Save the mfile, run the program, provide proper inputs and observe
the results.

(a)
(b)
(c)
(d)
(e)
(f)

B]
Choose the image to implement Discrete Wavelet Transform
Find 1-scale DWT of an image using Matlab function (DWT2)
Find 2-scale DWT of an image again using Matlab function (DWT2)
Find inverse of transformed image using Matlab function IDWT2
Display original image, transformed image and inverse transformed
image
Save the mfile, run the program, provide proper inputs and observe
the results.

5. Post-Experiment Exercise
A) Theory
1) State Formulae of (1D/2D) DWT and also write down 4 pt
and 8 pt DWT matrices
2) Solve the example for input signal entered by user and tally
analytical results with your program output
4) Comment the program code wherever necessary as per
B) Observations:
Observe the Sequences and images before and after the
transforms
C) Related Questions
1) How Wavelet transform is different from other transform?
2) What is sub-band coding related to wavelet transform?
3) List down Properties of 2-D DWT.
1) Comment on what is performed and results obtained
2) List down the applications (if any) of the topic studied
__________________________

Page | 12

## St. Francis Institute of Technology, Mumbai-400 103

A.Y. 2013-2014
Class: BE-ITA/ITB, Semester: VII
Subject: Digital Signal and Image Processing
Experiment 7: Image Enhancement by Contrast stretching
method
Date: _________

## 1. Aim: Program to enhance image using contrast stretching.

2. Requirements
PC with MatLab 7.8.0.347 (R2009a) version or above
3. Pre-Experiment Exercise
Study of point processing techniques (contrast stretching algorithm)
for image enhancement
4. Laboratory Exercise
Procedure
(a) Open new mfile.
(b) Write a program code for accepting five variables from user viz.
lower threshold (a), upper threshold (b) and slopes used in algorithm
namely alpha, beta and gamma
(c) Choose the low contrast image e.g. Pout.tif, implement the contrast
stretching algorithm step by step
(d) Display the original image and contrast stretched image
(e) Save the mfile, run the program, provide proper inputs and observe
the results.
(f) Change the values of slopes and thresholds and see the difference
in the contrast.
5. Post-Experiment Exercise
Page | 13

A) Theory
1) With neat diagram derive the contrast stretch algorithm
2) Comment the program code wherever necessary as per

B) Observations:
Observe the results obtained. Reflect on what is studied.
C) Related Questions
1) What is a need of contrast stretching?
1) Comment on what is performed and results obtained
2) List down the applications (if any) of the topic studied
__________________________

Page | 14

## St. Francis Institute of Technology, Mumbai-400 103

A.Y. 2013-2014
Class: BE-ITA/ITB, Semester: VII
Subject: Digital Signal and Image Processing
Experiment 8: Various Image Enhancement operations
Date: _________

## 1. Aim: Program to implement image enhancement operations.

2. Requirements
PC with MatLab 7.8.0.347 (R2009a) version or above
3. Pre-Experiment Exercise
Study of Digital negative, Thresholding, Bit plane slicing and Median
filtering for image enhancement
4. Laboratory Exercise
Procedure
(a)
(b)
(c)

## Open new mfile.

Choose the low contrast image e.g. Pout.tif
Write a program code to accept user choices at the
beginning of program such as
accept 0 to perform and display the result of Digital negative
accept 1 to perform and display the result of Thresholding
accept 2 to perform and display the result of Bit plane

slicing
accept 3 to perform and display the result of Median filtering
(d)
Page | 15

(e)

## If choice 1 find out histogram of an image and then

perform Thresholding
(f)
If choice 2 find out Bit plane slicing of an image
(g)
If choice 3 add salt and pepper noise in an image and
remove that noise using Median filtering and recover original image
(h)
Display the original image and enhanced image.
(i)
Save the mfile, run the program, provide proper inputs
and observe the results.

5. Post-Experiment Exercise
A) Theory
1) Explain Digital negative, Thresholding, Bit plane slicing and
Median filtering with example
2) Comment the program code wherever necessary as per
B) Observations:
Observe the results obtained. Reflect on what is studied.
C) Related Questions
1) What is need of various image enhancement techniques?
1) Comment on what is performed and results obtained
2) List down the applications (if any) of the topic studied
__________________________

Page | 16

## St. Francis Institute of Technology, Mumbai-400 103

A.Y. 2013-2014
Class: BE-ITA/ITB, Semester: VII
Subject: Digital Signal and Image Processing
Experiment 9: Edge detection using Gradient Operators
Date: _________

## 1. Aim: Program to find edges using Prewitt, Sobel and Roberts

operators
2. Requirements
PC with MatLab 7.8.0.347 (R2009a) version or above
3. Pre-Experiment Exercise
Study of Image segmentation and edge detection techniques
4. Laboratory Exercise
Procedure
(a) Open new mfile.
(b) Choose the image Cameraman. tif
(c) Write a program code to convolve different masks such as
Ordinary, Roberts, Prewitts and Sobels
(d) Display the original image along with images showing
horizontal (x) edges, vertical (y) edges and both x-y
direction edges
(e) Save the mfile, run the program, provide proper inputs
and observe the results.
5. Post-Experiment Exercise
A) Theory

Page | 17

## 1) Derive the Gradient (ordinary) operator by taking first

derivative of an image.
2) List down all the masks used in the experiment
3) Comment the program code wherever necessary as per

B) Observations:
Observe the results obtained. Reflect on what is studied.
C) Related Questions
1) What is Edge linking? Why it is required?
1) Comment on what is performed and results obtained
2) List down the applications (if any) of the topic studied
__________________________

Page | 18

## St. Francis Institute of Technology, Mumbai-400 103

A.Y. 2013-2014
Class: BE-ITA/ITB, Semester: VII
Subject: Digital Signal and Image Processing
Experiment 10: Edge detection using Laplacian and LOG
method
Date: _________

## 1. Aim: Program to compare edge detection with Laplacian and

Laplacian of Gaussian [ LoG ] operators using global Thresholding.
2. Requirements
PC with MatLab 7.8.0.347 (R2009a) version or above
3. Pre-Experiment Exercise
Study of edge detection techniques using second derivative of
image Laplacian and Laplacian of Gaussian (LOG) method
4. Laboratory Exercise
Procedure
(a)
(b)
(c)

## Open new mfile.

Choose the image Cameraman.tif
Write a program code to detect edges using Edge matlab
inbuilt function for laplacian and Laplacian of Gaussian (LOG) filters
(d)
Use external threshold for above methods
(e)
Display the original image along with edge detected
images for both the methods
(f)
Save the mfile, run the program, provide proper inputs
and observe the results.
5. Post-Experiment Exercise
A) Theory
Page | 19

## 1) Explain how LOG mask is derived

2) Comment the program code wherever necessary as per

B) Observations:
Observe the results obtained. Reflect on what is studied.

C) Related Questions
1) Why Laplacian mask cannot be used in its original form?
1) Comment on what is performed and results obtained
2) List down the applications (if any) of the topic studied
__________________________

Page | 20

## St. Francis Institute of Technology, Mumbai-400 103

A.Y. 2013-2014
Class: BE-ITA/ITB, Semester: VII
Subject: Digital Signal and Image Processing
Experiment 11: Digital Watermarking and Steganography
Date: _________

## 1. Aim: Program to perform digital watermarking & Steganography.

2. Requirements
PC with MatLab 7.8.0.347 (R2009a) version or above
3. Pre-Experiment Exercise
Study of Applications of Image Processing such as
watermarking/Steganography
4. Laboratory Exercise
Procedure
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)

## Open new mfile.

Choose the carrier image and a secret (Message) image
Resize the secret image to fit in carrier image
Find 8 bit binary representation of each pixel of a carrier and secret
image
Replace LSB of carrier with MSB of secret image to get stego image
Display carrier, secret and stego image
Perform reverse operation to recover secret image from stego image
Save the mfile, run the program, provide proper inputs and observe
the results.

5. Post-Experiment Exercise
A) Theory
1) Explain the concept of Steganography
Page | 21

## 2) Comment the program code wherever necessary as per

B) Observations:
Observe the results obtained. Reflect on what is studied.

C) Related Questions
1) What is Watermarking? How it is related to steganography?