Skip to content

Commit 3eeb086

Browse files
bugfix solid colors were being masked
1 parent 07e5da5 commit 3eeb086

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/depthmap.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ def run_depthmap(processed, outpath, inputimages, inputnames, compute_device, mo
410410
background_removed_image = background_removed_images[count]
411411
#maybe a threshold cut would be better on the line below.
412412
background_removed_array = np.array(background_removed_image)
413-
bg_mask = (background_removed_array[:,:,0]==0)|(background_removed_array[:,:,1]==0)|(background_removed_array[:,:,2]==0)
413+
bg_mask = (background_removed_array[:,:,0]==0)&(background_removed_array[:,:,1]==0)&(background_removed_array[:,:,2]==0)&(background_removed_array[:,:,3]<=0.2)
414414
far_value = 255 if invert_depth else 0
415415

416416
img_output[bg_mask] = far_value * far_value #255*255 or 0*0

0 commit comments

Comments
 (0)