日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

pcl-三维点云库

發布時間:2023/12/10 编程问答 39 豆豆
生活随笔 收集整理的這篇文章主要介紹了 pcl-三维点云库 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

pcl-三維點云庫


pcl::PointCloud的一些屬性值

  • width(int)
    two meanings:
  • it can specify the total number of points in the cloud for unorganized point cloud datasets;
  • it can specify the width (total number of points in a row) of an organized point cloud dataset.
  • The advantages of an organized dataset is that by knowing the relationship between adjacent points (e.g. pixels), nearest neighbor operations are much more efficient, thus speeding up the computation and lowering the costs of certain algorithms in PCL.

    cloud.width = 640; // there are 640 points per line
    • height(int)
      two meanings:
  • it can specify the height (total number of rows) of an organized point cloud dataset;
  • it is set to 1 for unorganized datasets (thus used to check whether a dataset is organized or not).
  • cloud1.width = 640; // Image-like organized structure, with 480 rows and 640 columns, cloud1.height = 480; // thus 640*480=307200 points total in the datasetcloud2.width = 307200; cloud2.height = 1; // unorganized point cloud dataset with 307200 points
    • points(std::vector)
      Contains the data array where all the points of type PointT are stored.
    pcl::PointCloud<pcl::PointXYZ> cloud; std::vector<pcl::PointXYZ> data = cloud.points;
    • is_dense(bool)
      Specifies if all the data in points is finite (true), or whether the XYZ values of certain points might contain Inf/NaN values (false).
    • isOrganized()
    if (!cloud.isOrganized ()) // do something

    參考

    http://www.pointclouds.org/documentation/tutorials/basic_structures.php#basic-structures


    如何使用pcl庫

    • CMakeLists.txt
    cmake_minimum_required(VERSION 2.6 FATAL_ERROR) project(MY_GRAND_PROJECT)find_package(PCL 1.3 REQUIRED COMPONENTS common io) include_directories(${PCL_INCLUDE_DIRS}) link_directories(${PCL_LIBRARY_DIRS}) add_definitions(${PCL_DEFINITIONS})add_executable(pcd_write_test pcd_write.cpp) target_link_libraries(pcd_write_test ${PCL_COMMON_LIBRARIES} ${PCL_IO_LIBRARIES})

    We are requesting to find the PCL package at minimum version 1.3. We also says that it is REQUIRED meaning that cmake will fail gracefully if it can’t be found. As PCL is modular one can request:

    only one component: find_package(PCL 1.3 REQUIRED COMPONENTS io) several: find_package(PCL 1.3 REQUIRED COMPONENTS io common) all existing: find_package(PCL 1.3 REQUIRED)

    注:為了方便,用的是全部模塊

    find_package(PCL 1.7 REQUIRED)

    When PCL is found, several related variables are set:

    PCL_FOUND: set to 1 if PCL is found, otherwise unset PCL_INCLUDE_DIRS: set to the paths to PCL installed headers and the dependency headers PCL_LIBRARIES: set to the file names of the built and installed PCL libraries PCL_LIBRARY_DIRS: set to the paths to where PCL libraries and 3rd party dependencies reside PCL_VERSION: the version of the found PCL PCL_COMPONENTS: lists all available components PCL_DEFINITIONS: lists the needed preprocessor definitions and compiler flags
    • Weird installations
      CMake has a list of default searchable paths where it seeks for FindXXX.cmake or XXXConfig.cmake. If you happen to install in some non obvious repository (let us say in Documents for evils) then you can help cmake find PCLConfig.cmake adding this line:
    set(PCL_DIR "/path/to/PCLConfig.cmake")

    before this one:

    find_package(PCL 1.3 REQUIRED COMPONENTS common io)...

    參考

    http://www.pointclouds.org/documentation/tutorials/using_pcl_pcl_config.php#using-pcl-pcl-config

    轉載于:https://www.cnblogs.com/ChrisCoder/p/10083766.html

    總結

    以上是生活随笔為你收集整理的pcl-三维点云库的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。