UOMOP

SNR vs PSNR graph 본문

카테고리 없음

SNR vs PSNR graph

Happy PinGu 2024. 10. 29. 11:58
% 기존 데이터 입력
snr_512 = [30, 20, 10, 0];
psnr_proposed_512 = [30.99, 28.68, 24.98, 21.05];
psnr_TopK_512 = [29.99, 27.82, 24.19, 20.41];
psnr_Random_512 = [30.00, 27.38, 23.24, 19.02];

snr_256 = [30, 20, 10, 0];
psnr_proposed_256 = [27.35, 25.98, 23.23, 20.20];
psnr_TopK_256 = [26.80, 25.34, 22.61, 19.32];
psnr_Random_256 = [26.92, 25.24, 21.69, 17.96];

% DeepJSCC 데이터 추가
psnr_DeepJSCC_256 = [19.638, 23.318, 26.505, 27.997];
psnr_DeepJSCC_512 = [20.781, 24.801, 28.817, 31.227];
snr_DeepJSCC = [0, 10, 20, 30]; % DeepJSCC 데이터의 SNR 범위

% dim을 기반으로 선택
dim = 256;  % 원하는 dim 입력 (512 또는 256)

if dim == 512
    snr = snr_512;
    psnr_proposed = psnr_proposed_512;
    psnr_TopK = psnr_TopK_512;
    psnr_Random = psnr_Random_512;
    psnr_DeepJSCC = psnr_DeepJSCC_512;
else
    snr = snr_256;
    psnr_proposed = psnr_proposed_256;
    psnr_TopK = psnr_TopK_256;
    psnr_Random = psnr_Random_256;
    psnr_DeepJSCC = psnr_DeepJSCC_256;
end

% 그래프 그리기
% 그래프 그리기
figure;
plot(snr_DeepJSCC, psnr_DeepJSCC, '-kd', 'LineWidth', 2.5, 'MarkerSize', 8, 'DisplayName', 'DeepJSCC');  hold on; % 실
plot(snr, psnr_proposed, ':r*', 'LineWidth', 2.5, 'MarkerSize', 12, 'DisplayName', 'Proposed');
plot(snr, psnr_TopK, '--bs', 'LineWidth', 2.5, 'MarkerSize', 8, 'DisplayName', 'TopK'); % 점선
plot(snr, psnr_Random, '-.','Color', [0.85, 0.65, 0], 'Marker', '^', 'LineWidth', 2.5, 'MarkerSize', 8, 'DisplayName', 'Random'); % 어두운 노란색 점선


% 그래프 옵션 설정
xlabel('SNR (dB)');
ylabel('PSNR (dB)');
ylim([0 35]);
legend('Location', 'southeast');
grid on;
hold off;

Comments