laboratory of image processing
DESCRIPTION
Laboratory of Image Processing. Pier Luigi Mazzeo [email protected] July 23, 2014. Filtering. Neighbourhood processing. Mean. Filtering in MatLab. filter2. f ilter2 (cont.). fspecial ( low pass filters ). - PowerPoint PPT PresentationTRANSCRIPT
![Page 2: Laboratory of Image Processing](https://reader034.vdocuments.net/reader034/viewer/2022050908/56813dd0550346895da79952/html5/thumbnails/2.jpg)
Filtering
![Page 3: Laboratory of Image Processing](https://reader034.vdocuments.net/reader034/viewer/2022050908/56813dd0550346895da79952/html5/thumbnails/3.jpg)
Neighbourhood processing
![Page 4: Laboratory of Image Processing](https://reader034.vdocuments.net/reader034/viewer/2022050908/56813dd0550346895da79952/html5/thumbnails/4.jpg)
Mean
![Page 5: Laboratory of Image Processing](https://reader034.vdocuments.net/reader034/viewer/2022050908/56813dd0550346895da79952/html5/thumbnails/5.jpg)
Filtering in MatLab
![Page 6: Laboratory of Image Processing](https://reader034.vdocuments.net/reader034/viewer/2022050908/56813dd0550346895da79952/html5/thumbnails/6.jpg)
filter2
![Page 7: Laboratory of Image Processing](https://reader034.vdocuments.net/reader034/viewer/2022050908/56813dd0550346895da79952/html5/thumbnails/7.jpg)
filter2 (cont.)
![Page 8: Laboratory of Image Processing](https://reader034.vdocuments.net/reader034/viewer/2022050908/56813dd0550346895da79952/html5/thumbnails/8.jpg)
fspecial (low pass filters)
Produce an Average filtering image using 9x9 filter and a 25x25 filter
![Page 9: Laboratory of Image Processing](https://reader034.vdocuments.net/reader034/viewer/2022050908/56813dd0550346895da79952/html5/thumbnails/9.jpg)
>> hsize = 10;>> sigma = 5;>> h = fspecial(‘gaussian’ hsize, sigma);
>> mesh(h);
>> imagesc(h);
>> outim = imfilter(c, h);>> imshow(outim);
fspecial (low pass filters)
![Page 10: Laboratory of Image Processing](https://reader034.vdocuments.net/reader034/viewer/2022050908/56813dd0550346895da79952/html5/thumbnails/10.jpg)
for sigma=1:3:10 h = fspecial('gaussian‘, fsize, sigma);out = imfilter(c, h); imshow(out);pause;
end
fspecial (low pass filters)
![Page 11: Laboratory of Image Processing](https://reader034.vdocuments.net/reader034/viewer/2022050908/56813dd0550346895da79952/html5/thumbnails/11.jpg)
>> noise = randn(size(c)).*sigma;
>> output = c+ noise;
Noise
Periodic noise
![Page 12: Laboratory of Image Processing](https://reader034.vdocuments.net/reader034/viewer/2022050908/56813dd0550346895da79952/html5/thumbnails/12.jpg)
Cleaning salt and pepper noise
![Page 13: Laboratory of Image Processing](https://reader034.vdocuments.net/reader034/viewer/2022050908/56813dd0550346895da79952/html5/thumbnails/13.jpg)
fspecial (high pass filters)
![Page 14: Laboratory of Image Processing](https://reader034.vdocuments.net/reader034/viewer/2022050908/56813dd0550346895da79952/html5/thumbnails/14.jpg)
fspecial (high pass filters)
![Page 15: Laboratory of Image Processing](https://reader034.vdocuments.net/reader034/viewer/2022050908/56813dd0550346895da79952/html5/thumbnails/15.jpg)
Unsharp masking
Find the image ‘pelicans.tif’ from internet and use u filter
>> My = fspecial(‘sobel’);>> outim = imfilter(double(c), My); >> imagesc(outim);>> colormap gray;
![Page 16: Laboratory of Image Processing](https://reader034.vdocuments.net/reader034/viewer/2022050908/56813dd0550346895da79952/html5/thumbnails/16.jpg)
Canny edge detectorMATLAB: edge(c, ‘canny’);>>help edge
I = imread('circuit.tif'); BW1 = edge(I,'prewitt'); BW2 = edge(I,'canny'); figure, imshow(BW1) figure, imshow(BW2)