This commit is contained in:
higepi 2022-12-11 12:19:03 +01:00
parent e36a125f44
commit bf1cb09aeb
19 changed files with 788 additions and 237 deletions

View file

@ -17,9 +17,9 @@ ima_g=ima(:,:,2);
ima_b=ima(:,:,3);
%Affichage d'un niveau de couleur de l'image
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','B','numbertitle','off');imagesc(ima_b);colormap gray %Niveau de bleu
% 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','B','numbertitle','off');imagesc(ima_b);colormap gray %Niveau de bleu
%Taille d'une image
taille=size(ima);
@ -30,28 +30,27 @@ display(taille);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%tic toc pour mesurer le temps de calcul
disp("Seuil :");
tic;
tic;
ima_out=ima;
nr = ima_r./sqrt(ima_r.^2 + ima_b.^2 + ima_g.^2);
ima_seuil = ima.*(nr>0.7);
toc;
figure('name','RGB out','numbertitle','off');image(ima_seuil);
% toc;
% figure('name','RGB out','numbertitle','off');image(ima_seuil);
disp("Jaune :")
tic;
% disp("Jaune :")
% tic;
ima_jaune = ima_seuil;
ima_jaune(:,:,2) = ima_seuil(:,:,1);
toc;
figure('name','RGB out','numbertitle','off');image(ima_jaune);
% toc;
% figure('name','RGB out','numbertitle','off');image(ima_jaune);
disp("Reinsertion dans l'image :")
tic;
% disp("Reinsertion dans l'image :")
% tic;
ima_out = ima - ima_seuil + ima_jaune;
figure('name','RGB out','numbertitle','off');image(ima_out);
toc;
figure('name','RGB out','numbertitle','off');image(ima_out);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

View file

@ -5,7 +5,7 @@ ima=single(imread('../Image/ferrari.jpg'));
ima=ima./255;
%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
@ -17,9 +17,9 @@ ima_g=ima(:,:,2);
ima_b=ima(:,:,3);
%Affichage d'un niveau de couleur de l'image
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','B','numbertitle','off');imagesc(ima_b);colormap gray %Niveau de bleu
% 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','B','numbertitle','off');imagesc(ima_b);colormap gray %Niveau de bleu
%Taille d'une image
taille=size(ima);
@ -53,7 +53,7 @@ end
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);
ima_out_v3(:,:,2)=image_tmp();
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 2','numbertitle','off');image(ima_out_v2);
figure('name','RGB out version 3','numbertitle','off');image(ima_out_v3);
% 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 3','numbertitle','off');image(ima_out_v3);
%Sauvegarde d'une image au format jpg
imwrite(ima_out_v1,'../Image/ferrari_out_v1.jpg','jpg');

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 77 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB