Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -177,6 +177,7 @@ def laplacian_blend(img1: np.ndarray, img2: np.ndarray, mask: np.ndarray, depth:
|
|
| 177 |
imgs = []
|
| 178 |
for d in range(0, depth-1):
|
| 179 |
gaussian_img = _low_pass_filter(blanded_img.copy(), sigma)
|
|
|
|
| 180 |
reconstructed_img = cv2.add(blended[d], gaussian_img)
|
| 181 |
|
| 182 |
imgs.append(reconstructed_img)
|
|
|
|
| 177 |
imgs = []
|
| 178 |
for d in range(0, depth-1):
|
| 179 |
gaussian_img = _low_pass_filter(blanded_img.copy(), sigma)
|
| 180 |
+
gaussian_img = cv2.resize(gaussian_img, blended[d].shape[:2]) # Ensure sizes match
|
| 181 |
reconstructed_img = cv2.add(blended[d], gaussian_img)
|
| 182 |
|
| 183 |
imgs.append(reconstructed_img)
|