memo: Lib - Points | Libraries Manipulating Point Cloud

Awesome

(2024-05-10)


plyfile

(2024-03-27)

  1. Read ply file (Polygon File Format): Docs

    1
    2
    3
    4
    5
    6
    7
    
    import numpy
    from plyfile import PlyData, PlyElement
    
    with open('/home/yi/Downloads/DTU_SampleSet/MVS Data/Points/stl/stl001_total.ply', 'rb') as f:
        plydata = PlyData.read(f)
    
    np.array(plydata.elements[0].data)[0]
    

    Output:

    1
    
    (49.720848, -54.11675, 672.04956, 0.9649841, -0.08213623, -0.24911714, 102, 70, 44)
    

    The returned tuple is a single data, whose datatype has 9 members. I want to only take the first 3 values: x,y,z. But it’s not allowed to use syntax like [:3] to slice it.

  2. Write a ply file

    Example in 3DGS:


Open3D

Homepage

(2024-03-27)

Compare open3d, plyfile, pyntcloud, and meshio

  1. open3d read .ply file Docs

    1
    2
    3
    
    import open3d as o3d
    
    pcd = o3d.io.read_point_cloud("/home/yi/Downloads/DTU_SampleSet/MVS Data/Points/stl/stl001_total.ply", format='ply')
    
  2. Convert pcd to np.array and visualize it: Docs

    1
    2
    3
    4
    
    import numpy as np
    xyz_load = np.asarray(pcd.points) # (2880879, 3)
    print(f'xyz_load:\n {xyz_load}')
    o3d.visualization.draw_geometries([pcd])
    

    Setting camera directions:

    1
    2
    3
    4
    
    lookat = np.array([[500.],[500.], [500.]])
    up = np.array([[0.853452],[-0.447425], [0.267266]])
    front = np.array([[0.417749],[0.893913],[0.162499]])
    o3d.visualization.draw_geometries([pcd], width=500, height=500, lookat=lookat, up=up, front=front, zoom=1.0)
    
  3. Visualize point cloud from a specified camera pose:

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    
    import numpy as np
    vis = o3d.visualization.VisualizerWithKeyCallback()
    vis.create_window()
    vis.get_render_option().background_color = np.asarray([1,1,1])
    vis.add_geometry(pcd)
    view_ctl = vis.get_view_control()
    w2c = np.array([[-0.636298, -0.727666, 0.25618, -143.534],
                    [0.0315712,  0.307237, 0.951109, -579.42],
                    [-0.770797,  0.613276, -0.172521, 759.831],
                    [ 0.0, 0.0, 0.0, 1.0]]) # cam 38
    cam = view_ctl.convert_to_pinhole_camera_parameters()
    cam.extrinsic = w2c
    view_ctl.convert_from_pinhole_camera_parameters(cam, True)
    vis.run()
    vis.destroy_window()
    

Triangulation

open3d.geometry.TriangleMesh - Docs

Ball-Pivoting

Ref: 5-Step Guide to generate 3D meshes from point clouds with Python - Medium - Florent Poux, Ph.D

  1. Basic code

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    
    import open3d as o3d
    import numpy as np
    
    pcd = o3d.io.read_point_cloud("/home/yi/Downloads/CasMVSNet_pl-comments/results/dtu/image_ref/scan1/points3d.ply", format='ply')
    
    distances = pcd.compute_nearest_neighbor_distance()
    avg_dist = np.mean(distances)
    # The radius of the ball should be larger than the avg distance between points
    radius = 3 * avg_dist
    
    # Ball-Pivoting Algorithm
    bpa_mesh = o3d.geometry.TriangleMesh.create_from_point_cloud_ball_pivoting(pcd,o3d.utility.DoubleVector([radius, radius * 2]))
    
    dec_mesh = bpa_mesh.simplify_quadric_decimation(100000)
    
    dec_mesh.remove_degenerate_triangles()
    dec_mesh.remove_duplicated_triangles()
    dec_mesh.remove_duplicated_vertices()
    dec_mesh.remove_non_manifold_edges()
    
    o3d.io.write_triangle_mesh("bpa_mesh.ply", dec_mesh)
    
  2. Open the .ply file with ParaView:

    • The ball-pivoting algorithm result is better than possion on this point cloud.

  1. Retrieve triangles vertices:

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    
    print(np.asarray(dec_mesh.triangles).shape)
    print(dec_mesh.triangles[0])
    print(np.asarray(dec_mesh.vertices).shape)
    print(dec_mesh.vertices[100567])
    # print(np.asarray(dec_mesh.triangle_uvs).shape)
    print(dec_mesh)
    
    vertices = np.asarray(dec_mesh.vertices)    # (220_583, 3)
    vertices = torch.from_numpy(vertices)
    triangles = np.asarray(dec_mesh.triangles)  # (100_000, 3)
    triangles = torch.from_numpy(triangles)
    K = 3 # number of vertices
    # Coordinates of 3 vertices of each triangle
    nnCoords = vertices.gather(dim=0, index=triangles.reshape(-1,1).expand(-1,3).type(torch.int64)).view(-1,K,3)  # (100_000,K,3)
    

Poisson

  1. Basic Code:

    1
    2
    3
    4
    5
    6
    
    poisson_mesh = o3d.geometry.TriangleMesh.create_from_point_cloud_poisson(pcd, depth=8, width=0, scale=1.1, linear_fit=False)[0]
    
    bbox = pcd.get_axis_aligned_bounding_box()
    p_mesh_crop = poisson_mesh.crop(bbox)
    
    o3d.io.write_triangle_mesh("p_mesh_c.ply", p_mesh_crop)
    
  2. Visualization in ParaView

    • Don’t know if the normals of the input .ply caused the Poisson reconsturction bad. It seems like a sheet is blown up.

Delaunay

(2024-05-13)

Search: “pointcloudlibrary triangulation” in DDG


Other Libs


Stitch Clouds

(2024-04-01)

Stitching point clouds from multiple cameras - camcalib


Wis3D

(2024-04-07)

zju3dv/Wis3D


PCL

Compile Library

CPU ✅

(2024-05-11)

Reference: Docs

System:

  • Ubuntu 22.04.4 LTS x86_64, Kernel: 6.5.0-28-generic,
  • gcc (Ubuntu 9.5.0-1ubuntu1~22.04) 9.5.0
  • Cudatoolkit: cuda_11.6.r11.6/compiler.30794723_0
  • Nvidia Driver: 545.23.08
  • GPU: 3090Ti
  • CPU: AMD Ryzen 7 5700X (16) @ 3.400GHz
  • Board: X570 AORUS PRO WIFI -CF. Memory: 16GB.
  1. Download source.tar.gz (pcl-1.14.1)

    Uncompress: tar xvf source.tar.gz

  2. Build:

    1
    2
    
    cd pcl
    cmake -B ./build
    
  3. Compile and install:

1
2
make -j2
sudo make -j2 install

The library is installed in /usr/lib and /usr/include/

