bartduis commited on
Commit
f83a7e1
·
verified ·
1 Parent(s): eb5153b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -151,8 +151,13 @@ def input_to_glb(outdir,img,depth_dict,mask,rotated=False):
151
  pts = pts.reshape(-1,3)
152
  pts[:,1] = -pts[:,1]
153
  pts[:,2] = -pts[:,2]
154
-
155
-
 
 
 
 
 
156
  pct = trimesh.PointCloud(pts, colors=col.reshape(-1,3))
157
  scene.add_geometry(pct)
158
 
 
151
  pts = pts.reshape(-1,3)
152
  pts[:,1] = -pts[:,1]
153
  pts[:,2] = -pts[:,2]
154
+
155
+ if rotated:
156
+ pts_swapped = np.copy(pts)
157
+ pts_swapped[:,0] = pts[:,1]
158
+ pts_swapped[:,1] = pts[:,0]
159
+ pts = pts_swapped
160
+
161
  pct = trimesh.PointCloud(pts, colors=col.reshape(-1,3))
162
  scene.add_geometry(pct)
163