Merge branch 4.x

This commit is contained in:
Alexander Smorkalov
2025-10-08 14:55:14 +03:00
23 changed files with 690 additions and 62 deletions

View File

@@ -144,8 +144,8 @@ double getPSNR(const Mat& I1, const Mat& I2)
double sse = s.val[0] + s.val[1] + s.val[2]; // sum channels
if( sse <= 1e-10) // for small values return zero
return 0;
if( sse <= 1e-10) // For very small values, return 360 to cap PSNR (theoretical value is infinity)
return 360.0;
else
{
double mse = sse / (double)(I1.channels() * I1.total());