Skip to content

Commit 4c55ebd

Browse files
cuikssemjonsona
authored andcommitted
Fix generate 3d inpainted mesh 4-channel png error
1 parent 00d878f commit 4c55ebd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/core.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,9 @@ def run_3dphoto(device, img_rgb, img_depth, inputnames, outpath, gen_inpainted_m
450450

451451
# rgb input
452452
img = np.asarray(img_rgb[count])
453+
if len(img.shape) > 2 and img.shape[2] == 4:
454+
# convert the image from RGBA2RGB
455+
img = cv2.cvtColor(img, cv2.COLOR_BGRA2BGR)
453456

454457
# run sparse bilateral filter
455458
config['sparse_iter'] = 5

0 commit comments

Comments
 (0)