ENGINEERIN
Lab 7.docx

# Filter with 50 cutoff frequency filtered image filter

• Lab Report
• 8

This preview shows pages 7–8. Sign up to view the full content.

Filter with 50 cutoff Frequency Filtered Image Filter with 100 cutoff Frequency Filtered Image P OST -L AB T ASKS : T ASK -1: f = im2double(imread('coins.png')); subplot(2,2,1),imshow(f),title('Original Image'); PQ = paddedsize(size(f)); h=[0,1,0;1,-4,1;0,1,0]; H=ifftshift(freqz2(h,PQ(1),PQ(2))); subplot(2,2,2),imshow(h),title('Laplacian Mask'); F = fft2(f, size(H, 1), size(H, 2)); g = real(ifft2(H.*F)); g = g(1:size(f,1), 1:size(f,2)); subplot(2,2,3), imshow(g),title('Laplacian Filtered'); g1= f-g; subplot(2,2,4),imshow(g1),title('Sharpened Image'); function PQ = paddedsize(AB, CD, PARAM) if nargin == 1 PQ = 2*AB; elseif nargin == 2 & ~ischar(CD) PQ =AB + CD - 1; PQ = 2 * ceil(PQ / 2); elseif nargin == 2 m = max(AB); p = 2^nextpow2(2*m); PQ = [p, p]; elseif nargin == 3 m = max([AB CD]); p = 2^nextpow2(2*m);

This preview has intentionally blurred sections. Sign up to view the full version.

PQ = [p, p]; else error('Wrong number of inputs.'); end Output: Original Image Laplacian Mask Filtered Image Sharpened Image
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern