Add SSIM report to command line tools...

This commit is contained in:
Pavel Krajcevski 2013-10-11 13:09:33 -04:00
parent 855683983c
commit 86bb0f6d0e
2 changed files with 18 additions and 0 deletions

View File

@ -260,6 +260,15 @@ int main(int argc, char **argv) {
fprintf(stderr, "Error computing PSNR\n");
}
double MSSIM;
double SSIM = img.ComputeSSIM(ci, &MSSIM);
if(SSIM > 0.0) {
fprintf(stdout, "SSIM: %.9f\n", SSIM);
fprintf(stdout, "MSSIM: %.9f\n", MSSIM);
} else {
fprintf(stderr, "Error computing MSSIM\n");
}
if(format == eCompressionFormat_BPTC) {
strcat(basename, "-bc7.png");
} else if(format == eCompressionFormat_PVRTC) {

View File

@ -264,6 +264,15 @@ int _tmain(int argc, _TCHAR* argv[])
fprintf(stderr, "Error computing PSNR\n");
}
double MSSIM;
double SSIM = img.ComputeSSIM(ci, &MSSIM);
if(SSIM > 0.0) {
fprintf(stdout, "SSIM: %.9f\n", SSIM);
fprintf(stdout, "MSSIM: %.9f\n", MSSIM);
} else {
fprintf(stderr, "Error computing MSSIM\n");
}
if(format == eCompressionFormat_BPTC) {
strcat_s(basename, "-bc7.png");
} else if(format == eCompressionFormat_PVRTC) {