TKOSEI commited on
Commit
8daa403
·
verified ·
1 Parent(s): b12a31c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 == emboss, depth_image + lift_height, depth_image)
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)
@@ -476,7 +476,7 @@ def process_image_and_generate_stl(image_input, depth_near, depth_far, thickness
476
  vertex_colors=True,
477
  scene_lights=True,
478
  prepare_for_3d_printing=True,
479
- lift_height=lift
480
  )
481
 
482
  return stl_path # Return the path to the generated STL file
 
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 != emboss, depth_image + lift_height, depth_image)
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)
 
476
  vertex_colors=True,
477
  scene_lights=True,
478
  prepare_for_3d_printing=True,
479
+ lift_height=-lift
480
  )
481
 
482
  return stl_path # Return the path to the generated STL file