Pastebin
Retrouvez, créez et partagez vos snippets en temps réel.
Rechercher un Pastebin
Aucun paste trouvé.
Créer un paste
Pastebin
Blog
ezrzerzerze
clc; close all; clear all; figure(1) I = im2double(imread("ULCO.png")); imshow(I); title('Loaded Image'); J = imnoise(I, 'salt & pepper', 0.05); %Display the noisy image figure(2); imshow(J); title('Noisy Image'); % % clc; close all; clear all; % Charger l'image I = im2double(imread("ULCO.PNG")); % Figure 1 : Affichage RGB et canaux séparés figure(1) colors = ["Rouge", "Vert", "Bleu"]; for i=0:3 subplot(2,2,i+1) if i==0 imshow(I); title("Image RGB") else imshow(I(:,:,i)); title(colors(i)) end end %% Figure 2 : Filtrage figure(2) % Image originale subplot(2,2,1) imshow(I); title("Image originale") % Filtrage moyenneur h_moy = fspecial('average',[5,5]); I_moy = imfilter(I, h_moy); subplot(2,2,2) imshow(I_moy) title("Filtrage moyenneur") % Filtrage gaussien h_gauss = fspecial('gaussian',[5,5], 1); I_gaus = imfilter(I, h_gauss); subplot(2,2,3) imshow(I_gaus) title("Filtrage gaussien") % Filtrage médian I_median = medfilt3(I, [5 5 1]); subplot(2,2,4) imshow(I_median) title("Filtrage médian")
Créé il y a 1 mois.