Merge pull request #16586 from themechanicalcoder:video-psnr

* add  python version of video-input-psnr-ssim

* remove ret

* documentation changes

* added link for python file

* command line argument
This commit is contained in:
Gourav Roy
2020-02-22 17:12:26 +05:30
committed by GitHub
parent 95f0c9b19b
commit 8b5efc6f4c
3 changed files with 171 additions and 71 deletions

View File

@@ -132,6 +132,7 @@ int main(int argc, char *argv[])
return 0;
}
// ![get-psnr]
double getPSNR(const Mat& I1, const Mat& I2)
{
Mat s1;
@@ -152,6 +153,9 @@ double getPSNR(const Mat& I1, const Mat& I2)
return psnr;
}
}
// ![get-psnr]
// ![get-mssim]
Scalar getMSSIM( const Mat& i1, const Mat& i2)
{
@@ -205,3 +209,4 @@ Scalar getMSSIM( const Mat& i1, const Mat& i2)
Scalar mssim = mean(ssim_map); // mssim = average of ssim map
return mssim;
}
// ![get-mssim]