Spaces:
Runtime error
Runtime error
jens
commited on
Commit
·
848a6df
1
Parent(s):
4f02127
fix
Browse files
utils.py
CHANGED
|
@@ -174,13 +174,10 @@ def PCL3(image):
|
|
| 174 |
# Step 4: Convert PointCloud data to a NumPy array
|
| 175 |
points = np.asarray(pcd.points)
|
| 176 |
colors = np.asarray(pcd.colors)
|
| 177 |
-
#
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
#df = pd.DataFrame(data)
|
| 181 |
# Step 6: Create a 3D scatter plot using Plotly Express
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
ax = Axes3D(fig)
|
| 185 |
-
ax.scatter(points[:, 0], points[:, 1], points[:, 2], marker='o', s=0.01, c=colors)
|
| 186 |
return fig
|
|
|
|
| 174 |
# Step 4: Convert PointCloud data to a NumPy array
|
| 175 |
points = np.asarray(pcd.points)
|
| 176 |
colors = np.asarray(pcd.colors)
|
| 177 |
+
#ax = Axes3D(fig)
|
| 178 |
+
data = {'x': points[:, 0], 'y': points[:, 1], 'z': points[:, 2]}
|
| 179 |
+
df = pd.DataFrame(data)
|
|
|
|
| 180 |
# Step 6: Create a 3D scatter plot using Plotly Express
|
| 181 |
+
fig = px.scatter_3d(df, x='x', y='y', z='z', color=colors, size=0.01)
|
| 182 |
+
|
|
|
|
|
|
|
| 183 |
return fig
|