1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-25 21:33:04 +04:00

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
@@ -16,7 +16,7 @@ def getPSNR(I1, I2):
s1 = s1 * s1 # |I1 - I2|^2
sse = s1.sum() # sum elements per channel
if sse <= 1e-10: # sum channels
return 0 # for small values return zero
return 360 # For very small SSE, return 360 to cap PSNR (theoretical value is infinity)
else:
shape = I1.shape
mse = 1.0 * sse / (shape[0] * shape[1] * shape[2])