From b73b4a1ab4e48791a53805e7658f47c0b2e3dfc3 Mon Sep 17 00:00:00 2001 From: Jochen Sprickerhof Date: Sat, 25 Sep 2021 18:36:20 +0200 Subject: [PATCH] New upstream version 1.12.0+dfsg --- .ci/azure-pipelines/azure-pipelines.yaml | 86 +- .ci/azure-pipelines/build/macos.yaml | 4 +- .ci/azure-pipelines/build/ubuntu.yaml | 3 + .ci/azure-pipelines/build/ubuntu_indices.yaml | 5 - .ci/azure-pipelines/build/windows.yaml | 35 +- .ci/azure-pipelines/docs-pipeline.yaml | 46 + .ci/azure-pipelines/documentation.yaml | 2 +- .ci/azure-pipelines/env.yml | 90 +- .ci/azure-pipelines/formatting.yaml | 2 +- .ci/azure-pipelines/release.yaml | 16 + .ci/azure-pipelines/tutorials.yaml | 4 +- .ci/scripts/build_tutorials.sh | 2 +- .dev/docker/env/Dockerfile | 2 + .dev/docker/release/Dockerfile | 5 + .dev/docker/windows/Dockerfile | 47 + .dev/docker/windows/x64-windows-rel.cmake | 4 + .dev/docker/windows/x86-windows-rel.cmake | 4 + .dev/format.sh | 2 +- 2d/CMakeLists.txt | 2 - CHANGES.md | 222 + CMakeLists.txt | 171 +- CONTRIBUTING.md | 40 +- PCLConfig.cmake.in | 37 +- README.md | 32 +- apps/3d_rec_framework/CMakeLists.txt | 26 +- .../feature_wrapper/global/cvfh_estimator.h | 3 +- .../global/ourcvfh_estimator.h | 2 +- .../local/fpfh_local_estimator.h | 1 - .../feature_wrapper/local/local_estimator.h | 6 +- .../local/shot_local_estimator.h | 1 - .../local/shot_local_estimator_omp.h | 1 - .../feature_wrapper/normal_estimator.h | 5 +- .../3d_rec_framework/pc_source/mesh_source.h | 43 +- .../pc_source/registered_views_source.h | 64 +- .../apps/3d_rec_framework/pc_source/source.h | 48 +- .../pipeline/global_nn_classifier.h | 7 +- .../pipeline/global_nn_recognizer_crh.h | 4 +- .../pipeline/global_nn_recognizer_cvfh.h | 4 +- .../pipeline/impl/global_nn_classifier.hpp | 34 +- .../impl/global_nn_recognizer_crh.hpp | 76 +- .../impl/global_nn_recognizer_cvfh.hpp | 78 +- .../pipeline/impl/local_recognizer.hpp | 62 +- .../pipeline/local_recognizer.h | 11 +- .../pcl/apps/3d_rec_framework/utils/metrics.h | 3 - .../utils/persistence_utils.h | 127 - .../utils/vtk_model_sampling.h | 8 +- .../src/tools/global_classification.cpp | 25 +- .../tools/local_recognition_mian_dataset.cpp | 42 +- apps/CMakeLists.txt | 95 +- apps/cloud_composer/CMakeLists.txt | 46 +- apps/cloud_composer/ComposerTool.cmake | 8 +- .../pcl/apps/cloud_composer/cloud_composer.h | 1 + .../pcl/apps/cloud_composer/cloud_view.h | 16 +- .../apps/cloud_composer/items/cloud_item.h | 9 +- .../pcl/apps/cloud_composer/items/fpfh_item.h | 5 +- .../click_trackball_interactor_style.h | 2 + .../point_selectors/interactor_style_switch.h | 9 +- .../point_selectors/manipulation_event.h | 1 - .../rectangular_frustum_selector.h | 4 + .../selected_trackball_interactor_style.h | 4 + .../point_selectors/selection_event.h | 7 +- .../apps/cloud_composer/properties_model.h | 2 - .../tools/impl/organized_segmentation.hpp | 2 +- apps/cloud_composer/src/cloud_view.cpp | 71 +- apps/cloud_composer/src/items/fpfh_item.cpp | 15 +- .../click_trackball_interactor_style.cpp | 4 + .../interactor_style_switch.cpp | 3 + .../rectangular_frustum_selector.cpp | 8 + .../selected_trackball_interactor_style.cpp | 9 + apps/cloud_composer/src/project_model.cpp | 5 + apps/cloud_composer/src/transform_clouds.cpp | 1 - .../tools/euclidean_clustering.cpp | 2 +- apps/in_hand_scanner/CMakeLists.txt | 84 +- .../include/pcl/apps/in_hand_scanner/boost.h | 2 +- .../include/pcl/apps/in_hand_scanner/eigen.h | 2 +- .../include/pcl/apps/in_hand_scanner/icp.h | 2 - .../in_hand_scanner/impl/common_types.hpp | 2 + .../apps/in_hand_scanner/in_hand_scanner.h | 3 +- .../in_hand_scanner/input_data_processing.h | 1 - .../in_hand_scanner/offline_integration.h | 2 - .../pcl/apps/in_hand_scanner/opengl_viewer.h | 2 - .../in_hand_scanner/visibility_confidence.h | 1 - apps/in_hand_scanner/src/icp.cpp | 2 +- .../src/input_data_processing.cpp | 1 - apps/in_hand_scanner/src/integration.cpp | 3 +- .../src/visibility_confidence.cpp | 1 + .../pcl/apps/dominant_plane_segmentation.h | 3 - .../face_detection_apps_utils.h | 9 +- .../apps/impl/dominant_plane_segmentation.hpp | 17 +- apps/include/pcl/apps/manual_registration.h | 10 +- apps/include/pcl/apps/nn_classification.h | 21 +- apps/include/pcl/apps/openni_passthrough.h | 3 + .../pcl/apps/organized_segmentation_demo.h | 11 +- apps/include/pcl/apps/pcd_video_player.h | 10 +- .../pcl/apps/render_views_tesselated_sphere.h | 3 +- apps/modeler/CMakeLists.txt | 72 +- .../include/pcl/apps/modeler/render_window.h | 5 +- apps/modeler/src/cloud_mesh.cpp | 14 +- apps/modeler/src/cloud_mesh_item.cpp | 15 +- apps/modeler/src/normal_estimation_worker.cpp | 2 +- apps/modeler/src/normals_actor_item.cpp | 2 +- apps/modeler/src/render_window.cpp | 35 +- apps/point_cloud_editor/CMakeLists.txt | 47 +- .../pcl/apps/point_cloud_editor/cloud.h | 16 +- .../pcl/apps/point_cloud_editor/common.h | 15 +- .../pcl/apps/point_cloud_editor/selection.h | 5 + .../point_cloud_editor/transformCommand.h | 4 +- apps/point_cloud_editor/src/cloud.cpp | 7 +- .../src/cloudEditorWidget.cpp | 3 +- .../src/cloudTransformTool.cpp | 2 - apps/point_cloud_editor/src/copyBuffer.cpp | 9 +- .../point_cloud_editor/src/denoiseCommand.cpp | 3 +- apps/point_cloud_editor/src/mainWindow.cpp | 1 - apps/point_cloud_editor/src/selection.cpp | 9 +- .../src/selectionTransformTool.cpp | 1 - apps/point_cloud_editor/src/trackball.cpp | 1 - .../filesystem_face_detection.cpp | 4 +- .../face_detection/openni_face_detection.cpp | 1 - .../face_detection/openni_frame_source.cpp | 1 - apps/src/feature_matching.cpp | 9 +- apps/src/grabcut_2d.cpp | 7 +- .../manual_registration.cpp | 63 +- .../manual_registration.ui | 10 +- ...multiscale_feature_persistence_example.cpp | 2 +- apps/src/ni_agast.cpp | 10 +- apps/src/ni_brisk.cpp | 12 +- apps/src/ni_linemod.cpp | 27 +- apps/src/ni_susan.cpp | 6 +- apps/src/ni_trajkovic.cpp | 3 +- apps/src/nn_classification_example.cpp | 1 - apps/src/openni_3d_concave_hull.cpp | 1 - apps/src/openni_3d_convex_hull.cpp | 1 - apps/src/openni_boundary_estimation.cpp | 2 - apps/src/openni_change_viewer.cpp | 6 +- apps/src/openni_fast_mesh.cpp | 1 - apps/src/openni_feature_persistence.cpp | 6 +- apps/src/openni_grab_frame.cpp | 14 +- apps/src/openni_grab_images.cpp | 24 +- apps/src/openni_ii_normal_estimation.cpp | 2 - apps/src/openni_klt.cpp | 9 +- apps/src/openni_mls_smoothing.cpp | 5 +- apps/src/openni_mobile_server.cpp | 1 - apps/src/openni_octree_compression.cpp | 5 +- apps/src/openni_organized_compression.cpp | 3 +- apps/src/openni_organized_edge_detection.cpp | 1 - ...nni_organized_multi_plane_segmentation.cpp | 4 - apps/src/openni_passthrough.cpp | 32 +- apps/src/openni_passthrough.ui | 8 +- apps/src/openni_shift_to_depth_conversion.cpp | 11 +- apps/src/openni_tracking.cpp | 24 +- apps/src/openni_voxel_grid.cpp | 1 - apps/src/organized_segmentation_demo.cpp | 35 +- apps/src/organized_segmentation_demo.ui | 8 +- ...pcd_organized_multi_plane_segmentation.cpp | 14 +- apps/src/pcd_select_object_plane.cpp | 19 +- .../src/pcd_video_player/pcd_video_player.cpp | 34 +- apps/src/pcd_video_player/pcd_video_player.ui | 226 +- apps/src/ppf_object_recognition.cpp | 10 +- apps/src/render_views_tesselated_sphere.cpp | 11 +- apps/src/stereo_ground_segmentation.cpp | 11 +- apps/src/test_search.cpp | 4 +- benchmarks/CMakeLists.txt | 25 + benchmarks/features/normal_3d.cpp | 69 + benchmarks/filters/voxel_grid.cpp | 72 + cmake/Modules/FindFLANN.cmake | 96 +- cmake/Modules/FindGLEW.cmake | 69 + cmake/Modules/FindOpenNI.cmake | 41 +- cmake/Modules/FindOpenNI2.cmake | 41 +- cmake/Modules/FindQhull.cmake | 12 +- cmake/Modules/FindRSSDK.cmake | 2 +- cmake/Modules/Findlibusb-1.0.cmake | 72 - cmake/Modules/Findlibusb.cmake | 73 + cmake/pcl_all_in_one_installer.cmake | 13 +- cmake/pcl_cpack.cmake | 38 +- cmake/pcl_find_avx.cmake | 41 + cmake/pcl_find_boost.cmake | 13 +- cmake/pcl_find_cuda.cmake | 6 +- cmake/pcl_find_sse.cmake | 399 +- cmake/pcl_find_vtk.cmake | 153 + cmake/pcl_options.cmake | 15 +- cmake/pcl_pclconfig.cmake | 36 +- cmake/pcl_targets.cmake | 62 +- common/include/pcl/ModelCoefficients.h | 1 - common/include/pcl/PCLImage.h | 7 +- common/include/pcl/PCLPointCloud2.h | 9 +- common/include/pcl/PCLPointField.h | 5 +- common/include/pcl/PointIndices.h | 2 - common/include/pcl/PolygonMesh.h | 4 +- common/include/pcl/Vertices.h | 5 +- common/include/pcl/common/boost.h | 1 + common/include/pcl/common/colors.h | 86 +- common/include/pcl/common/common.h | 136 +- common/include/pcl/common/concatenate.h | 2 - common/include/pcl/common/eigen.h | 154 +- common/include/pcl/common/gaussian.h | 3 +- common/include/pcl/common/geometry.h | 2 +- common/include/pcl/common/impl/centroid.hpp | 18 +- common/include/pcl/common/impl/common.hpp | 150 +- common/include/pcl/common/impl/eigen.hpp | 4 +- common/include/pcl/common/impl/gaussian.hpp | 5 +- common/include/pcl/common/impl/intensity.hpp | 34 + common/include/pcl/common/impl/io.hpp | 79 +- common/include/pcl/common/impl/pca.hpp | 2 + .../transformation_from_correspondences.hpp | 1 - common/include/pcl/common/impl/transforms.hpp | 37 +- .../pcl/common/impl/vector_average.hpp | 2 + common/include/pcl/common/io.h | 61 +- common/include/pcl/common/point_tests.h | 12 +- common/include/pcl/common/random.h | 2 +- common/include/pcl/common/time_trigger.h | 3 +- .../transformation_from_correspondences.h | 3 +- common/include/pcl/common/transforms.h | 65 +- common/include/pcl/common/vector_average.h | 3 +- common/include/pcl/console/print.h | 13 +- common/include/pcl/conversions.h | 26 +- common/include/pcl/correspondence.h | 1 - common/include/pcl/exceptions.h | 1 - common/include/pcl/for_each_type.h | 2 - common/include/pcl/impl/pcl_base.hpp | 11 +- common/include/pcl/impl/point_types.hpp | 146 +- common/include/pcl/pcl_base.h | 5 +- common/include/pcl/pcl_macros.h | 83 +- common/include/pcl/point_cloud.h | 290 +- common/include/pcl/point_struct_traits.h | 3 - common/include/pcl/point_types.h | 5 + common/include/pcl/point_types_conversion.h | 67 +- .../pcl/range_image/bearing_angle_image.h | 1 - .../pcl/range_image/impl/range_image.hpp | 2 +- common/include/pcl/range_image/range_image.h | 4 +- common/include/pcl/register_point_struct.h | 3 - common/include/pcl/types.h | 18 +- common/src/PCLPointCloud2.cpp | 2 +- common/src/bearing_angle_image.cpp | 1 - common/src/colors.cpp | 28 +- common/src/common.cpp | 3 +- common/src/gaussian.cpp | 4 +- common/src/io.cpp | 114 +- common/src/parse.cpp | 10 +- common/src/point_types.cpp | 11 +- common/src/print.cpp | 1 + common/src/range_image.cpp | 15 +- cuda/CMakeLists.txt | 4 +- cuda/apps/src/kinect_normals_cuda.cpp | 2 +- cuda/apps/src/kinect_ransac.cpp | 2 +- cuda/apps/src/kinect_segmentation_cuda.cpp | 2 +- .../src/kinect_segmentation_planes_cuda.cpp | 2 +- cuda/common/include/pcl/cuda/point_cloud.h | 4 +- .../include/pcl/cuda/filters/passthrough.h | 10 +- .../include/pcl/cuda/filters/voxel_grid.h | 8 +- cuda/io/CMakeLists.txt | 9 +- cuda/io/src/cloud_from_pcl.cu | 6 +- cuda/io/src/cloud_to_pcl.cpp | 6 +- cuda/io/src/debayering.cu | 4 +- cuda/nn/organized_neighbor_search.hpp | 4 +- cuda/sample_consensus/src/sac_model.cu | 2 +- doc/advanced/content/c_cache.rst | 8 +- doc/advanced/content/index.rst | 2 +- doc/advanced/content/pcl_style_guide.rst | 2 +- doc/doxygen/pcl.doxy | 3 +- doc/tutorials/content/adding_custom_ptype.rst | 2 +- doc/tutorials/content/bspline_fitting.rst | 4 +- doc/tutorials/content/compiling_pcl_posix.rst | 6 +- .../conditional_euclidean_clustering.rst | 4 +- doc/tutorials/content/convex_hull_2d.rst | 2 +- .../content/cylinder_segmentation.rst | 2 +- doc/tutorials/content/ensenso_cameras.rst | 1 + doc/tutorials/content/extract_indices.rst | 2 +- doc/tutorials/content/function_filter.rst | 78 + .../global_hypothesis_verification.rst | 8 +- doc/tutorials/content/gpu_install.rst | 8 +- doc/tutorials/content/gpu_people.rst | 22 +- doc/tutorials/content/greedy_projection.rst | 2 +- doc/tutorials/content/how_features_work.rst | 8 +- doc/tutorials/content/index.rst | 2 +- doc/tutorials/content/matrix_transform.rst | 2 +- .../content/min_cut_segmentation.rst | 22 +- doc/tutorials/content/mobile_streaming.rst | 4 +- doc/tutorials/content/normal_estimation.rst | 2 +- doc/tutorials/content/octree.rst | 4 +- doc/tutorials/content/octree_change.rst | 2 +- doc/tutorials/content/openni_grabber.rst | 2 +- doc/tutorials/content/pcd_file_format.rst | 6 +- doc/tutorials/content/pcl_painter2D.rst | 2 +- doc/tutorials/content/pcl_plotter.rst | 2 +- doc/tutorials/content/planar_segmentation.rst | 4 +- .../content/random_sample_consensus.rst | 6 +- .../region_growing_rgb_segmentation.rst | 14 +- .../content/region_growing_segmentation.rst | 17 +- doc/tutorials/content/resampling.rst | 6 +- doc/tutorials/content/sources/CMakeLists.txt | 2 +- .../alignment_prerejective/CMakeLists.txt | 2 +- .../alignment_prerejective.cpp | 2 +- .../content/sources/bare_earth/CMakeLists.txt | 2 +- .../content/sources/bare_earth/bare_earth.cpp | 2 +- .../sources/bspline_fitting/CMakeLists.txt | 2 +- .../sources/cloud_viewer/CMakeLists.txt | 2 +- .../sources/cluster_extraction/CMakeLists.txt | 2 +- .../cluster_extraction/cluster_extraction.cpp | 10 +- .../sources/concatenate_clouds/CMakeLists.txt | 2 +- .../concatenate_clouds/concatenate_clouds.cpp | 8 +- .../sources/concatenate_fields/CMakeLists.txt | 2 +- .../concatenate_fields/concatenate_fields.cpp | 8 +- .../sources/concatenate_points/CMakeLists.txt | 2 +- .../concatenate_points/concatenate_points.cpp | 8 +- .../sources/concave_hull_2d/CMakeLists.txt | 2 +- .../concave_hull_2d/concave_hull_2d.cpp | 4 +- .../CMakeLists.txt | 2 +- .../conditional_euclidean_clustering.cpp | 26 +- .../conditional_removal/CMakeLists.txt | 2 +- .../conditional_removal.cpp | 2 +- .../sources/convex_hull_2d/CMakeLists.txt | 2 +- .../sources/convex_hull_2d/convex_hull_2d.cpp | 4 +- .../cylinder_segmentation/CMakeLists.txt | 2 +- .../cylinder_segmentation.cpp | 4 +- .../content/sources/davidsdk/CMakeLists.txt | 2 +- .../sources/don_segmentation/CMakeLists.txt | 2 +- .../don_segmentation/don_segmentation.cpp | 4 +- .../sources/ensenso_cameras/CMakeLists.txt | 2 +- .../sources/extract_indices/CMakeLists.txt | 2 +- .../extract_indices/extract_indices.cpp | 2 +- .../sources/function_filter/CMakeLists.txt | 9 + .../function_filter/sphere_removal.cpp | 45 + .../global_hypothesis_verification.cpp | 2 +- .../sources/gpu/people_detect/CMakeLists.txt | 2 +- .../gpu/people_detect/src/people_detect.cpp | 14 +- .../sources/greedy_projection/CMakeLists.txt | 2 +- .../greedy_projection/greedy_projection.cpp | 4 +- .../CMakeLists.txt | 2 +- .../content/sources/iccv2011/CMakeLists.txt | 2 +- .../iccv2011/include/feature_estimation.h | 2 +- .../sources/iccv2011/include/registration.h | 4 +- .../iccv2011/src/build_all_object_models.cpp | 25 +- .../iccv2011/src/build_object_model.cpp | 24 +- .../iccv2011/src/correspondence_viewer.cpp | 2 +- .../sources/iccv2011/src/openni_capture.cpp | 2 +- .../iccv2011/src/test_feature_estimation.cpp | 1 + .../iccv2011/src/test_object_recognition.cpp | 24 +- .../iccv2011/src/test_registration.cpp | 2 +- .../sources/iccv2011/src/test_surface.cpp | 1 + .../content/sources/iccv2011/src/tutorial.cpp | 5 +- .../implicit_shape_model/CMakeLists.txt | 2 +- .../interactive_icp/interactive_icp.cpp | 2 +- .../content/sources/iros2011/CMakeLists.txt | 2 +- .../iros2011/include/object_recognition.h | 6 +- .../sources/iros2011/include/registration.h | 4 +- .../include/solution/feature_estimation.h | 2 +- .../iros2011/include/solution/registration.h | 4 +- .../sources/iros2011/include/surface.h | 14 +- .../iros2011/src/build_all_object_models.cpp | 25 +- .../iros2011/src/build_object_model.cpp | 24 +- .../iros2011/src/correspondence_viewer.cpp | 2 +- .../sources/iros2011/src/openni_capture.cpp | 4 +- .../iros2011/src/test_feature_estimation.cpp | 1 + .../iros2011/src/test_object_recognition.cpp | 24 +- .../iros2011/src/test_registration.cpp | 2 +- .../sources/iros2011/src/test_surface.cpp | 1 + .../iterative_closest_point/CMakeLists.txt | 2 +- .../iterative_closest_point.cpp | 2 +- .../sources/kdtree_search/CMakeLists.txt | 2 +- .../sources/kdtree_search/kdtree_search.cpp | 18 +- .../min_cut_segmentation/CMakeLists.txt | 2 +- .../min_cut_segmentation.cpp | 12 +- .../model_outlier_removal/CMakeLists.txt | 2 +- .../model_outlier_removal.cpp | 6 +- .../sources/moment_of_inertia/CMakeLists.txt | 2 +- .../narf_descriptor_visualization.cpp | 6 +- .../narf_feature_extraction.cpp | 2 +- .../narf_keypoint_extraction.cpp | 2 +- .../CMakeLists.txt | 2 +- .../normal_distributions_transform.cpp | 2 +- .../octree_change_detection/CMakeLists.txt | 2 +- .../octree_change_detection.cpp | 2 +- .../sources/octree_search/CMakeLists.txt | 2 +- .../sources/octree_search/octree_search.cpp | 2 +- .../sources/openni_grabber/CMakeLists.txt | 2 +- .../openni_narf_keypoint_extraction.cpp | 6 +- .../openni_range_image_visualization.cpp | 6 +- .../pairwise_incremental_registration.cpp | 10 +- .../sources/passthrough/CMakeLists.txt | 2 +- .../sources/passthrough/passthrough.cpp | 2 +- .../content/sources/pcd_read/CMakeLists.txt | 2 +- .../content/sources/pcd_read/pcd_read.cpp | 2 +- .../content/sources/pcd_write/CMakeLists.txt | 2 +- .../content/sources/pcd_write/pcd_write.cpp | 4 +- .../pcl_painter2D/pcl_painter2D_demo.cpp | 4 +- .../sources/pcl_plotter/CMakeLists.txt | 2 +- .../sources/pcl_plotter/pcl_plotter_demo.cpp | 2 +- .../pcl_visualizer/pcl_visualizer_demo.cpp | 2 +- .../planar_segmentation/CMakeLists.txt | 2 +- .../planar_segmentation.cpp | 5 +- .../point_cloud_compression/CMakeLists.txt | 2 +- .../point_cloud_compression.cpp | 2 +- .../sources/project_inliers/CMakeLists.txt | 2 +- .../project_inliers/project_inliers.cpp | 4 +- .../sources/qt_colorize_cloud/CMakeLists.txt | 2 +- .../sources/qt_colorize_cloud/pclviewer.cpp | 4 +- .../sources/qt_visualizer/CMakeLists.txt | 2 +- .../radius_outlier_removal/CMakeLists.txt | 2 +- .../radius_outlier_removal.cpp | 2 +- .../random_sample_consensus/CMakeLists.txt | 2 +- .../random_sample_consensus.cpp | 6 +- .../range_image_border_extraction.cpp | 8 +- .../range_image_creation.cpp | 4 +- .../range_image_visualization.cpp | 4 +- .../CMakeLists.txt | 2 +- .../region_growing_rgb_segmentation.cpp | 10 +- .../CMakeLists.txt | 2 +- .../region_growing_segmentation.cpp | 14 +- .../sources/registration_api/CMakeLists.txt | 2 +- .../sources/registration_api/example2.cpp | 4 +- .../sources/remove_outliers/CMakeLists.txt | 2 +- .../content/sources/resampling/CMakeLists.txt | 2 +- .../content/sources/resampling/resampling.cpp | 2 +- .../sources/rops_feature/CMakeLists.txt | 2 +- .../statistical_removal/CMakeLists.txt | 2 +- .../statistical_removal.cpp | 4 +- .../sources/stick_segmentation/CMakeLists.txt | 2 +- .../stick_segmentation/stick_segmentation.cpp | 2 +- .../supervoxel_clustering/CMakeLists.txt | 2 +- .../sources/template_alignment/CMakeLists.txt | 2 +- .../content/sources/tracking/CMakeLists.txt | 2 +- .../sources/tracking/tracking_sample.cpp | 11 +- .../sources/vfh_recognition/CMakeLists.txt | 2 +- .../sources/vfh_recognition/build_tree.cpp | 2 +- .../vfh_recognition/nearest_neighbors.cpp | 4 +- .../content/sources/voxel_grid/CMakeLists.txt | 2 +- .../content/sources/voxel_grid/voxel_grid.cpp | 2 +- doc/tutorials/content/statistical_outlier.rst | 2 +- doc/tutorials/content/template_alignment.rst | 2 +- doc/tutorials/content/tracking.rst | 14 +- .../content/using_kinfu_large_scale.rst | 8 +- doc/tutorials/content/voxel_grid.rst | 2 +- doc/tutorials/content/walkthrough.rst | 30 +- doc/tutorials/content/writing_new_classes.rst | 178 +- .../example_difference_of_normals.cpp | 2 +- .../example_fast_point_feature_histograms.cpp | 2 +- .../features/example_normal_estimation.cpp | 2 +- .../example_point_feature_histograms.cpp | 2 +- ...xample_principal_curvatures_estimation.cpp | 2 +- examples/features/example_rift_estimation.cpp | 2 +- examples/features/example_shape_contexts.cpp | 2 +- examples/features/example_spin_images.cpp | 2 +- .../example_remove_nan_from_point_cloud.cpp | 2 +- examples/keypoints/CMakeLists.txt | 9 +- .../example_get_keypoints_indices.cpp | 1 + .../example_sift_keypoint_estimation.cpp | 2 +- ...xample_sift_normal_keypoint_estimation.cpp | 2 +- .../example_sift_z_keypoint_estimation.cpp | 2 +- examples/outofcore/CMakeLists.txt | 1 - examples/segmentation/CMakeLists.txt | 1 - .../example_extract_clusters_normals.cpp | 2 +- .../segmentation/example_region_growing.cpp | 10 +- examples/stereo/CMakeLists.txt | 1 - examples/surface/CMakeLists.txt | 1 - .../surface/example_nurbs_viewer_surface.cpp | 2 - features/include/pcl/features/3dsc.h | 1 - features/include/pcl/features/board.h | 2 +- features/include/pcl/features/boost.h | 2 +- features/include/pcl/features/boundary.h | 5 +- features/include/pcl/features/brisk_2d.h | 1 - features/include/pcl/features/cppf.h | 1 - features/include/pcl/features/cvfh.h | 7 +- features/include/pcl/features/eigen.h | 2 +- features/include/pcl/features/feature.h | 8 +- features/include/pcl/features/fpfh.h | 7 +- features/include/pcl/features/from_meshes.h | 2 +- features/include/pcl/features/gasd.h | 2 - features/include/pcl/features/gfpfh.h | 2 +- features/include/pcl/features/grsd.h | 1 - features/include/pcl/features/impl/3dsc.hpp | 6 +- features/include/pcl/features/impl/board.hpp | 6 +- .../include/pcl/features/impl/boundary.hpp | 8 +- features/include/pcl/features/impl/cppf.hpp | 3 +- features/include/pcl/features/impl/crh.hpp | 8 +- features/include/pcl/features/impl/cvfh.hpp | 26 +- features/include/pcl/features/impl/esf.hpp | 7 +- .../include/pcl/features/impl/feature.hpp | 17 +- features/include/pcl/features/impl/flare.hpp | 2 +- features/include/pcl/features/impl/fpfh.hpp | 9 +- .../include/pcl/features/impl/fpfh_omp.hpp | 8 +- features/include/pcl/features/impl/gasd.hpp | 3 +- features/include/pcl/features/impl/gfpfh.hpp | 12 +- features/include/pcl/features/impl/grsd.hpp | 5 +- .../pcl/features/impl/integral_image2D.hpp | 6 +- .../pcl/features/impl/intensity_gradient.hpp | 10 +- .../pcl/features/impl/intensity_spin.hpp | 10 +- .../pcl/features/impl/moment_invariants.hpp | 6 +- .../impl/moment_of_inertia_estimation.hpp | 55 +- .../impl/multiscale_feature_persistence.hpp | 6 +- features/include/pcl/features/impl/narf.hpp | 1 - .../include/pcl/features/impl/normal_3d.hpp | 2 +- .../pcl/features/impl/normal_3d_omp.hpp | 2 +- .../features/impl/normal_based_signature.hpp | 4 +- .../impl/organized_edge_detection.hpp | 12 +- .../include/pcl/features/impl/our_cvfh.hpp | 34 +- features/include/pcl/features/impl/pfh.hpp | 5 +- features/include/pcl/features/impl/pfhrgb.hpp | 4 +- features/include/pcl/features/impl/ppf.hpp | 3 +- features/include/pcl/features/impl/ppfrgb.hpp | 8 +- .../features/impl/principal_curvatures.hpp | 4 +- features/include/pcl/features/impl/rift.hpp | 14 +- .../pcl/features/impl/rops_estimation.hpp | 30 +- features/include/pcl/features/impl/rsd.hpp | 12 +- features/include/pcl/features/impl/shot.hpp | 48 +- .../include/pcl/features/impl/shot_lrf.hpp | 3 +- .../pcl/features/impl/shot_lrf_omp.hpp | 3 +- .../include/pcl/features/impl/shot_omp.hpp | 4 +- .../include/pcl/features/impl/spin_image.hpp | 2 +- ..._multiscale_interest_region_extraction.hpp | 8 +- features/include/pcl/features/impl/usc.hpp | 5 +- features/include/pcl/features/impl/vfh.hpp | 10 +- .../pcl/features/integral_image_normal.h | 1 - .../include/pcl/features/intensity_gradient.h | 2 +- .../include/pcl/features/intensity_spin.h | 2 +- .../features/linear_least_squares_normal.h | 2 - .../include/pcl/features/moment_invariants.h | 2 +- .../features/moment_of_inertia_estimation.h | 1 - .../features/multiscale_feature_persistence.h | 2 +- features/include/pcl/features/narf.h | 1 - .../include/pcl/features/narf_descriptor.h | 4 +- features/include/pcl/features/normal_3d.h | 10 +- features/include/pcl/features/our_cvfh.h | 6 +- features/include/pcl/features/pfh.h | 4 +- features/include/pcl/features/pfhrgb.h | 3 +- features/include/pcl/features/ppfrgb.h | 1 - .../pcl/features/principal_curvatures.h | 3 +- features/include/pcl/features/rift.h | 2 +- .../include/pcl/features/rops_estimation.h | 5 +- features/include/pcl/features/rsd.h | 28 +- features/include/pcl/features/shot.h | 19 +- ...al_multiscale_interest_region_extraction.h | 2 +- features/include/pcl/features/vfh.h | 2 +- features/src/narf.cpp | 14 +- features/src/range_image_border_extractor.cpp | 6 +- filters/CMakeLists.txt | 5 +- .../pcl/filters/approximate_voxel_grid.h | 1 - filters/include/pcl/filters/bilateral.h | 4 +- filters/include/pcl/filters/boost.h | 1 + filters/include/pcl/filters/box_clipper3D.h | 2 +- filters/include/pcl/filters/clipper3D.h | 2 +- .../include/pcl/filters/conditional_removal.h | 3 +- filters/include/pcl/filters/convolution_3d.h | 8 +- .../include/pcl/filters/covariance_sampling.h | 2 +- filters/include/pcl/filters/crop_box.h | 7 +- filters/include/pcl/filters/crop_hull.h | 7 +- .../pcl/filters/experimental/functor_filter.h | 96 +- filters/include/pcl/filters/extract_indices.h | 6 +- filters/include/pcl/filters/filter.h | 13 +- filters/include/pcl/filters/filter_indices.h | 14 +- filters/include/pcl/filters/frustum_culling.h | 6 +- filters/include/pcl/filters/grid_minimum.h | 5 +- .../filters/impl/approximate_voxel_grid.hpp | 5 +- .../include/pcl/filters/impl/bilateral.hpp | 12 +- .../pcl/filters/impl/box_clipper3D.hpp | 4 +- .../pcl/filters/impl/conditional_removal.hpp | 6 +- .../pcl/filters/impl/convolution_3d.hpp | 14 +- .../pcl/filters/impl/covariance_sampling.hpp | 8 +- filters/include/pcl/filters/impl/crop_box.hpp | 9 +- .../include/pcl/filters/impl/crop_hull.hpp | 18 +- .../pcl/filters/impl/extract_indices.hpp | 25 +- .../pcl/filters/impl/fast_bilateral_omp.hpp | 1 - filters/include/pcl/filters/impl/filter.hpp | 18 +- .../pcl/filters/impl/filter_indices.hpp | 6 +- .../pcl/filters/impl/frustum_culling.hpp | 2 +- .../include/pcl/filters/impl/grid_minimum.hpp | 21 +- .../pcl/filters/impl/local_maximum.hpp | 36 +- .../pcl/filters/impl/median_filter.hpp | 5 +- .../filters/impl/model_outlier_removal.hpp | 10 +- .../pcl/filters/impl/morphological_filter.hpp | 7 +- .../include/pcl/filters/impl/normal_space.hpp | 6 +- .../include/pcl/filters/impl/passthrough.hpp | 2 +- .../pcl/filters/impl/plane_clipper3D.hpp | 8 +- .../pcl/filters/impl/project_inliers.hpp | 16 +- filters/include/pcl/filters/impl/pyramid.hpp | 6 +- .../filters/impl/radius_outlier_removal.hpp | 22 +- .../pcl/filters/impl/random_sample.hpp | 3 +- .../filters/impl/sampling_surface_normal.hpp | 6 +- .../include/pcl/filters/impl/shadowpoints.hpp | 16 +- .../impl/statistical_outlier_removal.hpp | 6 +- .../include/pcl/filters/impl/voxel_grid.hpp | 42 +- .../filters/impl/voxel_grid_covariance.hpp | 29 +- .../impl/voxel_grid_occlusion_estimation.hpp | 1 - filters/include/pcl/filters/local_maximum.h | 6 +- .../pcl/filters/model_outlier_removal.h | 4 +- .../pcl/filters/morphological_filter.h | 7 +- .../include/pcl/filters/normal_refinement.h | 18 +- filters/include/pcl/filters/normal_space.h | 6 +- filters/include/pcl/filters/passthrough.h | 38 +- filters/include/pcl/filters/plane_clipper3D.h | 2 +- filters/include/pcl/filters/project_inliers.h | 14 - .../pcl/filters/radius_outlier_removal.h | 9 +- filters/include/pcl/filters/random_sample.h | 4 +- .../pcl/filters/sampling_surface_normal.h | 5 +- filters/include/pcl/filters/shadowpoints.h | 4 +- .../pcl/filters/statistical_outlier_removal.h | 9 +- .../include/pcl/filters/uniform_sampling.h | 6 +- filters/include/pcl/filters/voxel_grid.h | 5 +- .../pcl/filters/voxel_grid_covariance.h | 13 +- filters/src/crop_box.cpp | 8 +- filters/src/extract_indices.cpp | 32 +- filters/src/filter_indices.cpp | 2 +- filters/src/passthrough.cpp | 21 +- filters/src/radius_outlier_removal.cpp | 6 +- filters/src/random_sample.cpp | 4 +- filters/src/statistical_outlier_removal.cpp | 4 +- filters/src/voxel_grid.cpp | 126 +- filters/src/voxel_grid_covariance.cpp | 1 - filters/src/voxel_grid_label.cpp | 6 +- geometry/include/pcl/geometry/boost.h | 2 +- geometry/include/pcl/geometry/eigen.h | 3 +- geometry/include/pcl/geometry/get_boundary.h | 80 +- .../pcl/geometry/impl/polygon_operations.hpp | 342 +- geometry/include/pcl/geometry/line_iterator.h | 285 +- geometry/include/pcl/geometry/mesh_base.h | 3941 +++++++++-------- .../include/pcl/geometry/mesh_circulators.h | 1598 ++++--- .../include/pcl/geometry/mesh_conversion.h | 141 +- geometry/include/pcl/geometry/mesh_elements.h | 246 +- geometry/include/pcl/geometry/mesh_indices.h | 719 +-- geometry/include/pcl/geometry/mesh_indices.py | 265 -- geometry/include/pcl/geometry/mesh_io.h | 408 +- geometry/include/pcl/geometry/mesh_traits.h | 54 +- .../pcl/geometry/organized_index_iterator.h | 151 +- .../include/pcl/geometry/planar_polygon.h | 188 +- geometry/include/pcl/geometry/polygon_mesh.h | 316 +- .../include/pcl/geometry/polygon_operations.h | 56 +- geometry/include/pcl/geometry/quad_mesh.h | 255 +- geometry/include/pcl/geometry/triangle_mesh.h | 650 +-- gpu/CMakeLists.txt | 6 +- .../include/pcl/gpu/containers/device_array.h | 501 ++- .../pcl/gpu/containers/device_memory.h | 494 ++- .../pcl/gpu/containers/impl/device_array.hpp | 323 +- .../pcl/gpu/containers/impl/device_memory.hpp | 62 +- .../pcl/gpu/containers/initialization.h | 64 +- .../pcl/gpu/containers/kernel_containers.h | 163 +- gpu/containers/src/device_memory.cpp | 573 ++- gpu/containers/src/error.cpp | 14 +- gpu/containers/src/initialization.cpp | 510 ++- gpu/examples/octree/src/octree_search.cpp | 4 +- gpu/examples/segmentation/src/seg.cpp | 12 +- .../pcl/gpu/features/device/pair_features.hpp | 14 +- gpu/features/src/fpfh.cu | 8 +- gpu/features/src/pfh.cu | 14 +- gpu/features/src/spinimages.cu | 6 +- gpu/features/src/vfh.cu | 12 +- gpu/features/test/test_fpfh.cpp | 1 - gpu/features/test/test_normals.cpp | 2 +- gpu/kinfu/src/tsdf_volume.cpp | 12 +- gpu/kinfu/tools/CMakeLists.txt | 2 - gpu/kinfu/tools/kinfu_app.cpp | 18 +- gpu/kinfu/tools/kinfu_app_sim.cpp | 1 - .../impl/standalone_marching_cubes.hpp | 2 +- .../kinfu_large_scale/impl/world_model.hpp | 5 +- .../pcl/gpu/kinfu_large_scale/world_model.h | 3 +- gpu/kinfu_large_scale/src/cyclical_buffer.cpp | 1 + gpu/kinfu_large_scale/src/tsdf_volume.cpp | 10 +- gpu/kinfu_large_scale/tools/CMakeLists.txt | 2 - gpu/kinfu_large_scale/tools/color_handler.h | 11 +- gpu/kinfu_large_scale/tools/kinfuLS_app.cpp | 6 +- gpu/kinfu_large_scale/tools/kinfu_app_sim.cpp | 1 - gpu/octree/include/pcl/gpu/octree/octree.hpp | 16 + gpu/octree/src/cuda/approx_nsearch.cu | 453 +- gpu/octree/src/cuda/knn_search.cu | 31 +- gpu/octree/src/cuda/octree_host.cu | 48 +- gpu/octree/src/internal.hpp | 4 +- gpu/octree/src/octree.cpp | 26 +- gpu/octree/src/utils/approx_nearest_utils.hpp | 126 + gpu/octree/src/utils/morton.hpp | 18 +- .../include/pcl/gpu/people/label_tree.h | 4 +- .../include/pcl/gpu/people/people_detector.h | 2 +- gpu/people/src/face_detector.cpp | 2 +- gpu/people/src/organized_plane_detector.cpp | 6 +- gpu/people/src/people_detector.cpp | 18 +- gpu/people/tools/CMakeLists.txt | 2 - gpu/people/tools/people_app.cpp | 16 +- gpu/people/tools/people_pcd_prob.cpp | 3 +- gpu/segmentation/CMakeLists.txt | 3 +- .../gpu/segmentation/gpu_extract_clusters.h | 21 +- .../gpu_extract_labeled_clusters.h | 9 +- .../gpu_seeded_hue_segmentation.h | 7 +- .../impl/gpu_extract_clusters.hpp | 123 +- .../impl/gpu_extract_labeled_clusters.hpp | 4 +- gpu/segmentation/src/extract_clusters.cpp | 21 +- .../pcl/gpu/tracking/particle_filter.h | 2 - io/CMakeLists.txt | 40 +- io/include/pcl/compression/color_coding.h | 50 +- .../pcl/compression/entropy_range_coder.h | 15 - .../compression/impl/entropy_range_coder.hpp | 2 - .../impl/octree_pointcloud_compression.hpp | 8 +- .../impl/organized_pointcloud_compression.hpp | 7 - .../octree_pointcloud_compression.h | 10 +- .../organized_pointcloud_compression.h | 5 - .../organized_pointcloud_conversion.h | 24 +- io/include/pcl/compression/point_coding.h | 18 +- io/include/pcl/io/ascii_io.h | 13 - io/include/pcl/io/boost.h | 2 +- io/include/pcl/io/buffers.h | 4 - io/include/pcl/io/debayer.h | 1 - io/include/pcl/io/eigen.h | 1 + io/include/pcl/io/ensenso_grabber.h | 2 - io/include/pcl/io/file_io.h | 174 +- io/include/pcl/io/grabber.h | 14 +- io/include/pcl/io/hdl_grabber.h | 6 - io/include/pcl/io/ifs_io.h | 1 - io/include/pcl/io/image.h | 1 - io/include/pcl/io/image_depth.h | 1 - io/include/pcl/io/image_ir.h | 1 - io/include/pcl/io/impl/auto_io.hpp | 8 +- io/include/pcl/io/impl/buffers.hpp | 1 - io/include/pcl/io/impl/pcd_io.hpp | 20 +- io/include/pcl/io/impl/vtk_lib_io.hpp | 6 +- io/include/pcl/io/io.h | 2 +- io/include/pcl/io/low_level_io.h | 6 +- io/include/pcl/io/oni_grabber.h | 3 - .../pcl/io/openni2/openni2_video_mode.h | 1 - io/include/pcl/io/openni2_grabber.h | 3 - io/include/pcl/io/openni_camera/openni.h | 3 - .../pcl/io/openni_camera/openni_depth_image.h | 1 - .../pcl/io/openni_camera/openni_device.h | 2 - .../pcl/io/openni_camera/openni_image.h | 1 - .../pcl/io/openni_camera/openni_ir_image.h | 1 - io/include/pcl/io/openni_grabber.h | 4 +- io/include/pcl/io/pcd_io.h | 9 +- io/include/pcl/io/ply/byte_order.h | 2 +- io/include/pcl/io/ply/ply.h | 2 +- io/include/pcl/io/ply/ply_parser.h | 8 +- io/include/pcl/io/ply_io.h | 3 +- io/include/pcl/io/real_sense_2_grabber.h | 3 +- io/include/pcl/io/robot_eye_grabber.h | 1 + io/include/pcl/io/vtk_lib_io.h | 2 - io/src/ascii_io.cpp | 2 + io/src/auto_io.cpp | 12 +- io/src/debayer.cpp | 2 + io/src/dinast_grabber.cpp | 1 + io/src/ensenso_grabber.cpp | 10 +- io/src/file_io.cpp | 39 - io/src/hdl_grabber.cpp | 1 - io/src/ifs_io.cpp | 3 +- io/src/image_depth.cpp | 2 - io/src/image_grabber.cpp | 22 +- io/src/image_ir.cpp | 4 - io/src/obj_io.cpp | 32 +- io/src/oni_grabber.cpp | 4 +- io/src/openni2/openni2_device.cpp | 6 + io/src/openni2_grabber.cpp | 2 +- .../openni_device_primesense.cpp | 1 - io/src/openni_camera/openni_device_xtion.cpp | 1 - io/src/openni_camera/openni_driver.cpp | 2 - io/src/openni_grabber.cpp | 2 +- io/src/pcd_io.cpp | 47 +- io/src/ply_io.cpp | 8 +- io/src/real_sense_2_grabber.cpp | 16 +- io/src/real_sense_grabber.cpp | 2 +- io/src/vtk_lib_io.cpp | 41 +- io/tools/openni_grabber_example.cpp | 1 + io/tools/openni_pcd_recorder.cpp | 1 + io/tools/pcd_introduce_nan.cpp | 1 + kdtree/CMakeLists.txt | 1 - kdtree/include/pcl/kdtree/flann.h | 53 - kdtree/include/pcl/kdtree/impl/io.hpp | 8 +- .../include/pcl/kdtree/impl/kdtree_flann.hpp | 278 +- kdtree/include/pcl/kdtree/io.h | 4 +- kdtree/include/pcl/kdtree/kdtree.h | 110 +- kdtree/include/pcl/kdtree/kdtree_flann.h | 426 +- kdtree/kdtree.doxy | 2 +- keypoints/include/pcl/keypoints/agast_2d.h | 1 + keypoints/include/pcl/keypoints/harris_3d.h | 2 +- keypoints/include/pcl/keypoints/harris_6d.h | 2 +- .../include/pcl/keypoints/impl/harris_3d.hpp | 66 +- .../include/pcl/keypoints/impl/harris_6d.hpp | 29 +- .../include/pcl/keypoints/impl/iss_3d.hpp | 29 +- .../include/pcl/keypoints/impl/keypoint.hpp | 12 +- .../pcl/keypoints/impl/sift_keypoint.hpp | 21 +- .../impl/smoothed_surfaces_keypoint.hpp | 10 +- .../include/pcl/keypoints/impl/susan.hpp | 45 +- .../pcl/keypoints/impl/trajkovic_2d.hpp | 2 +- .../pcl/keypoints/impl/trajkovic_3d.hpp | 2 +- keypoints/include/pcl/keypoints/iss_3d.h | 1 + keypoints/include/pcl/keypoints/keypoint.h | 8 +- .../include/pcl/keypoints/sift_keypoint.h | 2 +- .../include/pcl/keypoints/uniform_sampling.h | 4 +- keypoints/src/brisk_2d.cpp | 4 +- keypoints/src/narf_keypoint.cpp | 4 +- .../pcl/ml/impl/dt/decision_tree_trainer.hpp | 2 +- ml/src/kmeans.cpp | 4 + octree/include/pcl/octree/boost.h | 1 + .../pcl/octree/impl/octree2buf_base.hpp | 70 +- .../include/pcl/octree/impl/octree_base.hpp | 46 +- .../pcl/octree/impl/octree_iterator.hpp | 25 +- .../pcl/octree/impl/octree_pointcloud.hpp | 104 +- .../impl/octree_pointcloud_adjacency.hpp | 27 +- .../impl/octree_pointcloud_voxelcentroid.hpp | 2 +- .../include/pcl/octree/impl/octree_search.hpp | 126 +- octree/include/pcl/octree/octree2buf_base.h | 68 +- octree/include/pcl/octree/octree_base.h | 67 +- octree/include/pcl/octree/octree_container.h | 50 +- octree/include/pcl/octree/octree_iterator.h | 63 +- octree/include/pcl/octree/octree_key.h | 16 +- octree/include/pcl/octree/octree_nodes.h | 3 - octree/include/pcl/octree/octree_pointcloud.h | 34 +- .../pcl/octree/octree_pointcloud_adjacency.h | 6 +- .../octree_pointcloud_adjacency_container.h | 10 +- .../octree/octree_pointcloud_changedetector.h | 6 +- .../pcl/octree/octree_pointcloud_density.h | 17 +- .../octree/octree_pointcloud_singlepoint.h | 3 + .../octree/octree_pointcloud_voxelcentroid.h | 11 +- octree/include/pcl/octree/octree_search.h | 106 +- octree/src/octree_inst.cpp | 4 +- outofcore/CMakeLists.txt | 9 + .../pcl/outofcore/impl/octree_base.hpp | 2 +- .../pcl/outofcore/impl/octree_base_node.hpp | 16 +- .../octree_abstract_node_container.h | 1 - outofcore/include/pcl/outofcore/octree_base.h | 6 +- .../include/pcl/outofcore/octree_base_node.h | 2 +- .../pcl/outofcore/octree_disk_container.h | 1 - .../pcl/outofcore/octree_ram_container.h | 1 - .../pcl/outofcore/outofcore_base_data.h | 2 - .../outofcore_breadth_first_iterator.h | 3 + outofcore/outofcore.doxy | 4 +- outofcore/src/outofcore_node_data.cpp | 3 +- outofcore/tools/CMakeLists.txt | 2 - outofcore/tools/outofcore_print.cpp | 2 +- outofcore/tools/outofcore_process.cpp | 2 +- pcl_config.h.in | 4 +- people/CMakeLists.txt | 2 - .../main_ground_based_people_detection.cpp | 2 +- .../ground_based_people_detection_app.h | 3 - .../ground_based_people_detection_app.hpp | 5 +- .../pcl/people/impl/head_based_subcluster.hpp | 14 +- .../include/pcl/people/impl/height_map_2d.hpp | 6 +- .../pcl/people/impl/person_cluster.hpp | 39 +- recognition/CMakeLists.txt | 32 +- .../recognition/3rdparty/metslib/README.md | 15 + .../pcl/recognition/3rdparty/metslib/model.hh | 2 +- .../include/pcl/recognition/auxiliary.h | 2 + recognition/include/pcl/recognition/boost.h | 1 + recognition/include/pcl/recognition/bvh.h | 2 + .../include/pcl/recognition/cg/hough_3d.h | 1 - .../recognition/color_gradient_dot_modality.h | 2 +- .../pcl/recognition/color_gradient_modality.h | 4 +- .../include/pcl/recognition/dot_modality.h | 1 - .../face_detector_data_provider.h | 2 +- .../pcl/recognition/hv/greedy_verification.h | 1 - .../include/pcl/recognition/hv/hv_go.h | 1 - .../include/pcl/recognition/hv/hv_papazov.h | 2 - .../recognition/hv/hypotheses_verification.h | 5 +- .../pcl/recognition/hv/occlusion_reasoning.h | 6 +- .../include/pcl/recognition/hypothesis.h | 2 + .../pcl/recognition/impl/cg/hough_3d.hpp | 1 + .../impl/hv/greedy_verification.hpp | 2 +- .../include/pcl/recognition/impl/hv/hv_go.hpp | 13 +- .../pcl/recognition/impl/hv/hv_papazov.hpp | 2 +- .../impl/hv/occlusion_reasoning.hpp | 4 +- .../recognition/impl/implicit_shape_model.hpp | 2 + .../pcl/recognition/impl/line_rgbd.hpp | 2 + .../impl/ransac_based/simple_octree.hpp | 1 - .../pcl/recognition/impl/simple_octree.hpp | 2 + .../pcl/recognition/impl/voxel_structure.hpp | 2 + .../pcl/recognition/implicit_shape_model.h | 9 +- .../include/pcl/recognition/line_rgbd.h | 2 + .../include/pcl/recognition/mask_map.h | 4 - .../include/pcl/recognition/model_library.h | 2 + .../include/pcl/recognition/obj_rec_ransac.h | 2 + .../include/pcl/recognition/orr_graph.h | 2 + .../include/pcl/recognition/orr_octree.h | 2 + .../pcl/recognition/orr_octree_zprojection.h | 2 + .../pcl/recognition/ransac_based/auxiliary.h | 5 +- .../recognition/ransac_based/obj_rec_ransac.h | 2 - .../pcl/recognition/ransac_based/orr_octree.h | 2 - .../recognition/ransac_based/trimmed_icp.h | 2 +- .../ransac_based/voxel_structure.h | 2 - .../pcl/recognition/rigid_transform_space.h | 2 + .../include/pcl/recognition/simple_octree.h | 2 + .../include/pcl/recognition/trimmed_icp.h | 2 + .../include/pcl/recognition/voxel_structure.h | 2 + recognition/src/mask_map.cpp | 9 - recognition/src/ransac_based/orr_octree.cpp | 1 + registration/include/pcl/registration/bfgs.h | 708 +-- registration/include/pcl/registration/boost.h | 9 +- .../include/pcl/registration/boost_graph.h | 83 +- .../pcl/registration/convergence_criteria.h | 74 +- .../registration/correspondence_estimation.h | 784 ++-- ...correspondence_estimation_backprojection.h | 389 +- ...orrespondence_estimation_normal_shooting.h | 368 +- ...pondence_estimation_organized_projection.h | 351 +- .../registration/correspondence_rejection.h | 743 ++-- .../correspondence_rejection_distance.h | 317 +- .../correspondence_rejection_features.h | 510 +-- ...correspondence_rejection_median_distance.h | 325 +- .../correspondence_rejection_one_to_one.h | 88 +- ...respondence_rejection_organized_boundary.h | 192 +- .../correspondence_rejection_poly.h | 666 ++- ...orrespondence_rejection_sample_consensus.h | 433 +- ...espondence_rejection_sample_consensus_2d.h | 217 +- .../correspondence_rejection_surface_normal.h | 538 +-- .../correspondence_rejection_trimmed.h | 178 +- .../correspondence_rejection_var_trimmed.h | 418 +- .../pcl/registration/correspondence_sorting.h | 167 +- .../pcl/registration/correspondence_types.h | 56 +- .../default_convergence_criteria.h | 524 ++- .../include/pcl/registration/distances.h | 181 +- .../pcl/registration/edge_measurements.h | 52 +- registration/include/pcl/registration/eigen.h | 5 +- registration/include/pcl/registration/elch.h | 408 +- .../include/pcl/registration/exceptions.h | 57 +- registration/include/pcl/registration/gicp.h | 752 ++-- .../include/pcl/registration/gicp6d.h | 275 +- .../include/pcl/registration/graph_handler.h | 343 +- .../pcl/registration/graph_optimizer.h | 45 +- .../pcl/registration/graph_registration.h | 145 +- .../include/pcl/registration/ia_fpcs.h | 1027 +++-- .../include/pcl/registration/ia_kfpcs.h | 434 +- .../include/pcl/registration/ia_ransac.h | 519 ++- registration/include/pcl/registration/icp.h | 740 ++-- .../include/pcl/registration/icp_nl.h | 85 +- .../impl/correspondence_estimation.hpp | 181 +- ...rrespondence_estimation_backprojection.hpp | 237 +- ...respondence_estimation_normal_shooting.hpp | 252 +- ...ndence_estimation_organized_projection.hpp | 99 +- .../correspondence_rejection_distance.hpp | 3 +- .../correspondence_rejection_features.hpp | 93 +- ...rrespondence_rejection_median_distance.hpp | 5 +- .../correspondence_rejection_one_to_one.hpp | 2 +- ...spondence_rejection_organized_boundary.hpp | 3 +- .../impl/correspondence_rejection_poly.hpp | 160 +- ...respondence_rejection_sample_consensus.hpp | 156 +- ...pondence_rejection_sample_consensus_2d.hpp | 107 +- ...orrespondence_rejection_surface_normal.hpp | 2 +- .../impl/correspondence_rejection_trimmed.hpp | 2 +- .../correspondence_rejection_var_trimmed.hpp | 2 +- .../impl/correspondence_types.hpp | 39 +- .../impl/default_convergence_criteria.hpp | 89 +- .../include/pcl/registration/impl/elch.hpp | 248 +- .../include/pcl/registration/impl/gicp.hpp | 502 ++- .../include/pcl/registration/impl/ia_fpcs.hpp | 844 ++-- .../pcl/registration/impl/ia_kfpcs.hpp | 252 +- .../pcl/registration/impl/ia_ransac.hpp | 227 +- .../include/pcl/registration/impl/icp.hpp | 304 +- .../include/pcl/registration/impl/icp_nl.hpp | 1 - .../impl/incremental_registration.hpp | 62 +- .../pcl/registration/impl/joint_icp.hpp | 355 +- .../include/pcl/registration/impl/lum.hpp | 465 +- .../registration/impl/meta_registration.hpp | 62 +- .../include/pcl/registration/impl/ndt.hpp | 931 ++-- .../include/pcl/registration/impl/ndt_2d.hpp | 588 +-- .../impl/pairwise_graph_registration.hpp | 59 +- .../registration/impl/ppf_registration.hpp | 317 +- .../impl/pyramid_feature_matching.hpp | 321 +- .../pcl/registration/impl/registration.hpp | 172 +- .../impl/sample_consensus_prerejective.hpp | 276 +- .../impl/transformation_estimation_2D.hpp | 180 +- .../impl/transformation_estimation_3point.hpp | 213 +- .../impl/transformation_estimation_dq.hpp | 201 +- ...nsformation_estimation_dual_quaternion.hpp | 194 +- .../impl/transformation_estimation_lm.hpp | 263 +- ...ormation_estimation_point_to_plane_lls.hpp | 289 +- ...estimation_point_to_plane_lls_weighted.hpp | 353 +- ...ion_estimation_point_to_plane_weighted.hpp | 299 +- .../impl/transformation_estimation_svd.hpp | 213 +- .../transformation_estimation_svd_scale.hpp | 82 +- ...stimation_symmetric_point_to_plane_lls.hpp | 199 +- .../transformation_validation_euclidean.hpp | 66 +- .../registration/incremental_registration.h | 168 +- .../include/pcl/registration/joint_icp.h | 392 +- registration/include/pcl/registration/lum.h | 603 +-- .../pcl/registration/matching_candidate.h | 91 +- .../pcl/registration/meta_registration.h | 170 +- registration/include/pcl/registration/ndt.h | 878 ++-- .../include/pcl/registration/ndt_2d.h | 235 +- .../pairwise_graph_registration.h | 115 +- .../pcl/registration/ppf_registration.h | 540 ++- .../registration/pyramid_feature_matching.h | 309 +- .../include/pcl/registration/registration.h | 1244 +++--- .../sample_consensus_prerejective.h | 544 +-- .../registration/transformation_estimation.h | 148 +- .../transformation_estimation_2D.h | 197 +- .../transformation_estimation_3point.h | 182 +- .../transformation_estimation_dq.h | 171 +- ...ransformation_estimation_dual_quaternion.h | 168 +- .../transformation_estimation_lm.h | 605 ++- ...transformation_estimation_point_to_plane.h | 92 +- ...sformation_estimation_point_to_plane_lls.h | 201 +- ...n_estimation_point_to_plane_lls_weighted.h | 226 +- ...ation_estimation_point_to_plane_weighted.h | 600 +-- .../transformation_estimation_svd.h | 221 +- .../transformation_estimation_svd_scale.h | 85 +- ..._estimation_symmetric_point_to_plane_lls.h | 243 +- .../registration/transformation_validation.h | 156 +- .../transformation_validation_euclidean.h | 393 +- .../include/pcl/registration/transforms.h | 2 +- .../pcl/registration/vertex_estimates.h | 48 +- .../pcl/registration/warp_point_rigid.h | 167 +- .../pcl/registration/warp_point_rigid_3d.h | 86 +- .../pcl/registration/warp_point_rigid_6d.h | 93 +- registration/registration.doxy | 2 +- .../src/correspondence_rejection_distance.cpp | 28 +- .../src/correspondence_rejection_features.cpp | 30 +- ...rrespondence_rejection_median_distance.cpp | 26 +- .../correspondence_rejection_one_to_one.cpp | 19 +- ...spondence_rejection_organized_boundary.cpp | 49 +- ...orrespondence_rejection_surface_normal.cpp | 22 +- .../src/correspondence_rejection_trimmed.cpp | 18 +- .../correspondence_rejection_var_trimmed.cpp | 72 +- registration/src/correspondence_types.cpp | 1 - registration/src/gicp6d.cpp | 438 +- registration/src/joint_icp.cpp | 10 +- registration/src/lum.cpp | 3 +- registration/src/ndt.cpp | 16 +- registration/src/ppf_registration.cpp | 78 +- registration/src/pyramid_feature_matching.cpp | 4 +- registration/src/registration.cpp | 15 +- .../src/transformation_estimation_2D.cpp | 2 +- .../include/pcl/sample_consensus/boost.h | 1 + .../include/pcl/sample_consensus/eigen.h | 2 +- .../pcl/sample_consensus/impl/lmeds.hpp | 24 +- .../pcl/sample_consensus/impl/mlesac.hpp | 42 +- .../pcl/sample_consensus/impl/msac.hpp | 2 +- .../pcl/sample_consensus/impl/prosac.hpp | 2 +- .../pcl/sample_consensus/impl/ransac.hpp | 2 +- .../pcl/sample_consensus/impl/rmsac.hpp | 2 +- .../pcl/sample_consensus/impl/rransac.hpp | 2 +- .../impl/sac_model_circle.hpp | 197 +- .../impl/sac_model_circle3d.hpp | 32 +- .../sample_consensus/impl/sac_model_cone.hpp | 89 +- .../impl/sac_model_cylinder.hpp | 43 +- .../sample_consensus/impl/sac_model_line.hpp | 15 +- .../impl/sac_model_normal_parallel_plane.hpp | 7 + .../impl/sac_model_normal_plane.hpp | 157 +- .../impl/sac_model_normal_sphere.hpp | 38 +- .../impl/sac_model_parallel_line.hpp | 1 + .../impl/sac_model_parallel_plane.hpp | 1 + .../impl/sac_model_perpendicular_plane.hpp | 3 + .../sample_consensus/impl/sac_model_plane.hpp | 130 +- .../impl/sac_model_registration.hpp | 20 +- .../impl/sac_model_registration_2d.hpp | 1 - .../impl/sac_model_sphere.hpp | 198 +- .../sample_consensus/impl/sac_model_stick.hpp | 8 +- .../include/pcl/sample_consensus/lmeds.h | 3 + .../include/pcl/sample_consensus/msac.h | 6 +- .../include/pcl/sample_consensus/prosac.h | 2 +- .../include/pcl/sample_consensus/ransac.h | 13 +- .../include/pcl/sample_consensus/rmsac.h | 1 - .../include/pcl/sample_consensus/rransac.h | 10 +- .../include/pcl/sample_consensus/sac.h | 4 +- .../include/pcl/sample_consensus/sac_model.h | 39 +- .../pcl/sample_consensus/sac_model_circle.h | 43 + .../pcl/sample_consensus/sac_model_cone.h | 2 - .../pcl/sample_consensus/sac_model_cylinder.h | 1 - .../pcl/sample_consensus/sac_model_line.h | 1 - .../sample_consensus/sac_model_normal_plane.h | 28 + .../sac_model_normal_sphere.h | 1 - .../sac_model_parallel_plane.h | 1 - .../sac_model_perpendicular_plane.h | 1 - .../pcl/sample_consensus/sac_model_plane.h | 43 + .../sample_consensus/sac_model_registration.h | 35 +- .../pcl/sample_consensus/sac_model_sphere.h | 43 + .../pcl/sample_consensus/sac_model_stick.h | 1 - sample_consensus/sample_consensus.doxy | 12 +- .../include/pcl/search/impl/flann_search.hpp | 18 +- search/include/pcl/search/impl/organized.hpp | 34 +- search/include/pcl/search/octree.h | 12 +- search/include/pcl/search/organized.h | 22 +- ...oximate_progressive_morphological_filter.h | 2 +- segmentation/include/pcl/segmentation/boost.h | 2 +- .../conditional_euclidean_clustering.h | 3 +- .../pcl/segmentation/cpc_segmentation.h | 5 +- .../pcl/segmentation/crf_segmentation.h | 1 - .../edge_aware_plane_comparator.h | 1 - .../euclidean_cluster_comparator.h | 312 +- .../euclidean_plane_coefficient_comparator.h | 1 - .../pcl/segmentation/extract_clusters.h | 81 +- .../segmentation/extract_labeled_clusters.h | 356 +- .../extract_polygonal_prism_data.h | 3 +- .../pcl/segmentation/grabcut_segmentation.h | 6 +- ...imate_progressive_morphological_filter.hpp | 4 +- .../impl/conditional_euclidean_clustering.hpp | 16 +- .../segmentation/impl/cpc_segmentation.hpp | 9 +- .../segmentation/impl/crf_segmentation.hpp | 2 +- .../segmentation/impl/extract_clusters.hpp | 29 +- .../impl/extract_labeled_clusters.hpp | 158 +- .../impl/extract_polygonal_prism_data.hpp | 5 +- .../impl/grabcut_segmentation.hpp | 27 +- .../impl/min_cut_segmentation.hpp | 44 +- ...nized_connected_component_segmentation.hpp | 2 +- .../organized_multi_plane_segmentation.hpp | 9 +- .../impl/progressive_morphological_filter.hpp | 5 +- .../pcl/segmentation/impl/region_growing.hpp | 63 +- .../segmentation/impl/region_growing_rgb.hpp | 110 +- .../segmentation/impl/sac_segmentation.hpp | 4 +- .../impl/seeded_hue_segmentation.hpp | 23 +- .../segmentation/impl/segment_differences.hpp | 10 +- .../impl/supervoxel_clustering.hpp | 22 +- .../segmentation/impl/unary_classifier.hpp | 21 +- .../pcl/segmentation/lccp_segmentation.h | 1 - .../pcl/segmentation/min_cut_segmentation.h | 2 +- .../organized_multi_plane_segmentation.h | 21 - .../progressive_morphological_filter.h | 3 +- .../include/pcl/segmentation/random_walker.h | 2 +- .../include/pcl/segmentation/region_3d.h | 1 - .../include/pcl/segmentation/region_growing.h | 24 +- .../pcl/segmentation/region_growing_rgb.h | 11 +- .../rgb_plane_coefficient_comparator.h | 1 - .../segmentation/seeded_hue_segmentation.h | 2 +- .../pcl/segmentation/segment_differences.h | 14 +- .../pcl/segmentation/supervoxel_clustering.h | 23 +- .../pcl/segmentation/unary_classifier.h | 7 +- segmentation/src/extract_clusters.cpp | 18 +- segmentation/src/grabcut_segmentation.cpp | 4 +- simulation/CMakeLists.txt | 8 +- simulation/include/pcl/simulation/camera.h | 2 +- simulation/include/pcl/simulation/model.h | 2 +- .../include/pcl/simulation/range_likelihood.h | 1 - simulation/src/camera.cpp | 2 - simulation/src/model.cpp | 5 +- simulation/src/range_likelihood.cpp | 2 +- simulation/tools/sim_terminal_demo.cpp | 3 +- simulation/tools/sim_test_performance.cpp | 8 - simulation/tools/sim_test_simple.cpp | 6 - simulation/tools/sim_viewer.cpp | 95 +- simulation/tools/simulation_io.hpp | 1 - surface/CMakeLists.txt | 43 +- .../poisson4/marching_cubes_poisson.h | 1 - .../poisson4/multi_grid_octree_data.hpp | 2 +- .../3rdparty/poisson4/octree_poisson.hpp | 1 - .../surface/3rdparty/poisson4/polynomial.hpp | 2 - .../surface/3rdparty/poisson4/ppolynomial.hpp | 1 + .../3rdparty/poisson4/sparse_matrix.hpp | 1 - surface/include/pcl/surface/boost.h | 1 + surface/include/pcl/surface/concave_hull.h | 2 +- surface/include/pcl/surface/convex_hull.h | 5 +- surface/include/pcl/surface/ear_clipping.h | 29 +- surface/include/pcl/surface/eigen.h | 1 + surface/include/pcl/surface/gp3.h | 30 +- surface/include/pcl/surface/grid_projection.h | 28 +- .../pcl/surface/impl/bilateral_upsampling.hpp | 4 +- .../include/pcl/surface/impl/concave_hull.hpp | 71 +- .../include/pcl/surface/impl/convex_hull.hpp | 87 +- surface/include/pcl/surface/impl/gp3.hpp | 30 +- .../pcl/surface/impl/grid_projection.hpp | 35 +- .../pcl/surface/impl/marching_cubes.hpp | 3 +- .../pcl/surface/impl/marching_cubes_hoppe.hpp | 5 +- .../pcl/surface/impl/marching_cubes_rbf.hpp | 3 - surface/include/pcl/surface/impl/mls.hpp | 35 +- .../pcl/surface/impl/organized_fast_mesh.hpp | 1 + surface/include/pcl/surface/impl/poisson.hpp | 21 +- .../include/pcl/surface/impl/processing.hpp | 2 +- .../pcl/surface/impl/reconstruction.hpp | 4 +- .../pcl/surface/impl/surfel_smoothing.hpp | 11 +- .../pcl/surface/impl/texture_mapping.hpp | 51 +- surface/include/pcl/surface/marching_cubes.h | 1 - .../pcl/surface/marching_cubes_hoppe.h | 1 - .../include/pcl/surface/marching_cubes_rbf.h | 1 - surface/include/pcl/surface/mls.h | 94 +- .../include/pcl/surface/on_nurbs/nurbs_data.h | 2 - .../pcl/surface/on_nurbs/nurbs_solve.h | 2 - .../pcl/surface/on_nurbs/nurbs_tools.h | 1 - .../pcl/surface/on_nurbs/sequential_fitter.h | 2 +- .../include/pcl/surface/on_nurbs/sparse_mat.h | 1 - surface/include/pcl/surface/poisson.h | 15 + surface/include/pcl/surface/qhull.h | 27 +- surface/include/pcl/surface/reconstruction.h | 5 +- .../simplification_remove_unused_vertices.h | 5 +- .../include/pcl/surface/surfel_smoothing.h | 2 +- surface/include/pcl/surface/texture_mapping.h | 3 +- .../opennurbs/opennurbs_annotation2.cpp | 407 -- .../poisson4/marching_cubes_poisson.cpp | 1 - surface/src/ear_clipping.cpp | 7 +- surface/src/marching_cubes_hoppe.cpp | 1 - surface/src/on_nurbs/closing_boundary.cpp | 1 + surface/src/on_nurbs/fitting_curve_2d.cpp | 1 + .../src/on_nurbs/fitting_curve_2d_apdm.cpp | 1 + .../src/on_nurbs/fitting_curve_2d_asdm.cpp | 1 + .../src/on_nurbs/fitting_curve_2d_atdm.cpp | 1 + surface/src/on_nurbs/fitting_cylinder_pdm.cpp | 3 + surface/src/on_nurbs/fitting_sphere_pdm.cpp | 2 + surface/src/on_nurbs/fitting_surface_im.cpp | 7 +- surface/src/on_nurbs/fitting_surface_pdm.cpp | 3 + surface/src/on_nurbs/fitting_surface_tdm.cpp | 1 + .../src/on_nurbs/global_optimization_pdm.cpp | 1 + .../src/on_nurbs/global_optimization_tdm.cpp | 1 + surface/src/on_nurbs/nurbs_solve_eigen.cpp | 2 + surface/src/on_nurbs/nurbs_solve_umfpack.cpp | 1 + surface/src/on_nurbs/nurbs_tools.cpp | 2 + surface/src/on_nurbs/sequential_fitter.cpp | 6 +- surface/src/on_nurbs/sparse_mat.cpp | 3 +- surface/src/on_nurbs/triangulation.cpp | 2 + .../simplification_remove_unused_vertices.cpp | 2 +- .../vtk_mesh_smoothing_laplacian.cpp | 1 - .../vtk_mesh_smoothing_windowed_sinc.cpp | 1 - .../vtk_smoothing/vtk_mesh_subdivision.cpp | 1 - surface/src/vtk_smoothing/vtk_utils.cpp | 6 +- test/2d/test_2d.cpp | 1 - test/CMakeLists.txt | 15 +- test/common/CMakeLists.txt | 2 + test/common/test_centroid.cpp | 1 - test/common/test_common.cpp | 191 +- test/common/test_io.cpp | 199 +- test/common/test_plane_intersection.cpp | 1 - ...est_point_type_static_member_functions.cpp | 36 + test/common/test_pointcloud.cpp | 405 ++ test/common/test_polygon_mesh.cpp | 32 +- test/common/test_transforms.cpp | 28 + test/common/test_wrappers.cpp | 16 +- test/features/test_base_feature.cpp | 2 +- test/features/test_board_estimation.cpp | 2 +- test/features/test_boundary_estimation.cpp | 2 +- test/features/test_curvatures_estimation.cpp | 2 +- test/features/test_cvfh_estimation.cpp | 2 +- test/features/test_flare_estimation.cpp | 2 +- test/features/test_gradient_estimation.cpp | 3 +- test/features/test_grsd_estimation.cpp | 1 - test/features/test_ii_normals.cpp | 4 +- test/features/test_invariants_estimation.cpp | 2 +- test/features/test_normal_estimation.cpp | 6 +- test/features/test_pfh_estimation.cpp | 2 +- test/features/test_rift_estimation.cpp | 4 +- test/features/test_rsd_estimation.cpp | 1 - test/features/test_shot_estimation.cpp | 4 +- test/features/test_shot_lrf_estimation.cpp | 2 +- test/features/test_spin_estimation.cpp | 4 +- test/filters/CMakeLists.txt | 8 +- test/filters/test_clipper.cpp | 61 +- test/filters/test_crop_hull.cpp | 376 ++ test/filters/test_filters.cpp | 148 +- test/filters/test_functor_filter.cpp | 28 +- test/filters/test_model_outlier_removal.cpp | 2 +- test/filters/test_sampling.cpp | 10 +- test/filters/test_uniform_sampling.cpp | 2 +- test/fuzz/build.sh | 65 + test/fuzz/ply_reader_fuzzer.cpp | 23 + test/geometry/test_mesh_conversion.cpp | 19 +- test/geometry/test_quad_mesh.cpp | 4 +- test/gpu/octree/perfomance.cpp | 30 +- test/gpu/octree/test_approx_nearest.cpp | 256 +- test/gpu/octree/test_host_radius_search.cpp | 9 +- test/gpu/octree/test_knn_search.cpp | 36 +- test/io/CMakeLists.txt | 3 +- test/io/test_grabbers.cpp | 2 + test/io/test_io.cpp | 38 +- test/io/test_octree_compression.cpp | 194 +- test/io/test_ply_io.cpp | 4 +- test/io/test_ply_mesh_io.cpp | 32 + test/io/test_point_cloud_image_extractors.cpp | 22 +- test/kdtree/test_kdtree.cpp | 18 +- test/keypoints/test_keypoints.cpp | 6 +- test/ml/CMakeLists.txt | 14 + test/ml/test_kmeans.cpp | 107 + test/octree/test_octree.cpp | 456 +- test/outofcore/test_outofcore.cpp | 6 +- test/recognition/test_recognition_cg.cpp | 4 +- test/registration/test_kfpcs_ia.cpp | 3 + test/registration/test_ndt.cpp | 8 +- test/registration/test_registration.cpp | 28 +- test/registration/test_registration_api.cpp | 1 - test/registration/test_sac_ia.cpp | 8 +- test/registration/test_warps.cpp | 2 + .../test_sample_consensus.cpp | 16 +- .../test_sample_consensus_line_models.cpp | 14 +- .../test_sample_consensus_plane_models.cpp | 156 +- .../test_sample_consensus_quadric_models.cpp | 157 +- test/search/test_flann_search.cpp | 56 +- test/search/test_kdtree.cpp | 36 +- test/search/test_octree.cpp | 37 +- test/search/test_organized.cpp | 41 +- test/search/test_organized_index.cpp | 70 +- test/search/test_search.cpp | 42 +- test/surface/test_concave_hull.cpp | 4 +- test/surface/test_convex_hull.cpp | 4 +- test/visualization/test_visualization.cpp | 21 +- tools/CMakeLists.txt | 8 + tools/boost.h | 3 - tools/compute_cloud_error.cpp | 4 +- tools/compute_hausdorff.cpp | 4 +- tools/concatenate_points_pcd.cpp | 1 - tools/crf_segmentation.cpp | 2 +- tools/elch.cpp | 1 - tools/fast_bilateral_filter.cpp | 12 +- tools/grid_min.cpp | 11 +- tools/hdl_viewer_simple.cpp | 1 - tools/image_grabber_saver.cpp | 9 +- tools/image_grabber_viewer.cpp | 3 +- tools/image_viewer.cpp | 3 - tools/local_max.cpp | 11 +- tools/lum.cpp | 1 - tools/match_linemod_template.cpp | 1 - tools/mesh_sampling.cpp | 12 +- tools/mls_smoothing.cpp | 1 - tools/morph.cpp | 13 +- tools/ndt2d.cpp | 2 - tools/normal_estimation.cpp | 12 +- tools/obj_rec_ransac_accepted_hypotheses.cpp | 2 - tools/obj_rec_ransac_hash_table.cpp | 2 - tools/obj_rec_ransac_model_opps.cpp | 2 - tools/obj_rec_ransac_result.cpp | 8 +- tools/obj_rec_ransac_scene_opps.cpp | 1 - tools/octree_viewer.cpp | 5 +- tools/oni_viewer_simple.cpp | 2 - tools/openni2_viewer.cpp | 2 - tools/openni_image.cpp | 22 +- tools/openni_save_image.cpp | 17 +- tools/openni_viewer.cpp | 1 - tools/openni_viewer_simple.cpp | 1 - tools/outlier_removal.cpp | 6 +- tools/passthrough_filter.cpp | 12 +- tools/pcd2png.cpp | 1 + tools/pcd_grabber_viewer.cpp | 4 +- tools/pcd_viewer.cpp | 88 +- tools/pcl_video.cpp | 4 +- tools/png2pcd.cpp | 22 +- tools/progressive_morphological_filter.cpp | 15 +- tools/radius_filter.cpp | 13 +- tools/registration_visualizer.cpp | 1 - tools/sac_segmentation_plane.cpp | 13 +- tools/tiff2pcd.cpp | 35 +- tools/timed_trigger_test.cpp | 1 - tools/train_linemod_template.cpp | 4 +- tools/transform_from_viewpoint.cpp | 1 - tools/transform_point_cloud.cpp | 2 +- tools/unary_classifier_segment.cpp | 11 +- tools/uniform_sampling.cpp | 3 +- tools/vfh_estimation.cpp | 1 - tools/virtual_scanner.cpp | 52 +- tools/vlp_viewer.cpp | 3 - tools/voxel_grid_occlusion_estimation.cpp | 1 - tools/xyz2pcd.cpp | 1 + ...pprox_nearest_pair_point_cloud_coherence.h | 1 - tracking/include/pcl/tracking/boost.h | 46 - ...rox_nearest_pair_point_cloud_coherence.hpp | 2 +- .../pcl/tracking/impl/distance_coherence.hpp | 2 - .../pcl/tracking/impl/hsv_color_coherence.hpp | 2 - .../impl/kld_adaptive_particle_filter_omp.hpp | 2 +- .../nearest_pair_point_cloud_coherence.hpp | 3 +- .../pcl/tracking/impl/particle_filter.hpp | 21 +- .../pcl/tracking/impl/particle_filter_omp.hpp | 2 +- .../pcl/tracking/impl/pyramidal_klt.hpp | 14 +- .../include/pcl/tracking/impl/tracker.hpp | 3 - .../include/pcl/tracking/impl/tracking.hpp | 2 - .../include/pcl/tracking/particle_filter.h | 32 +- tracking/include/pcl/tracking/pyramidal_klt.h | 18 +- tracking/src/kld_adaptive_particle_filter.cpp | 23 +- tracking/src/particle_filter.cpp | 21 +- visualization/CMakeLists.txt | 69 +- .../pcl/visualization/area_picking_event.h | 8 +- .../include/pcl/visualization/boost.h | 5 - .../pcl/visualization/common/actor_map.h | 6 +- .../include/pcl/visualization/common/common.h | 3 +- .../visualization/common/float_image_utils.h | 2 - .../include/pcl/visualization/common/io.h | 3 +- .../common/ren_win_interact_map.h | 3 +- .../include/pcl/visualization/common/shapes.h | 13 +- .../include/pcl/visualization/eigen.h | 1 + .../pcl/visualization/histogram_visualizer.h | 8 +- .../impl/histogram_visualizer.hpp | 6 +- .../pcl/visualization/impl/pcl_plotter.hpp | 2 +- .../pcl/visualization/impl/pcl_visualizer.hpp | 158 +- .../impl/point_cloud_color_handlers.hpp | 1 + .../impl/registration_visualizer.hpp | 9 +- .../pcl/visualization/interactor_style.h | 5 +- .../include/pcl/visualization/pcl_painter2D.h | 2 - .../include/pcl/visualization/pcl_plotter.h | 17 +- .../pcl/visualization/pcl_visualizer.h | 29 +- .../point_cloud_color_handlers.h | 66 +- .../point_cloud_geometry_handlers.h | 1 + .../pcl/visualization/point_picking_event.h | 4 +- .../pcl/visualization/qvtk_compatibility.h | 51 + .../visualization/registration_visualizer.h | 21 +- .../visualization/simple_buffer_visualizer.h | 2 +- visualization/include/pcl/visualization/vtk.h | 170 +- .../visualization/vtk/pcl_vtk_compatibility.h | 17 + .../visualization/vtk/vtkVertexBufferObject.h | 2 - visualization/src/cloud_viewer.cpp | 4 +- visualization/src/common/common.cpp | 2 + visualization/src/common/io.cpp | 16 +- visualization/src/common/shapes.cpp | 27 + visualization/src/histogram_visualizer.cpp | 20 +- visualization/src/interactor_style.cpp | 9 +- visualization/src/pcl_plotter.cpp | 8 +- visualization/src/pcl_visualizer.cpp | 199 +- visualization/src/point_cloud_handlers.cpp | 2 +- visualization/src/point_picking_event.cpp | 7 +- 1379 files changed, 36130 insertions(+), 32198 deletions(-) create mode 100644 .ci/azure-pipelines/docs-pipeline.yaml create mode 100644 .dev/docker/windows/Dockerfile create mode 100644 .dev/docker/windows/x64-windows-rel.cmake create mode 100644 .dev/docker/windows/x86-windows-rel.cmake create mode 100644 benchmarks/CMakeLists.txt create mode 100644 benchmarks/features/normal_3d.cpp create mode 100644 benchmarks/filters/voxel_grid.cpp create mode 100644 cmake/Modules/FindGLEW.cmake delete mode 100644 cmake/Modules/Findlibusb-1.0.cmake create mode 100644 cmake/Modules/Findlibusb.cmake create mode 100644 cmake/pcl_find_avx.cmake create mode 100644 cmake/pcl_find_vtk.cmake create mode 100644 doc/tutorials/content/function_filter.rst create mode 100644 doc/tutorials/content/sources/function_filter/CMakeLists.txt create mode 100644 doc/tutorials/content/sources/function_filter/sphere_removal.cpp delete mode 100644 geometry/include/pcl/geometry/mesh_indices.py create mode 100644 gpu/octree/src/utils/approx_nearest_utils.hpp delete mode 100644 io/src/file_io.cpp delete mode 100644 kdtree/include/pcl/kdtree/flann.h create mode 100644 recognition/include/pcl/recognition/3rdparty/metslib/README.md create mode 100644 recognition/include/pcl/recognition/auxiliary.h create mode 100644 recognition/include/pcl/recognition/bvh.h create mode 100644 recognition/include/pcl/recognition/hypothesis.h create mode 100644 recognition/include/pcl/recognition/impl/line_rgbd.hpp create mode 100644 recognition/include/pcl/recognition/impl/simple_octree.hpp create mode 100644 recognition/include/pcl/recognition/impl/voxel_structure.hpp create mode 100644 recognition/include/pcl/recognition/line_rgbd.h create mode 100644 recognition/include/pcl/recognition/model_library.h create mode 100644 recognition/include/pcl/recognition/obj_rec_ransac.h create mode 100644 recognition/include/pcl/recognition/orr_graph.h create mode 100644 recognition/include/pcl/recognition/orr_octree.h create mode 100644 recognition/include/pcl/recognition/orr_octree_zprojection.h create mode 100644 recognition/include/pcl/recognition/rigid_transform_space.h create mode 100644 recognition/include/pcl/recognition/simple_octree.h create mode 100644 recognition/include/pcl/recognition/trimmed_icp.h create mode 100644 recognition/include/pcl/recognition/voxel_structure.h create mode 100644 test/common/test_point_type_static_member_functions.cpp create mode 100644 test/common/test_pointcloud.cpp create mode 100644 test/filters/test_crop_hull.cpp create mode 100644 test/fuzz/build.sh create mode 100644 test/fuzz/ply_reader_fuzzer.cpp create mode 100644 test/ml/CMakeLists.txt create mode 100644 test/ml/test_kmeans.cpp delete mode 100644 tracking/include/pcl/tracking/boost.h create mode 100644 visualization/include/pcl/visualization/qvtk_compatibility.h create mode 100644 visualization/include/pcl/visualization/vtk/pcl_vtk_compatibility.h diff --git a/.ci/azure-pipelines/azure-pipelines.yaml b/.ci/azure-pipelines/azure-pipelines.yaml index a0bf28f0..28154042 100644 --- a/.ci/azure-pipelines/azure-pipelines.yaml +++ b/.ci/azure-pipelines/azure-pipelines.yaml @@ -1,15 +1,33 @@ +trigger: + paths: + exclude: + - doc + - README.md + - CHANGES.md + - CONTRIBUTING.md + +pr: + paths: + exclude: + - doc + - README.md + - CHANGES.md + - CONTRIBUTING.md + resources: containers: + - container: winx86 + image: pointcloudlibrary/env:winx86 + - container: winx64 + image: pointcloudlibrary/env:winx64 - container: fmt image: pointcloudlibrary/fmt - - container: env1604 - image: pointcloudlibrary/env:16.04 - container: env1804 image: pointcloudlibrary/env:18.04 - container: env2004 image: pointcloudlibrary/env:20.04 - - container: doc - image: pointcloudlibrary/doc + - container: env2010 + image: pointcloudlibrary/env:20.10 stages: - stage: formatting @@ -24,26 +42,26 @@ stages: - job: ubuntu displayName: Ubuntu pool: - vmImage: 'Ubuntu 16.04' + vmImage: 'Ubuntu 20.04' strategy: matrix: - 16.04 GCC: - CONTAINER: env1604 + 18.04 GCC: # oldest LTS + CONTAINER: env1804 CC: gcc CXX: g++ - BUILD_GPU: OFF + BUILD_GPU: ON CMAKE_ARGS: '-DPCL_WARNINGS_ARE_ERRORS=ON' - 20.04 GCC: - CONTAINER: env2004 + 20.10 GCC: # latest Ubuntu + CONTAINER: env2010 CC: gcc CXX: g++ BUILD_GPU: OFF - CMAKE_ARGS: '' container: $[ variables['CONTAINER'] ] timeoutInMinutes: 0 variables: BUILD_DIR: '$(Agent.BuildDirectory)/build' - CMAKE_CXX_FLAGS: '-Wall -Wextra' + CMAKE_CXX_FLAGS: '-Wall -Wextra -Wnoexcept-type' + DISPLAY: :99.0 # Checked for in CMake steps: - template: build/ubuntu.yaml @@ -75,14 +93,15 @@ stages: # Placement of Ubuntu Clang job after macOS ensures an extra parallel job doesn't need to be created. # Total time per run remains same since macOS is quicker so it finishes earlier, and remaining time is used by this job # Therefore, number of parallel jobs and total run time of entire pipeline remains unchanged even after addition of this job + # The version of Ubuntu is chosen to cover more versions than covered by GCC based CI dependsOn: osx condition: succeededOrFailed() pool: - vmImage: 'Ubuntu 16.04' + vmImage: 'Ubuntu 20.04' strategy: matrix: - 18.04 Clang: - CONTAINER: env1804 + 20.04 Clang: + CONTAINER: env2004 CC: clang CXX: clang++ BUILD_GPU: ON @@ -92,6 +111,7 @@ stages: variables: BUILD_DIR: '$(Agent.BuildDirectory)/build' CMAKE_CXX_FLAGS: '-Wall -Wextra' + DISPLAY: :99.0 # Checked for in CMake steps: - template: build/ubuntu.yaml - job: ubuntu_indices @@ -100,11 +120,11 @@ stages: dependsOn: osx condition: succeededOrFailed() pool: - vmImage: 'Ubuntu 16.04' + vmImage: 'Ubuntu 20.04' strategy: matrix: - 18.04 Clang: - CONTAINER: env1804 + 20.04 Clang: + CONTAINER: env2004 CC: clang CXX: clang++ INDEX_SIGNED: OFF @@ -122,37 +142,27 @@ stages: displayName: Build MSVC dependsOn: formatting jobs: - - job: vs2017 - displayName: Windows VS2017 Build + - job: Windows + displayName: Windows Build pool: - vmImage: 'vs2017-win2016' + vmImage: 'windows-2019' strategy: matrix: x86: + CONTAINER: winx86 PLATFORM: 'x86' ARCHITECTURE: 'x86' - GENERATOR: 'Visual Studio 15 2017' + GENERATOR: '"Visual Studio 16 2019" -A Win32' x64: + CONTAINER: winx64 PLATFORM: 'x64' ARCHITECTURE: 'x86_amd64' - GENERATOR: 'Visual Studio 15 2017 Win64' + GENERATOR: '"Visual Studio 16 2019" -A x64' + container: $[ variables['CONTAINER'] ] timeoutInMinutes: 0 variables: - BUILD_DIR: '$(Agent.WorkFolder)\build' + BUILD_DIR: 'c:\build' CONFIGURATION: 'Release' - VCPKG_ROOT: 'C:\vcpkg' + VCPKG_ROOT: 'c:\vcpkg' steps: - template: build/windows.yaml - - - stage: documentation - displayName: Documentation - dependsOn: [] - jobs: - - template: documentation.yaml - - - stage: tutorials - displayName: Tutorials - dependsOn: build_gcc - jobs: - - template: tutorials.yaml - diff --git a/.ci/azure-pipelines/build/macos.yaml b/.ci/azure-pipelines/build/macos.yaml index 985aaa35..36631166 100644 --- a/.ci/azure-pipelines/build/macos.yaml +++ b/.ci/azure-pipelines/build/macos.yaml @@ -3,7 +3,8 @@ steps: # find the commit hash on a quick non-forced update too fetchDepth: 10 - script: | - brew install cmake pkg-config boost eigen flann glew libusb qhull vtk glew qt5 libpcap libomp brewsci/science/openni + brew install cmake pkg-config boost eigen flann glew libusb qhull vtk glew qt5 libpcap libomp google-benchmark + brew install brewsci/science/openni git clone https://github.com/abseil/googletest.git $GOOGLE_TEST_DIR # the official endpoint changed to abseil/googletest cd $GOOGLE_TEST_DIR && git checkout release-1.8.1 displayName: 'Install Dependencies' @@ -19,6 +20,7 @@ steps: -DPCL_ONLY_CORE_POINT_TYPES=ON \ -DBUILD_simulation=ON \ -DBUILD_global_tests=ON \ + -DBUILD_benchmarks=ON \ -DBUILD_examples=ON \ -DBUILD_tools=ON \ -DBUILD_apps=ON \ diff --git a/.ci/azure-pipelines/build/ubuntu.yaml b/.ci/azure-pipelines/build/ubuntu.yaml index 559dfddd..961e34ea 100644 --- a/.ci/azure-pipelines/build/ubuntu.yaml +++ b/.ci/azure-pipelines/build/ubuntu.yaml @@ -1,4 +1,6 @@ steps: + - script: (nohup Xvfb :99 -screen 0 1280x1024x24 -nolisten tcp -nolisten unix &) + displayName: "Start Xvfb for DISPLAY=$(DISPLAY)" - checkout: self # find the commit hash on a quick non-forced update too fetchDepth: 10 @@ -12,6 +14,7 @@ steps: -DBUILD_simulation=ON \ -DBUILD_surface_on_nurbs=ON \ -DBUILD_global_tests=ON \ + -DBUILD_benchmarks=ON \ -DBUILD_examples=ON \ -DBUILD_tools=ON \ -DBUILD_apps=ON \ diff --git a/.ci/azure-pipelines/build/ubuntu_indices.yaml b/.ci/azure-pipelines/build/ubuntu_indices.yaml index 28f8340d..fd2e8366 100644 --- a/.ci/azure-pipelines/build/ubuntu_indices.yaml +++ b/.ci/azure-pipelines/build/ubuntu_indices.yaml @@ -10,11 +10,6 @@ steps: -DPCL_ONLY_CORE_POINT_TYPES=ON \ -DPCL_INDEX_SIGNED=$INDEX_SIGNED \ -DPCL_INDEX_SIZE=$INDEX_SIZE \ - -DBUILD_geometry=OFF \ - -DBUILD_tools=OFF \ - -DBUILD_kdtree=OFF \ - -DBUILD_ml=OFF \ - -DBUILD_octree=OFF \ -DBUILD_global_tests=ON # Temporary fix to ensure no tests are skipped cmake $(Build.SourcesDirectory) diff --git a/.ci/azure-pipelines/build/windows.yaml b/.ci/azure-pipelines/build/windows.yaml index b2a884c0..c9839847 100644 --- a/.ci/azure-pipelines/build/windows.yaml +++ b/.ci/azure-pipelines/build/windows.yaml @@ -3,43 +3,32 @@ steps: # find the commit hash on a quick non-forced update too fetchDepth: 10 - script: | - echo ##vso[task.setvariable variable=BOOST_ROOT]%BOOST_ROOT_1_69_0% - displayName: 'Set BOOST_ROOT Environment Variable' - - script: | - echo ##vso[task.prependpath]%BOOST_ROOT_1_69_0%\lib - displayName: 'Include Boost Libraries In System PATH' - - script: | - set - displayName: 'Print Environment Variables' - - script: | - vcpkg.exe install eigen3 flann gtest qhull --triplet %PLATFORM%-windows && vcpkg.exe list - displayName: 'Install C++ Dependencies Via Vcpkg' - - script: | - rmdir %VCPKG_ROOT%\downloads /S /Q - rmdir %VCPKG_ROOT%\packages /S /Q - displayName: 'Free Up Space' - - script: | - mkdir %BUILD_DIR% && cd %BUILD_DIR% + mkdir %BUILD_DIR% && cd %BUILD_DIR% && dir cmake $(Build.SourcesDirectory) ^ - -G"%GENERATOR%" ^ + -G%GENERATOR% ^ + -DVCPKG_TARGET_TRIPLET=%PLATFORM%-windows-rel ^ -DCMAKE_BUILD_TYPE="MinSizeRel" ^ - -DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake ^ + -DCMAKE_TOOLCHAIN_FILE="%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake" ^ -DVCPKG_APPLOCAL_DEPS=ON ^ -DPCL_BUILD_WITH_BOOST_DYNAMIC_LINKING_WIN32=ON ^ -DPCL_BUILD_WITH_FLANN_DYNAMIC_LINKING_WIN32=ON ^ -DPCL_BUILD_WITH_QHULL_DYNAMIC_LINKING_WIN32=ON ^ -DBUILD_global_tests=ON ^ + -DBUILD_benchmarks=ON ^ -DBUILD_tools=OFF ^ - -DBUILD_surface_on_nurbs=ON + -DBUILD_surface_on_nurbs=ON ^ + -DPCL_DISABLE_VISUALIZATION_TESTS=ON displayName: 'CMake Configuration' - - script: cd %BUILD_DIR% && cmake --build . --config %CONFIGURATION% + - script: | + cd %BUILD_DIR% && cmake --build . --config %CONFIGURATION% displayName: 'Build Library' - - script: cd %BUILD_DIR% && cmake --build . --target tests --config %CONFIGURATION% + - script: | + cd %BUILD_DIR% && cmake --build . --target tests --config %CONFIGURATION% displayName: 'Run Unit Tests' - task: PublishTestResults@2 inputs: testResultsFormat: 'CTest' testResultsFiles: '**/Test*.xml' - searchFolder: '$(Agent.WorkFolder)\build' + searchFolder: '$(BUILD_DIR)' condition: succeededOrFailed() diff --git a/.ci/azure-pipelines/docs-pipeline.yaml b/.ci/azure-pipelines/docs-pipeline.yaml new file mode 100644 index 00000000..e9c787cb --- /dev/null +++ b/.ci/azure-pipelines/docs-pipeline.yaml @@ -0,0 +1,46 @@ +trigger: + paths: + include: + - doc + +pr: + paths: + include: + - doc + +resources: + pipelines: + - pipeline: Build-CI + source: Build + trigger: + stages: + - build_gcc + containers: + - container: fmt # for formatting.yaml + image: pointcloudlibrary/fmt + - container: doc # for documentation.yaml + image: pointcloudlibrary/doc + - container: env1804 # for tutorials.yaml + image: pointcloudlibrary/env:18.04 + +stages: + - stage: formatting + displayName: Formatting + # if docs pipeline triggered by build_gcc stage, + # the formatting stage has already run, thus it + # won't run for a second time here. + condition: ne(variables['Build.Reason'], 'ResourceTrigger') + jobs: + - template: formatting.yaml + + - stage: documentation + displayName: Documentation + condition: in(dependencies.formatting.result, 'Succeeded', 'SucceededWithIssues', 'Skipped') + jobs: + - template: documentation.yaml + + - stage: tutorials + displayName: Tutorials + condition: in(dependencies.documentation.result, 'Succeeded', 'SucceededWithIssues') + jobs: + - template: tutorials.yaml diff --git a/.ci/azure-pipelines/documentation.yaml b/.ci/azure-pipelines/documentation.yaml index 9eaacba3..9cfcbfb8 100644 --- a/.ci/azure-pipelines/documentation.yaml +++ b/.ci/azure-pipelines/documentation.yaml @@ -2,7 +2,7 @@ jobs: - job: documentation displayName: Generate Documentation pool: - vmImage: 'Ubuntu 16.04' + vmImage: 'Ubuntu 20.04' container: doc variables: BUILD_DIR: '$(Agent.BuildDirectory)/build' diff --git a/.ci/azure-pipelines/env.yml b/.ci/azure-pipelines/env.yml index d3c6f7aa..00ca0a80 100644 --- a/.ci/azure-pipelines/env.yml +++ b/.ci/azure-pipelines/env.yml @@ -9,12 +9,14 @@ trigger: paths: include: - .dev/docker/env/Dockerfile + - .dev/docker/windows - .ci/azure-pipelines/env.yml pr: paths: include: - .dev/docker/env/Dockerfile + - .dev/docker/windows - .ci/azure-pipelines/env.yml schedules: @@ -32,32 +34,39 @@ variables: dockerHubID: "pointcloudlibrary" jobs: -- job: BuildAndPush +- job: BuildAndPushUbuntu timeoutInMinutes: 360 displayName: "Env" pool: vmImage: 'ubuntu-latest' strategy: matrix: - Ubuntu 16.04: - CUDA_VERSION: 9.2 - UBUNTU_DISTRO: 16.04 - USE_CUDA: false - VTK_VERSION: 6 - tag: 16.04 Ubuntu 18.04: CUDA_VERSION: 10.2 UBUNTU_DISTRO: 18.04 USE_CUDA: true VTK_VERSION: 6 - tag: 18.04 + TAG: 18.04 Ubuntu 20.04: - CUDA_VERSION: 11 + CUDA_VERSION: 11.2.1 UBUNTU_DISTRO: 20.04 VTK_VERSION: 7 - # nvidia-cuda docker image has not been released for 20.04 yet + USE_CUDA: true + TAG: 20.04 + Ubuntu 20.10: + CUDA_VERSION: 11.2.1 + UBUNTU_DISTRO: 20.10 + VTK_VERSION: 7 + # nvidia-cuda docker image has not been released for 20.10 yet + USE_CUDA: "" + TAG: 20.10 + Ubuntu 21.04: + CUDA_VERSION: 11.2.1 + UBUNTU_DISTRO: 21.04 + VTK_VERSION: 9 + # nvidia-cuda docker image has not been released for 21.04 yet USE_CUDA: "" - tag: 20.04 + TAG: 21.04 steps: - task: Docker@2 displayName: "Build docker image" @@ -69,12 +78,12 @@ jobs: --build-arg UBUNTU_DISTRO=$(UBUNTU_DISTRO) --build-arg USE_CUDA=$(USE_CUDA) --build-arg VTK_VERSION=$(VTK_VERSION) - -t $(dockerHubID)/env:$(tag) + -t $(dockerHubID)/env:$(TAG) dockerfile: '$(Build.SourcesDirectory)/.dev/docker/env/Dockerfile' - tags: "$(tag)" + tags: "$(TAG)" - script: | set -x - docker run --rm -v "$(Build.SourcesDirectory)":/pcl $(dockerHubID)/env:$(tag) bash -c ' \ + docker run --rm -v "$(Build.SourcesDirectory)":/pcl $(dockerHubID)/env:$(TAG) bash -c ' \ mkdir /pcl/build && cd /pcl/build && \ cmake /pcl \ -DCMAKE_BUILD_TYPE="Release" \ @@ -89,6 +98,57 @@ jobs: command: push containerRegistry: $(dockerHub) repository: $(dockerHubID)/env - tags: "$(tag)" + tags: "$(TAG)" + condition: and(eq(variables['Build.Repository.Name'], 'PointCloudLibrary/pcl'), + eq(variables['Build.SourceBranch'], 'refs/heads/master')) +- job: BuildAndPushWindows + timeoutInMinutes: 360 + displayName: "Env" + pool: + vmImage: 'windows-2019' + strategy: + matrix: + Winx86: + PLATFORM: x86 + TAG: winx86 + GENERATOR: "'Visual Studio 16 2019' -A Win32" + VCPKGCOMMIT: 2bc10eae2fb0b8c7c098325c4e9d82aa5d0329d9 + Winx64: + PLATFORM: x64 + TAG: winx64 + GENERATOR: "'Visual Studio 16 2019' -A x64" + VCPKGCOMMIT: master + steps: + - task: Docker@2 + displayName: "Build docker image" + inputs: + command: build + arguments: | + --no-cache + --build-arg PLATFORM=$(PLATFORM) + --build-arg VCPKGCOMMIT=$(VCPKGCOMMIT) + -t $(dockerHubID)/env:$(TAG) + dockerfile: '$(Build.SourcesDirectory)/.dev/docker/windows/Dockerfile' + tags: "$(TAG)" + + - script: > + docker run --rm -v "$(Build.SourcesDirectory)":c:\pcl $(dockerHubID)/env:$(TAG) + powershell -command "mkdir c:\pcl\build; cd c:\pcl\build; + cmake c:\pcl -G$(GENERATOR) + -DVCPKG_TARGET_TRIPLET=$(PLATFORM)-windows-rel + -DCMAKE_BUILD_TYPE='Release' + -DCMAKE_TOOLCHAIN_FILE=c:\vcpkg\scripts\buildsystems\vcpkg.cmake + -DPCL_ONLY_CORE_POINT_TYPES=ON + -DBUILD_io:BOOL=OFF + -DBUILD_kdtree:BOOL=OFF; + cmake --build . " + displayName: 'Verify Dockerimage' + - task: Docker@2 + displayName: "Push docker image" + inputs: + command: push + containerRegistry: $(dockerHub) + repository: $(dockerHubID)/env + tags: "$(TAG)" condition: and(eq(variables['Build.Repository.Name'], 'PointCloudLibrary/pcl'), eq(variables['Build.SourceBranch'], 'refs/heads/master')) diff --git a/.ci/azure-pipelines/formatting.yaml b/.ci/azure-pipelines/formatting.yaml index 0033e72f..342e56ff 100644 --- a/.ci/azure-pipelines/formatting.yaml +++ b/.ci/azure-pipelines/formatting.yaml @@ -2,7 +2,7 @@ jobs: - job: formatting displayName: Check code formatting pool: - vmImage: 'Ubuntu 16.04' + vmImage: 'Ubuntu 20.04' container: fmt steps: - checkout: self diff --git a/.ci/azure-pipelines/release.yaml b/.ci/azure-pipelines/release.yaml index 225c846f..b088cf29 100644 --- a/.ci/azure-pipelines/release.yaml +++ b/.ci/azure-pipelines/release.yaml @@ -48,6 +48,20 @@ stages: timeoutInMinutes: 360 pool: vmImage: 'ubuntu-latest' + strategy: + matrix: + INT32: + PCL_INDEX_SIGNED: true + PCL_INDEX_SIZE: 32 + UINT32: + PCL_INDEX_SIGNED: false + PCL_INDEX_SIZE: 32 + INT64: + PCL_INDEX_SIGNED: true + PCL_INDEX_SIZE: 64 + UINT64: + PCL_INDEX_SIGNED: false + PCL_INDEX_SIZE: 64 variables: tag: "release" steps: @@ -61,6 +75,8 @@ stages: arguments: | --no-cache -t $(dockerHubID)/release:$(tag) + --build-arg PCL_INDEX_SIGNED=$(PCL_INDEX_SIGNED) + --build-arg PCL_INDEX_SIZE=$(PCL_INDEX_SIZE) dockerfile: '$(Build.SourcesDirectory)/.dev/docker/release/Dockerfile' tags: "$(tag)" - stage: ROS diff --git a/.ci/azure-pipelines/tutorials.yaml b/.ci/azure-pipelines/tutorials.yaml index 05922c47..6ca14276 100644 --- a/.ci/azure-pipelines/tutorials.yaml +++ b/.ci/azure-pipelines/tutorials.yaml @@ -2,8 +2,8 @@ jobs: - job: tutorials displayName: Building Tutorials pool: - vmImage: 'Ubuntu 16.04' - container: env1604 + vmImage: 'Ubuntu 20.04' + container: env1804 timeoutInMinutes: 0 variables: BUILD_DIR: '$(Agent.BuildDirectory)/build' diff --git a/.ci/scripts/build_tutorials.sh b/.ci/scripts/build_tutorials.sh index 169128ec..c26d02d9 100755 --- a/.ci/scripts/build_tutorials.sh +++ b/.ci/scripts/build_tutorials.sh @@ -73,7 +73,7 @@ for DIRECTORY in "$SOURCE_DIR"/*/ ; do TUTORIAL_BUILD_DIR="$BUILD_DIR/$NAME" mkdir -p "$TUTORIAL_BUILD_DIR" && cd "$TUTORIAL_BUILD_DIR" || exit echo "Configuring tutorial: $NAME" - if ! cmake "$TUTORIAL_SOURCE_DIR" -DPCL_DIR="$INSTALL_DIR" -DCMAKE_CXX_FLAGS="-Werror"; then + if ! cmake "$TUTORIAL_SOURCE_DIR" -DPCL_DIR="$INSTALL_DIR" -DCMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic -Werror"; then STATUS="cmake error" else echo "Building tutorial: $NAME" diff --git a/.dev/docker/env/Dockerfile b/.dev/docker/env/Dockerfile index 6e06fb78..e2dcb662 100644 --- a/.dev/docker/env/Dockerfile +++ b/.dev/docker/env/Dockerfile @@ -14,6 +14,7 @@ ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update \ && apt-get install -y \ + xvfb \ cmake \ g++ \ clang \ @@ -26,6 +27,7 @@ RUN apt-get update \ libflann-dev \ libglew-dev \ libgtest-dev \ + libbenchmark-dev \ libopenni-dev \ libopenni2-dev \ libproj-dev \ diff --git a/.dev/docker/release/Dockerfile b/.dev/docker/release/Dockerfile index b7afd81b..8b156a98 100644 --- a/.dev/docker/release/Dockerfile +++ b/.dev/docker/release/Dockerfile @@ -3,6 +3,9 @@ FROM debian:testing ARG VTK_VERSION=7 ENV DEBIAN_FRONTEND=noninteractive +ARG PCL_INDEX_SIGNED=true +ARG PCL_INDEX_SIZE=32 + # Add sources so we can just install build-dependencies of PCL RUN sed -i 's/^deb \(.*\)$/deb \1\ndeb-src \1/' /etc/apt/sources.list \ && apt update \ @@ -57,6 +60,8 @@ RUN cd \ -DBUILD_tools=ON -DBUILD_tracking=ON -DBUILD_visualization=ON \ -DBUILD_apps_cloud_composer=OFF -DBUILD_apps_modeler=ON \ -DBUILD_apps_point_cloud_editor=ON -DBUILD_apps_in_hand_scanner=ON \ + -DPCL_INDEX_SIGNED=${PCL_INDEX_SIGNED} \ + -DPCL_INDEX_SIZE=${PCL_INDEX_SIZE} \ && make install -j2 \ && cd \ && rm -fr pcl diff --git a/.dev/docker/windows/Dockerfile b/.dev/docker/windows/Dockerfile new file mode 100644 index 00000000..6901105d --- /dev/null +++ b/.dev/docker/windows/Dockerfile @@ -0,0 +1,47 @@ +# escape=` + +FROM mcr.microsoft.com/windows/servercore:ltsc2019 + +# Use "--build-arg platform=x64" for 64 bit or x86 for 32 bit. +ARG PLATFORM + +# Use to set specific commit to checkout +ARG VCPKGCOMMIT + +# Download channel for fixed install. +ARG CHANNEL_BASE_URL=https://aka.ms/vs/16/release + +ADD $CHANNEL_BASE_URL/channel C:\TEMP\VisualStudio.chman + +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +# Download and install Build Tools for Visual Studio 2019 for native desktop +RUN wget $Env:CHANNEL_BASE_URL/vs_buildtools.exe -OutFile 'C:\TEMP\vs_buildtools.exe'; ` + Start-Process -FilePath C:\TEMP\vs_buildtools.exe -ArgumentList ` + "--quiet", ` + "--norestart", ` + "--nocache", ` + "--installPath", ` + "C:\BuildTools", ` + "--wait", ` + "--channelUri", ` + "C:\TEMP\VisualStudio.chman", ` + "--installChannelUri", ` + "C:\TEMP\VisualStudio.chman", ` + "--add", ` + "Microsoft.VisualStudio.Workload.VCTools", ` + "--includeRecommended" ` + -Wait -PassThru; ` + del c:\temp\vs_buildtools.exe; + +RUN iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')); ` + choco install cmake git --installargs 'ADD_CMAKE_TO_PATH=System' -y --no-progress + +RUN git clone https://github.com/microsoft/vcpkg.git; cd vcpkg; git checkout $Env:VCPKGCOMMIT; + +# To explicit set VCPKG to only build Release version of the libraries. +COPY $PLATFORM'-windows-rel.cmake' 'c:\vcpkg\triplets\'$PLATFORM'-windows-rel.cmake' + +RUN cd .\vcpkg; ` + .\bootstrap-vcpkg.bat; ` + .\vcpkg install boost flann eigen3 qhull vtk[qt,opengl] gtest benchmark --triplet $Env:PLATFORM-windows-rel --clean-after-build; diff --git a/.dev/docker/windows/x64-windows-rel.cmake b/.dev/docker/windows/x64-windows-rel.cmake new file mode 100644 index 00000000..f6c40253 --- /dev/null +++ b/.dev/docker/windows/x64-windows-rel.cmake @@ -0,0 +1,4 @@ +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE dynamic) +set(VCPKG_BUILD_TYPE release) diff --git a/.dev/docker/windows/x86-windows-rel.cmake b/.dev/docker/windows/x86-windows-rel.cmake new file mode 100644 index 00000000..0a277bdb --- /dev/null +++ b/.dev/docker/windows/x86-windows-rel.cmake @@ -0,0 +1,4 @@ +set(VCPKG_TARGET_ARCHITECTURE x86) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE dynamic) +set(VCPKG_BUILD_TYPE release) diff --git a/.dev/format.sh b/.dev/format.sh index 6acff827..dba26190 100755 --- a/.dev/format.sh +++ b/.dev/format.sh @@ -8,7 +8,7 @@ format() { # don't use a directory with whitespace - local whitelist="apps/3d_rec_framework apps/modeler 2d ml octree simulation stereo tracking" + local whitelist="apps/3d_rec_framework apps/include apps/modeler apps/src benchmarks 2d geometry ml octree simulation stereo tracking registration gpu/containers" local PCL_DIR="${2}" local formatter="${1}" diff --git a/2d/CMakeLists.txt b/2d/CMakeLists.txt index 8bd5411e..437d23fb 100644 --- a/2d/CMakeLists.txt +++ b/2d/CMakeLists.txt @@ -31,8 +31,6 @@ set(impl_incs ) if(${VTK_FOUND}) - set(VTK_USE_FILE "${VTK_USE_FILE}" CACHE INTERNAL "VTK_USE_FILE") - include("${VTK_USE_FILE}") set(VTK_IO_TARGET_LINK_LIBRARIES vtkCommon vtkWidgets vtkIO vtkImaging) endif() diff --git a/CHANGES.md b/CHANGES.md index 533d35f4..5fd55b71 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,227 @@ # ChangeList +## = 1.12.0 (2021.07.07) = + +PCL 1.12.0 enables custom index size and type, from `int16_t` to `uint64_t`, allowing +users to have as small or large clouds as they wish. 1.12 also comes with improved +support for VTK and CUDA, along with making existing functionality more user friendly. + +This is all on top of the usual bug-fixes and performance improvements across the board + +### Notable changes + +**New features** *added to PCL* + +* **[sample_consensus]** Add SIMD implementations to some countWithinDistance functions [[#3519](https://github.com/PointCloudLibrary/pcl/pull/3519)] +* **[io]** Enable Real Sense 2 grabber for all platforms [[#4471](https://github.com/PointCloudLibrary/pcl/pull/4471)] +* **[visualization]** add ellipsoid shape to pcl_visualizer [[#4531](https://github.com/PointCloudLibrary/pcl/pull/4531)] +* **[common]** Add `constexpr` to static member functions for point types, add macro for `if constexpr` [[#4735](https://github.com/PointCloudLibrary/pcl/pull/4735)] +* **[ci]** Use windows docker image in CI. [[#4426](https://github.com/PointCloudLibrary/pcl/pull/4426)] +* **[common]** Add pcl log stream macros [[#4595](https://github.com/PointCloudLibrary/pcl/pull/4595)] + +**Deprecation** *of public APIs, scheduled to be removed after two minor releases* + +* **[common]** Modify index type for vertices [[#4256](https://github.com/PointCloudLibrary/pcl/pull/4256)] +* **[gpu]** Add square distances to GPU knnSearch API [[#4322](https://github.com/PointCloudLibrary/pcl/pull/4322)] +* **[gpu]** Add square distances to ApproxNearestSearch [[#4340](https://github.com/PointCloudLibrary/pcl/pull/4340)] +* Deprecate unused ease-of-internal-use headers [[#4367](https://github.com/PointCloudLibrary/pcl/pull/4367)] +* **[registration]** Deprecate `TransformationEstimationDQ` in favor of `TransformationEstimationDualQuaternion` [[#4425](https://github.com/PointCloudLibrary/pcl/pull/4425)] +* **[segmentation]** Deprecate unused `max_label` in `extractLabeledEuclideanClusters` [[#4105](https://github.com/PointCloudLibrary/pcl/pull/4105)] +* **[surface]** MLS: correct typo in `principle` by using `principal` instead [[#4505](https://github.com/PointCloudLibrary/pcl/pull/4505)] +* Deprecate unneeded meta-headers [[#4628](https://github.com/PointCloudLibrary/pcl/pull/4628)] +* **[apps][tracking]** pyramidal klt: switch keypoints_status_ to int vector [[#4681](https://github.com/PointCloudLibrary/pcl/pull/4681)] +* Properly remove remaining items deprecated for version 1.12, deprecate `uniform_sampling.h` [[#4688](https://github.com/PointCloudLibrary/pcl/pull/4688)] +* **[recognition]** Add deprecation for incorrectly installed headers [[#4650](https://github.com/PointCloudLibrary/pcl/pull/4650)] + +**Removal** *of the public APIs deprecated in previous releases* + +* Remove deprecated items as scheduled in preparation of v1.12 (except `concatenatePointCloud`) [[#4341](https://github.com/PointCloudLibrary/pcl/pull/4341)] +* **[apps]** Remove unused code in persistence_utils.h [[#4500](https://github.com/PointCloudLibrary/pcl/pull/4500)] +* Properly remove remaining items deprecated for version 1.12, deprecate `uniform_sampling.h` [[#4688](https://github.com/PointCloudLibrary/pcl/pull/4688)] + +**Behavior changes** *in classes, apps, or tools* + +* **[registration]** Don't move, or copy ICP [[#4167](https://github.com/PointCloudLibrary/pcl/pull/4167)] +* **[common]** Fix PointXYZRGBA ctor, set A as 255 by default [[#4799](https://github.com/PointCloudLibrary/pcl/pull/4799)] + +**API changes** *that did not go through the proper deprecation and removal cycle* + +* **[common]** modify index type for PCLImage [[#4257](https://github.com/PointCloudLibrary/pcl/pull/4257)] +* **[registration]** Don't move, or copy ICP [[#4167](https://github.com/PointCloudLibrary/pcl/pull/4167)] +* **[kdtree]** KdTree: handle 0 or negative k for nearestKSearch [[#4430](https://github.com/PointCloudLibrary/pcl/pull/4430)] +* **[common]** Use `std::array` instead of C-array for ColorLUT [[#4489](https://github.com/PointCloudLibrary/pcl/pull/4489)] +* **[tracking]** Use SFINAE instead of relying on macro `PCL_TRACKING_NORMAL_SUPPORTED` [[#4643](https://github.com/PointCloudLibrary/pcl/pull/4643)] +* **[gpu]** Export and template extract clusters [[#4196](https://github.com/PointCloudLibrary/pcl/pull/4196)] +* **[common]** Added `namespace pcl` to free functions: `aligned_{malloc/free}` [[#4742](https://github.com/PointCloudLibrary/pcl/pull/4742)] + +**ABI changes** *that are still API compatible* + +* **[registration]** Refactoring and Bugfix of NDT [[#4180](https://github.com/PointCloudLibrary/pcl/pull/4180)] +* **[common]** modify index types for PCLPointCloud2 [[#4199](https://github.com/PointCloudLibrary/pcl/pull/4199)] +* **[common]** Modify index type for vertices [[#4256](https://github.com/PointCloudLibrary/pcl/pull/4256)] +* **[common]** Modify index type for PCLPointField [[#4228](https://github.com/PointCloudLibrary/pcl/pull/4228)] +* **[surface]** Enabled multithreading in Poisson surface reconstruction [[#4332](https://github.com/PointCloudLibrary/pcl/pull/4332)] +* **[io]** Allow file_io to read large point clouds depending on PCL config [[#4331](https://github.com/PointCloudLibrary/pcl/pull/4331)] +* **[sample_consensus]** Allow user to apply arbitrary constraint on models in sample consensus [[#4260](https://github.com/PointCloudLibrary/pcl/pull/4260)] +* **[tracking]** Use SFINAE instead of relying on macro `PCL_TRACKING_NORMAL_SUPPORTED` [[#4643](https://github.com/PointCloudLibrary/pcl/pull/4643)] +* **[features]** Move the init of static variables to library load time [[#4640](https://github.com/PointCloudLibrary/pcl/pull/4640)] +* **[octree]** Octree2BufBase: Fix bug that contents from previous buffer appear in current buffer [[#4642](https://github.com/PointCloudLibrary/pcl/pull/4642)] + +### Changes grouped by module + +#### CMake: + +* Update `pcl_find_boost` to allow compilation with Boost 1.74 [[#4330](https://github.com/PointCloudLibrary/pcl/pull/4330)] +* Variable needs to be expanded when checking for `EXT_DEPS` [[#4353](https://github.com/PointCloudLibrary/pcl/pull/4353)] +* Update pcl_find_cuda.cmake to contain all supported architectures [[#4400](https://github.com/PointCloudLibrary/pcl/pull/4400)] +* Add support for VTK 9 [[#4262](https://github.com/PointCloudLibrary/pcl/pull/4262)] +* Refactor cmake find script of libusb [[#4483](https://github.com/PointCloudLibrary/pcl/pull/4483)] +* Add AVX for windows [[#4598](https://github.com/PointCloudLibrary/pcl/pull/4598)] +* Add SSE definitions for SSE 4.1 and 4.2 [[#4596](https://github.com/PointCloudLibrary/pcl/pull/4596)] + +#### libpcl_common: + +* **[ABI break]** modify index types for PCLPointCloud2 [[#4199](https://github.com/PointCloudLibrary/pcl/pull/4199)] +* **[API break]** modify index type for PCLImage [[#4257](https://github.com/PointCloudLibrary/pcl/pull/4257)] +* **[ABI break][deprecation]** Modify index type for vertices [[#4256](https://github.com/PointCloudLibrary/pcl/pull/4256)] +* **[ABI break]** Modify index type for PCLPointField [[#4228](https://github.com/PointCloudLibrary/pcl/pull/4228)] +* Allow PCL_DEPRECATED to detect and help remove deprecations before release [[#4336](https://github.com/PointCloudLibrary/pcl/pull/4336)] +* Allow conversion of PointCloud with more than 32-bit size rows/columns [[#4343](https://github.com/PointCloudLibrary/pcl/pull/4343)] +* Improve routing for `transformPointCloud` [[#4398](https://github.com/PointCloudLibrary/pcl/pull/4398)] +* Correct typo in `transformPlane` [[#4396](https://github.com/PointCloudLibrary/pcl/pull/4396)] +* **[API break]** Use `std::array` instead of C-array for ColorLUT [[#4489](https://github.com/PointCloudLibrary/pcl/pull/4489)] +* Set header in two toPCLPointCloud2 functions [[#4538](https://github.com/PointCloudLibrary/pcl/pull/4538)] +* Add more operators to `PointCloud` to prevent perf regression in refactoring [[#4397](https://github.com/PointCloudLibrary/pcl/pull/4397)] +* Make sure that organized point clouds are still organized after transformPointCloud [[#4488](https://github.com/PointCloudLibrary/pcl/pull/4488)] +* **[API break]** Added `namespace pcl` to free functions: `aligned_{malloc/free}` [[#4742](https://github.com/PointCloudLibrary/pcl/pull/4742)] +* **[new feature]** Add `constexpr` to static member functions for point types, add macro for `if constexpr` [[#4735](https://github.com/PointCloudLibrary/pcl/pull/4735)] +* Fix `PolygonMesh::concatenate` and its unit test [[#4745](https://github.com/PointCloudLibrary/pcl/pull/4745)] +* **[behavior change]** Fix PointXYZRGBA ctor, set A as 255 by default [[#4799](https://github.com/PointCloudLibrary/pcl/pull/4799)] +* Remove pseudo-template-instantiations in eigen.h to reduce compilation time [[#4788](https://github.com/PointCloudLibrary/pcl/pull/4788)] +* **[new feature]** Add pcl log stream macros [[#4595](https://github.com/PointCloudLibrary/pcl/pull/4595)] + +#### libpcl_features: + +* **[ABI break]** Move the init of static variables to library load time [[#4640](https://github.com/PointCloudLibrary/pcl/pull/4640)] +* Use correct cloud for checking finite-ness in fpfh [[#4720](https://github.com/PointCloudLibrary/pcl/pull/4720)] + +#### libpcl_filters: + +* Improve performance of median filter by using `nth_element` [[#4360](https://github.com/PointCloudLibrary/pcl/pull/4360)] +* Fix the covariance calculation as suggested by @zxd123 [[#4466](https://github.com/PointCloudLibrary/pcl/pull/4466)] +* Filters: fix wrong initialization of covariance in VoxelGridCovariance [[#4556](https://github.com/PointCloudLibrary/pcl/pull/4556)] +* Fix application of setMinimumPointsNumberPerVoxel for PCLPointCloud2 implementation of VoxelGrid [[#4389](https://github.com/PointCloudLibrary/pcl/pull/4389)] +* Adding tests for CropHull and using hull_cloud instead of input in getHullCloudRange [[#3976](https://github.com/PointCloudLibrary/pcl/pull/3976)] + +#### libpcl_gpu: + +* **[deprecation]** Add square distances to GPU knnSearch API [[#4322](https://github.com/PointCloudLibrary/pcl/pull/4322)] +* **[deprecation]** Add square distances to ApproxNearestSearch [[#4340](https://github.com/PointCloudLibrary/pcl/pull/4340)] +* **[API break]** Export and template extract clusters [[#4196](https://github.com/PointCloudLibrary/pcl/pull/4196)] +* Update support for CUDA arch in CMake and `convertSMVer2Cores` [[#4748](https://github.com/PointCloudLibrary/pcl/pull/4748)] +* Add ability to download contiguous chunk of memory to host using `Device{Array,Memory}` [[#4741](https://github.com/PointCloudLibrary/pcl/pull/4741)] +* Speeding up GPU clustering using smarter download strategy and memory allocations [[#4677](https://github.com/PointCloudLibrary/pcl/pull/4677)] + +#### libpcl_io: + +* **[ABI break]** Allow file_io to read large point clouds depending on PCL config [[#4331](https://github.com/PointCloudLibrary/pcl/pull/4331)] +* Improve PCD read performance (more than 50%) by reusing `istringstream` [[#4339](https://github.com/PointCloudLibrary/pcl/pull/4339)] +* **[new feature]** Enable Real Sense 2 grabber for all platforms [[#4471](https://github.com/PointCloudLibrary/pcl/pull/4471)] +* Throw error if the device bluffs about its capability [[#4141](https://github.com/PointCloudLibrary/pcl/pull/4141)] +* Fix crash in Dinast Grabber due to bad initialization of device handle [[#4484](https://github.com/PointCloudLibrary/pcl/pull/4484)] +* PLY face definition accepts uint fields as well [[#4492](https://github.com/PointCloudLibrary/pcl/pull/4492)] +* Prevent segfault in vtk2mesh [[#4581](https://github.com/PointCloudLibrary/pcl/pull/4581)] +* Prevent exception in PCDReader for misformed PCD files [[#4566](https://github.com/PointCloudLibrary/pcl/pull/4566)] +* Enable arbitary size Indices for Octree module [[#4350](https://github.com/PointCloudLibrary/pcl/pull/4350)] +* Fix addition of Carriage Return to PCD files. [[#4727](https://github.com/PointCloudLibrary/pcl/pull/4727)] +* Support Ensenso SDK 3.0 for ensenso_grabber [[#4751](https://github.com/PointCloudLibrary/pcl/pull/4751)] +* Specify no face elements in PLY files (from point cloud) to make them interoperable with VTK [[#4774](https://github.com/PointCloudLibrary/pcl/pull/4774)] + +#### libpcl_kdtree: + +* **[API break]** KdTree: handle 0 or negative k for nearestKSearch [[#4430](https://github.com/PointCloudLibrary/pcl/pull/4430)] + +#### libpcl_ml: + +* Fix un-initialized centroids bug (k-means) [[#4570](https://github.com/PointCloudLibrary/pcl/pull/4570)] + +#### libpcl_octree: + +* Enable arbitary size Indices for Octree module [[#4350](https://github.com/PointCloudLibrary/pcl/pull/4350)] +* Fix problems in octree search functions when using dynamic depth [[#4657](https://github.com/PointCloudLibrary/pcl/pull/4657)] +* **[ABI break]** Octree2BufBase: Fix bug that contents from previous buffer appear in current buffer [[#4642](https://github.com/PointCloudLibrary/pcl/pull/4642)] + +#### libpcl_outofcore: + +* Fix compile issue due to missing include under MSVC 2019 [[#4755](https://github.com/PointCloudLibrary/pcl/pull/4755)] + +#### libpcl_recognition: + +* **[deprecation]** Add deprecation for incorrectly installed headers [[#4650](https://github.com/PointCloudLibrary/pcl/pull/4650)] + +#### libpcl_registration: + +* **[ABI break]** Refactoring and Bugfix of NDT [[#4180](https://github.com/PointCloudLibrary/pcl/pull/4180)] +* **[API break][behavior change]** Don't move, or copy ICP [[#4167](https://github.com/PointCloudLibrary/pcl/pull/4167)] +* **[deprecation]** Deprecate `TransformationEstimationDQ` in favor of `TransformationEstimationDualQuaternion` [[#4425](https://github.com/PointCloudLibrary/pcl/pull/4425)] +* Fix force no recompute [[#4535](https://github.com/PointCloudLibrary/pcl/pull/4535)] +* Skip non-finite points for Pyramid Feature Matching [[#4711](https://github.com/PointCloudLibrary/pcl/pull/4711)] + +#### libpcl_sample_consensus: + +* **[ABI break]** Allow user to apply arbitrary constraint on models in sample consensus [[#4260](https://github.com/PointCloudLibrary/pcl/pull/4260)] +* Improve logging errors during sample consensus model registration [[#4381](https://github.com/PointCloudLibrary/pcl/pull/4381)] +* **[new feature]** Add SIMD implementations to some countWithinDistance functions [[#3519](https://github.com/PointCloudLibrary/pcl/pull/3519)] +* Faster sample consensus functions [[#4424](https://github.com/PointCloudLibrary/pcl/pull/4424)] +* Fix and improve MLESAC [[#4575](https://github.com/PointCloudLibrary/pcl/pull/4575)] +* Improve logging in module `sample_consensus` [[#4261](https://github.com/PointCloudLibrary/pcl/pull/4261)] + +#### libpcl_search: + +* Faster organized search [[#4496](https://github.com/PointCloudLibrary/pcl/pull/4496)] +* Add access to boxSearch [[#4282](https://github.com/PointCloudLibrary/pcl/pull/4282)] + +#### libpcl_segmentation: + +* **[deprecation]** Deprecate unused `max_label` in `extractLabeledEuclideanClusters` [[#4105](https://github.com/PointCloudLibrary/pcl/pull/4105)] +* Fix the dotproduct calculation in `extractEuclideanClusters` for smooth surfaces [[#4162](https://github.com/PointCloudLibrary/pcl/pull/4162)] +* Make euclidean clustering with normals faster [[#4551](https://github.com/PointCloudLibrary/pcl/pull/4551)] + +#### libpcl_surface: + +* **[ABI break]** Enabled multithreading in Poisson surface reconstruction [[#4332](https://github.com/PointCloudLibrary/pcl/pull/4332)] +* Add stdlib header for malloc in poisson (bugfix for gcc-5) [[#4376](https://github.com/PointCloudLibrary/pcl/pull/4376)] +* Always update counter and prevent overflow access in poisson4 octree [[#4316](https://github.com/PointCloudLibrary/pcl/pull/4316)] +* Add missing include to nurbs_solve_umfpack.cpp [[#4571](https://github.com/PointCloudLibrary/pcl/pull/4571)] +* **[deprecation]** MLS: correct typo in `principle` by using `principal` instead [[#4505](https://github.com/PointCloudLibrary/pcl/pull/4505)] + +#### libpcl_visualization: + +* Add support for VTK 9 [[#4262](https://github.com/PointCloudLibrary/pcl/pull/4262)] +* **[new feature]** add ellipsoid shape to pcl_visualizer [[#4531](https://github.com/PointCloudLibrary/pcl/pull/4531)] + +#### PCL Apps: + +* **[removal]** Remove unused code in persistence_utils.h [[#4500](https://github.com/PointCloudLibrary/pcl/pull/4500)] +* **[deprecation]** pyramidal klt: switch keypoints_status_ to int vector [[#4681](https://github.com/PointCloudLibrary/pcl/pull/4681)] + +#### PCL Docs: + +* Update documentation to be coherent with the style guide [[#4771](https://github.com/PointCloudLibrary/pcl/pull/4771)] + +#### PCL Tutorials: + +* Replace PassThrough with removeNaNFromPointCloud in 3 tutorials [[#4760](https://github.com/PointCloudLibrary/pcl/pull/4760)] + +#### PCL Tools: + +* Fix virtual scanner [[#4730](https://github.com/PointCloudLibrary/pcl/pull/4730)] + +#### CI: + +* Make windows build on c:\ drive to fix out-of-disk-space errors [[#4382](https://github.com/PointCloudLibrary/pcl/pull/4382)] +* **[new feature]** Use windows docker image in CI. [[#4426](https://github.com/PointCloudLibrary/pcl/pull/4426)] + ## = 1.11.1 (13.08.2020) = Apart from the usual serving of bug-fixes and speed improvements, PCL 1.11.1 brings in diff --git a/CMakeLists.txt b/CMakeLists.txt index e5aa7f40..63b38df6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,7 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "") set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "build type default to RelWithDebInfo, set to Release to improve performance" FORCE) endif() -project(PCL VERSION 1.11.1) +project(PCL VERSION 1.12.0) string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER) ### ---[ Find universal dependencies @@ -90,18 +90,25 @@ if(PCL_ENABLE_SSE AND "${CMAKE_CXX_FLAGS}" STREQUAL "${CMAKE_CXX_FLAGS_DEFAULT}" PCL_CHECK_FOR_SSE() endif() +# check for AVX flags for windows +if(PCL_ENABLE_AVX AND "${CMAKE_CXX_FLAGS}" STREQUAL "${CMAKE_CXX_FLAGS_DEFAULT}") + include("${PCL_SOURCE_DIR}/cmake/pcl_find_avx.cmake") + PCL_CHECK_FOR_AVX() +endif() + # ---[ Unix/Darwin/Windows specific flags if(CMAKE_COMPILER_IS_GNUCXX) if("${CMAKE_CXX_FLAGS}" STREQUAL "${CMAKE_CXX_FLAGS_DEFAULT}") if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wabi=11") + string(APPEND CMAKE_CXX_FLAGS " -Wabi=11") else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wabi") - endif() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-unknown-pragmas -fno-strict-aliasing -Wno-format-extra-args -Wno-sign-compare -Wno-invalid-offsetof -Wno-conversion ${SSE_FLAGS_STR}") - if(PCL_WARNINGS_ARE_ERRORS) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") + string(APPEND CMAKE_CXX_FLAGS " -Wabi") endif() + string(APPEND CMAKE_CXX_FLAGS " -Wall -Wextra -Wno-unknown-pragmas -fno-strict-aliasing -Wno-format-extra-args -Wno-sign-compare -Wno-invalid-offsetof -Wno-conversion ${SSE_FLAGS}") + endif() + + if(PCL_WARNINGS_ARE_ERRORS) + string(APPEND CMAKE_CXX_FLAGS " -Werror -fno-strict-aliasing") endif() if("${CMAKE_SHARED_LINKER_FLAGS}" STREQUAL "" AND NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin") @@ -110,10 +117,10 @@ if(CMAKE_COMPILER_IS_GNUCXX) if(WIN32) if(PCL_SHARED_LIBS) - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--export-all-symbols -Wl,--enable-auto-import") + string(APPEND CMAKE_SHARED_LINKER_FLAGS " -Wl,--export-all-symbols -Wl,--enable-auto-import") if(MINGW) add_definitions("-DBOOST_THREAD_USE_LIB") - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--allow-multiple-definition") + string(APPEND CMAKE_SHARED_LINKER_FLAGS " -Wl,--allow-multiple-definition") endif() else() add_definitions("-DBOOST_LIB_DIAGNOSTIC -DBOOST_THREAD_USE_LIB") @@ -127,20 +134,20 @@ if(CMAKE_COMPILER_IS_MSVC) add_compile_options(/bigobj) if("${CMAKE_CXX_FLAGS}" STREQUAL "${CMAKE_CXX_FLAGS_DEFAULT}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:precise /wd4800 /wd4521 /wd4251 /wd4275 /wd4305 /wd4355 ${SSE_FLAGS_STR}") + string(APPEND CMAKE_CXX_FLAGS " /fp:precise /wd4800 /wd4521 /wd4251 /wd4275 /wd4305 /wd4355 ${SSE_FLAGS} ${AVX_FLAGS}") # Add extra code generation/link optimizations if(CMAKE_MSVC_CODE_LINK_OPTIMIZATION AND (NOT BUILD_CUDA) AND (NOT BUILD_GPU)) - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GL") - set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /LTCG /OPT:REF") - set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG") + string(APPEND CMAKE_CXX_FLAGS_RELEASE " /GL") + string(APPEND CMAKE_SHARED_LINKER_FLAGS_RELEASE " /LTCG /OPT:REF") + string(APPEND CMAKE_EXE_LINKER_FLAGS_RELEASE " /LTCG") else() message("Global optimizations /GL has been turned off, as it doesn't work with nvcc/thrust") endif() # /MANIFEST:NO") # please, don't disable manifest generation, otherwise crash at start for vs2008 if(PCL_WARNINGS_ARE_ERRORS) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX") + string(APPEND CMAKE_CXX_FLAGS " /WX") endif() include(ProcessorCount) @@ -150,11 +157,11 @@ if(CMAKE_COMPILER_IS_MSVC) # Usage of COMPILE_LANGUAGE generator expression for MSVC in add_compile_options requires at least CMake 3.11, see https://gitlab.kitware.com/cmake/cmake/issues/17435 if(MSVC_MP EQUAL 0) # MSVC_MP is 0 in case the information cannot be determined by ProcessorCount => fallback - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") + string(APPEND CMAKE_C_FLAGS " /MP") + string(APPEND CMAKE_CXX_FLAGS " /MP") elseif(MSVC_MP GREATER 1) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP${MSVC_MP}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP${MSVC_MP}") + string(APPEND CMAKE_C_FLAGS " /MP${MSVC_MP}") + string(APPEND CMAKE_CXX_FLAGS " /MP${MSVC_MP}") endif() else() if(MSVC_MP EQUAL 0) @@ -168,8 +175,8 @@ if(CMAKE_COMPILER_IS_MSVC) endif() if(CMAKE_GENERATOR STREQUAL "Ninja") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /FS") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /FS") + string(APPEND CMAKE_C_FLAGS " /FS") + string(APPEND CMAKE_CXX_FLAGS " /FS") endif() endif() @@ -189,7 +196,7 @@ if(CMAKE_COMPILER_IS_CLANG) if("${CMAKE_CXX_FLAGS}" STREQUAL "") set(CMAKE_CXX_FLAGS "-ftemplate-depth=1024 -Qunused-arguments -Wno-invalid-offsetof ${SSE_FLAGS_STR}") # Unfortunately older Clang versions do not have this: -Wno-unnamed-type-template-args if(APPLE AND WITH_CUDA AND CUDA_FOUND) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libstdc++") + string(APPEND CMAKE_CXX_FLAGS " -stdlib=libstdc++") endif() endif() set(CLANG_LIBRARIES "stdc++") @@ -263,8 +270,8 @@ if(WITH_OPENMP) find_package(OpenMP COMPONENTS C CXX) endif() if(OpenMP_FOUND) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") + string(APPEND CMAKE_C_FLAGS " ${OpenMP_C_FLAGS}") + string(APPEND CMAKE_CXX_FLAGS " ${OpenMP_CXX_FLAGS}") if(${CMAKE_VERSION} VERSION_LESS "3.7") message(STATUS "Found OpenMP") else() @@ -281,8 +288,8 @@ if(OpenMP_FOUND) set(OPENMP_DLL VCOMP140) endif() if(OPENMP_DLL) - set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DELAYLOAD:${OPENMP_DLL}D.dll") - set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DELAYLOAD:${OPENMP_DLL}.dll") + string(APPEND CMAKE_SHARED_LINKER_FLAGS_DEBUG " /DELAYLOAD:${OPENMP_DLL}D.dll") + string(APPEND CMAKE_SHARED_LINKER_FLAGS_RELEASE " /DELAYLOAD:${OPENMP_DLL}.dll") else() message(WARNING "Delay loading flag for OpenMP DLL is invalid.") endif() @@ -299,18 +306,15 @@ find_package(Eigen 3.1 REQUIRED) include_directories(SYSTEM ${EIGEN_INCLUDE_DIRS}) # FLANN (required) -if(NOT PCL_SHARED_LIBS OR ((WIN32 AND NOT MINGW) AND NOT PCL_BUILD_WITH_FLANN_DYNAMIC_LINKING_WIN32)) - set(FLANN_USE_STATIC ON) +find_package(FLANN 1.9.1 REQUIRED) +if(NOT (${FLANN_LIBRARY_TYPE} MATCHES ${PCL_FLANN_REQUIRED_TYPE}) AND NOT (${PCL_FLANN_REQUIRED_TYPE} MATCHES "DONTCARE")) + message(FATAL_ERROR "Flann was selected with ${PCL_FLANN_REQUIRED_TYPE} but found as ${FLANN_LIBRARY_TYPE}") endif() -find_package(FLANN 1.7.0 REQUIRED) -# libusb-1.0 +# libusb option(WITH_LIBUSB "Build USB RGBD-Camera drivers" TRUE) if(WITH_LIBUSB) - find_package(libusb-1.0) - if(LIBUSB_1_FOUND) - include_directories(SYSTEM "${LIBUSB_1_INCLUDE_DIR}") - endif() + find_package(libusb) endif() # Dependencies for different grabbers @@ -363,89 +367,44 @@ if(WITH_CUDA) include("${PCL_SOURCE_DIR}/cmake/pcl_find_cuda.cmake") endif() -option(WITH_QT "Build QT Front-End" TRUE) -if(WITH_QT) - find_package(Qt5 COMPONENTS Concurrent OpenGL Widgets QUIET) -endif() -# Find VTK +# Reset VTK_FOUND to off +set(VTK_FOUND OFF) +# Find VTK - VTK has to be found before Qt, otherwise it can overwrite Qt variables option(WITH_VTK "Build VTK-Visualizations" TRUE) -if(WITH_VTK AND NOT ANDROID) - set(PCL_VTK_COMPONENTS - vtkChartsCore - vtkCommonCore - vtkCommonDataModel - vtkCommonExecutionModel - vtkFiltersCore - vtkFiltersExtraction - vtkFiltersModeling - vtkImagingCore - vtkImagingSources - vtkInteractionStyle - vtkInteractionWidgets - vtkIOCore - vtkIOGeometry - vtkIOImage - vtkIOLegacy - vtkIOPLY - vtkRenderingAnnotation - vtkRenderingLOD - vtkViewsContext2D - ) - find_package(VTK COMPONENTS ${PCL_VTK_COMPONENTS}) - if(VTK_FOUND AND ("${VTK_VERSION}" VERSION_LESS 6.2)) - message(WARNING "The minimum required version of VTK is 6.2, but found ${VTK_VERSION}") - set(VTK_FOUND FALSE) +if(WITH_VTK) + if(ANDROID) + message(WARNING "VTK is not supported on Android.") + else() + include("${PCL_SOURCE_DIR}/cmake/pcl_find_vtk.cmake") endif() +endif() - if(VTK_FOUND) - if(NOT DEFINED VTK_RENDERING_BACKEND) - # On old VTK versions this variable does not exist. In this case it is - # safe to assume OpenGL backend - set(VTK_RENDERING_BACKEND "OpenGL") - endif() - list(APPEND PCL_VTK_COMPONENTS vtkRenderingContext${VTK_RENDERING_BACKEND}) - - if(WITH_QT) - if(";${VTK_MODULES_ENABLED};" MATCHES ";vtkGUISupportQt;" AND ";${VTK_MODULES_ENABLED};" MATCHES ";vtkRenderingQt;") - set(QVTK_FOUND ON) - list(APPEND PCL_VTK_COMPONENTS vtkRenderingQt vtkGUISupportQt) - else() - unset(QVTK_FOUND) - endif() +#VTK can depend on Qt and search for its required version, so search after so we can overwrite Qt5_FOUND if the version we require is not found. +option(WITH_QT "Build QT Front-End" TRUE) +if(WITH_QT) + find_package(Qt5 5.9.5 COMPONENTS Concurrent OpenGL Widgets) + set(QT_DISABLE_PRECATED_BEFORE_VAL "0x050900") + + if(Qt5_FOUND) + message(STATUS "Qt5 version: ${Qt5_VERSION}") + set(QT5_FOUND ${Qt5_FOUND}) + #Set Cmake Auto features to skip .hh files + if(POLICY CMP0100) + cmake_policy(SET CMP0100 OLD) endif() + + get_property(core_def TARGET Qt5::Core PROPERTY INTERFACE_COMPILE_DEFINITIONS) + list(APPEND core_def "QT_DISABLE_DEPRECATED_BEFORE=${QT_DISABLE_PRECATED_BEFORE_VAL}") + set_property(TARGET Qt5::Core PROPERTY INTERFACE_COMPILE_DEFINITIONS ${core_def}) - find_package(VTK COMPONENTS ${PCL_VTK_COMPONENTS}) - - message(STATUS "VTK_MAJOR_VERSION ${VTK_MAJOR_VERSION}, rendering backend: ${VTK_RENDERING_BACKEND}") - if(PCL_SHARED_LIBS OR (NOT (PCL_SHARED_LIBS) AND NOT (VTK_BUILD_SHARED_LIBS))) - if(VTK_USE_FILE) - include(${VTK_USE_FILE}) - endif() - message(STATUS "VTK found (include: ${VTK_INCLUDE_DIRS}, libs: ${VTK_LIBRARIES}") - if(APPLE) - option(VTK_USE_COCOA "Use Cocoa for VTK render windows" ON) - mark_as_advanced(VTK_USE_COCOA) - endif() - if(${VTK_RENDERING_BACKEND} STREQUAL "OpenGL") - set(VTK_RENDERING_BACKEND_OPENGL_VERSION "1") - message(DEPRECATION "The rendering backend OpenGL is deprecated and not available anymore since VTK 8.2." - "Please switch to the OpenGL2 backend instead, which is available since VTK 6.2." - "Support of the deprecated backend will be dropped with PCL 1.13.") - elseif(${VTK_RENDERING_BACKEND} STREQUAL "OpenGL2") - set(VTK_RENDERING_BACKEND_OPENGL_VERSION "2") - endif() - else() - set(VTK_FOUND OFF) - message("Warning: You are to build PCL in STATIC but VTK is SHARED!") - message("Warning: VTK disabled!") - endif() + else() + message(STATUS "Qt5 is not found.") endif() else() - set(VTK_FOUND OFF) + set(Qt5_FOUND FALSE) endif() - #Find PCAP option(WITH_PCAP "pcap file capabilities in Velodyne HDL driver" TRUE) if(WITH_PCAP) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 16e64b7a..c940ed3b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,7 +24,7 @@ restrictions: * [Discord Server](https://discord.gg/JFFMAXS) for live chat with other members of the PCL community and casual discussions - @@ -42,7 +42,7 @@ commits. **Please ask first** before embarking on any significant pull request (e.g. implementing features, refactoring code), otherwise you risk spending a lot of time working on something that the project's developers might not want to merge -into the project. Please read the [tutorial on writing a new PCL class](http://pointclouds.org/documentation/tutorials/writing_new_classes.php#writing-new-classes) if you want to contribute a +into the project. Please read the [tutorial on writing a new PCL class](https://pcl.readthedocs.io/projects/tutorials/en/latest/writing_new_classes.html) if you want to contribute a brand new feature. If you are new to Git, GitHub, or contributing to an open-source project, you @@ -55,7 +55,7 @@ may want to consult the [step-by-step guide on preparing and submitting a pull r Please use the following checklist to make sure that your contribution is well prepared for merging into PCL: -1. Source code adheres to the coding conventions described in [PCL Style Guide](http://pointclouds.org/documentation/advanced/pcl_style_guide.php). +1. Source code adheres to the coding conventions described in [PCL Style Guide](http://pcl.readthedocs.io/projects/advanced/en/latest/pcl_style_guide.html). But if you modify existing code, do not change/fix style in the lines that are not related to your contribution. @@ -114,40 +114,12 @@ of each `.h` and `.cpp` file: ```cpp /* - * Software License Agreement (BSD License) + * SPDX-License-Identifier: BSD-3-Clause * * Point Cloud Library (PCL) - www.pointclouds.org - * Copyright (c) 2014-, Open Perception, Inc. - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of the copyright holder(s) nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * Copyright (c) 2014-, Open Perception Inc. * + * All rights reserved */ ``` diff --git a/PCLConfig.cmake.in b/PCLConfig.cmake.in index 349ad7c4..a1283a81 100644 --- a/PCLConfig.cmake.in +++ b/PCLConfig.cmake.in @@ -101,20 +101,19 @@ macro(find_boost) endif() set(Boost_ADDITIONAL_VERSIONS "@Boost_MAJOR_VERSION@.@Boost_MINOR_VERSION@.@Boost_SUBMINOR_VERSION@" "@Boost_MAJOR_VERSION@.@Boost_MINOR_VERSION@" - "1.73.0" "1.73" "1.72.0" "1.72" "1.71.0" "1.71" "1.70.0" "1.70" - "1.69.0" "1.69" "1.68.0" "1.68" "1.67.0" "1.67" "1.66.0" "1.66" "1.65.1" "1.65.0" "1.65" - "1.64.0" "1.64" "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60" - "1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55") + "1.76.0" "1.76" "1.75.0" "1.75" + "1.74.0" "1.74" "1.73.0" "1.73" "1.72.0" "1.72" "1.71.0" "1.71" "1.70.0" "1.70" + "1.69.0" "1.69" "1.68.0" "1.68" "1.67.0" "1.67" "1.66.0" "1.66" "1.65.1" "1.65.0" "1.65") # Disable the config mode of find_package(Boost) set(Boost_NO_BOOST_CMAKE ON) - find_package(Boost 1.55.0 ${QUIET_} COMPONENTS @PCLCONFIG_AVAILABLE_BOOST_MODULES@) + find_package(Boost 1.65.0 ${QUIET_} COMPONENTS @PCLCONFIG_AVAILABLE_BOOST_MODULES@) set(BOOST_FOUND ${Boost_FOUND}) set(BOOST_INCLUDE_DIRS "${Boost_INCLUDE_DIR}") set(BOOST_LIBRARY_DIRS "${Boost_LIBRARY_DIRS}") set(BOOST_LIBRARIES ${Boost_LIBRARIES}) if(WIN32 AND NOT MINGW) - set(BOOST_DEFINITIONS ${BOOST_DEFINITIONS} -DBOOST_ALL_NO_LIB) + string(APPEND BOOST_DEFINITIONS -DBOOST_ALL_NO_LIB) endif() endmacro() @@ -126,7 +125,6 @@ macro(find_eigen) get_filename_component(EIGEN_ROOT "@EIGEN_INCLUDE_DIRS@" ABSOLUTE) endif() find_package(Eigen 3.1) - set(EIGEN_DEFINITIONS ${EIGEN_DEFINITIONS}) endmacro() #remove this as soon as qhull is shipped with FindQhull.cmake @@ -255,17 +253,7 @@ macro(find_VTK) endmacro() macro(find_libusb) - if(NOT WIN32) - find_path(LIBUSB_1_INCLUDE_DIR - NAMES libusb-1.0/libusb.h - PATHS /usr/include /usr/local/include /opt/local/include /sw/include - PATH_SUFFIXES libusb-1.0) - - find_library(LIBUSB_1_LIBRARY - NAMES usb-1.0 - PATHS /usr/lib /usr/local/lib /opt/local/lib /sw/lib) - find_package_handle_standard_args(libusb-1.0 LIBUSB_1_LIBRARY LIBUSB_1_INCLUDE_DIR) - endif() + find_package(libusb) endmacro() macro(find_glew) @@ -310,7 +298,7 @@ macro(find_external_library _component _lib _is_optional) find_rssdk2() elseif("${_lib}" STREQUAL "vtk") find_VTK() - elseif("${_lib}" STREQUAL "libusb-1.0") + elseif("${_lib}" STREQUAL "libusb") find_libusb() elseif("${_lib}" STREQUAL "glew") find_glew() @@ -396,6 +384,9 @@ file(TO_CMAKE_PATH "${PCL_DIR}" PCL_DIR) if(WIN32 AND NOT MINGW) # PCLConfig.cmake is installed to PCL_ROOT/cmake get_filename_component(PCL_ROOT "${PCL_DIR}" PATH) + if(EXISTS "${PCL_ROOT}/3rdParty") + set(PCL_ALL_IN_ONE_INSTALLER ON) + endif() else() # PCLConfig.cmake is installed to PCL_ROOT/share/pcl-x.y get_filename_component(PCL_ROOT "${CMAKE_CURRENT_LIST_DIR}/../.." ABSOLUTE) @@ -407,17 +398,11 @@ if(EXISTS "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}/pcl # pcl_message("Found a PCL installation") set(PCL_CONF_INCLUDE_DIR "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}") set(PCL_LIBRARY_DIRS "${PCL_ROOT}/@LIB_INSTALL_DIR@") - if(EXISTS "${PCL_ROOT}/3rdParty") - set(PCL_ALL_IN_ONE_INSTALLER ON) - endif() elseif(EXISTS "${PCL_ROOT}/include/pcl/pcl_config.h") # Found a non-standard (likely ANDROID) PCL installation # pcl_message("Found a PCL installation") set(PCL_CONF_INCLUDE_DIR "${PCL_ROOT}/include") set(PCL_LIBRARY_DIRS "${PCL_ROOT}/lib") - if(EXISTS "${PCL_ROOT}/3rdParty") - set(PCL_ALL_IN_ONE_INSTALLER ON) - endif() elseif(EXISTS "${PCL_DIR}/include/pcl/pcl_config.h") # Found PCLConfig.cmake in a build tree of PCL # pcl_message("PCL found into a build tree.") @@ -529,6 +514,7 @@ foreach(component ${PCL_TO_FIND_COMPONENTS}) #pcl_message("No include directory found for pcl_${component}.") endif() + set(FPHSA_NAME_MISMATCHED 1) # Suppress warnings, see https://cmake.org/cmake/help/v3.17/module/FindPackageHandleStandardArgs.html # Skip find_library for header only modules list(FIND pcl_header_only_components ${component} _is_header_only) if(_is_header_only EQUAL -1) @@ -565,6 +551,7 @@ foreach(component ${PCL_TO_FIND_COMPONENTS}) find_package_handle_standard_args(PCL_${COMPONENT} DEFAULT_MSG PCL_${COMPONENT}_INCLUDE_DIR) endif() + unset(FPHSA_NAME_MISMATCHED) if(PCL_${COMPONENT}_FOUND) if(NOT "${PCL_${COMPONENT}_INCLUDE_DIRS}" STREQUAL "") diff --git a/README.md b/README.md index 9ae34aae..b8c83e4d 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![Release][release-image]][releases] [![License][license-image]][license] -[release-image]: https://img.shields.io/badge/release-1.11.1-green.svg?style=flat +[release-image]: https://img.shields.io/badge/release-1.12.0-green.svg?style=flat [releases]: https://github.com/PointCloudLibrary/pcl/releases [license-image]: https://img.shields.io/badge/license-BSD-green.svg?style=flat @@ -21,19 +21,22 @@ If you really need access to the old website, please use [the copy made by the i Continuous integration ---------------------- [ci-latest-build]: https://dev.azure.com/PointCloudLibrary/pcl/_build/latest?definitionId=9&branchName=master -[ci-ubuntu-16.04]: https://dev.azure.com/PointCloudLibrary/pcl/_apis/build/status/9?branchName=master&stageName=Build%20GCC&jobName=Ubuntu&configuration=Ubuntu%2016.04%20GCC&label=Ubuntu%2016.04%20GCC -[ci-ubuntu-18.04]: https://dev.azure.com/PointCloudLibrary/pcl/_apis/build/status/9?branchName=master&stageName=Build%20Clang&jobName=Ubuntu&configuration=Ubuntu%2018.04%20Clang&label=Ubuntu%2018.04%20Clang -[ci-ubuntu-20.04]: https://dev.azure.com/PointCloudLibrary/pcl/_apis/build/status/9?branchName=master&stageName=Build%20GCC&jobName=Ubuntu&configuration=Ubuntu%2020.04%20GCC&label=Ubuntu%2020.04%20GCC -[ci-windows-x86]: https://dev.azure.com/PointCloudLibrary/pcl/_apis/build/status/9?branchName=master&stageName=Build%20MSVC&jobName=Windows%20VS2017%20Build&configuration=Windows%20VS2017%20Build%20x86&label=Windows%20VS2017%20x86 -[ci-windows-x64]: https://dev.azure.com/PointCloudLibrary/pcl/_apis/build/status/9?branchName=master&stageName=Build%20MSVC&jobName=Windows%20VS2017%20Build&configuration=Windows%20VS2017%20Build%20x64&label=Windows%20VS2017%20x64 +[ci-ubuntu-18.04]: https://dev.azure.com/PointCloudLibrary/pcl/_apis/build/status/9?branchName=master&stageName=Build%20GCC&jobName=Ubuntu&configuration=Ubuntu%2018.04%20GCC&label=Ubuntu%2018.04%20GCC +[ci-ubuntu-20.04]: https://dev.azure.com/PointCloudLibrary/pcl/_apis/build/status/9?branchName=master&stageName=Build%20Clang&jobName=Ubuntu&configuration=Ubuntu%2020.04%20Clang&label=Ubuntu%2020.04%20Clang +[ci-ubuntu-20.10]: https://dev.azure.com/PointCloudLibrary/pcl/_apis/build/status/9?branchName=master&stageName=Build%20GCC&jobName=Ubuntu&configuration=Ubuntu%2020.10%20GCC&label=Ubuntu%2020.10%20GCC +[ci-windows-x86]: https://dev.azure.com/PointCloudLibrary/pcl/_apis/build/status/9?branchName=master&stageName=Build%20MSVC&jobName=Windows%20Build&configuration=Windows%20Build%20x86&label=Windows%20VS2019%20x86 +[ci-windows-x64]: https://dev.azure.com/PointCloudLibrary/pcl/_apis/build/status/9?branchName=master&stageName=Build%20MSVC&jobName=Windows%20Build&configuration=Windows%20Build%20x64&label=Windows%20VS2019%20x64 [ci-macos-10.14]: https://dev.azure.com/PointCloudLibrary/pcl/_apis/build/status/9?branchName=master&stageName=Build%20Clang&jobName=macOS&configuration=macOS%20Mojave%2010.14&label=macOS%20Mojave%2010.14 [ci-macos-10.15]: https://dev.azure.com/PointCloudLibrary/pcl/_apis/build/status/9?branchName=master&stageName=Build%20Clang&jobName=macOS&configuration=macOS%20Catalina%2010.15&label=macOS%20Catalina%2010.15 +[ci-docs]: https://dev.azure.com/PointCloudLibrary/pcl/_apis/build/status/Documentation?branchName=master +[ci-latest-docs]: https://dev.azure.com/PointCloudLibrary/pcl/_build/latest?definitionId=14&branchName=master Build Platform | Status ------------------------ | ------------------------------------------------------------------------------------------------- | -Ubuntu | [![Status][ci-ubuntu-16.04]][ci-latest-build]
[![Status][ci-ubuntu-18.04]][ci-latest-build]
[![Status][ci-ubuntu-20.04]][ci-latest-build] | +Ubuntu | [![Status][ci-ubuntu-18.04]][ci-latest-build]
[![Status][ci-ubuntu-20.04]][ci-latest-build]
[![Status][ci-ubuntu-20.10]][ci-latest-build] | Windows | [![Status][ci-windows-x86]][ci-latest-build]
[![Status][ci-windows-x64]][ci-latest-build] | macOS | [![Status][ci-macos-10.14]][ci-latest-build]
[![Status][ci-macos-10.15]][ci-latest-build] | +Documentation | [![Status][ci-docs]][ci-latest-docs] | Community --------- @@ -97,3 +100,18 @@ for Q&A as well as support for troubleshooting, installation and debugging. Do remember to tag your questions with the tag `point-cloud-library`. * [Discord Server](https://discord.gg/JFFMAXS) for live chat with other members of the PCL community and casual discussions + +Citation +-------- +We encourage other researchers to cite PCL if they use PCL or its components for their work or baselines. The bibtex entry for the same is +``` +@InProceedings{Rusu_ICRA2011_PCL, + author = {Radu Bogdan Rusu and Steve Cousins}, + title = {{3D is here: Point Cloud Library (PCL)}}, + booktitle = {{IEEE International Conference on Robotics and Automation (ICRA)}}, + month = {May 9-13}, + year = {2011}, + address = {Shanghai, China}, + publisher = {IEEE} +} +``` diff --git a/apps/3d_rec_framework/CMakeLists.txt b/apps/3d_rec_framework/CMakeLists.txt index ec6c56d8..219c4def 100644 --- a/apps/3d_rec_framework/CMakeLists.txt +++ b/apps/3d_rec_framework/CMakeLists.txt @@ -1,25 +1,7 @@ set(SUBSUBSYS_NAME 3d_rec_framework) set(SUBSUBSYS_DESC "3D recognition framework") set(SUBSUBSYS_DEPS common geometry io filters sample_consensus segmentation visualization kdtree features surface octree registration keypoints tracking search recognition ml) - -# Find VTK -if(NOT VTK_FOUND) - set(DEFAULT AUTO_OFF) - set(REASON "VTK was not found.") -else() - set(DEFAULT TRUE) - set(REASON) - include("${VTK_USE_FILE}") -endif() - -# OpenNI found? -if(NOT WITH_OPENNI) - set(DEFAULT AUTO_OFF) - set(REASON "OpenNI was not found or was disabled by the user.") -elseif(NOT ${DEFAULT} STREQUAL "AUTO_OFF") - set(DEFAULT TRUE) - set(REASON) -endif() +set(SUBSUBSYS_EXT_DEPS vtk openni) # Default to not building for now if(${DEFAULT} STREQUAL "TRUE") @@ -27,7 +9,7 @@ if(${DEFAULT} STREQUAL "TRUE") endif() PCL_SUBSUBSYS_OPTION(build "${SUBSYS_NAME}" "${SUBSUBSYS_NAME}" "${SUBSUBSYS_DESC}" ${DEFAULT} "${REASON}") -PCL_SUBSUBSYS_DEPEND(build "${SUBSYS_NAME}" "${SUBSUBSYS_NAME}" DEPS ${SUBSUBSYS_DEPS} EXT_DEPS vtk openni) +PCL_SUBSUBSYS_DEPEND(build "${SUBSYS_NAME}" "${SUBSUBSYS_NAME}" DEPS ${SUBSUBSYS_DEPS} EXT_DEPS ${SUBSUBSYS_EXT_DEPS}) if(NOT build) return() @@ -112,10 +94,6 @@ target_link_libraries("${LIB_NAME}" pcl_apps pcl_common pcl_io pcl_filters pcl_v if(WITH_OPENNI) target_link_libraries("${LIB_NAME}" ${OPENNI_LIBRARIES}) - if(NOT WIN32) - find_package(libusb-1.0 REQUIRED) - target_link_libraries("${LIB_NAME}" ${LIBUSB_1_LIBRARIES}) - endif() endif() PCL_MAKE_PKGCONFIG(${LIB_NAME} COMPONENT ${SUBSUBSYS_NAME} DESC ${SUBSUBSYS_DESC}) diff --git a/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/feature_wrapper/global/cvfh_estimator.h b/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/feature_wrapper/global/cvfh_estimator.h index 97583935..471f647f 100644 --- a/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/feature_wrapper/global/cvfh_estimator.h +++ b/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/feature_wrapper/global/cvfh_estimator.h @@ -8,7 +8,6 @@ #pragma once #include -#include #include #include @@ -133,7 +132,7 @@ public: for (std::size_t i = 0; i < cvfh_signatures.size(); i++) { pcl::PointCloud vfh_signature; - vfh_signature.points.resize(1); + vfh_signature.resize(1); vfh_signature.width = vfh_signature.height = 1; for (int d = 0; d < 308; ++d) vfh_signature[0].histogram[d] = cvfh_signatures[i].histogram[d]; diff --git a/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/feature_wrapper/global/ourcvfh_estimator.h b/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/feature_wrapper/global/ourcvfh_estimator.h index 85e5c264..621702ae 100644 --- a/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/feature_wrapper/global/ourcvfh_estimator.h +++ b/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/feature_wrapper/global/ourcvfh_estimator.h @@ -162,7 +162,7 @@ public: for (const auto& point : cvfh_signatures.points) { pcl::PointCloud vfh_signature; - vfh_signature.points.resize(1); + vfh_signature.resize(1); vfh_signature.width = vfh_signature.height = 1; for (int d = 0; d < 308; ++d) vfh_signature[0].histogram[d] = point.histogram[d]; diff --git a/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/feature_wrapper/local/fpfh_local_estimator.h b/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/feature_wrapper/local/fpfh_local_estimator.h index c4106401..efcda555 100644 --- a/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/feature_wrapper/local/fpfh_local_estimator.h +++ b/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/feature_wrapper/local/fpfh_local_estimator.h @@ -8,7 +8,6 @@ #pragma once #include -#include #include namespace pcl { diff --git a/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/feature_wrapper/local/local_estimator.h b/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/feature_wrapper/local/local_estimator.h index d78c4eec..c37229b9 100644 --- a/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/feature_wrapper/local/local_estimator.h +++ b/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/feature_wrapper/local/local_estimator.h @@ -77,7 +77,7 @@ private: using KeypointExtractor::input_; using KeypointExtractor::radius_; float sampling_density_; - std::shared_ptr>> neighborhood_indices_; + std::shared_ptr> neighborhood_indices_; std::shared_ptr>> neighborhood_dist_; void @@ -92,12 +92,12 @@ private: tree.reset(new pcl::search::KdTree(false)); tree->setInputCloud(input); - neighborhood_indices_.reset(new std::vector>); + neighborhood_indices_.reset(new std::vector); neighborhood_indices_->resize(keypoints_cloud->size()); neighborhood_dist_.reset(new std::vector>); neighborhood_dist_->resize(keypoints_cloud->size()); - filtered_keypoints.points.resize(keypoints_cloud->size()); + filtered_keypoints.resize(keypoints_cloud->size()); int good = 0; for (std::size_t i = 0; i < keypoints_cloud->size(); i++) { diff --git a/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/feature_wrapper/local/shot_local_estimator.h b/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/feature_wrapper/local/shot_local_estimator.h index 9fef4505..31664672 100644 --- a/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/feature_wrapper/local/shot_local_estimator.h +++ b/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/feature_wrapper/local/shot_local_estimator.h @@ -10,7 +10,6 @@ #include #include #include -#include namespace pcl { namespace rec_3d_framework { diff --git a/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/feature_wrapper/local/shot_local_estimator_omp.h b/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/feature_wrapper/local/shot_local_estimator_omp.h index 3b86d64a..51fbf34b 100644 --- a/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/feature_wrapper/local/shot_local_estimator_omp.h +++ b/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/feature_wrapper/local/shot_local_estimator_omp.h @@ -10,7 +10,6 @@ #include #include #include -#include namespace pcl { namespace rec_3d_framework { diff --git a/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/feature_wrapper/normal_estimator.h b/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/feature_wrapper/normal_estimator.h index b1a7f539..a8f49baa 100644 --- a/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/feature_wrapper/normal_estimator.h +++ b/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/feature_wrapper/normal_estimator.h @@ -30,9 +30,8 @@ class PreProcessorAndNormalEstimator { KdTreeInPtr tree = pcl::make_shared>(false); tree->setInputCloud(input); - std::vector nn_indices(9); + pcl::Indices nn_indices(9); std::vector nn_distances(9); - std::vector src_indices; float sum_distances = 0.0; std::vector avg_distances(input->size()); @@ -198,7 +197,7 @@ public: } if (j != static_cast(out->size())) { - PCL_ERROR("Contain nans..."); + PCL_ERROR("Contain nans...\n"); } out->points.resize(j); diff --git a/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pc_source/mesh_source.h b/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pc_source/mesh_source.h index 8c3238dd..6e171361 100644 --- a/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pc_source/mesh_source.h +++ b/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pc_source/mesh_source.h @@ -10,7 +10,6 @@ #include #include #include -#include #include #include @@ -81,9 +80,8 @@ public: void loadOrGenerate(std::string& dir, std::string& model_path, ModelT& model) { - std::stringstream pathmodel; - pathmodel << dir << "/" << model.class_ << "/" << model.id_; - bf::path trained_dir = pathmodel.str(); + const std::string pathmodel = dir + '/' + model.class_ + '/' + model.id_; + bf::path trained_dir = pathmodel; model.views_.reset(new std::vector::Ptr>); model.poses_.reset( @@ -95,7 +93,6 @@ public: if (bf::exists(trained_dir)) { // load views, poses and self-occlusions std::vector view_filenames; - int number_of_views = 0; for (const auto& dir_entry : bf::directory_iterator(trained_dir)) { // check if its a directory, then get models in it if (!(bf::is_directory(dir_entry))) { @@ -112,17 +109,14 @@ public: if (extension == "pcd" && strs_[0] == "view") { view_filenames.push_back((dir_entry.path().filename()).string()); - - number_of_views++; } } } for (const auto& view_filename : view_filenames) { - std::stringstream view_file; - view_file << pathmodel.str() << "/" << view_filename; + const std::string view_file = pathmodel + '/' + view_filename; typename pcl::PointCloud::Ptr cloud(new pcl::PointCloud()); - pcl::io::loadPCDFile(view_file.str(), *cloud); + pcl::io::loadPCDFile(view_file, *cloud); model.views_->push_back(cloud); @@ -135,19 +129,17 @@ public: boost::replace_all(file_replaced2, ".pcd", ".txt"); // read pose as well - std::stringstream pose_file; - pose_file << pathmodel.str() << "/" << file_replaced1; + const std::string pose_file = pathmodel + '/' + file_replaced1; Eigen::Matrix4f pose; - PersistenceUtils::readMatrixFromFile(pose_file.str(), pose); + PersistenceUtils::readMatrixFromFile(pose_file, pose); model.poses_->push_back(pose); // read entropy as well - std::stringstream entropy_file; - entropy_file << pathmodel.str() << "/" << file_replaced2; + const std::string entropy_file = pathmodel + '/' + file_replaced2; float entropy = 0; - PersistenceUtils::readFloatFromFile(entropy_file.str(), entropy); + PersistenceUtils::readFloatFromFile(entropy_file, entropy); model.self_occlusions_->push_back(entropy); } } @@ -201,26 +193,23 @@ public: model.self_occlusions_->push_back(entropies[i]); } - std::stringstream direc; - direc << dir << "/" << model.class_ << "/" << model.id_; + const std::string direc = dir + '/' + model.class_ + '/' + model.id_; this->createClassAndModelDirectories(dir, model.class_, model.id_); for (std::size_t i = 0; i < model.views_->size(); i++) { // save generated model for future use - std::stringstream path_view; - path_view << direc.str() << "/view_" << i << ".pcd"; - pcl::io::savePCDFileBinary(path_view.str(), *(model.views_->at(i))); + const std::string path_view = direc + "/view_" + std::to_string(i) + ".pcd"; + pcl::io::savePCDFileBinary(path_view, *(model.views_->at(i))); - std::stringstream path_pose; - path_pose << direc.str() << "/pose_" << i << ".txt"; + const std::string path_pose = direc + "/pose_" + std::to_string(i) + ".txt"; - pcl::rec_3d_framework::PersistenceUtils::writeMatrixToFile(path_pose.str(), + pcl::rec_3d_framework::PersistenceUtils::writeMatrixToFile(path_pose, model.poses_->at(i)); - std::stringstream path_entropy; - path_entropy << direc.str() << "/entropy_" << i << ".txt"; + const std::string path_entropy = + direc + "/entropy_" + std::to_string(i) + ".txt"; pcl::rec_3d_framework::PersistenceUtils::writeFloatToFile( - path_entropy.str(), model.self_occlusions_->at(i)); + path_entropy, model.self_occlusions_->at(i)); } loadOrGenerate(dir, model_path, model); diff --git a/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pc_source/registered_views_source.h b/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pc_source/registered_views_source.h index 06319ec4..1699f85d 100644 --- a/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pc_source/registered_views_source.h +++ b/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pc_source/registered_views_source.h @@ -8,7 +8,7 @@ #pragma once #include -#include +#include #include #include @@ -100,9 +100,8 @@ public: void loadOrGenerate(std::string& dir, std::string& model_path, ModelT& model) { - std::stringstream pathmodel; - pathmodel << dir << "/" << model.class_ << "/" << model.id_; - bf::path trained_dir = pathmodel.str(); + const std::string pathmodel = dir + '/' + model.class_ + '/' + model.id_; + const bf::path trained_dir = pathmodel; model.views_.reset(new std::vector::Ptr>); model.poses_.reset( @@ -112,7 +111,6 @@ public: if (bf::exists(trained_dir)) { // load views and poses std::vector view_filenames; - int number_of_views = 0; for (const auto& dir_entry : bf::directory_iterator(trained_dir)) { // check if its a directory, then get models in it if (!(bf::is_directory(*itr))) { @@ -129,7 +127,6 @@ public: if (extension == "pcd" && strs_[0] == "view") { view_filenames.push_back((dir_entry.path().filename()).string()); - number_of_views++; } } } @@ -138,10 +135,9 @@ public: poses_to_assemble_; for (std::size_t i = 0; i < view_filenames.size(); i++) { - std::stringstream view_file; - view_file << pathmodel.str() << "/" << view_filenames[i]; + const std::string view_file = pathmodel + '/' + view_filenames[i]; typename pcl::PointCloud::Ptr cloud(new pcl::PointCloud()); - pcl::io::loadPCDFile(view_file.str(), *cloud); + pcl::io::loadPCDFile(view_file, *cloud); model.views_->push_back(cloud); @@ -150,10 +146,9 @@ public: boost::replace_all(file_replaced1, ".pcd", ".txt"); // read pose as well - std::stringstream pose_file; - pose_file << pathmodel.str() << "/" << file_replaced1; + const std::string pose_file = pathmodel + '/' + file_replaced1; Eigen::Matrix4f pose; - PersistenceUtils::readMatrixFromFile(pose_file.str(), pose); + PersistenceUtils::readMatrixFromFile(pose_file, pose); if (pose_files_order_ != 0) { Eigen::Matrix4f pose_trans = pose.transpose(); @@ -175,8 +170,7 @@ public: else { // we just need to copy the views to the training directory - std::stringstream direc; - direc << dir << "/" << model.class_ << "/" << model.id_; + const std::string direc = dir + '/' + model.class_ + '/' << model.id_; createClassAndModelDirectories(dir, model.class_, model.id_); std::vector view_filenames; @@ -186,23 +180,20 @@ public: std::cout << view_filenames.size() << std::endl; for (std::size_t i = 0; i < view_filenames.size(); i++) { - std::stringstream view_file; - view_file << model_path << "/" << view_filenames[i]; + const std::string view_file = model_path + '/' + view_filenames[i]; typename pcl::PointCloud::Ptr cloud(new pcl::PointCloud()); - pcl::io::loadPCDFile(view_file.str(), *cloud); + pcl::io::loadPCDFile(view_file, *cloud); - std::cout << view_file.str() << std::endl; + std::cout << view_file << std::endl; - std::stringstream path_view; - path_view << direc.str() << "/view_" << i << ".pcd"; - pcl::io::savePCDFileBinary(path_view.str(), *cloud); + const std::string path_view = direc + "/view_" + std::to_string(i) + ".pcd"; + pcl::io::savePCDFileBinary(path_view, *cloud); - std::string file_replaced1(view_file.str()); - boost::replace_all(file_replaced1, view_prefix_, "pose"); - boost::replace_all(file_replaced1, ".pcd", ".txt"); + boost::replace_all(view_file, view_prefix_, "pose"); + boost::replace_all(view_file, ".pcd", ".txt"); Eigen::Matrix4f pose; - PersistenceUtils::readMatrixFromFile(file_replaced1, pose); + PersistenceUtils::readMatrixFromFile(view_file, pose); std::cout << pose << std::endl; @@ -213,10 +204,8 @@ public: std::cout << pose << std::endl; } - std::stringstream path_pose; - path_pose << direc.str() << "/pose_" << i << ".txt"; - pcl::rec_3d_framework::PersistenceUtils::writeMatrixToFile(path_pose.str(), - pose); + const std::string path_pose = direc + "/pose_" + std::to_string(i) + ".txt"; + pcl::rec_3d_framework::PersistenceUtils::writeMatrixToFile(path_pose, pose); } loadOrGenerate(dir, model_path, model); @@ -245,7 +234,7 @@ public: // check if its a directory, then get models in it if (bf::is_directory(dir_entry)) { std::string so_far = - rel_path_so_far + (dir_entry.path().filename()).string() + "/"; + rel_path_so_far + (dir_entry.path().filename()).string() + '/'; bf::path curr_path = dir_entry.path(); if (isleafDirectory(curr_path)) { @@ -289,14 +278,7 @@ public: m.id_ = strs[0]; } else { - std::stringstream ss; - for (int i = 0; i < (static_cast(strs.size()) - 1); i++) { - ss << strs[i]; - if (i != (static_cast(strs.size()) - 1)) - ss << "/"; - } - - m.class_ = ss.str(); + m.class_ = boost::algorithm::join(strs, '/'); m.id_ = strs[strs.size() - 1]; } @@ -305,10 +287,8 @@ public: // load views, poses and self-occlusions for those that exist // generate otherwise - std::stringstream model_path; - model_path << path_ << "/" << files[i]; - std::string path_model = model_path.str(); - loadOrGenerate(training_dir, path_model, m); + const std::string model_path = path_ + '/' + files[i]; + loadOrGenerate(training_dir, model_path, m); models_->push_back(m); } diff --git a/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pc_source/source.h b/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pc_source/source.h index a3f45ee4..91b4cd9b 100644 --- a/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pc_source/source.h +++ b/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pc_source/source.h @@ -8,9 +8,7 @@ #pragma once #include -#include #include -#include #include #include @@ -93,20 +91,9 @@ protected: std::string& id, std::string& classname) { - - std::vector strs; - boost::split(strs, filename, boost::is_any_of("/\\")); - std::string name = strs[strs.size() - 1]; - - std::stringstream ss; - for (int i = 0; i < (static_cast(strs.size()) - 1); i++) { - ss << strs[i]; - if (i != (static_cast(strs.size()) - 1)) - ss << "/"; - } - - classname = ss.str(); - id = name.substr(0, name.length() - 4); + const bf::path path = filename; + classname = path.parent_path().string() + '/'; + id = path.stem().string(); } void @@ -122,22 +109,7 @@ protected: std::string& class_str, std::string& id_str) { - std::vector strs; - boost::split(strs, class_str, boost::is_any_of("/\\")); - - std::stringstream ss; - ss << training_dir << "/"; - for (const auto& str : strs) { - ss << str << "/"; - bf::path trained_dir = ss.str(); - if (!bf::exists(trained_dir)) - bf::create_directory(trained_dir); - } - - ss << id_str; - bf::path trained_dir = ss.str(); - if (!bf::exists(trained_dir)) - bf::create_directory(trained_dir); + bf::create_directories(training_dir + '/' + class_str + '/' + id_str); } public: @@ -174,7 +146,7 @@ public: // check if its a directory, then get models in it if (bf::is_directory(dir_entry)) { std::string so_far = - rel_path_so_far + (dir_entry.path().filename()).string() + "/"; + rel_path_so_far + (dir_entry.path().filename()).string() + '/'; bf::path curr_path = dir_entry.path(); getModelsInDirectory(curr_path, so_far, relative_paths, ext); @@ -239,19 +211,13 @@ public: bool modelAlreadyTrained(ModelT m, std::string& base_dir, std::string& descr_name) { - std::stringstream dir; - dir << base_dir << "/" << m.class_ << "/" << m.id_ << "/" << descr_name; - bf::path desc_dir = dir.str(); - std::cout << dir.str() << std::endl; - return bf::exists(desc_dir); + return bf::exists(getModelDescriptorDir(m, base_dir, descr_name)); } std::string getModelDescriptorDir(ModelT m, std::string& base_dir, std::string& descr_name) { - std::stringstream dir; - dir << base_dir << "/" << m.class_ << "/" << m.id_ << "/" << descr_name; - return dir.str(); + return base_dir + '/' + m.class_ + '/' + m.id_ + '/' + descr_name; } void diff --git a/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pipeline/global_nn_classifier.h b/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pipeline/global_nn_classifier.h index 981cc5d6..d6554df8 100644 --- a/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pipeline/global_nn_classifier.h +++ b/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pipeline/global_nn_classifier.h @@ -9,7 +9,6 @@ #include #include -#include #include @@ -34,7 +33,7 @@ public: classify() = 0; virtual void - setIndices(std::vector& indices) = 0; + setIndices(pcl::Indices& indices) = 0; virtual void setInputCloud(const PointInTPtr& cloud) = 0; @@ -92,7 +91,7 @@ protected: flann::Index* flann_index_; std::vector flann_models_; - std::vector indices_; + pcl::Indices indices_; // load features from disk and create flann structure void @@ -186,7 +185,7 @@ public: } void - setIndices(std::vector& indices) override + setIndices(pcl::Indices& indices) override { indices_ = indices; } diff --git a/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pipeline/global_nn_recognizer_crh.h b/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pipeline/global_nn_recognizer_crh.h index fb597bb1..ff3bde4e 100644 --- a/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pipeline/global_nn_recognizer_crh.h +++ b/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pipeline/global_nn_recognizer_crh.h @@ -95,7 +95,7 @@ protected: poses_cache_; std::map, Eigen::Vector3f> centroids_cache_; - std::vector indices_; + pcl::Indices indices_; // load features from disk and create flann structure void @@ -216,7 +216,7 @@ public: } void - setIndices(std::vector& indices) + setIndices(pcl::Indices& indices) { indices_ = indices; } diff --git a/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pipeline/global_nn_recognizer_cvfh.h b/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pipeline/global_nn_recognizer_cvfh.h index 82e9cc34..54c5076c 100644 --- a/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pipeline/global_nn_recognizer_cvfh.h +++ b/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pipeline/global_nn_recognizer_cvfh.h @@ -130,7 +130,7 @@ protected: poses_cache_; std::map, Eigen::Vector3f> centroids_cache_; - std::vector indices_; + pcl::Indices indices_; bool compute_scale_; @@ -295,7 +295,7 @@ public: } void - setIndices(std::vector& indices) + setIndices(pcl::Indices& indices) { indices_ = indices; } diff --git a/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pipeline/impl/global_nn_classifier.hpp b/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pipeline/impl/global_nn_classifier.hpp index ac54b86a..0592be86 100644 --- a/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pipeline/impl/global_nn_classifier.hpp +++ b/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pipeline/impl/global_nn_classifier.hpp @@ -181,30 +181,28 @@ pcl::rec_3d_framework::GlobalNNPipeline::initializ if (!bf::exists(desc_dir)) bf::create_directory(desc_dir); - std::stringstream path_view; - path_view << path << "/view_" << v << ".pcd"; - pcl::io::savePCDFileBinary(path_view.str(), *processed); - - std::stringstream path_pose; - path_pose << path << "/pose_" << v << ".txt"; - PersistenceUtils::writeMatrixToFile(path_pose.str(), - models->at(i).poses_->at(v)); - - std::stringstream path_entropy; - path_entropy << path << "/entropy_" << v << ".txt"; - PersistenceUtils::writeFloatToFile(path_entropy.str(), + const std::string path_view = path + "/view_" + std::to_string(v) + ".pcd"; + pcl::io::savePCDFileBinary(path_view, *processed); + + const std::string path_pose = path + "/pose_" + std::to_string(v) + ".txt"; + PersistenceUtils::writeMatrixToFile(path_pose, models->at(i).poses_->at(v)); + + const std::string path_entropy = + path + "/entropy_" + std::to_string(v) + ".txt"; + PersistenceUtils::writeFloatToFile(path_entropy, models->at(i).self_occlusions_->at(v)); // save signatures and centroids to disk for (std::size_t j = 0; j < signatures.size(); j++) { - std::stringstream path_centroid; - path_centroid << path << "/centroid_" << v << "_" << j << ".txt"; + const std::string path_centroid = path + "/centroid_" + std::to_string(v) + + "_" + std::to_string(j) + ".txt"; Eigen::Vector3f centroid(centroids[j][0], centroids[j][1], centroids[j][2]); - PersistenceUtils::writeCentroidToFile(path_centroid.str(), centroid); + PersistenceUtils::writeCentroidToFile(path_centroid, centroid); - std::stringstream path_descriptor; - path_descriptor << path << "/descriptor_" << v << "_" << j << ".pcd"; - pcl::io::savePCDFileBinary(path_descriptor.str(), signatures[j]); + const std::string path_descriptor = path + "/descriptor_" + + std::to_string(v) + "_" + + std::to_string(j) + ".pcd"; + pcl::io::savePCDFileBinary(path_descriptor, signatures[j]); } } } diff --git a/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pipeline/impl/global_nn_recognizer_crh.hpp b/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pipeline/impl/global_nn_recognizer_crh.hpp index 5d5052a0..d6ca7cd4 100644 --- a/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pipeline/impl/global_nn_recognizer_crh.hpp +++ b/apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pipeline/impl/global_nn_recognizer_crh.hpp @@ -34,11 +34,11 @@ pcl::rec_3d_framework::GlobalNNCRHRecognizer::getP } } - std::stringstream dir; - std::string path = source_->getModelDescriptorDir(model, training_dir_, descr_name_); - dir << path << "/pose_" << view_id << ".txt"; + const std::string path = + source_->getModelDescriptorDir(model, training_dir_, descr_name_); + const std::string dir = path + "/pose_" + std::to_string(view_id) + ".txt"; - PersistenceUtils::readMatrixFromFile(dir.str(), pose_matrix); + PersistenceUtils::readMatrixFromFile(dir, pose_matrix); } template