代码之家  ›  专栏  ›  技术社区  ›  Mark Loyman

将OctreePointCloudCompression与PointXYZRGBNormal一起使用

  •  1
  • Mark Loyman  · 技术社区  · 6 年前

    我想压缩点类型的云 pcl::PointXYZRGBNormal pcl::io::OctreePointCloudCompression 班级。

    pcl::io::OctreePointCloudCompression<pcl::PointXYZRGBNormal>

    #include <pcl/compression/octree_pointcloud_compression.h>
    #include <pcl/io/impl/octree_pointcloud_compression.hpp>
    #include <pcl/impl/instantiate.hpp>
    
    PCL_INSTANTIATE(OctreePointCloudCompression, (pcl::PointXYZRGBNormal));
    
    pcl::io::compression_Profiles_e compressionProfile = pcl::io::MED_RES_OFFLINE_COMPRESSION_WITH_COLOR;
    auto PointCloudEncoder = pcl::io::OctreePointCloudCompression<pcl::PointXYZRGBNormal>(compressionProfile, true);
    

    我一加上 octree_pointcloud_compression.hpp

    __cdecl pcl::StaticRangeCoder::encodeCharvectorTeam(类std::vector>const&,类 标准::基本_ostream>)” (?encodeCharVectorToStream@StaticRangeCoder@pcl@@QEAAKAEBV?$vector@DV?$allocator@D@std@@@std@@AEAV?$basic\u ostream@DU?$char\u特征@D@std@@@4@@Z) Test.Core.Native测试

    注意 :我在windows 10上使用预编译PCL 1.8.1,并使用Visual Studio 2017(15.7.4)。


    更新

    我试图编译一个干净的项目,基于 tutorial

    CMakeLists.txt文件

    cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
    
    project(point_cloud_compression)
    
    find_package(PCL 1.8 REQUIRED)
    
    include_directories(${PCL_INCLUDE_DIRS})
    link_directories(${PCL_LIBRARY_DIRS})
    add_definitions(${PCL_DEFINITIONS})
    
    add_executable (point_cloud_compression point_cloud_compression.cpp)
    target_link_libraries (point_cloud_compression ${PCL_LIBRARIES})
    

    点云_压缩.cpp

    #include <pcl/point_cloud.h>
    #include <pcl/point_types.h>
    
    #include <pcl/compression/octree_pointcloud_compression.h>
    #include <pcl/io/impl/octree_pointcloud_compression.hpp>
    #include <pcl/impl/instantiate.hpp>
    
    #define PCL_INSTANTIATE_OctreePointCloudCompression(T)                \
      template class PCL_EXPORTS pcl::io::OctreePointCloudCompression<T>;
    
    PCL_INSTANTIATE(OctreePointCloudCompression, (pcl::PointXYZRGBNormal));
    
    int
    main (int argc, char **argv)
    {
        pcl::io::compression_Profiles_e compressionProfile = pcl::io::MED_RES_ONLINE_COMPRESSION_WITH_COLOR;
    
        pcl::io::OctreePointCloudCompression<pcl::PointXYZRGBNormal>* PointCloudEncoder;
        PointCloudEncoder = new pcl::io::OctreePointCloudCompression<pcl::PointXYZRGBNormal>(compressionProfile, true);     
    
        delete (PointCloudEncoder);
    
      return (0);
    }
    
    0 回复  |  直到 6 年前