FrankFacundo commited on
Commit
03e2e42
·
1 Parent(s): 565f802

add Gaussian Blur

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -93,7 +93,8 @@ def _preview_canny(
93
  """Fast Canny‑edge preview (already implemented)."""
94
 
95
  arr = np.array(pil_img.convert("RGB"))
96
- edges = cv2.Canny(arr, threshold1=canny_threshold_1, threshold2=canny_threshold_2)
 
97
  edges_rgb = cv2.cvtColor(edges, cv2.COLOR_GRAY2RGB)
98
  return Image.fromarray(edges_rgb)
99
 
 
93
  """Fast Canny‑edge preview (already implemented)."""
94
 
95
  arr = np.array(pil_img.convert("RGB"))
96
+ blurred = cv2.GaussianBlur(arr, (5, 5), 1.4)
97
+ edges = cv2.Canny(blurred, threshold1=canny_threshold_1, threshold2=canny_threshold_2)
98
  edges_rgb = cv2.cvtColor(edges, cv2.COLOR_GRAY2RGB)
99
  return Image.fromarray(edges_rgb)
100