1) Find online a jpg image of something with some object edges with reasonable contrast. Read that image via your MATLAB program. Select a 128 × 128 square subimage I(j,k). This subimage and the 128 × 128 diagonal edge image you produced in the derivative assignment will be the two images on which you operate in this assignment. Display both images.
The AmpPhaseDFT and ReconfromAmpPhase MATLAB functions provided on SAKAI with assignment 3 will be used in this assignment. The amplitude and phase arrays produced by AmpPhaseDFT and those used as input to ReconfromAmpPhase are each 65 × 128 arrays. In these arrays the j,kth element corresponds to frequency (j-1)/128 in the vertical direction. The horizontal direction is more complicated. For k between 1 and 65 inclusive, the frequency is (k-1)/128. For k between 66 and 128 inclusive, the frequency is the negative number (k-129)/128.

2) The objective of this assignment is to see how the Laplacian of Gaussian operator produces zero crossings at edges in an image and to see how the width (standard deviation 𝜎) of the Gaussian affects the edges that are found. In this part you must compute the value of the filter at each discrete frequency that appears in the amplitude and phase outputs of AmpPhaseDFT. Write down the formula for the filter value for index j,k and for Gaussian width 𝜎; give this formula while ignoring the minus sign and any multipliers constant in frequency (the 2𝜋 multiplier in the expression for the FT of the Laplacian, the 2𝜋𝜎2 multiplier in front of the FT of the Gaussian, and the constant multiplying the exponential in
the formula for the Gaussian). Compute this filter array in j,k. Display part of this array as a 65 × 65 image with j and k running from 1 to 65.

3) For each of your two input images and for two values of a discussed below, apply AmpPhaseDFT to your input image, and apply your filter on the magnitude output of the result. State what operation this filter application takes. You will have produced the magnitude output of the frequency domain result, namely the Laplacian of Gaussian applied to your input. Because the kernel is real and symmetric in both x and y, its application in the frequency domain does not change the phase. The 𝜎 values you should use are 2 pixels (𝜎 =2) and 5 pixels (𝜎 =2).

4) For each of the four results in the frequency domain (two values of 𝜎 x two input images) apply ReconfromAmpPhase to the pair of arrays whose magnitude is the frequency domain result you computed and whose phase is the same as that produced by AmpPhaseDFT. Display these four images.

5) For each of the four images from part 4 you want to display those that correspond to a zero crossing. To do that, for each pixel in that image first test if that pixel's intensity is adequately far away from 0.0 (I tested whether its magnitude was less than 10E-7). If not, set the zero crossing result image pixel's value to (or leave it at) zero. For the remaining pixels, you should test whether it has any (horizontal, vertical, or diagonal) some neighbor pixels with intensity with opposite sign (not zero) from that of the pixel in question. If it has such neighbors set the intensity to 1000 in the zero-crossing image, and if it does not, set the intensity to 0 in the zero crossing image. Display the four zero-crossing images.

6) In your report discuss what you have seen. How well do the zero crossings characterize the edges in the original image: are there breaks? are the edges displaced from where they should be? How do these properties change with the value of 𝜎? Try to explain any of the behavior you have seen.

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

function [ mag_out, phase_out ] = AmpPhaseDFT( inputimage )
    X = inputimage;
    [nRow, nCol, nDim] = size( X );
    if nDim ~= 1
       error('input image is not grayscale')      
    if nRow ~= 128 || nCol ~= 128
       warning('input image is not 128x128')      
       X = imresize( X, [128, 128] );
       nRow = 128;
       nCol = 128;
    if ~isa(X,'double')
       warning('input image is not double precision')
       X = im2double( X );...

By purchasing this solution you'll be able to access the following files:
AmpPhaseDFT.m, imageprocessing.m, ReconfromAmpPhase.m and Tiger.jpg.

for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Image Processing Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Upload a file
Continue without uploading

We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats