

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


E. Phase Retrieval You can input your jpeg images using the following code: A_bmp=double(imread(‘example.jpg’)); % load example.jpg image Ar=A_bmp(:,:,1); Ag=A_bmp(:,:,2); Ab=A_bmp(:,:,3); Since the image is black and white we can just use one of the color components. For example, just use Ar. Also, since the modulation of each carrier varies in the vertical direction, if you were to cut a row out and process for peaks, at least one of the carriers may not be present. In this specific application, we can get an averaged carrier energy by taking the 2-D DFT of the Ar image. Then by selecting out the first row, we can see the approximate average energy distribution between the carriers. From this we can estimate our bandpass filter center positions and cutoffs.
STEP 4: Give the Np patterns, each is still mixed with the carrier image, we can remove the carrier and recover the baseband by elementwise squaring, followed by lowpass filtering, suppression of dc, followed by a elementwise square root. This is done by a row by row operation. The result are the cosine patterns deweighted by the optical roll off of the system as found in step 2. Assume the cosine pattern associate with the lowest frequency carrier is weighted correctly, normalize the other patterns to have the same peak to peak by dividing their energy weights, found in step 2, by the energy of the first pattern. Then take the resulting normalized weights and elementwise divide them into their respective patterns. This is known as deconvolution. STEP 5: With all Np demodulated normalized images, the phase is retrieved by
p p N n PMPn p N n PMPn p
1 , 1 ,
Plot the demodulate, normalized images and plot the resulting phase image for the background and the target image. Use the center frequencies and deconvolution weights found from the background image to process the target image.