Spaces:
Runtime error
Runtime error
some type chage made in image format
Browse files
app.py
CHANGED
@@ -18,9 +18,13 @@ def merge_images(image1, image2, method="concatenate"):
|
|
18 |
Returns:
|
19 |
PIL.Image: The merged image.
|
20 |
"""
|
21 |
-
img1 = cv2.resize(image1, (512,512))
|
22 |
-
img2 = cv2.resize(image2, (512,512))
|
23 |
-
img = img1*0.5 + img2*0.5
|
|
|
|
|
|
|
|
|
24 |
img = img.astype('uint8')
|
25 |
|
26 |
return img
|
|
|
18 |
Returns:
|
19 |
PIL.Image: The merged image.
|
20 |
"""
|
21 |
+
# img1 = cv2.resize(image1, (512,512))
|
22 |
+
# img2 = cv2.resize(image2, (512,512))
|
23 |
+
# img = img1*0.5 + img2*0.5
|
24 |
+
|
25 |
+
img1 = image1.astype('float32')
|
26 |
+
img2 = image2.astype('float32')
|
27 |
+
img = 0.5*img1 + 0.5*img2
|
28 |
img = img.astype('uint8')
|
29 |
|
30 |
return img
|