Text output is printed multiple times
이전 댓글 표시
I am new to matlab. When i run my code, the output is printed multiple times with different values. What's wrong with this code?
InputImage=imread("img1.png");
ReconstructedImage=imread("img2.png");
n=size(InputImage);
M=n(1);
N=n(2);
MSE = sum(sum((InputImage-ReconstructedImage).^2))/(M*N);
PSNR = 10*log10(256*256/MSE);
fprintf('\nMSE: %7.2f ', MSE);
fprintf('\nPSNR: %9.7f dB', PSNR);
Output:
MSE: 0.70
MSE: 0.61
MSE: 0.99
PSNR: 49.7147717 dB
PSNR: 50.3459133 dB
PSNR: 48.1905858 dB
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Images에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!