jens commited on
Commit
848a6df
·
1 Parent(s): 4f02127
Files changed (1) hide show
  1. utils.py +5 -8
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
- # Step 5: Create a DataFrame from the NumPy arrays
178
- #data = {'x': points[:, 0], 'y': points[:, 1], 'z': points[:, 2],
179
- # 'red': colors[:, 0], 'green': colors[:, 1], 'blue': colors[:, 2]}
180
- #df = pd.DataFrame(data)
181
  # Step 6: Create a 3D scatter plot using Plotly Express
182
- #fig = px.scatter_3d(df, x='x', y='y', z='z', color='red', size_max=0.1)
183
- fig = plt.figure()
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