(mask as 3-D and 2-D plots)neeed help plz as soon

1 次查看(过去 30 天)
Consider the following mask:
H=
[ 0 -1 0
-1 5 -1
0 -1 0]
<<(A)--Find and plot the frequency domain response of the mask as 3-D and 2-D plots. What is the effect of zero padding? Is the response low pass, high pass or band pass function?
<<(B)--Apply this mask to the house image or (any image) from your text book. Does it produce the effect you deduced in part (a)?
  2 个评论
Walter Roberson
Walter Roberson 2011-12-17
This forum is for MATLAB technical questions, not for people to do homework for you.
ahmad
ahmad 2011-12-17
tnx for ur reply in fact im new in this pro cuz that need some hint to resolvin same Q

请先登录,再进行评论。

回答(5 个)

Image Analyst
Image Analyst 2011-12-17
Some tips: You can tell if it's a high pass or high boost filter by seeing if there are negative weights in your kernel. If there are a lot of negative weights, it's a high pass filter. Because the sum of the weights adds to 1, you will have the same average gray level as your original image. A high pass filter would have 4 at the center, and the mean of that image would have been zero because the sum would have been zero. But you have an extra 1 in the center which means you're adding the original image back in. So you don't have any of the three options offered to you. What you have is a high boost filter. You're passing all frequencies and even amplifying the higher frequencies.
Of course the answer to B would be Yes since I'm familiar with filters and I know what to expect. I would not be surprised at the result at all.
I'll leave plotting the frequency response to you. Hint: fft2(), plot(), surf().
  3 个评论
ahmad
ahmad 2011-12-17
where can find this Hint: fft2(), plot(), surf().
Walter Roberson
Walter Roberson 2011-12-17
fft2: http://www.mathworks.com/help/techdoc/ref/fft2.html
plot: http://www.mathworks.com/help/techdoc/ref/plot.html
surf: http://www.mathworks.com/help/techdoc/ref/surf.html

请先登录,再进行评论。


toot
toot 2011-12-18
thanks alot :Image Analyst for this answre but i have a question: how we can make "zero padding" on mask ? and the question "apply the mask on image" how this will be done ? do we use con2 function? or what ? thanks again
  1 个评论
Walter Roberson
Walter Roberson 2011-12-18
padded_H = zeros(9,9);
padded_H(2:1+size(H,1), 6:1+size(H,2)) = H;
The above inserts H into padded_H starting at (2,6) and progressing down and to the right.
Yes, you can use conv2(). You could also use filter2() but that will just end up calling conv2() anyhow.

请先登录,再进行评论。


toot
toot 2011-12-19
ok I will try it, thanks alot but I want to be sure about somthing Zero padding when we make it on mask, it will display a black border over the mask is this will be the same in this mask with a "center 5"? thanks agin

Jessica
Jessica 2011-12-19
will we need to use freqz2() method to find the frequency?? and what do I use fft2() method for? plot is for 2-d and surf is for 3-d what is fft2? please can you guys help us, we are not even taking a matlab course, its image processing course and we didnt take any matlab and we dont have any resources or tutorials. please help us in this question. Thank you <3

Jessica
Jessica 2011-12-19
and also for applying the mask on the image, do we use imfilter() and give the image and mask as arguments?

类别

Help CenterFile Exchange 中查找有关 Fourier Analysis and Filtering 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by