TKOSEI commited on
Commit
7a6c9b6
·
verified ·
1 Parent(s): b7b9e3c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -178,7 +178,7 @@ def extrude_depth_3d(
178
  #depth_image_new[depth_image_new < 0] = 0
179
  depth_image = median_filter(depth_image, size=filter_size)
180
  depth_image = emboss*(depth_image - np.min(depth_image)) / (np.max(depth_image) - np.min(depth_image))
181
- depth_image = np.where(depth_image != 0.0, depth_image + lift_height, 0.0)
182
  Image.fromarray((depth_image * 255).astype(np.uint8)).convert("L").save(path_out_base+".png")
183
  rgb_image = np.array(
184
  Image.open(path_rgb).convert("RGB").resize((w, h), Image.Resampling.LANCZOS)
 
178
  #depth_image_new[depth_image_new < 0] = 0
179
  depth_image = median_filter(depth_image, size=filter_size)
180
  depth_image = emboss*(depth_image - np.min(depth_image)) / (np.max(depth_image) - np.min(depth_image))
181
+ depth_image = np.where(depth_image != 1.0, depth_image + lift_height, 1.0)
182
  Image.fromarray((depth_image * 255).astype(np.uint8)).convert("L").save(path_out_base+".png")
183
  rgb_image = np.array(
184
  Image.open(path_rgb).convert("RGB").resize((w, h), Image.Resampling.LANCZOS)