Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

2D Random Processes - Digital Signal Processing - Lab Handouts, Lecture notes of Digital Signal Processing

Main points of this handout are: 2d Random Processes, Spectral Estimation, Power Spectral Density of Image, Mesh Plot of Function, Matlab Function, Independent Random Numbers, Transfer Function, Command Image, Monochrome Colormap

Typology: Lecture notes

2012/2013

Uploaded on 05/18/2013

maazi
maazi 🇮🇳

4.4

(12)

77 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ECE-S490 Digital Image Processing
Laboratory 4
2D Random Processes and Spectral Estimation
1 Introduction
This laboratory explores the use of 2-D random process and spectral estimation techniques for
images. In section 2, you will estimate the power spectral density using the periodgram technique
and improve upon it using the Hamming window. In section 3, you will create a synthetic 2D AR
process and estimate its power spectral density using the improved periodgram technique and
compare the results with the analytical solution.
2 Power Spectral Density of an Image
1. Download the Matlab m-file SimpleSpecEst.m. and the gray scale image img5.tif. The m-file
estimates the power spectral density by computing the logarithm of the normalized energy
spectrum over a 64 x 64 window of the image. The comment lines in SimpleSpecEst.m explain
how the m-file operates.
2. Run SimpleSpecEst.m. The m-file will display the image img5g.tiff and show a meshplot of the
estimated log power spectral density. Print out the two figures.
3. Run SimpleSpecEst.m for 128 x 128 and 256 x 256 block sizes. Print out the log power
spectral density mesh plots for each case. Notice the spectral plots remain noisy even when the
block size is increased.
4. Write a Matlab function, BetterSpecEst(x), which computes a better estimate of the power
spectral density of the 2-D array x. Your new m-file should:
Use 25 nonoverlapping image windows of size 64 x 64. These windows should be
selected from the center of x.
Apply a 2-D separable Hamming window to each 64 x 64 window.
Compute the squared magnitude of the energy spectrum for each window.
Average the power spectral density of the 25 windows.
Display a mesh plot of the log of the estimated power spectral density.
5. Use BetterSpecEst(x) to compute the power spectral density of img5.tif, and print out your
result as a mesh plot of the log power spectral density.
Docsity.com
pf2

Partial preview of the text

Download 2D Random Processes - Digital Signal Processing - Lab Handouts and more Lecture notes Digital Signal Processing in PDF only on Docsity!

ECE-S490 Digital Image Processing

Laboratory 4

2D Random Processes and Spectral Estimation

1 Introduction

This laboratory explores the use of 2-D random process and spectral estimation techniques for images. In section 2, you will estimate the power spectral density using the periodgram technique and improve upon it using the Hamming window. In section 3, you will create a synthetic 2D AR process and estimate its power spectral density using the improved periodgram technique and compare the results with the analytical solution.

2 Power Spectral Density of an Image

  1. Download the Matlab m-file SimpleSpecEst.m. and the gray scale image img5.tif. The m-file estimates the power spectral density by computing the logarithm of the normalized energy spectrum over a 64 x 64 window of the image. The comment lines in SimpleSpecEst.m explain how the m-file operates.
  2. Run SimpleSpecEst.m. The m-file will display the image img5g.tiff and show a meshplot of the estimated log power spectral density. Print out the two figures.
  3. Run SimpleSpecEst.m for 128 x 128 and 256 x 256 block sizes. Print out the log power spectral density mesh plots for each case. Notice the spectral plots remain noisy even when the block size is increased.
  4. Write a Matlab function, BetterSpecEst(x), which computes a better estimate of the power spectral density of the 2-D array x. Your new m-file should:
    • Use 25 nonoverlapping image windows of size 64 x 64. These windows should be selected from the center of x.
    • Apply a 2-D separable Hamming window to each 64 x 64 window.
    • Compute the squared magnitude of the energy spectrum for each window.
    • Average the power spectral density of the 25 windows.
    • Display a mesh plot of the log of the estimated power spectral density.
  5. Use BetterSpecEst(x) to compute the power spectral density of img5.tif, and print out your result as a mesh plot of the log power spectral density.

Docsity.com

Section 2 Report: Hand in:

  1. The print out of the gray scale image img5.tif.
  2. The power spectral density plots for block sizes of 64 x 64, 128 x 128, and 256 x 256.
  3. The print out of the improved power spectral density estimate.
  4. Your BetterSpecEst.m m-file.

3 Power Spectral Density of a 2-D AR Process

In this problem, you will generate a synthetic 2-D AR process using Matlab, and you will analyze its power spectral density. In the steps below, you will be asked to display images, x, in the 8-bit range of 0 to 255. To do this in Matlab, first set a monochrome colormap with 256 levels using the command colormap(gray(256)), and then use the command image(x+1) to display x.

  1. Use the Matlab functions “rand” to generate x, a 512 x 512 image with independent random numbers each uniformly distributed on the interval [-0.5 0.5]. Display the image 255 * (x + 0:5) using Matlab.
  2. Filter the image x to produce the image y using an IIR filter with transfer function

H z z = − z − − z − + z − z −

  1. Display the image y + 127 using Matlab and print out the result.

4. Theoretically calculate S y ( e j ω^1 , ej ω^2 ), the power spectral density of y, plot log S y using mesh

and print out your result.

  1. Use BetterSpecEst(y), your Matlab function from the previous exercise, to estimate the power spectral density of y. Plot the estimated power spectral density and print out the result.

Section 3 Report: Hand in:

  1. A print out of the image 255 * (x + 0:5).
  2. A print out of the image y + 127.

3. A mesh plot of the function log Sy ( ej ω^1 , ej ω^2 )

  1. A mesh plot of the log of the estimated power spectral density of y using BetterSpecEst(y).

Docsity.com