Update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,7 @@ def calculate_similarity(img1, img2):
|
|
| 12 |
max_width = max(img1.shape[1], img2.shape[1])
|
| 13 |
img1_resized = cv2.resize(img1, (max_width, max_height))
|
| 14 |
img2_resized = cv2.resize(img2, (max_width, max_height))
|
| 15 |
-
similarity_score = ssim(img1_resized, img2_resized, multichannel=True)
|
| 16 |
return similarity_score
|
| 17 |
|
| 18 |
def image_similarity(img1, img2):
|
|
|
|
| 12 |
max_width = max(img1.shape[1], img2.shape[1])
|
| 13 |
img1_resized = cv2.resize(img1, (max_width, max_height))
|
| 14 |
img2_resized = cv2.resize(img2, (max_width, max_height))
|
| 15 |
+
similarity_score = ssim(img1_resized, img2_resized, win_size=3, multichannel=True)
|
| 16 |
return similarity_score
|
| 17 |
|
| 18 |
def image_similarity(img1, img2):
|