Unformatted text preview:

University of California, Berkeley College of Engineering Department of Electrical Engineering and Computer Sciences Prof. A. Zakhor Spring 2006 EE225b – Digital Image Processing Lab Assignment #1 – Phase-only image reconstruction Overview: In this assignment, you explore the possibility of reconstructing an image from its Fourier transform phase. Assignment specifics: On the class website, there is a file Phase.dat which contains samples of the phase information of an image, stored in matrix form. The original image was 96 pixels wide and 64 pixels tall. The phase matrix contains 192 by 128 evenly spaced complex-valued samples of the discrete space Fourier transform (DSFT). The magnitude of each sample is normalized to one. (1,1) of the matrix corresponds to 0xω= and 0yω= (,)row col corresponds to 2( 1)/xcol widthωπ=− and 2 ( 1)/yrow heightωπ=− Remember, in MATLAB, indices start with 1 and the row value (y) is listed before the column value (x). Implement the phase-only reconstruction algorithm described in Figure 1.30 of the textbook, and do your best to reconstruct the original image. The algorithm in the book is described in terms of the DSFT and continuous ,xyωω. In this lab you are working with samples of the DSFT, and 2-D discrete Fourier transforms (2D-DFT). Recall the relationship between the DTFT and the DFT. Would it have been possible to do this lab with just 96 by 64 samples of the phase? The iterative procedure requires an initial guess. How does your initial guess affect the algorithm? What did you choose for an initial guess? Why? The iterative procedure also requires a termination condition. The algorithm in the book requires the phase of the reconstructed image to be equal to the phase given to you. This is not entirely practical from a implementation point of view. What termination criterion did you choose? Why? On the class website, there is another file Magnitude.dat which contains samples of the DSFT of a different image, with the phase information removed. Modify the iterative procedure to do magnitude-only reconstruction, and test it on this file. How well does it work? Note there is a test.bmp file on the website as well. This is a test bench for you to check your algorithm. You don’t have to submit the result of that picture. Note the dimension of that picture is different from the question itself. Please submit a written lab writeup in class on the due date. Also please submit all your Matlab .m files and a bitmap (bmp) of your final reconstructed image, via email to [email protected]. Email submissions must be received before class on the due date. There should be an executable Matlab script Lab1.m which will generate all your results.University of California, Berkeley College of Engineering Department of Electrical Engineering and Computer Sciences Here are some helpful Matlab commands: X = fft2(x) Computes the 2D-DFT of the matrix x x = ifft2(X) Computes the inverse 2D-DFT of the matrix X I = uint8(x) I is a matrix of integers ranging from 0..255 imshow(I) Displays I as a grayscale image in the current figure I = imread(‘small.bmp’, ‘bmp’) Reads the image file small.bmp and stores it in matrix I imwrite(I, ‘result.bmp’, ‘bmp’) Writes the matrix I to the image file result.bmp stuff = load(‘Phase.dat’, ‘-mat’) Loads the contents of Phase.dat stored in matrix format into the structure stuff stuff.ImagePhase Access the ImagePhase matrix stored in


View Full Document

Berkeley ELENG 225B - Phase-only image reconstruction

Download Phase-only image reconstruction
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Phase-only image reconstruction and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Phase-only image reconstruction 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?