D3
|
@ -17,9 +17,9 @@ ima_g=ima(:,:,2);
|
||||||
ima_b=ima(:,:,3);
|
ima_b=ima(:,:,3);
|
||||||
|
|
||||||
%Affichage d'un niveau de couleur de l'image
|
%Affichage d'un niveau de couleur de l'image
|
||||||
figure('name','R','numbertitle','off');imagesc(ima_r);colormap gray %Niveau de rouge
|
% figure('name','R','numbertitle','off');imagesc(ima_r);colormap gray %Niveau de rouge
|
||||||
figure('name','G','numbertitle','off');imagesc(ima_g);colormap gray %Niveau de vert
|
% figure('name','G','numbertitle','off');imagesc(ima_g);colormap gray %Niveau de vert
|
||||||
figure('name','B','numbertitle','off');imagesc(ima_b);colormap gray %Niveau de bleu
|
% figure('name','B','numbertitle','off');imagesc(ima_b);colormap gray %Niveau de bleu
|
||||||
|
|
||||||
%Taille d'une image
|
%Taille d'une image
|
||||||
taille=size(ima);
|
taille=size(ima);
|
||||||
|
@ -30,28 +30,27 @@ display(taille);
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
%tic toc pour mesurer le temps de calcul
|
%tic toc pour mesurer le temps de calcul
|
||||||
disp("Seuil :");
|
disp("Seuil :");
|
||||||
tic;
|
|
||||||
|
|
||||||
|
tic;
|
||||||
ima_out=ima;
|
ima_out=ima;
|
||||||
|
|
||||||
nr = ima_r./sqrt(ima_r.^2 + ima_b.^2 + ima_g.^2);
|
nr = ima_r./sqrt(ima_r.^2 + ima_b.^2 + ima_g.^2);
|
||||||
|
|
||||||
ima_seuil = ima.*(nr>0.7);
|
ima_seuil = ima.*(nr>0.7);
|
||||||
toc;
|
% toc;
|
||||||
figure('name','RGB out','numbertitle','off');image(ima_seuil);
|
% figure('name','RGB out','numbertitle','off');image(ima_seuil);
|
||||||
|
|
||||||
disp("Jaune :")
|
% disp("Jaune :")
|
||||||
tic;
|
% tic;
|
||||||
ima_jaune = ima_seuil;
|
ima_jaune = ima_seuil;
|
||||||
ima_jaune(:,:,2) = ima_seuil(:,:,1);
|
ima_jaune(:,:,2) = ima_seuil(:,:,1);
|
||||||
toc;
|
% toc;
|
||||||
figure('name','RGB out','numbertitle','off');image(ima_jaune);
|
% figure('name','RGB out','numbertitle','off');image(ima_jaune);
|
||||||
|
|
||||||
disp("Reinsertion dans l'image :")
|
% disp("Reinsertion dans l'image :")
|
||||||
tic;
|
% tic;
|
||||||
ima_out = ima - ima_seuil + ima_jaune;
|
ima_out = ima - ima_seuil + ima_jaune;
|
||||||
figure('name','RGB out','numbertitle','off');image(ima_out);
|
|
||||||
toc;
|
toc;
|
||||||
|
figure('name','RGB out','numbertitle','off');image(ima_out);
|
||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ ima=single(imread('../Image/ferrari.jpg'));
|
||||||
ima=ima./255;
|
ima=ima./255;
|
||||||
|
|
||||||
%Affichage d'une image couleur avec image
|
%Affichage d'une image couleur avec image
|
||||||
figure('name','RGB in','numbertitle','off');image(ima);
|
% figure('name','RGB in','numbertitle','off');image(ima);
|
||||||
|
|
||||||
|
|
||||||
%Taille d'une image
|
%Taille d'une image
|
||||||
|
@ -17,9 +17,9 @@ ima_g=ima(:,:,2);
|
||||||
ima_b=ima(:,:,3);
|
ima_b=ima(:,:,3);
|
||||||
|
|
||||||
%Affichage d'un niveau de couleur de l'image
|
%Affichage d'un niveau de couleur de l'image
|
||||||
figure('name','R','numbertitle','off');imagesc(ima_r);colormap gray %Niveau de rouge
|
% figure('name','R','numbertitle','off');imagesc(ima_r);colormap gray %Niveau de rouge
|
||||||
figure('name','G','numbertitle','off');imagesc(ima_g);colormap gray %Niveau de vert
|
% figure('name','G','numbertitle','off');imagesc(ima_g);colormap gray %Niveau de vert
|
||||||
figure('name','B','numbertitle','off');imagesc(ima_b);colormap gray %Niveau de bleu
|
% figure('name','B','numbertitle','off');imagesc(ima_b);colormap gray %Niveau de bleu
|
||||||
|
|
||||||
%Taille d'une image
|
%Taille d'une image
|
||||||
taille=size(ima);
|
taille=size(ima);
|
||||||
|
@ -53,7 +53,7 @@ end
|
||||||
toc;
|
toc;
|
||||||
|
|
||||||
|
|
||||||
figure('name','ratio rouge','numbertitle','off');imagesc(nr);colormap gray %Niveau de rouge
|
% figure('name','ratio rouge','numbertitle','off');imagesc(nr);colormap gray %Niveau de rouge
|
||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
|
@ -89,11 +89,11 @@ image_tmp=ima_g;
|
||||||
image_tmp(image_test)=ima_r(image_test);
|
image_tmp(image_test)=ima_r(image_test);
|
||||||
ima_out_v3(:,:,2)=image_tmp();
|
ima_out_v3(:,:,2)=image_tmp();
|
||||||
toc;
|
toc;
|
||||||
figure('name','test','numbertitle','off');imagesc(image_test);colormap gray %Niveau de rouge
|
% figure('name','test','numbertitle','off');imagesc(image_test);colormap gray %Niveau de rouge
|
||||||
|
|
||||||
figure('name','RGB out version 1','numbertitle','off');image(ima_out_v1);
|
% figure('name','RGB out version 1','numbertitle','off');image(ima_out_v1);
|
||||||
figure('name','RGB out version 2','numbertitle','off');image(ima_out_v2);
|
% figure('name','RGB out version 2','numbertitle','off');image(ima_out_v2);
|
||||||
figure('name','RGB out version 3','numbertitle','off');image(ima_out_v3);
|
% figure('name','RGB out version 3','numbertitle','off');image(ima_out_v3);
|
||||||
|
|
||||||
%Sauvegarde d'une image au format jpg
|
%Sauvegarde d'une image au format jpg
|
||||||
imwrite(ima_out_v1,'../Image/ferrari_out_v1.jpg','jpg');
|
imwrite(ima_out_v1,'../Image/ferrari_out_v1.jpg','jpg');
|
||||||
|
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 98 KiB |
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 100 KiB |
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 103 KiB |
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 109 KiB |
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 104 KiB |
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 106 KiB |
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 106 KiB |
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 106 KiB |
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 105 KiB |
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 106 KiB |
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 96 KiB |
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 77 KiB |
BIN
D3/TP/TP_SETI_MLP/mlp_pred.png
Normal file
After Width: | Height: | Size: 245 KiB |
BIN
D3/TP/TP_SETI_MLP/mlp_test.png
Normal file
After Width: | Height: | Size: 248 KiB |