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

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

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일

1 개 추천

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일
thank you so much
ahmad
ahmad 2011년 12월 17일
where can find this Hint: fft2(), plot(), surf().
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일

0 개 추천

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

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일

0 개 추천

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일

0 개 추천

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

댓글 수: 1

http://www.mathworks.com/matlabcentral/answers/8026-best-way-s-to-master-matlab

댓글을 달려면 로그인하십시오.

Jessica
Jessica 2011년 12월 19일

0 개 추천

and also for applying the mask on the image, do we use imfilter() and give the image and mask as arguments?

카테고리

도움말 센터File Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기

태그

질문:

2011년 12월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by