| 使用Python的Open3D(Python 3.6.5,Open3D v0.4.0) | 您所在的位置:网站首页 › open3d安装windows › 使用Python的Open3D(Python 3.6.5,Open3D v0.4.0) |
|
开发环境 Windows10(64位,16GB内存,i7-7700HQ) Open3D v0.4.0 Python 3.6.5Open3D安装 可以使用以下命令安装Python3.6.x。 (让我们使用anaconda创建py36环境) 单击此处检查可以安装的Python版本。 1pip install open3d-pythonOpen3D示例 下载 Open3D v0.4.0,并且\Open3D-0.4.0\examples\Python下有一个示例程序,因此让我们尝试一下。 进阶 camera_trajectory.py12345678910111213141516171819202122232425262728293031323334353637383940414243444546(py36) D:\Open3D-0.4.0\examples\Python\Advanced>python camera_trajectory.py Testing camera in open3d ... [[525. 0. 319.5] [ 0. 525. 239.5] [ 0. 0. 1. ]] PinholeCameraIntrinsic with width = -1 and height = -1. Access intrinsics with intrinsic_matrix. PinholeCameraIntrinsic with width = 640 and height = 480. Access intrinsics with intrinsic_matrix. [[525. 0. 320.] [ 0. 525. 240.] [ 0. 0. 1.]] PinholeCameraIntrinsic with width = 640 and height = 480. Access intrinsics with intrinsic_matrix. [[525. 0. 320.] [ 0. 525. 240.] [ 0. 0. 1.]] Read a trajectory and combine all the RGB-D images. PinholeCameraTrajectory class. Access its data via intrinsic and extrinsic. std::vector with 5 elements. Use numpy.asarray() to access data. [[[-2.73959219e-01 8.67361738e-19 -9.61741310e-01 1.96003743e+00] [ 2.18193459e-02 -9.99742609e-01 -6.21540418e-03 5.92858340e-01] [-9.61493766e-01 -2.26873336e-02 2.73888704e-01 -8.68039442e-01] [ 0.00000000e+00 0.00000000e+00 -0.00000000e+00 1.00000000e+00]] [[-2.69333111e-01 -3.46944695e-18 -9.63047079e-01 1.96388301e+00] [ 3.32939238e-02 -9.99402229e-01 -9.31123335e-03 6.26082021e-01] [-9.62471397e-01 -3.45714395e-02 2.69172111e-01 -8.50365753e-01] [ 0.00000000e+00 0.00000000e+00 -0.00000000e+00 1.00000000e+00]] [[-2.65351855e-01 -3.46944695e-18 -9.64151644e-01 1.96642986e+00] [ 4.52270814e-02 -9.98899182e-01 -1.24473054e-02 6.60222975e-01] [-9.63090289e-01 -4.69086805e-02 2.65059750e-01 -8.32396694e-01] [ 0.00000000e+00 0.00000000e+00 -0.00000000e+00 1.00000000e+00]] [[-2.61914323e-01 -1.73472348e-18 -9.65091129e-01 1.96788675e+00] [ 5.75424277e-02 -9.98220917e-01 -1.56163346e-02 6.95070189e-01] [-9.63374152e-01 -5.96238282e-02 2.61448356e-01 -8.14014971e-01] [ 0.00000000e+00 0.00000000e+00 -0.00000000e+00 1.00000000e+00]] [[-2.58918642e-01 -0.00000000e+00 -9.65899134e-01 1.96846002e+00] [ 7.01643085e-02 -9.97358120e-01 -1.88082242e-02 7.30411488e-01] [-9.63347345e-01 -7.26414447e-02 2.58234610e-01 -7.95113315e-01] [ 0.00000000e+00 0.00000000e+00 -0.00000000e+00 1.00000000e+00]]] Colored_pointcloud_registration.py 一个 th> b th> c th> tr> header> td> td> td> tr> tbody> table> 123456789101112131415161718192021222324252627(py36) D:\Open3D-0.4.0\examples\Python\Advanced>python colored_pointcloud_registration.py 1. Load two point clouds and show initial pose Reading PLY: [========================================] 100% Reading PLY: [========================================] 100% 2. Point-to-plane ICP registration is applied on original point clouds to refine the alignment. Distance threshold 0.02. RegistrationResult with fitness = 0.974582, inlier_rmse = 0.004220, and correspondence_set size of 62729 Access transformation to get result. 3. Colored point cloud registration [50, 0.04, 0] 3-1. Downsample with a voxel size 0.04 3-2. Estimate normal. 3-3. Applying colored point cloud registration RegistrationResult with fitness = 0.876367, inlier_rmse = 0.014578, and correspondence_set size of 2084 Access transformation to get result. [30, 0.02, 1] 3-1. Downsample with a voxel size 0.02 3-2. Estimate normal. 3-3. Applying colored point cloud registration RegistrationResult with fitness = 0.866184, inlier_rmse = 0.008760, and correspondence_set size of 7541 Access transformation to get result. [14, 0.01, 2] 3-1. Downsample with a voxel size 0.01 3-2. Estimate normal. 3-3. Applying colored point cloud registration RegistrationResult with fitness = 0.843719, inlier_rmse = 0.004851, and correspondence_set size of 24737 Access transformation to get result. color_map_optimization.py 1。下载喷泉数据集。 2。将下载的喷泉数据集的目录路径添加到[path_to_fountain_dataset]并执行。 一个 th> b th> tr> header> td> td> tr> tbody> table> 12345678910111213141516171819202122232425262728293031323334353637383940(py36) D:\Open3D-0.4.0\examples\Python\Advanced>python color_map_optimization.py Reading PLY: [========================================] 100% Read TriangleMesh: 1033745 triangles and 536872 vertices. [ColorMapOptimization] [ColorMapOptimization] :: MakingMasks [MakeDepthMasks] Image 0/33 ... [MakeDepthMasks] Image 32/33 [ColorMapOptimization] :: VisibilityCheck [cam 25] 14.76181 percents are visible ... [cam 4] 38.92045 percents are visible [ColorMapOptimization] :: Rigid Optimization GLFW init. Add geometry and update bounding box to [(0.0015, 0.0015, 0.4771) - (1.4985, 1.4985, 1.4846)] Global colormap init. [Visualizer] Screen capture to ScreenCapture_2019-01-16-06-25-11.png [Visualizer] Screen camera capture to ScreenCamera_2019-01-16-06-25-11.json Writing PLY: [========================================] 100% Write TriangleMesh: 1033745 triangles and 536872 vertices. [ColorMapOptimization] [ColorMapOptimization] :: MakingMasks [MakeDepthMasks] Image 0/33 ... [MakeDepthMasks] Image 32/33 [ColorMapOptimization] :: VisibilityCheck [cam 25] 14.76181 percents are visible ... [cam 4] 38.92045 percents are visible [ColorMapOptimization] :: Non-Rigid Optimization [Iteration 0001] Residual error : 21639.276499, reg : 0.000000 ... [Iteration 0300] Residual error : 5585.115116, reg : 2747.785043 Add geometry and update bounding box to [(0.0015, 0.0015, 0.4771) - (1.4985, 1.4985, 1.4846)] [Visualizer] Screen capture to ScreenCapture_2019-01-16-06-32-08.png [Visualizer] Screen camera capture to ScreenCamera_2019-01-16-06-32-08.json Writing PLY: [========================================] 100% Write TriangleMesh: 1033745 triangles and 536872 vertices. Global colormap destruct. GLFW destruct. custom_visualization.py1234567891011121314151617181920(py36) D:\Open3D-0.4.0\examples\Python\Advanced>python customized_visualization.py Reading PLY: [========================================] 100% 1. Customized visualization to mimic DrawGeometry 2. Changing field of view Field of view (before changing) 60.00 Field of view (after changing) 90.00 Field of view (before changing) 60.00 Field of view (after changing) 5.00 [ViewControl] ConvertToPinholeCameraParameters() failed because orthogonal view cannot be translated to a pinhole camera. 3. Customized visualization with a rotating view 4. Customized visualization showing normal rendering 5. Customized visualization with key press callbacks Press 'K' to change background color to black Press 'R' to load a customized render option, showing normals Press ',' to capture the depth buffer and show it Press '.' to capture the screen and show it 6. Customized visualization playing a camera trajectory [ViewControl] ConvertFromPinholeCameraParameters() failed because window height and width do not match. Capture image 00000 ... fast_global_registration.py 一个 th> b th> c th> tr> header> td> td> td> tr> tbody> table> 1234567891011121314151617(py36) D:\Open3D-0.4.0\examples\Python\Advanced>python fast_global_registration.py :: Load two point clouds and disturb initial pose. :: Downsample with a voxel size 0.050. :: Estimate normal with search radius 0.100. :: Compute FPFH feature with search radius 0.250. :: Downsample with a voxel size 0.050. :: Estimate normal with search radius 0.100. :: Compute FPFH feature with search radius 0.250. :: RANSAC registration on downsampled point clouds. Since the downsampling voxel size is 0.050, we use a liberal distance threshold 0.075. RegistrationResult with fitness = 0.676891, inlier_rmse = 0.032296, and correspondence_set size of 3222 Access transformation to get result. Global registration took 0.464 sec. :: Apply fast global registration with distance threshold 0.025 Fast global registration took 0.218 sec. global_registration.py 一个 th> b th> c th> tr> header> td> td> td> tr> tbody> table> 123456789101112131415161718(py36) D:\Open3D-0.4.0\examples\Python\Advanced>python global_registration.py :: Load two point clouds and disturb initial pose. :: Downsample with a voxel size 0.050. :: Estimate normal with search radius 0.100. :: Compute FPFH feature with search radius 0.250. :: Downsample with a voxel size 0.050. :: Estimate normal with search radius 0.100. :: Compute FPFH feature with search radius 0.250. :: RANSAC registration on downsampled point clouds. Since the downsampling voxel size is 0.050, we use a liberal distance threshold 0.075. RegistrationResult with fitness = 0.676471, inlier_rmse = 0.028703, and correspondence_set size of 3220 Access transformation to get result. :: Point-to-plane ICP registration is applied on original point clouds to refine the alignment. This time we use a strict distance threshold 0.020. RegistrationResult with fitness = 0.621033, inlier_rmse = 0.006565, and correspondence_set size of 123483 Access transformation to get result. headless_rendering.py 123456(py36) D:\Open3D-0.4.0\examples\Python\Advanced>python headless_rendering.py Reading PLY: [========================================] 100% Customized visualization playing a camera trajectory. Ctrl+z to terminate [ViewControl] ConvertFromPinholeCameraParameters() failed because window height and width do not match. Capture image 00000 ... Interactive_visualization.py 一个 th> b th> c th> d th> tr> header> td> td> td> td> tr> tbody> table> 1234567891011121314151617181920212223242526(py36) D:\Open3D-0.4.0\examples\Python\Advanced>python interactive_visualization.py Demo for manual geometry cropping 1) Press 'Y' twice to align geometry with negative direction of y-axis 2) Press 'K' to lock screen and to switch to selection mode 3) Drag for rectangle selection, or use ctrl + left click for polygon selection 4) Press 'C' to get a selected geometry and to save it 5) Press 'F' to switch to freeview mode Demo for manual ICP Visualization of two point clouds before manual alignment 1) Please pick at least three correspondences using [shift + left click] Press [shift + right click] to undo point picking 2) Afther picking points, press q for close the window 1) Please pick at least three correspondences using [shift + left click] Press [shift + right click] to undo point picking 2) Afther picking points, press q for close the window Traceback (most recent call last): File "interactive_visualization.py", line 75, in demo_manual_registration() File "interactive_visualization.py", line 53, in demo_manual_registration assert(len(picked_id_source)>=3 and len(picked_id_target)>=3) AssertionError multiway_registration.py 一个 th> b th> c th> tr> header> td> td> td> tr> tbody> table> 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155(py36) D:\Open3D-0.4.0\examples\Python\Advanced>python multiway_registration.py PCD header indicates 8 fields, 32 bytes per point, and 198835 points in total. x, F, 4, 1, 0 y, F, 4, 1, 4 z, F, 4, 1, 8 rgb, F, 4, 1, 12 normal_x, F, 4, 1, 16 normal_y, F, 4, 1, 20 normal_z, F, 4, 1, 24 curvature, F, 4, 1, 28 Compression method is 1. Points: yes; normals: yes; colors: yes [Purge] 0 nan points have been removed. Read PointCloud: 198835 vertices. Pointcloud down sampled from 198835 points to 27211 points. PCD header indicates 8 fields, 32 bytes per point, and 137833 points in total. x, F, 4, 1, 0 y, F, 4, 1, 4 z, F, 4, 1, 8 rgb, F, 4, 1, 12 normal_x, F, 4, 1, 16 normal_y, F, 4, 1, 20 normal_z, F, 4, 1, 24 curvature, F, 4, 1, 28 Compression method is 1. Points: yes; normals: yes; colors: yes [Purge] 0 nan points have been removed. Read PointCloud: 137833 vertices. Pointcloud down sampled from 137833 points to 19137 points. PCD header indicates 8 fields, 32 bytes per point, and 191397 points in total. x, F, 4, 1, 0 y, F, 4, 1, 4 z, F, 4, 1, 8 rgb, F, 4, 1, 12 normal_x, F, 4, 1, 16 normal_y, F, 4, 1, 20 normal_z, F, 4, 1, 24 curvature, F, 4, 1, 28 Compression method is 1. Points: yes; normals: yes; colors: yes [Purge] 0 nan points have been removed. Read PointCloud: 191397 vertices. Pointcloud down sampled from 191397 points to 25269 points. GLFW init. Add geometry and update bounding box to [(0.5513, 0.8320, 0.5617) - (3.9485, 2.4249, 2.5522)] Add geometry and update bounding box to [(0.5513, 0.8320, 0.5617) - (3.9485, 2.6123, 2.5522)] Add geometry and update bounding box to [(0.0039, 0.8320, 0.4857) - (3.9485, 2.9019, 2.5522)] Global colormap init. [Visualizer] Screen capture to ScreenCapture_2019-01-16-06-57-01.png [Visualizer] Screen camera capture to ScreenCamera_2019-01-16-06-57-01.json [ViewControl] SetViewPoint() failed because window height and width are not set.Full registration ... Apply point-to-plane ICP ICP Iteration #0: Fitness 0.6258, RMSE 0.1566 Residual : 1.96e-02 (# of elements : 17029) ... ICP Iteration #5: Fitness 0.6391, RMSE 0.0101 Residual : 3.22e-05 (# of elements : 17390) Build PoseGraph Apply point-to-plane ICP ICP Iteration #0: Fitness 0.5669, RMSE 0.1655 Residual : 1.86e-02 (# of elements : 15427) ... ICP Iteration #5: Fitness 0.7054, RMSE 0.0104 Residual : 3.25e-05 (# of elements : 19194) Build PoseGraph Apply point-to-plane ICP ICP Iteration #0: Fitness 0.7980, RMSE 0.1231 Residual : 1.25e-02 (# of elements : 15272) ... ICP Iteration #4: Fitness 0.7594, RMSE 0.0108 Residual : 4.35e-05 (# of elements : 14532) Build PoseGraph Optimizing PoseGraph ... Validating PoseGraph - finished. [GlobalOptimizationLM] Optimizing PoseGraph having 3 nodes and 3 edges. Line process weight : 15.342900 [Initial ] residual : 1.068329e+00, lambda : 2.960767e+00 [Iteration 00] residual : 2.144428e-01, valid edges : 1, time : 0.000 sec. [Iteration 01] residual : 1.535337e-01, valid edges : 1, time : 0.000 sec. Delta.norm() < 1.000000e-06 * (x.norm() + 1.000000e-06) [GlobalOptimizationLM] total time : 0.008 sec. [GlobalOptimizationLM] Optimizing PoseGraph having 3 nodes and 3 edges. Line process weight : 15.342900 [Initial ] residual : 1.535309e-01, lambda : 3.050809e+00 Delta.norm() < 1.000000e-06 * (x.norm() + 1.000000e-06) [GlobalOptimizationLM] total time : 0.001 sec. CompensateReferencePoseGraphNode : reference : 0 Transform points and display [[ 1.00000000e+00 -1.81265051e-19 -1.08420217e-19 1.73472348e-18] [ 3.54695047e-20 1.00000000e+00 -1.08420217e-19 0.00000000e+00] [-2.16840434e-19 0.00000000e+00 1.00000000e+00 0.00000000e+00] [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.00000000e+00]] [[ 0.84017249 -0.14644731 0.52217178 0.34783878] [ 0.00617134 0.96536884 0.26081585 -0.3942583 ] [-0.54228415 -0.2159078 0.81198012 1.73003584] [ 0. 0. 0. 1. ]] [[ 0.9627123 -0.07179198 0.2608274 0.37654711] [-0.00195415 0.96227383 0.27207581 -0.48957983] [-0.27052025 -0.26244043 0.92625257 1.29771599] [ 0. 0. 0. 1. ]] Add geometry and update bounding box to [(0.5513, 0.8320, 0.5617) - (3.9485, 2.4249, 2.5522)] Add geometry and update bounding box to [(0.5513, 0.8320, 0.5346) - (4.0783, 2.4252, 2.5522)] Add geometry and update bounding box to [(0.5012, 0.8320, 0.5346) - (4.0783, 2.4442, 2.5522)] [Visualizer] Screen capture to ScreenCapture_2019-01-16-06-57-33.png [Visualizer] Screen camera capture to ScreenCamera_2019-01-16-06-57-33.json Make a combined point cloud PCD header indicates 8 fields, 32 bytes per point, and 198835 points in total. x, F, 4, 1, 0 y, F, 4, 1, 4 z, F, 4, 1, 8 rgb, F, 4, 1, 12 normal_x, F, 4, 1, 16 normal_y, F, 4, 1, 20 normal_z, F, 4, 1, 24 curvature, F, 4, 1, 28 Compression method is 1. Points: yes; normals: yes; colors: yes [Purge] 0 nan points have been removed. Read PointCloud: 198835 vertices. Pointcloud down sampled from 198835 points to 27211 points. PCD header indicates 8 fields, 32 bytes per point, and 137833 points in total. x, F, 4, 1, 0 y, F, 4, 1, 4 z, F, 4, 1, 8 rgb, F, 4, 1, 12 normal_x, F, 4, 1, 16 normal_y, F, 4, 1, 20 normal_z, F, 4, 1, 24 curvature, F, 4, 1, 28 Compression method is 1. Points: yes; normals: yes; colors: yes [Purge] 0 nan points have been removed. Read PointCloud: 137833 vertices. Pointcloud down sampled from 137833 points to 19137 points. PCD header indicates 8 fields, 32 bytes per point, and 191397 points in total. x, F, 4, 1, 0 y, F, 4, 1, 4 z, F, 4, 1, 8 rgb, F, 4, 1, 12 normal_x, F, 4, 1, 16 normal_y, F, 4, 1, 20 normal_z, F, 4, 1, 24 curvature, F, 4, 1, 28 Compression method is 1. Points: yes; normals: yes; colors: yes [Purge] 0 nan points have been removed. Read PointCloud: 191397 vertices. Pointcloud down sampled from 191397 points to 25269 points. Pointcloud down sampled from 71617 points to 33315 points. Write PointCloud: 33315 vertices. Add geometry and update bounding box to [(0.5012, 0.8335, 0.5346) - (4.0761, 2.4441, 2.5522)] [Visualizer] Screen capture to ScreenCapture_2019-01-16-06-57-52.png [Visualizer] Screen camera capture to ScreenCamera_2019-01-16-06-57-52.json Global colormap destruct. GLFW destruct. non_blocking_visualization.py non_blocking_visualization测试#Open3D #Python pic.twitter.com/d1EjFQnWpj —藤本健二(Gachimoto)(@sotongshi)2019年1月15日 rgbd_odometry.py12345678910111213141516171819(py36) D:\Open3D-0.4.0\examples\Python\Basic>python rgbd_odometry.py [[525. 0. 319.5] [ 0. 525. 239.5] [ 0. 0. 1. ]] OdometryOption class. iteration_number_per_pyramid_level = [ 20, 10, 5, ] max_depth_diff = 0.030000 min_depth = 0.000000 max_depth = 4.000000 Using RGB-D Odometry [[ 9.99988275e-01 -7.36617570e-05 -4.84191029e-03 2.77175781e-04] [ 1.67413000e-05 9.99930910e-01 -1.17547746e-02 2.29264601e-02] [ 4.84244164e-03 1.17545557e-02 9.99919187e-01 5.96549283e-04] [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.00000000e+00]] Using Hybrid RGB-D Odometry [[ 9.99992973e-01 -2.51085987e-04 -3.74035293e-03 -1.07049785e-03] [ 2.07047515e-04 9.99930714e-01 -1.17696192e-02 2.32280935e-02] [ 3.74304897e-03 1.17687621e-02 9.99923740e-01 1.40592008e-03] [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.00000000e+00]] rgbd_redwood.py 一个 th> b th> tr> header> td> td> tr> tbody> table> 123456(py36) D:\Open3D-0.4.0\examples\Python\Basic>python rgbd_redwood.py Read Redwood dataset RGBDImage of size Color image : 640x480, with 1 channels. Depth image : 640x480, with 1 channels. Use numpy.asarray to access buffer data. rgbd_sun.py 一个 th> b th> tr> header> td> td> tr> tbody> table> 123456(py36) D:\Open3D-0.4.0\examples\Python\Basic>python rgbd_sun.py Read SUN dataset RGBDImage of size Color image : 640x480, with 1 channels. Depth image : 640x480, with 1 channels. Use numpy.asarray to access buffer data. rgbd_tum.py 一个 th> b th> tr> header> td> td> tr> tbody> table> 123456(py36) D:\Open3D-0.4.0\examples\Python\Basic>python rgbd_tum.py Read TUM dataset RGBDImage of size Color image : 640x480, with 1 channels. Depth image : 640x480, with 1 channels. Use numpy.asarray to access buffer data. 可视化.py 一个 th> b th> c th> tr> header> td> td> td> tr> tbody> table> 1234567(py36) D:\Open3D-0.4.0\examples\Python\Basic>python visualization.py Load a ply point cloud, print it, and render it Reading PLY: [========================================] 100% Let's draw some primitives We draw a few primitives using collection. We draw a few primitives using + operator of mesh. Let's draw a cubic that consists of 8 points and 12 lines working_with_numpy.py 一个 th> b th> tr> header> td> td> tr> tbody> table> 12345678910111213141516171819(py36) D:\Open3D-0.4.0\examples\Python\Basic>python working_with_numpy.py xyz [[-3. -3. 0.17846472] [-2.985 -3. 0.17440115] [-2.97 -3. 0.17063709] ... [ 2.97 3. 0.17063709] [ 2.985 3. 0.17440115] [ 3. 3. 0.17846472]] Writing PLY: [========================================] 100% Reading PLY: [========================================] 100% xyz_load [[-3. -3. 0.17846472] [-2.985 -3. 0.17440115] [-2.97 -3. 0.17063709] ... [ 2.97 3. 0.17063709] [ 2.985 3. 0.17440115] [ 3. 3. 0.17846472]] 基准 基准_fgr.py 123456789101112131415... office2:: matching 48-49 Reading PLY: [========================================] 100% Reading PLY: [========================================] 100% :: Downsample with a voxel size 0.050. :: Estimate normal with search radius 0.100. :: Compute FPFH feature with search radius 0.250. :: Downsample with a voxel size 0.050. :: Estimate normal with search radius 0.100. :: Compute FPFH feature with search radius 0.250. :: Apply fast global registration with distance threshold 0.025 [[ 0.95713891 -0.09688744 0.2729431 -0.19772407] [ 0.09078796 0.99525781 0.03492042 -0.28293611] [-0.2750321 -0.00864375 0.96139619 0.44358903] [ 0. 0. 0. 1. ]] 基准_pre.py 按住 123456789(py36) D:\Open3D-0.4.0\examples\Python\Benchmark>python benchmark_pre.py Reading PLY: [========================================] 100% :: Downsample with a voxel size 0.050. :: Estimate normal with search radius 0.100. :: Compute FPFH feature with search radius 0.250. Traceback (most recent call last): File "benchmark_pre.py", line 49, in pickle.dump([source_down, source_fpfh], f) TypeError: can't pickle open3d.open3d.PointCloud objects 基准_ransac.py 1234567891011121314151617... office2:: matching 48-49 Reading PLY: [========================================] 100% Reading PLY: [========================================] 100% :: Downsample with a voxel size 0.050. :: Estimate normal with search radius 0.100. :: Compute FPFH feature with search radius 0.250. :: Downsample with a voxel size 0.050. :: Estimate normal with search radius 0.100. :: Compute FPFH feature with search radius 0.250. :: RANSAC registration on downsampled point clouds. Since the downsampling voxel size is 0.050, we use a liberal distance threshold 0.075. [[ 0.9566918 -0.08567279 0.27821031 -0.383805 ] [ 0.07492634 0.99598184 0.0490533 -0.33100488] [-0.28129495 -0.02608361 0.9592668 0.62173136] [ 0. 0. 0. 1. ]] 杂项 color_image.py 一个 th> b th> c th> d th> e th> tr> header> td> td> td> td> td> tr> tbody> table> 12345678910111213141516(py36) D:\Open3D-0.4.0\examples\Python\Misc>python color_image.py Testing image in open3d ... Convert an image to numpy and draw it with matplotlib. Image of size 1582x1058, with 3 channels. Use numpy.asarray to access buffer data. Convet a numpy image to Image and show it with DrawGeomtries(). (512, 512, 3) Image of size 512x512, with 3 channels. Use numpy.asarray to access buffer data. Render a channel of the previous image. (512, 512) (512, 1) Image of size 512x512, with 1 channels. Use numpy.asarray to access buffer data. Write the previous image to file then load it with matplotlib. Testing basic image processing module. Evaluation_geometric_feature.py 12(py36) D:\Open3D-0.4.0\examples\Python\Misc>python evaluate_geometric_feature.py 11.39% points in source pointcloud successfully found their correspondence. feature.py 一个 th> b th> c th> tr> header> td> td> td> tr> tbody> table> 123456789(py36) D:\Open3D-0.4.0\examples\Python\Misc>python feature.py Load two aligned point clouds. Load their FPFH feature and evaluate. Black : matching distance > 0.2 White : matching distance = 0 [ViewControl] SetViewPoint() failed because window height and width are not set. Load their L32D feature and evaluate. Black : matching distance > 0.2 White : matching distance = 0 pose_graph_optimization.py 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758(py36) D:\Open3D-0.4.0\examples\Python\Misc>python pose_graph_optimization.py Parameters for PoseGraph optimization ... GlobalOptimizationLevenbergMarquardt GlobalOptimizationConvergenceCriteria > max_iteration : 100 > min_relative_increment : 0.000001 > min_relative_residual_increment : 0.000001 > min_right_term : 0.000001 > min_residual : 0.000001 > max_iteration_lm : 20 > upper_scale_factor : 0.666667 > lower_scale_factor : 0.333333 GlobalOptimizationOption > max_correspondence_distance : 0.075000 > edge_prune_threshold : 0.250000 > preference_loop_closure : 1.000000 > reference_node : -1 Optimizing Fragment PoseGraph using open3d ... PoseGraph with 100 nodes and 4090 edges. Validating PoseGraph - finished. [GlobalOptimizationLM] Optimizing PoseGraph having 100 nodes and 4090 edges. Line process weight : 1042.862563 [Initial ] residual : 1.637548e+05, lambda : 1.497962e+03 [Iteration 00] residual : 9.502428e+03, valid edges : 3989, time : 0.060 sec. [Iteration 01] residual : 4.505665e+03, valid edges : 3989, time : 0.060 sec. Delta.norm() < 1.000000e-06 * (x.norm() + 1.000000e-06) [GlobalOptimizationLM] total time : 0.170 sec. [GlobalOptimizationLM] Optimizing PoseGraph having 100 nodes and 4088 edges. Line process weight : 1043.102250 [Initial ] residual : 2.882884e+03, lambda : 1.576682e+03 [Iteration 00] residual : 2.881731e+03, valid edges : 3989, time : 0.060 sec. Delta.norm() < 1.000000e-06 * (x.norm() + 1.000000e-06) [GlobalOptimizationLM] total time : 0.108 sec. CompensateReferencePoseGraphNode : reference : -1 Optimizing Global PoseGraph using open3d ... PoseGraph with 320 nodes and 13904 edges. Validating PoseGraph - finished. [GlobalOptimizationLM] Optimizing PoseGraph having 320 nodes and 13904 edges. Line process weight : 18.104563 [Initial ] residual : 1.180879e+09, lambda : 4.157481e+01 [Iteration 00] residual : 2.998445e+05, valid edges : 390, time : 0.910 sec. ... [Iteration 21] residual : 2.753939e+05, valid edges : 605, time : 1.038 sec. Current_residual - new_residual < 1.000000e-06 * current_residual [GlobalOptimizationLM] total time : 22.635 sec. [GlobalOptimizationLM] Optimizing PoseGraph having 320 nodes and 1243 edges. Line process weight : 28.662674 [Initial ] residual : 4.879364e+04, lambda : 6.815879e+01 [Iteration 00] residual : 4.855143e+04, valid edges : 605, time : 0.044 sec. ... [Iteration 07] residual : 4.852427e+04, valid edges : 605, time : 0.045 sec. Current_residual - new_residual < 1.000000e-06 * current_residual [GlobalOptimizationLM] total time : 0.401 sec. CompensateReferencePoseGraphNode : reference : -1 sample.py按住 12345(py36) D:\Open3D-0.4.0\examples\Python\Misc>python sampling.py Traceback (most recent call last): File "sampling.py", line 8, in from common import * ModuleNotFoundError: No module named 'common' vector.py 1234567891011121314151617181920212223242526272829303132333435363738394041424344(py36) D:\Open3D-0.4.0\examples\Python\Misc>python vector.py Testing vector in open3d ... Testing IntVector ... IntVector[1, 2, 3, 4, 5] [1 2 3 4 5] IntVector[10, 22, 3, 4, 5] IntVector[5, 2, 3, 4, 5] IntVector[2, 2, 3, 4, 5] IntVector[40, 50, 3, 4, 5] IntVector[1, 2, 3, 4, 5] Testing DoubleVector ... DoubleVector[1, 2, 3] DoubleVector[1.1, 1.2] DoubleVector[0.1, 0.2] DoubleVector[1.1, 1.2, 1.3, 0.1, 0.2] Testing Vector3dVector ... std::vector with 2 elements. Use numpy.asarray() to access data. [[1. 2. 3. ] [0.1 0.2 0.3]] [[4. 5. 6. ] [0.1 0.2 0.3]] [[-1. 5. 6. ] [ 0.1 0.2 0.3]] [[0. 5. 6. ] [0.1 0.2 0.3]] [[10. 11. 3. ] [12. 13. 0.3]] [[ 1. 2. 3. ] [ 0.1 0.2 0.3] [30. 31. 32. ]] [[1. 2. 3. ] [0.1 0.2 0.3] [0. 5. 6. ] [0.1 0.2 0.3]] Testing Vector3iVector ... std::vector with 2 elements. Use numpy.asarray() to access data. [[1 2 3] [4 5 6]] 重建系统 run_system.py按住 123456789101112Reconstruction system positional arguments: config path to the config file optional arguments: -h, --help show this help message and exit --make Step 1) make fragments from RGBD sequence --register Step 2) register all fragments to detect loop closure --refine Step 3) refine rough registrations --integrate Step 4) integrate the whole RGBD sequence to make final mesh --debug_mode turn on debug mode概要 在Python中引入了Open3D。 我运行了示例程序。 现在,您可以轻松执行3D处理。参考文献 Open3D教程 Open 3D PyCon九州2018的SLAM入门 Open3D的 Copyright © 码农家园 联系:[email protected] |
| 今日新闻 |
| 推荐新闻 |
| CopyRight 2018-2019 |