Install paths
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
-- Installing: /usr/local/lib/libpcl_kdtree.so.1.14.1
-- Installing: /usr/local/lib/libpcl_kdtree.so.1.14
-- Set non-toolchain portion of runtime path of "/usr/local/lib/libpcl_kdtree.so.1.14.1" to "/usr/local/lib"
-- Installing: /usr/local/lib/libpcl_kdtree.so
-- Installing: /usr/local/lib/pkgconfig/pcl_kdtree.pc
-- Installing: /usr/local/include/pcl-1.14/pcl/kdtree/kdtree.h
-- Installing: /usr/local/include/pcl-1.14/pcl/kdtree/io.h
-- Installing: /usr/local/include/pcl-1.14/pcl/kdtree/kdtree_flann.h
...
-- Installing: /usr/local/include/pcl-1.14/pcl/kdtree/impl/io.hpp
-- Installing: /usr/local/include/pcl-1.14/pcl/kdtree/impl/kdtree_flann.hpp
-- Installing: /usr/local/lib/libpcl_octree.so.1.14.1
-- Installing: /usr/local/lib/libpcl_octree.so.1.14
-- Set non-toolchain portion of runtime path of "/usr/local/lib/libpcl_octree.so.1.14.1" to "/usr/local/lib"
-- Installing: /usr/local/lib/libpcl_octree.so
-- Installing: /usr/local/lib/pkgconfig/pcl_octree.pc
-- Installing: /usr/local/include/pcl-1.14/pcl/octree/octree_base.h
...
-- Installing: /usr/local/include/pcl-1.14/pcl/octree/impl/octree_base.hpp
...
-- Installing: /usr/local/lib/libpcl_search.so.1.14.1
-- Installing: /usr/local/lib/libpcl_search.so.1.14
-- Set non-toolchain portion of runtime path of "/usr/local/lib/libpcl_search.so.1.14.1" to "/usr/local/lib"
-- Installing: /usr/local/lib/libpcl_search.so
-- Installing: /usr/local/lib/pkgconfig/pcl_search.pc
-- Installing: /usr/local/include/pcl-1.14/pcl/search/search.h
-- Installing: /usr/local/include/pcl-1.14/pcl/search/kdtree.h
...
-- Installing: /usr/local/lib/libpcl_sample_consensus.so.1.14.1
-- Installing: /usr/local/lib/libpcl_sample_consensus.so.1.14
-- Set non-toolchain portion of runtime path of "/usr/local/lib/libpcl_sample_consensus.so.1.14.1" to "/usr/local/lib"
-- Installing: /usr/local/lib/libpcl_sample_consensus.so
-- Installing: /usr/local/lib/pkgconfig/pcl_sample_consensus.pc
-- Installing: /usr/local/include/pcl-1.14/pcl/sample_consensus/boost.h
...
-- Installing: /usr/local/include/pcl-1.14/pcl/sample_consensus/impl/mlesac.hpp
-- Installing: /usr/local/lib/libpcl_filters.so.1.14.1
-- Installing: /usr/local/lib/libpcl_filters.so.1.14
-- Set non-toolchain portion of runtime path of "/usr/local/lib/libpcl_filters.so.1.14.1" to "/usr/local/lib"
-- Installing: /usr/local/lib/libpcl_filters.so
-- Installing: /usr/local/lib/pkgconfig/pcl_filters.pc
-- Installing: /usr/local/include/pcl-1.14/pcl/filters/boost.h
-- Installing: /usr/local/include/pcl-1.14/pcl/filters/impl/farthest_point_sampling.hpp
-- Installing: /usr/local/lib/pkgconfig/pcl_2d.pc
-- Installing: /usr/local/include/pcl-1.14/pcl/2d/convolution.h
...
-- Installing: /usr/local/include/pcl-1.14/pcl/2d/impl/convolution.hpp
...
-- Installing: /usr/local/lib/pkgconfig/pcl_geometry.pc
-- Installing: /usr/local/include/pcl-1.14/pcl/geometry/boost.h
-- Installing: /usr/local/include/pcl-1.14/pcl/geometry/eigen.h
...
-- Installing: /usr/local/include/pcl-1.14/pcl/geometry/triangle_mesh.h
-- Installing: /usr/local/include/pcl-1.14/pcl/geometry/impl/polygon_operations.hpp
-- Installing: /usr/local/lib/libpcl_io_ply.so.1.14.1
-- Installing: /usr/local/lib/libpcl_io_ply.so.1.14
-- Set non-toolchain portion of runtime path of "/usr/local/lib/libpcl_io_ply.so.1.14.1" to "/usr/local/lib"
-- Installing: /usr/local/lib/libpcl_io_ply.so
-- Installing: /usr/local/include/pcl-1.14/pcl/io/ply/byte_order.h
-- Installing: /usr/local/include/pcl-1.14/pcl/io/ply/io_operators.h
-- Installing: /usr/local/include/pcl-1.14/pcl/io/ply/ply.h
-- Installing: /usr/local/include/pcl-1.14/pcl/io/ply/ply_parser.h
-- Installing: /usr/local/lib/libpcl_io.so.1.14.1
-- Installing: /usr/local/lib/libpcl_io.so.1.14
-- Set non-toolchain portion of runtime path of "/usr/local/lib/libpcl_io.so.1.14.1" to "/usr/local/lib"
-- Installing: /usr/local/lib/libpcl_io.so
-- Installing: /usr/local/lib/pkgconfig/pcl_io.pc
-- Installing: /usr/local/include/pcl-1.14/pcl/io/boost.h
-- Installing: /usr/local/include/pcl-1.14/pcl/io/eigen.h
...
-- Installing: /usr/local/include/pcl-1.14/pcl/compression/octree_pointcloud_compression.h
-- Installing: /usr/local/include/pcl-1.14/pcl/compression/color_coding.h
-- Installing: /usr/local/include/pcl-1.14/pcl/compression/compression_profiles.h
...
-- Installing: /usr/local/include/pcl-1.14/pcl/io/impl/ascii_io.hpp
-- Installing: /usr/local/include/pcl-1.14/pcl/io/impl/pcd_io.hpp
-- Installing: /usr/local/include/pcl-1.14/pcl/io/impl/octree_pointcloud_compression.hpp
-- Installing: /usr/local/lib/libpcl_features.so.1.14.1
-- Installing: /usr/local/lib/libpcl_features.so.1.14
-- Set non-toolchain portion of runtime path of "/usr/local/lib/libpcl_features.so.1.14.1" to "/usr/local/lib"
-- Installing: /usr/local/lib/libpcl_features.so
-- Installing: /usr/local/lib/pkgconfig/pcl_features.pc
-- Installing: /usr/local/include/pcl-1.14/pcl/features/boost.h
...
-- Installing: /usr/local/include/pcl-1.14/pcl/features/boundary.h
-- Installing: /usr/local/include/pcl-1.14/pcl/features/range_image_border_extractor.h
-- Installing: /usr/local/include/pcl-1.14/pcl/features/impl/board.hpp
...
-- Installing: /usr/local/include/pcl-1.14/pcl/features/impl/boundary.hpp
-- Installing: /usr/local/include/pcl-1.14/pcl/features/impl/range_image_border_extractor.hpp
-- Installing: /usr/local/lib/libpcl_ml.so.1.14.1
-- Installing: /usr/local/lib/libpcl_ml.so.1.14
-- Set non-toolchain portion of runtime path of "/usr/local/lib/libpcl_ml.so.1.14.1" to "/usr/local/lib"
-- Installing: /usr/local/lib/libpcl_ml.so
-- Installing: /usr/local/lib/pkgconfig/pcl_ml.pc
-- Installing: /usr/local/include/pcl-1.14/pcl/ml/feature_handler.h
-- Installing: /usr/local/include/pcl-1.14/pcl/ml/multi_channel_2d_comparison_feature.h
...
-- Installing: /usr/local/include/pcl-1.14/pcl/ml/dt/decision_forest.h
...
-- Installing: /usr/local/include/pcl-1.14/pcl/ml/ferns/fern.h
...
-- Installing: /usr/local/include/pcl-1.14/pcl/ml/impl/dt/decision_forest_evaluator.hpp
...
-- Installing: /usr/local/include/pcl-1.14/pcl/ml/impl/svm/svm_wrapper.hpp
-- Installing: /usr/local/lib/libpcl_segmentation.so.1.14.1
-- Installing: /usr/local/lib/libpcl_segmentation.so.1.14
-- Set non-toolchain portion of runtime path of "/usr/local/lib/libpcl_segmentation.so.1.14.1" to "/usr/local/lib"
-- Installing: /usr/local/lib/libpcl_segmentation.so
-- Installing: /usr/local/lib/pkgconfig/pcl_segmentation.pc
-- Installing: /usr/local/include/pcl-1.14/pcl/segmentation/boost.h
-- Installing: /usr/local/include/pcl-1.14/pcl/segmentation/extract_clusters.h
...
-- Installing: /usr/local/include/pcl-1.14/pcl/segmentation/impl/extract_clusters.hpp
...
-- Installing: /usr/local/include/pcl-1.14/pcl/segmentation/impl/cpc_segmentation.hpp
-- Installing: /usr/local/lib/libpcl_surface.so.1.14.1
-- Installing: /usr/local/lib/libpcl_surface.so.1.14
-- Set non-toolchain portion of runtime path of "/usr/local/lib/libpcl_surface.so.1.14.1" to "/usr/local/lib"
-- Installing: /usr/local/lib/libpcl_surface.so
-- Installing: /usr/local/lib/pkgconfig/pcl_surface.pc
-- Installing: /usr/local/include/pcl-1.14/pcl/surface/boost.h
-- Installing: /usr/local/include/pcl-1.14/pcl/surface/eigen.h
...
-- Installing: /usr/local/include/pcl-1.14/pcl/surface/poisson.h
-- Installing: /usr/local/include/pcl-1.14/pcl/surface/3rdparty/poisson4/allocator.h
...
-- Installing: /usr/local/include/pcl-1.14/pcl/surface/impl/gp3.hpp
-- Installing: /usr/local/include/pcl-1.14/pcl/surface/impl/grid_projection.hpp
-- Installing: /usr/local/include/pcl-1.14/pcl/surface/impl/marching_cubes.hpp
...
-- Installing: /usr/local/lib/libpcl_registration.so.1.14.1
-- Installing: /usr/local/lib/libpcl_registration.so.1.14
-- Set non-toolchain portion of runtime path of "/usr/local/lib/libpcl_registration.so.1.14.1" to "/usr/local/lib"
-- Installing: /usr/local/lib/libpcl_registration.so
-- Installing: /usr/local/lib/pkgconfig/pcl_registration.pc
-- Installing: /usr/local/include/pcl-1.14/pcl/registration/eigen.h
-- Installing: /usr/local/include/pcl-1.14/pcl/registration/boost.h
...
-- Installing: /usr/local/include/pcl-1.14/pcl/registration/transforms.h
-- Installing: /usr/local/include/pcl-1.14/pcl/registration/transformation_estimation.h
...
-- Installing: /usr/local/include/pcl-1.14/pcl/registration/gicp.h
...
-- Installing: /usr/local/include/pcl-1.14/pcl/registration/impl/default_convergence_criteria.hpp
-- Installing: /usr/local/include/pcl-1.14/pcl/registration/impl/correspondence_estimation.hpp
...
-- Installing: /usr/local/include/pcl-1.14/pcl/registration/impl/transformation_estimation_3point.hpp
-- Installing: /usr/local/lib/libpcl_keypoints.so.1.14.1
-- Installing: /usr/local/lib/libpcl_keypoints.so.1.14
-- Set non-toolchain portion of runtime path of "/usr/local/lib/libpcl_keypoints.so.1.14.1" to "/usr/local/lib"
-- Installing: /usr/local/lib/libpcl_keypoints.so
-- Installing: /usr/local/lib/pkgconfig/pcl_keypoints.pc
-- Installing: /usr/local/include/pcl-1.14/pcl/keypoints/keypoint.h
-- Installing: /usr/local/include/pcl-1.14/pcl/keypoints/narf_keypoint.h
-- Installing: /usr/local/include/pcl-1.14/pcl/keypoints/sift_keypoint.h
...
-- Installing: /usr/local/lib/libpcl_tracking.so.1.14.1
-- Installing: /usr/local/lib/libpcl_tracking.so.1.14
-- Set non-toolchain portion of runtime path of "/usr/local/lib/libpcl_tracking.so.1.14.1" to "/usr/local/lib"
-- Installing: /usr/local/lib/libpcl_tracking.so
-- Installing: /usr/local/lib/pkgconfig/pcl_tracking.pc
-- Installing: /usr/local/include/pcl-1.14/pcl/tracking/tracking.h
-- Installing: /usr/local/include/pcl-1.14/pcl/tracking/tracker.h
...
-- Installing: /usr/local/include/pcl-1.14/pcl/tracking/impl/tracking.hpp
-- Installing: /usr/local/include/pcl-1.14/pcl/tracking/impl/tracker.hpp
...
-- Installing: /usr/local/lib/libpcl_recognition.so.1.14.1
-- Installing: /usr/local/lib/libpcl_recognition.so.1.14
-- Set non-toolchain portion of runtime path of "/usr/local/lib/libpcl_recognition.so.1.14.1" to "/usr/local/lib"
-- Installing: /usr/local/lib/libpcl_recognition.so
-- Installing: /usr/local/lib/pkgconfig/pcl_recognition.pc
-- Installing: /usr/local/include/pcl-1.14/pcl/recognition/boost.h
...
-- Installing: /usr/local/include/pcl-1.14/pcl/recognition/ransac_based/auxiliary.h
...
-- Installing: /usr/local/lib/libpcl_stereo.so.1.14.1
-- Installing: /usr/local/lib/libpcl_stereo.so.1.14
-- Set non-toolchain portion of runtime path of "/usr/local/lib/libpcl_stereo.so.1.14.1" to "/usr/local/lib"
-- Installing: /usr/local/lib/libpcl_stereo.so
-- Installing: /usr/local/lib/pkgconfig/pcl_stereo.pc
-- Installing: /usr/local/include/pcl-1.14/pcl/stereo/stereo_grabber.h
-- Installing: /usr/local/include/pcl-1.14/pcl/stereo/stereo_matching.h
...
-- Installing: /usr/local/bin/pcl_pcd_convert_NaN_nan
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_pcd_convert_NaN_nan" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_pcd2ply
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_pcd2ply" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_ply2pcd
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_ply2pcd" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_xyz2pcd
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_xyz2pcd" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_pclzf2pcd
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_pclzf2pcd" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_pcd2vtk
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_pcd2vtk" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_add_gaussian_noise
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_add_gaussian_noise" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_pcd_change_viewpoint
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_pcd_change_viewpoint" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_concatenate_points_pcd
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_concatenate_points_pcd" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_demean_cloud
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_demean_cloud" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_generate
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_generate" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_convert_pcd_ascii_binary
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_convert_pcd_ascii_binary" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_pcd_introduce_nan
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_pcd_introduce_nan" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_hdl_grabber
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_hdl_grabber" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_ply2obj
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_ply2obj" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_ply2ply
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_ply2ply" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_ply2raw
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_ply2raw" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_plyheader
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_plyheader" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_plane_projection
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_plane_projection" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_compute_hausdorff
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_compute_hausdorff" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_compute_cloud_error
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_compute_cloud_error" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_voxel_grid
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_voxel_grid" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_passthrough_filter
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_passthrough_filter" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_radius_filter
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_radius_filter" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_outlier_removal
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_outlier_removal" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_fast_bilateral_filter
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_fast_bilateral_filter" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_morph
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_morph" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_local_max
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_local_max" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_grid_min
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_grid_min" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_cluster_extraction
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_cluster_extraction" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_progressive_morphological_filter
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_progressive_morphological_filter" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_mls_smoothing
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_mls_smoothing" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_uniform_sampling
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_uniform_sampling" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_sac_segmentation_plane
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_sac_segmentation_plane" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_train_unary_classifier
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_train_unary_classifier" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_unary_classifier_segment
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_unary_classifier_segment" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_crf_segmentation
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_crf_segmentation" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_train_linemod_template
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_train_linemod_template" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_normal_estimation
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_normal_estimation" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_boundary_estimation
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_boundary_estimation" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_fpfh_estimation
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_fpfh_estimation" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_vfh_estimation
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_vfh_estimation" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_spin_estimation
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_spin_estimation" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_extract_feature
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_extract_feature" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_marching_cubes_reconstruction
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_marching_cubes_reconstruction" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_gp3_surface
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_gp3_surface" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_poisson_reconstruction
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_poisson_reconstruction" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_icp
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_icp" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_icp2d
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_icp2d" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_elch
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_elch" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_lum
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_lum" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_ndt2d
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_ndt2d" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_ndt3d
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_ndt3d" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_transform_point_cloud
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_transform_point_cloud" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_transform_from_viewpoint
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_transform_from_viewpoint" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_match_linemod_template
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_match_linemod_template" to "/usr/local/lib"
-- Installing: /usr/local/bin/pcl_linemod_detection
-- Set non-toolchain portion of runtime path of "/usr/local/bin/pcl_linemod_detection" to "/usr/local/lib"

GPU ✅

Compile PCL for leveraging Nvidia GPU: Tutorials

I’m concerning GPU version is not good for debugging.

(2024-05-13)

System info:

  • OS: Ubuntu 20.04.6 LTS x86_64, Kernel: 5.15.0-105-generic
  • CPU: Intel i7-9700 (8) @ 4.700GHz
  • GPU: NVIDIA GeForce GTX 1050 Ti; GPU: Intel UHD Graphics 630
  • Memory: 5010MiB / 15809MiB
  • gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
  • Cudatoolkit: Cuda compilation tools, release 11.6, V11.6.55. Build cuda_11.6.r11.6/compiler.30794723_0
1
2
3
4
5
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt install g++-7 -y

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-7
sudo update-alternatives --config gcc

Open GPU options in ccmake, which is an interactive interface How do I install ccmake? - SE

1
2
3
4
5
# install ccmake
sudo apt-get install cmake-curses-gui

mkdir build; cd build
ccmake ..

I turned ON 2 options: BUILD_CUDA and BUILD_GPU

Press c again to finish configurations and then press g to generate makefiles.

1
2
3
# cd build
make 
sudo make install

Triangulation

Greedy Projection

Code: Docs

  • Change the path to .pcd file: pcl::io::loadPCDFile ("../../pcl/test/bun0.pcd", cloud_blob);

  • Save point cloud as .vtk file: pcl::io::saveVTKFile ("mesh.vtk", triangles);

  • Build and compile:

    1
    2
    
    cmake -B ./build -DCMAKE_BUILD_TYPE=Debug
    make -C ./build
    
  • Execute: ./greedy_projection will generate a mesh.vtk

Use ParaView to open .vtk files.

  • Uncompress: tar xvf ParaView-5.12.0-MPI-Linux-Python3.10-x86_64.tar.gz

  • Execute: ./home/jack/Programs/ParaView-5.12.0-MPI-Linux-Python3.10-x86_64/bin/paraview

  • Open the vtk file and open the “eye”.


Convert ply pcd

(2024-05-11)

Ref: Convertion of .ply format to .pcd format - SO

1
2
3
import open3d as o3d
ply = o3d.io.read_point_cloud("source_pointcloud.ply")
o3d.io.write_point_cloud("sink_pointcloud.pcd", ply)

Then use loadPCDFile to a PCLPointCloud2 template point cloud.

1
2
pcl::PCLPointCloud2 cloud_blob;
pcl::io::loadPCDFile ("../pcl/test/bun0.pcd", cloud_blob);

In this way, however, there is no triangle formed, as shown in the last line of the file “mesh.vtk”: POLYGONS 0 0. VTK file formats

(2024-05-13)


Read Ply file

(2024-05-12)

Docs

1
2
#include <pcl/io/ply_io.h>
pcl::io::loadPLYFile ("../CasMVSNet_pl-comments/results/dtu/image_ref/scan1/points3d.ply", cloud_blob);

Debug

Repo-Github

(2024-05-12)

  • The C/C++ extension in VSCode can’t cannot open source file "pcl/point_types.h"C/C++(1696)

  • Set IncludePath referring to Visual Studio Code cannot open source file “iostream” - SO

    • BTW, To find the path to C++: gcc -v -E -x c++ -

    • Create c_cpp_properties.json by pressing Ctrl+Shift+p and select C/C++: Edit Configurations (JSON)

    • Append includePath

      1
      2
      3
      4
      5
      
      "includePath": [
                      "${workspaceFolder}/**",
                      "/usr/local/include/pcl-1.14",
                      "/home/zichen/.local/include/eigen3"
                   ]
      
    • Eigen must be installed: cannot open source file "Eigen/StdVector" (dependency of "pcl/io/pcd_io.h")C/C++(1696)

      Installation Guide: Eigen - GitHub Pages

      It's installed in .local/include/eigen/
        1
        2
        3
        4
        5
        6
        7
        8
        9
       10
       11
       12
       13
       14
       15
       16
       17
       18
       19
       20
       21
       22
       23
       24
       25
       26
       27
       28
       29
       30
       31
       32
       33
       34
       35
       36
       37
       38
       39
       40
       41
       42
       43
       44
       45
       46
       47
       48
       49
       50
       51
       52
       53
       54
       55
       56
       57
       58
       59
       60
       61
       62
       63
       64
       65
       66
       67
       68
       69
       70
       71
       72
       73
       74
       75
       76
       77
       78
       79
       80
       81
       82
       83
       84
       85
       86
       87
       88
       89
       90
       91
       92
       93
       94
       95
       96
       97
       98
       99
      100
      101
      102
      103
      104
      105
      106
      107
      108
      109
      110
      111
      112
      113
      114
      115
      116
      117
      118
      119
      120
      121
      122
      123
      124
      125
      126
      127
      128
      129
      130
      131
      132
      133
      134
      135
      136
      137
      138
      139
      140
      141
      142
      143
      144
      145
      146
      147
      148
      149
      150
      151
      152
      153
      154
      155
      156
      157
      158
      159
      160
      161
      162
      163
      164
      165
      166
      167
      168
      169
      170
      171
      172
      173
      174
      175
      176
      177
      178
      179
      180
      181
      182
      183
      184
      185
      186
      187
      188
      189
      190
      191
      192
      193
      194
      195
      196
      197
      198
      199
      200
      201
      202
      203
      204
      205
      206
      207
      208
      209
      210
      211
      212
      213
      214
      215
      216
      217
      218
      219
      220
      221
      222
      223
      224
      
      -- Configured Eigen 3.3.7
      -- 
      -- Some things you can do now:
      -- --------------+--------------------------------------------------------------
      -- Command       |   Description
      -- --------------+--------------------------------------------------------------
      -- make install  | Install Eigen. Headers will be installed to:
      --               |     <CMAKE_INSTALL_PREFIX>/<INCLUDE_INSTALL_DIR>
      --               |   Using the following values:
      --               |     CMAKE_INSTALL_PREFIX: /home/zichen/.local
      --               |     INCLUDE_INSTALL_DIR:  include/eigen3
      --               |   Change the install location of Eigen headers using:
      --               |     cmake . -DCMAKE_INSTALL_PREFIX=yourprefix
      --               |   Or:
      --               |     cmake . -DINCLUDE_INSTALL_DIR=yourdir
      -- make doc      | Generate the API documentation, requires Doxygen & LaTeX
      -- make check    | Build and run the unit-tests. Read this page:
      --               |   http://eigen.tuxfamily.org/index.php?title=Tests
      -- make blas     | Build BLAS library (not the same thing as Eigen)
      -- make uninstall| Removes files installed by make install
      -- --------------+--------------------------------------------------------------
      -- 
      -- Configuring done (3.0s)
      -- Generating done (1.1s)
      -- Build files have been written to: /tmp/eigen/build
      + make install
      Install the project...
      -- Install configuration: "Release"
      -- Installing: /home/zichen/.local/include/eigen3/signature_of_eigen3_matrix_library
      -- Installing: /home/zichen/.local/share/pkgconfig/eigen3.pc
      -- Installing: /home/zichen/.local/share/eigen3/cmake/Eigen3Targets.cmake
      -- Installing: /home/zichen/.local/share/eigen3/cmake/UseEigen3.cmake
      -- Installing: /home/zichen/.local/share/eigen3/cmake/Eigen3Config.cmake
      -- Installing: /home/zichen/.local/share/eigen3/cmake/Eigen3ConfigVersion.cmake
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/Cholesky
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/CholmodSupport
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/Core
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/Dense
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/Eigen
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/Eigenvalues
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/Geometry
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/Householder
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/IterativeLinearSolvers
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/Jacobi
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/LU
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/MetisSupport
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/OrderingMethods
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/PaStiXSupport
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/PardisoSupport
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/QR
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/QtAlignedMalloc
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/SPQRSupport
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/SVD
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/Sparse
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/SparseCholesky
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/SparseCore
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/SparseLU
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/SparseQR
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/StdDeque
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/StdList
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/StdVector
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/SuperLUSupport
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/UmfPackSupport
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Householder
      ...
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/DenseBase.h
      ...
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/functors/StlFunctors.h
      ...
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/CwiseTernaryOp.h
      ...
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/products
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/products/TriangularMatrixVector_BLAS.h
      ...
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/Transpositions.h
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/NoAlias.h
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/util
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/util/BlasUtil.h
      ...
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/DenseStorage.h
      ...
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/arch
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/arch/ZVector
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/arch/ZVector/Complex.h
      ...
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/arch/Default
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/arch/Default/Settings.h
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/arch/Default/ConjHelper.h
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/arch/AVX
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/arch/AVX/Complex.h
      ...
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/arch/SSE
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/arch/SSE/Complex.h
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/arch/SSE/MathFunctions.h
      ...
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/arch/CUDA
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/arch/CUDA/Complex.h
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/arch/CUDA/MathFunctions.h
      ...
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/arch/AltiVec
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/arch/AltiVec/Complex.h
      ...
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/arch/AVX512
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/arch/AVX512/MathFunctions.h
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/arch/AVX512/PacketMath.h
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/arch/NEON
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/arch/NEON/Complex.h
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/arch/NEON/MathFunctions.h
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Core/arch/NEON/PacketMath.h
      ...
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/PardisoSupport
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/PardisoSupport/PardisoSupport.h
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/CholmodSupport
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/CholmodSupport/CholmodSupport.h
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Jacobi
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Jacobi/Jacobi.h
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Eigenvalues
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Eigenvalues/Tridiagonalization.h
      ...
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/misc
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/misc/Image.h
      ...
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/SuperLUSupport
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/SuperLUSupport/SuperLUSupport.h
      ...
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/OrderingMethods
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/OrderingMethods/Ordering.h
      ...
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/SparseCore
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/SparseCore/SparseDot.h
      ...
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/IterativeLinearSolvers
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h
      ...
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/QR
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/QR/CompleteOrthogonalDecomposition.h
      ...
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/StlSupport
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/StlSupport/StdList.h
      ...
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/LU
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/LU/Determinant.h
      ...
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/LU/arch
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/LU/arch/Inverse_SSE.h
      ...
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/PaStiXSupport
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/PaStiXSupport/PaStiXSupport.h
      ...
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/SVD
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/SVD/JacobiSVD.h
      ...
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Geometry
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Geometry/Umeyama.h
      ...
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/SparseCholesky
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/SparseCholesky/SimplicialCholesky.h
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/plugins
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/plugins/BlockMethods.h
      ...
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/MetisSupport
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/MetisSupport/MetisSupport.h
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Cholesky
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Cholesky/LLT_LAPACKE.h
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Cholesky/LDLT.h
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/Cholesky/LLT.h
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/SparseLU
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/SparseLU/SparseLU_column_dfs.h
      ...
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/SparseQR
      -- Installing: /home/zichen/.local/include/eigen3/Eigen/src/SparseQR/SparseQR.h
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/AdolcForward
      ...
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/src
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/src/LevenbergMarquardt
      ...
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/src/FFT
      ...
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/src/EulerAngles
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/src/EulerAngles/EulerAngles.h
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/src/EulerAngles/EulerSystem.h
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/src/MatrixFunctions
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/src/MatrixFunctions/MatrixFunction.h
      ...
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/src/Eigenvalues
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/src/Eigenvalues/ArpackSelfAdjointEigenSolver.h
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/src/AutoDiff
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/src/AutoDiff/AutoDiffVector.h
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/src/BVH
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/src/BVH/BVAlgorithms.h
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/src/BVH/KdBVH.h
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/src/NumericalDiff
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/src/NumericalDiff/NumericalDiff.h
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/src/Splines
      ...
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/src/SpecialFunctions
      ...
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/src/SparseExtra
      ...
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/src/Polynomials
      ...
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/src/MoreVectorization
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/src/MoreVectorization/MathFunctions.h
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/src/KroneckerProduct
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/src/KroneckerProduct/KroneckerTensorProduct.h
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/src/Skyline
      ...
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/src/NonLinearOptimization
      ...
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/src/IterativeSolvers
      ...
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/CXX11/Tensor
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/CXX11/TensorSymmetry
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/CXX11/ThreadPool
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/CXX11/src
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/CXX11/src/Tensor
      ...
      -- Installing: /home/zichen/.local/include/eigen3/unsupported/Eigen/CXX11/src/util
      ...
      

Resampling

(2024-05-28)

  • Interpolate point cloud base on Moving Least Squares. Tutorial

    1
    2
    3
    4
    
    mkdir -p pcl_resampling && cd $_
    nvim resampling.cpp
    cmake -B ./build -DCMAKE_BUILD_TYPE=Debug
    make -C ./build
    


CloudCompare

Homepage | Download page

Install:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
sudo apt install flatpak

# Add the Flathub repository
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo

# Install CloudCompare
flatpak install flathub org.cloudcompare.CloudCompare

# Run the app
flatpak run org.cloudcompare.CloudCompare
# (base) yi@Alienware:~$ flatpak run org.cloudcompare.CloudCompare
  • It pops to warn about Python 3.11 requirement. But it’s okay to run in my conda env with Python 3.8.

Open a .vtk file:

The mesh.vtk result of greedy_projection.cpp for dtu scan1 point cloud (.ply) indeed doesn’t have mesh:

1
2
[19:15:38] [VTK] vtk output
[19:15:39] An error occurred while loading 'mesh': nothing to load

MeshLab

Remeshing

(2024-05-13)

Version: MeshLab 64bit dp v2023.12d built on Dec 12 2023 with GCC 9.4.0 and Qt 5.15.2.

Tutorial: MeshLab: Point Cloud to Mesh - Design Support - Greenwich Blogs (Search: “meshlab convert point cloud to mesh”)

Filters -> Remeshing, Simplification and Reconstruction -> Surface Reconstruction: Screened Poisson (or Ball Pivoting)

Poisson (defalut) Ball Pivoting (default)
Recon depth: 8 Clustering radius: 20%