jens commited on
Commit
4f02127
·
1 Parent(s): 1faf11a
Files changed (1) hide show
  1. utils.py +2 -1
utils.py CHANGED
@@ -6,6 +6,7 @@ import numpy as np
6
  import pandas as pd
7
  from inference import DepthPredictor
8
  import matplotlib.pyplot as plt
 
9
 
10
  def create_3d_obj(rgb_image, depth_image, depth=10, path='./image.gltf'):
11
  depth_o3d = o3d.geometry.Image(depth_image)
@@ -180,6 +181,6 @@ def PCL3(image):
180
  # Step 6: Create a 3D scatter plot using Plotly Express
181
  #fig = px.scatter_3d(df, x='x', y='y', z='z', color='red', size_max=0.1)
182
  fig = plt.figure()
183
- ax = fig.add_subplot(projection='3d')
184
  ax.scatter(points[:, 0], points[:, 1], points[:, 2], marker='o', s=0.01, c=colors)
185
  return fig
 
6
  import pandas as pd
7
  from inference import DepthPredictor
8
  import matplotlib.pyplot as plt
9
+ from mpl_toolkits.mplot3d import Axes3D
10
 
11
  def create_3d_obj(rgb_image, depth_image, depth=10, path='./image.gltf'):
12
  depth_o3d = o3d.geometry.Image(depth_image)
 
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