#include <ClassicDeviceUtil.h>
离线工具
ClassicDeviceUtil 中包含一些基本的数据处理接口,无需连接到服务端也可以对数据进行处理。实现与 ClassicDeviceController 相同的功能 
- 自从
 - 0.4.0 
 
在文件 ClassicDeviceUtil.h 第 41 行定义.
 
◆ ClassicDeviceUtil() [1/4]
  
  
      
        
          | ALSON::ClassicDeviceUtil::ClassicDeviceUtil  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
default   | 
  
 
 
◆ ClassicDeviceUtil() [2/4]
  
  
      
        
          | ALSON::ClassicDeviceUtil::ClassicDeviceUtil  | 
          ( | 
          ClassicDeviceUtilImplPtr |           classicDeviceUtilPtr | ) | 
           | 
         
       
   | 
  
explicit   | 
  
 
 
◆ ~ClassicDeviceUtil()
  
  
      
        
          | ALSON::ClassicDeviceUtil::~ClassicDeviceUtil  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
default   | 
  
 
 
◆ ClassicDeviceUtil() [3/4]
◆ ClassicDeviceUtil() [4/4]
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ create()
  
  
      
        
          | static ClassicDeviceUtil ALSON::ClassicDeviceUtil::create  | 
          ( | 
          const std::string & |           parameter | ) | 
           | 
         
       
   | 
  
static   | 
  
 
创建离线工具 
- 参数
 - 
  
  
 
- 返回
 - 离线工具 
 
- 异常
 - 
  
  
 
- 自从
 - 0.4.0 
 
 
 
◆ load()
  
  
      
        
          | static ClassicDeviceUtil ALSON::ClassicDeviceUtil::load  | 
          ( | 
          const std::string & |           filename | ) | 
           | 
         
       
   | 
  
static   | 
  
 
通过加载本地文件的方式创建离线工具 
- 参数
 - 
  
  
 
- 返回
 - 离线工具 
 
- 异常
 - 
  
  
 
- 自从
 - 0.4.0 
 
 
 
◆ save()
      
        
          | void ALSON::ClassicDeviceUtil::save  | 
          ( | 
          const std::string & |           filename | ) | 
           const | 
        
      
 
将离线工具作为文件保存到本地 
- 参数
 - 
  
  
 
- 异常
 - 
  
  
 
- 自从
 - 0.4.0 
 
 
 
◆ pointXYZToUV() [1/3]
      
        
          | PointUV ALSON::ClassicDeviceUtil::pointXYZToUV  | 
          ( | 
          const PointXYZ & |           pointXYZ | ) | 
           const | 
        
      
 
计算指定点在未对齐纹理图上的坐标 
- 参数
 - 
  
  
 
- 返回
 - 未对齐纹理图上的坐标 
 
- 异常
 - 
  
  
 
- 自从
 - 0.4.0 
 
 
 
◆ pointXYZToUV() [2/3]
      
        
          | PointUV ALSON::ClassicDeviceUtil::pointXYZToUV  | 
          ( | 
          float |           x,  | 
        
        
           | 
           | 
          float |           y,  | 
        
        
           | 
           | 
          float |           z ) const | 
        
      
 
计算指定点在未对齐纹理图上的坐标 
- 参数
 - 
  
  
 
- 返回
 - 未对齐纹理图上的坐标 
 
- 异常
 - 
  
  
 
- 自从
 - 0.4.0 
 
 
 
◆ pointXYZToUV() [3/3]
      
        
          | std::vector< PointUV > ALSON::ClassicDeviceUtil::pointXYZToUV  | 
          ( | 
          const PointCloud & |           pointCloud | ) | 
           const | 
        
      
 
将点云中的所有三维坐标转换为未对齐纹理图上的坐标 
- 参数
 - 
  
  
 
- 返回
 - 未对齐纹理图上的坐标 
 
- 异常
 - 
  
  
 
- 自从
 - 0.4.0 
 
 
 
◆ addRGBForPointCloud()
点云贴图 
- 参数
 - 
  
    | pointCloud | 点云  | 
    | textureImage | 未对齐的纹理图像  | 
  
   
- 返回
 - 贴图后的点云 
 
- 异常
 - 
  
  
 
- 自从
 - 0.4.0 
 
 
 
◆ addRGBAndNormalForPointCloud()
      
        
          | PointCloud ALSON::ClassicDeviceUtil::addRGBAndNormalForPointCloud  | 
          ( | 
          const PointCloud & |           pointCloud,  | 
        
        
           | 
           | 
          const AlsonMat & |           textureImage,  | 
        
        
           | 
           | 
          double |           radiusSearch,  | 
        
        
           | 
           | 
          int |           totalThreads = 1 ) const | 
        
      
 
点云贴图并计算法向量 
- 参数
 - 
  
    | pointCloud | 点云  | 
    | textureImage | 未对齐的纹理图像  | 
    | radiusSearch | 搜索半径  | 
    | totalThreads | 线程数  | 
  
   
- 返回
 - 贴图并计算法向后的点云 
 
- 异常
 - 
  
  
 
- 自从
 - 0.4.0 
 
 
 
◆ alignTextureImage()
      
        
          | AlsonMat ALSON::ClassicDeviceUtil::alignTextureImage  | 
          ( | 
          const AlsonMat & |           textureImage | ) | 
           | 
        
      
 
 
◆ pointCloudToDepthImage()
      
        
          | AlsonMat ALSON::ClassicDeviceUtil::pointCloudToDepthImage  | 
          ( | 
          const PointCloud & |           pointCloud | ) | 
           const | 
        
      
 
 
◆ depthImageToPointCloud()
      
        
          | PointCloud ALSON::ClassicDeviceUtil::depthImageToPointCloud  | 
          ( | 
          const AlsonMat & |           depthImage | ) | 
           const | 
        
      
 
 
◆ alignPointCloud()
点云对齐
对齐后的点云是有序点云,有序点云的尺寸和纹理图像一致,有序点云与对齐后的纹理图像一一对应
如果我们知道纹理图上一个点的坐标为 \((u,v)\),那么我们可以通过如下示例代码获取到它在有序点云中对应的三维点 
或者也可以参照如下示例代码通过指针的方式获取三维点 
- 参数
 - 
  
    | pointCloud | 原始点云,通常是 grabPointCloud 接口返回的点云  | 
  
   
- 返回
 - 对齐后的点云 
 
- 异常
 - 
  
  
 
- 自从
 - 0.4.0 
 
- 参见
 - alignTextureImage