Last active
November 25, 2022 16:03
-
-
Save bulentsiyah/aaf477b13d636672979dc18c2a5e8e2f to your computer and use it in GitHub Desktop.
Görüntü Filtreleme Uygulamaları ve Amaçları (Matlab) -- http://www.bulentsiyah.com/goruntu-filtreleme-uygulamalari-ve-amaclari-matlab/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Average Filtresi | |
ResimOrjinal=imread('FiltreOrnekResim.jpg'); %Resim Yüklendi. | |
ResimOrjinal=im2double(ResimOrjinal); %Double tipine çevrildi. | |
hAverageFiltresi=fspecial('average',3); %maske 3x3lük | |
averageFiltresi=imfilter(ResimOrjinal,hAverageFiltresi,'replicate'); | |
figure; | |
subplot(1,2,1); | |
imshow(ResimOrjinal); | |
title('Resmin Orjinal Hali'); | |
subplot(1,2,2); | |
imshow(averageFiltresi,[]); | |
title('Average Filtresi'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Blurring Filtresi | |
ResimOrjinal = imread('moon.tif') ; | |
hBlurringFiltresi = fspecial('disk',10); | |
blurred = imfilter(ResimOrjinal,hBlurringFiltresi); | |
figure; | |
subplot(1,2,1); | |
imshow(ResimOrjinal); | |
title('Resmin Orjinal Hali'); | |
subplot(1,2,2); | |
imshow(blurred); | |
title('Blurring Filtresi'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Gaussian Filtresi | |
ResimOrjinal=imread('FiltreOrnekResim.jpg'); %Resim Yüklendi. | |
ResimOrjinal=im2double(ResimOrjinal); %Double tipine çevrildi. | |
hGaussionFiltresi=fspecial('gaussian',3,2); %maske 3x3lük | |
gaussianFiltresi=imfilter(ResimOrjinal,hGaussionFiltresi,'replicate'); | |
figure; | |
subplot(1,2,1); | |
imshow(ResimOrjinal); | |
title('Resmin Orjinal Hali'); | |
subplot(1,2,2); | |
imshow(gaussianFiltresi,[]); | |
title('Gaussion Filtresi'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Medyan Filtresi | |
ResimOrjinal=imread('eight.tif'); | |
tuzBiber=imnoise(ResimOrjinal,'salt & pepper',0.02); % tuz ve biber gürültüsü ekle | |
medyanFiltresi=medfilt2(tuzBiber); | |
figure; | |
subplot(1,2,1); | |
imshow(tuzBiber); | |
title('Resmin Tuz ve Biber Gürültülü Hali'); | |
subplot(1,2,2); | |
imshow(medyanFiltresi); | |
title('Medyan Filtresi'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Motion Filtesi | |
ResimOrjinal = imread('moon.tif') ; | |
hResimOrjinal = fspecial('motion', 50, 45) ; | |
motionBlurFiltresi = imfilter(ResimOrjinal, hResimOrjinal) ; | |
figure; | |
subplot(1,2,1); | |
imshow(ResimOrjinal); | |
title('Resmin Orjinal Hali'); | |
subplot(1,2,2); | |
imshow(motionBlurFiltresi); | |
title('Motion Filtesi'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Unsharp Filtresi | |
ResimOrjinal = imread('moon.tif'); | |
hUnsharpFiltresi = fspecial('unsharp'); | |
unsharpFiltresi = imfilter(ResimOrjinal, hUnsharpFiltresi); | |
figure; | |
subplot(1,2,1); | |
imshow(ResimOrjinal); | |
title('Resmin Orjinal Hali'); | |
subplot(1,2,2); | |
imshow(unsharpFiltresi); | |
title('Unsharp Filtresi'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment