#include <ClassicDeviceController.h>
经典系列(A、C系列)设备控制器
ClassicDeviceController 包含基本的设备控制接口、数据获取接口、数据处理接口
- 自从
- 0.1.0
在文件 ClassicDeviceController.h 第 42 行定义.
◆ ClassicDeviceController() [1/4]
ALSON::ClassicDeviceController::ClassicDeviceController |
( |
| ) |
|
|
default |
◆ ClassicDeviceController() [2/4]
ALSON::ClassicDeviceController::ClassicDeviceController |
( |
const ClientContextPtr & | clientContextPtr | ) |
|
|
explicit |
◆ ~ClassicDeviceController()
ALSON::ClassicDeviceController::~ClassicDeviceController |
( |
| ) |
|
|
default |
◆ ClassicDeviceController() [3/4]
◆ ClassicDeviceController() [4/4]
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ open()
void ALSON::ClassicDeviceController::open |
( |
| ) |
|
打开设备
- 注意
- 只有先调用该接口打开设备,才能调用其它与设备相关的接口
- 异常
-
- 自从
- 0.1.0
◆ close()
void ALSON::ClassicDeviceController::close |
( |
| ) |
|
关闭设备
- 注意
- 关闭设备之后,下次再打开设备会比较耗时。通常情况下,并不需要关闭设备。如果确认长时间不再使用设备,就可以关闭设备
- 异常
-
- 自从
- 0.1.0
◆ isOpen()
bool ALSON::ClassicDeviceController::isOpen |
( |
| ) |
|
判断设备是否已经打开
- 返回
- 返回 true 表示已经打开,返回 false 表示尚未打开
- 异常
-
- 自从
- 0.1.0
◆ getDeviceInfo()
DeviceInfo ALSON::ClassicDeviceController::getDeviceInfo |
( |
| ) |
|
◆ setDeviceEventListener()
注册设备事件监听器
如果要注销监听器,传递 nullptr 即可
- 参数
-
deviceEventListenerPtr | 监听器指针 |
- 异常
-
- 自从
- 0.4.0
◆ captureSourceImage()
std::vector< AlsonMat > ALSON::ClassicDeviceController::captureSourceImage |
( |
bool | isLatest | ) |
|
采集原始图像
该接口返回左右相机采集的原始图像
- 参数
-
isLatest | 如果给定的参数值是 true,将采集最新的图像 |
- 返回
- 原始图像列表,按序存放左图像、右图像
- 异常
-
- 自从
- 0.1.0
- 弃用
- 该接口可能会在未来的某个版本中弃用,请优先使用 grabSourceImages 接口
◆ captureTextureImage()
std::vector< AlsonMat > ALSON::ClassicDeviceController::captureTextureImage |
( |
bool | isLatest | ) |
|
采集纹理图像
- 注意
- 该接口返回左右相机采集的对齐后的图像。其中,左图像(即返回列表中的第一张图像)和深度图(或有序点云)是一一对应的
- 参数
-
isLatest | 如果给定的参数值是 true,将采集最新的图像 |
- 返回
- 纹理图像列表,按序存放左图像、右图像
- 异常
-
- 自从
- 0.1.0
- 弃用
- 该接口可能会在未来的某个版本中弃用,请优先使用 grabTextureImage 接口
◆ scan()
AlsonMat ALSON::ClassicDeviceController::scan |
( |
bool | isDepthMode | ) |
|
执行扫描并获取点云或深度图
点云是三通道浮点数矩阵,深度图是单通道浮点数矩阵
- 注意
- 该接口返回的点云是对齐后的点云
- 参数
-
isDepthMode | 如果设置为 true 将返回深度图,否则返回点云 |
- 返回
- 点云或深度图
- 异常
-
- 自从
- 0.1.0
- 弃用
- 该接口可能会在未来的某个版本中弃用,请优先使用 grabPointCloud 接口
◆ grabTextureImage()
AlsonMat ALSON::ClassicDeviceController::grabTextureImage |
( |
| ) |
|
采集纹理图像
对于双目设备,纹理图由左相机采集
- 注意
- 该接口返回的是未对齐的纹理图像
- 返回
- 纹理图像
- 异常
-
- 自从
- 0.3.0
◆ grabSourceImages()
std::vector< AlsonMat > ALSON::ClassicDeviceController::grabSourceImages |
( |
| ) |
|
采集原始图像
该接口固定返回两张图像,分别是左右相机采集的原始图像
- 返回
- 原始图像
- 异常
-
- 自从
- 0.3.0
◆ grabPointCloud()
PointCloud ALSON::ClassicDeviceController::grabPointCloud |
( |
| ) |
|
采集点云
- 注意
- 该接口返回的点云可能是有序点云,也有可能是无序点云
- 返回
- 点云
- 异常
-
- 自从
- 0.3.0
◆ setUserMask()
void ALSON::ClassicDeviceController::setUserMask |
( |
const AlsonMat & | left, |
|
|
const AlsonMat & | right ) |
限定点云在指定的 mask 区域内生成
mask 矩阵的大小和左右相机的图像分辨率一致。在 mask 矩阵中,值为 0 的位置不生成点云。 如果指定的 mask 矩阵为空,则表示不限制 点云的生成范围。
- 参数
-
left | 左相机 mask |
right | 右相机 mask |
- 异常
-
- 自从
- 0.4.0
◆ createClassicDeviceUtil()
创建离线工具
离线工具可以在不连接设备的情况下,对数据进行处理
- 返回
- 离线工具
- 异常
-
- 自从
- 0.4.0
◆ getDeviceIntrinsics()
AlsonMat ALSON::ClassicDeviceController::getDeviceIntrinsics |
( |
| ) |
|
获取设备内参矩阵
- 返回
- 内参矩阵
- 异常
-
- 自从
- 0.4.0
◆ pointXYZToUV() [1/3]
PointUV ALSON::ClassicDeviceController::pointXYZToUV |
( |
const PointXYZ & | pointXYZ | ) |
const |
计算指定点在未对齐纹理图上的坐标
- 参数
-
- 返回
- 未对齐纹理图上的坐标
- 异常
-
- 自从
- 0.4.0
◆ pointXYZToUV() [2/3]
PointUV ALSON::ClassicDeviceController::pointXYZToUV |
( |
float | x, |
|
|
float | y, |
|
|
float | z ) const |
计算指定点在未对齐纹理图上的坐标
- 参数
-
- 返回
- 未对齐纹理图上的坐标
- 异常
-
- 自从
- 0.4.0
◆ pointXYZToUV() [3/3]
std::vector< PointUV > ALSON::ClassicDeviceController::pointXYZToUV |
( |
const PointCloud & | pointCloud | ) |
const |
将点云中的所有三维坐标转换为未对齐纹理图上的坐标
- 参数
-
- 返回
- 未对齐纹理图上的坐标
- 异常
-
- 自从
- 0.4.0
◆ addRGBForPointCloud()
点云贴图
- 参数
-
pointCloud | 点云 |
textureImage | 未对齐的纹理图像 |
- 返回
- 贴图后的点云
- 异常
-
- 自从
- 0.4.0
◆ addRGBAndNormalForPointCloud()
PointCloud ALSON::ClassicDeviceController::addRGBAndNormalForPointCloud |
( |
const PointCloud & | pointCloud, |
|
|
const AlsonMat & | textureImage, |
|
|
double | radiusSearch, |
|
|
int | totalThreads = 1 ) const |
点云贴图并计算法向量
- 参数
-
pointCloud | 点云 |
textureImage | 未对齐的纹理图像 |
radiusSearch | 搜索半径 |
totalThreads | 线程数 |
- 返回
- 贴图并计算法向后的点云
- 异常
-
- 自从
- 0.4.0
◆ alignTextureImage()
AlsonMat ALSON::ClassicDeviceController::alignTextureImage |
( |
const AlsonMat & | textureImage | ) |
|
◆ pointCloudToDepthImage()
AlsonMat ALSON::ClassicDeviceController::pointCloudToDepthImage |
( |
const PointCloud & | pointCloud | ) |
const |
◆ depthImageToPointCloud()
PointCloud ALSON::ClassicDeviceController::depthImageToPointCloud |
( |
const AlsonMat & | depthImage | ) |
const |
◆ alignPointCloud()
点云对齐
对齐后的点云是有序点云,有序点云的尺寸和纹理图像一致,有序点云与对齐后的纹理图像一一对应
如果我们知道纹理图上一个点的坐标为 (u,v),那么我们可以通过如下示例代码获取到它在有序点云中对应的三维点
或者也可以参照如下示例代码通过指针的方式获取三维点
- 参数
-
- 返回
- 对齐后的点云
- 异常
-
- 自从
- 0.4.0
- 参见
- alignTextureImage
◆ classicDeviceControllerImplPtr()
virtual ClassicDeviceControllerImplPtr ALSON::ClassicDeviceController::classicDeviceControllerImplPtr |
( |
| ) |
const |
|
protectedvirtual |