Spaces:
Runtime error
Runtime error
jens
commited on
Commit
·
ec37504
1
Parent(s):
848a6df
fix
Browse files
utils.py
CHANGED
|
@@ -174,10 +174,12 @@ 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 |
#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=
|
| 182 |
|
| 183 |
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 |
+
sizes = np.zeros(colors.shape)
|
| 178 |
+
sizes[:] = 0.01
|
| 179 |
#ax = Axes3D(fig)
|
| 180 |
+
data = {'x': points[:, 0], 'y': points[:, 1], 'z': points[:, 2], 'sizes': sizes, 'cs': colors}
|
| 181 |
df = pd.DataFrame(data)
|
| 182 |
# Step 6: Create a 3D scatter plot using Plotly Express
|
| 183 |
+
fig = px.scatter_3d(df, x='x', y='y', z='z', color="cs", size="sizes")
|
| 184 |
|
| 185 |
return fig
|