isl-org / Open3D

Open3D: A Modern Library for 3D Data Processing
http://www.open3d.org
Other
11.37k stars 2.29k forks source link

L515 Reconstruction pipeline with official docs doesn't work #2866

Closed bell-one closed 3 years ago

bell-one commented 3 years ago

Describe the bug reconsturction pipeline with L515 sample dataset doesn't work o3d.pipelines.color_map class doesn't have run_non_rigid_optimizer & run_rigid_optimizer

To Reproduce

  1. pip install open3d with python 3.8 on anaconda
  2. follow http://www.open3d.org/docs/release/tutorial/sensor/realsense.html Running the scene reconstruction pipeline
  3. See error theres no o3d.piplines.color_map.run_rigid_optimizer o3d.pipelines.color_map.run_non_rigid_optimizer
  4. find that colo_map.py only includes color_map_optimization
  5. change code like
    mesh_optimized = o3d.pipelines.color_map.color_map_optimization(
         mesh, rgbd_images, camera,
         o3d.pipelines.color_map.ColorMapOptimizationOption.non_rigid_camera_coordinate)

    o3d.visualization.draw_geometries([mesh_optimized])
    o3d.io.write_triangle_mesh(
        os.path.join(path, config["folder_scene"],
                     "color_map_before_optimization.ply"), mesh_optimized)
  1. See error
    
    Traceback (most recent call last):
    File "../pipelines/color_map_optimization_for_reconstruction_system.py", line 174, in <module>
    main(config, keys)
    File "../pipelines/color_map_optimization_for_reconstruction_system.py", line 115, in main
    mesh_optimized = o3d.pipelines.color_map.color_map_optimization(
    TypeError: color_map_optimization(): incompatible function arguments. The following argument types are supported:
    1. (mesh: open3d.cpu.pybind.geometry.TriangleMesh, imgs_rgbd: List[open3d.cpu.pybind.geometry.RGBDImage], camera: open3d.cpu.pybind.camera.PinholeCameraTrajectory, option: open3d.cpu.pybind.pipelines.color_map.ColorMapOptimizationOption = ColorMapOptimizationOption with
    - non_rigid_camera_coordinate: false
    - number_of_vertical_anchors: 16
    - non_rigid_anchor_point_weight: 0.316
    - maximum_iteration: 300
    - maximum_allowable_depth: 2.5
    - depth_threshold_for_visibility_check: 0.03
    - depth_threshold_for_discontinuity_check: 0.1
    - half_dilation_kernel_size_for_discontinuity_map: 3
    - image_boundary_margin: 10
    - invisible_vertex_color_knn: 3
    ) -> None

Invoked with: TriangleMesh with 167611 points and 316636 triangles., [RGBDImage of size Color image : 960x540, with 3 channels. Depth image : 960x540, with 1 channels. Use numpy.asarray to access buffer data., RGBDImage of size Color image : 960x540, with 3 channels. Depth image : 960x540, with 1 channels. Use numpy.asarray to access buffer data., RGBDImage of size Color image : 960x540, with 3 channels. Depth image : 960x540, with 1 channels. Use numpy.asarray to access buffer data.], PinholeCameraTrajectory class. Access its data via camera.parameters., <property object at 0x00000281065EF130>



**Expected behavior**
any suggestion for color_map.color_map_optimization ?

**Environment (please complete the following information):**

- Operating system: Windows 10 64-bit
- Python version: e.g. Python 3.8
- Open3D version: 0.12.0
- Is this remote workstation?:  no
- How did you install Open3D?: pip
chuong98 commented 3 years ago

You need to install the latest (master) version, for example:

pip install --user --pre https://storage.googleapis.com/open3d-releases-master/python-wheels/open3d-0.12.0+51ebdc9-cp37-cp37m-linux_x86_64.whl
bell-one commented 3 years ago

Thanks, with 'python-wheels/open3d-0.12.0+51ebdc9-cp38-cp38-win_amd64.whl' scene reconstruction works well