目录

HwArPointCloud

Module Info

包含场景中检测到的3D点位置及其对应置信度的集合。

Public Method Summary

Qualifier and Type

Method Name and Description

void

HwArPointCloud_getData(const HwArSession *session, const HwArPointCloud *pointCloud, const float **outPointCloudData)

获取点云中所有点的坐标及置信度数组。

void

HwArPointCloud_getNumberOfPoints(const HwArSession *session, const HwArPointCloud *pointCloud, int32_t *outNumberOfPoints)

点云中所有点的坐标及置信度数组大小。

void

HwArPointCloud_getTimestamp(const HwArSession *session, const HwArPointCloud *pointCloud, int64_t *outTimestampNs)

获取检测到当前特征点云的时间,以纳秒为单位。

void

HwArPointCloud_release(HwArPointCloud *pointCloud)

释放点云对象使用的内存。

Public Methods

[h2]HwArPointCloud_getData

Function

HwArPointCloud_getData(const HwArSession *session, const HwArPointCloud *pointCloud, const float **outPointCloudData)

获取点云中所有点的坐标及置信度数组。数据格式为[x0,y0,z0,c0,x1,y1,z1,c1]。其坐标值都在世界坐标系下,使用右手坐标系表示。点云对象可以通过HwArFrame_acquirePointCloud获取。

Parameters

Name

Description

session

与AR Engine服务交互的Session对象。

pointCloud

点云对象。

outPointCloudData

点云中所有点的坐标及置信度数组。

[h2]HwArPointCloud_getNumberOfPoints

Function

HwArPointCloud_getNumberOfPoints(const HwArSession *session, const HwArPointCloud *pointCloud, int32_t *outNumberOfPoints)

点云中所有点的坐标及置信度数组大小。与HwArPointCloud_getData配合使用。

Parameters

Name

Description

session

与AR Engine服务交互的Session对象。

pointCloud

点云对象。

outNumberOfPoints

点云中所有点的坐标及置信度数组大小。

[h2]HwArPointCloud_getTimestamp

Function

HwArPointCloud_getTimestamp(const HwArSession *session, const HwArPointCloud *pointCloud, int64_t *outTimestampNs)

获取检测到当前特征点云的时间,以纳秒为单位。

Parameters

Name

Description

session

与AR Engine服务交互的Session对象。

pointCloud

点云对象。

outTimestampNs

检测到当前特征点云的时间。

[h2]HwArPointCloud_release

Function

HwArPointCloud_release(HwArPointCloud *pointCloud)

释放点云对象使用的内存。

Parameters

Name

Description

pointCloud

待释放的点云对象。