25 lines
687 B
Matlab
25 lines
687 B
Matlab
% Aymeric Arnould, Tom Colinot
|
|
% TP3
|
|
% Codage INTRA (3/3)
|
|
% Question 8 - Qualité visuelle (INTRA) pour différentes valeurs du débit
|
|
|
|
clear all;
|
|
|
|
gamma=[0.1 1 3 5]; %Pas de quantification
|
|
|
|
file = fopen('Foreman.qcif','r');
|
|
[compY,~,~]=yuv_readimage(file,'qcif');
|
|
|
|
figure(1)
|
|
subplot(2,length(gamma)+1,1); imagesc(compY); title('Image non compressee');
|
|
|
|
colormap(gray)
|
|
|
|
for k=1:size(gamma,2)
|
|
g=gamma(k);
|
|
[Yc,~,bpp] = encodeINTRA(compY,g);
|
|
d=bpp*size(compY,1)*size(compY,2)*15;
|
|
|
|
subplot(2,length(gamma)+1,k+1); imagesc(Yc); title(strcat('gamma=',num2str(g),',','Debit=',num2str(d), 'bps'));
|
|
subplot(2,length(gamma)+1,length(gamma)+k+2); imagesc(compY-Yc);
|
|
end
|