Ash2505 commited on
Commit
e18a03c
·
verified ·
1 Parent(s): e2980eb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -125,6 +125,9 @@ def lens_blur_effect(input_image: Image.Image, fg_threshold: float = 85, mg_thre
125
  img_foreground = img.copy() # No blur for foreground
126
  img_middleground = cv2.GaussianBlur(img, (0, 0), sigmaX=7, sigmaY=7)
127
  img_background = cv2.GaussianBlur(img, (0, 0), sigmaX=15, sigmaY=15)
 
 
 
128
 
129
  # Use slider values as thresholds
130
  threshold1 = fg_threshold # e.g., default 85
 
125
  img_foreground = img.copy() # No blur for foreground
126
  img_middleground = cv2.GaussianBlur(img, (0, 0), sigmaX=7, sigmaY=7)
127
  img_background = cv2.GaussianBlur(img, (0, 0), sigmaX=15, sigmaY=15)
128
+
129
+ print(depth_map)
130
+ depth_map /= depth_map.max()
131
 
132
  # Use slider values as thresholds
133
  threshold1 = fg_threshold # e.g., default 85