This commit is contained in:
louiscklaw
2025-01-31 22:56:58 +08:00
parent 57c7fd9332
commit b1cd1d4662
26 changed files with 6436 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
# Compute pixel-by-pixel difference and return the sum
import cv2 as cv
def compareImgs(img1, img2):
# img2 = cv.resize(img2, (img1.shape[1], img1.shape[0]))
diff = cv.absdiff(img1, img2)
return diff.sum()