1 / 5

Salt and pepper noise

Salt and pepper noise. tw=imread('twins.tif'); t=rgb2gray(tw); t_sp=imnoise(t, 'salt & pepper ‘ , 0.1 );. Low-pass filtering. a3=fspecial('average'); t_sp_a3=filter2(a3,t_sp);. Ex#1. Try 7x7 averaging filter and 3x3 median filter ( medfilt2 ). Gaussian noise.

fuller
Download Presentation

Salt and pepper noise

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Salt and pepper noise tw=imread('twins.tif'); t=rgb2gray(tw); t_sp=imnoise(t, 'salt & pepper‘, 0.1); Low-pass filtering a3=fspecial('average'); t_sp_a3=filter2(a3,t_sp); Ex#1. Try 7x7 averaging filter and 3x3 median filter (medfilt2)

  2. Gaussian noise t_ga=imnoise(t, 'gaussian'); % default: mean=0, var=0.01 Ex#2: image averaging For the twin image, generate 10 Gaussian noisy images. Then take a the average of them. Ex#3: average filter Try 3x3 and 5x5 average filter to the t_ga noisy image

  3. Periodic noise [x,y]=meshgrid(1:size(t,1), 1:size(t,2)); p=sin(x+y/1.5)+1; t_pn=(double(t)/128+p)/4; Ex#4. Show the DFT of t_pn

  4. Band reject filtering z=sqrt((x-129).^2+(y-129).^2); br=(z<47 | z>51); tbr=T.*br; imshow(log(1+abs(tbr)), []) Ex#5. (a) perform iDFT to tbr. Show the restored image. (b) Notch filtering: perform notch filtering as the image on the right. Show the restored image.

  5. Inverse filtering bc=imread('board.tif'); bg=im2uint8(rgb2gray(bc)); b=bg(100:355, 50:305); imshow(b) m=fspecial('motion', 7, 0); bm=imfilter(b,m); imshow(bm); m2(1,1:7)=m; mf=fft2(m2); bmi=ifft2(fft2(double(bm))./mf); imshow(abs(bmi), []) Ex#6. Limit the division. Such that no division when mf(i,j) < 0.02;

More Related