Update app.py
Browse files
app.py
CHANGED
|
@@ -47,7 +47,8 @@ def remove_noise(noisy_image, password):
|
|
| 47 |
sigma_est = np.mean(estimate_sigma(image_float))
|
| 48 |
|
| 49 |
denoised_image = denoise_nl_means(image_float, h=1.15 * sigma_est, fast_mode=True,
|
| 50 |
-
patch_size=5, patch_distance=6,
|
|
|
|
| 51 |
denoised_image = (255 * denoised_image).astype(np.uint8) # Scale back to 0-255
|
| 52 |
return Image.fromarray(denoised_image)
|
| 53 |
|
|
|
|
| 47 |
sigma_est = np.mean(estimate_sigma(image_float))
|
| 48 |
|
| 49 |
denoised_image = denoise_nl_means(image_float, h=1.15 * sigma_est, fast_mode=True,
|
| 50 |
+
patch_size=5, patch_distance=6, channel_axis=None)
|
| 51 |
+
|
| 52 |
denoised_image = (255 * denoised_image).astype(np.uint8) # Scale back to 0-255
|
| 53 |
return Image.fromarray(denoised_image)
|
| 54 |
|