Update app.py
Browse files
app.py
CHANGED
|
@@ -119,7 +119,7 @@ def create_3d_obj(foreground, depth_image, image_path, depth=12, edge_strength=0
|
|
| 119 |
z = depth_image_sharpened
|
| 120 |
points_3d = np.vstack((x.flatten(), y.flatten(), z.flatten())).T
|
| 121 |
if points_3d.shape[0] == 0:
|
| 122 |
-
|
| 123 |
|
| 124 |
# Create Trimesh object from 3D points and depth-based faces
|
| 125 |
try:
|
|
|
|
| 119 |
z = depth_image_sharpened
|
| 120 |
points_3d = np.vstack((x.flatten(), y.flatten(), z.flatten())).T
|
| 121 |
if points_3d.shape[0] == 0:
|
| 122 |
+
raise ValueError("No valid points found in depth data for 3D mesh creation.")
|
| 123 |
|
| 124 |
# Create Trimesh object from 3D points and depth-based faces
|
| 125 |
try:
|