Update app.py
Browse files
app.py
CHANGED
|
@@ -91,11 +91,6 @@ def process_image(image_path, depth_map_path=None):
|
|
| 91 |
img = Image.fromarray(blended_depth_image)
|
| 92 |
return [img, gltf_path, gltf_path]
|
| 93 |
|
| 94 |
-
import numpy as np
|
| 95 |
-
import open3d as o3d
|
| 96 |
-
from PIL import Image
|
| 97 |
-
from skimage.util import img_as_ubyte, img_as_float
|
| 98 |
-
|
| 99 |
def create_3d_obj(foreground, depth_image, background, image_path, depth=12):
|
| 100 |
# Resize depth_image to match the size of the foreground using OpenCV
|
| 101 |
depth_image_resized = cv2.resize(depth_image, (foreground.shape[1], foreground.shape[0]), interpolation=cv2.INTER_LANCZOS4)
|
|
|
|
| 91 |
img = Image.fromarray(blended_depth_image)
|
| 92 |
return [img, gltf_path, gltf_path]
|
| 93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 94 |
def create_3d_obj(foreground, depth_image, background, image_path, depth=12):
|
| 95 |
# Resize depth_image to match the size of the foreground using OpenCV
|
| 96 |
depth_image_resized = cv2.resize(depth_image, (foreground.shape[1], foreground.shape[0]), interpolation=cv2.INTER_LANCZOS4)
|