UBot Image Frame
一次相机采集。图像在 GPU 的 Render Target 里,像素只在调用 Request Pixel Readback 后才读到 CPU,并且只有最新一次采集的帧能读回。
Clear CPUPixel Data
Section titled “Clear CPUPixel Data”Clear CPUPixel DataTarget is UBot Image FrameTarget
释放 CPU 上的像素或深度数据。
Copy Depth Values (High Cost)
Section titled “Copy Depth Values (High Cost)”Copy Depth Values (High Cost)Target is UBot Image FrameTargetReturn Value
返回全部深度的副本,单位 m,按行排列。每次调用都复制整个数组,开销高。
| 引脚 | 方向 | 类型 |
|---|---|---|
| Return Value | 输出 | Float数组 |
Copy Pixel Bytes (High Cost)
Section titled “Copy Pixel Bytes (High Cost)”Copy Pixel Bytes (High Cost)Target is UBot Image FrameTargetReturn Value
返回全部像素字节的副本,顺序为 B、G、R、A。每次调用都复制整个数组,开销高。
| 引脚 | 方向 | 类型 |
|---|---|---|
| Return Value | 输出 | Byte数组 |
Generate Point Cloud
Section titled “Generate Point Cloud”Generate Point CloudTarget is UBot Image FrameTargetError MessageReturn Value
从已读回的深度生成相机坐标系下的点云(X 前、Y 右、Z 上,单位 m)。只含深度有效的像素,没有强度。
| 引脚 | 方向 | 类型 |
|---|---|---|
| Error Message | 输出 | String |
| Return Value | 输出 | UBot Point Cloud Frame对象引用 |
Get BGRAPixel by Coordinates
Section titled “Get BGRAPixel by Coordinates”Get BGRAPixel by CoordinatesTarget is UBot Image FrameTargetX0Y0ColorReturn Value
读取坐标 (X, Y) 处的像素颜色,原点在左上角。坐标越界、不是 BGRA8 帧或像素还没读回时返回 false。
| 引脚 | 方向 | 类型 | 默认值 |
|---|---|---|---|
| X | 输入 | Integer | 0 |
| Y | 输入 | Integer | 0 |
| Color | 输出 | Color结构体 | |
| Return Value | 输出 | Boolean |
Get Depth Meters by Coordinates
Section titled “Get Depth Meters by Coordinates”Get Depth Meters by CoordinatesTarget is UBot Image FrameTargetX0Y0Depth MetersReturn Value
读取坐标 (X, Y) 处的深度,单位 m,0 表示无效。坐标越界、不是深度帧或深度还没读回时返回 false。
| 引脚 | 方向 | 类型 | 默认值 |
|---|---|---|---|
| X | 输入 | Integer | 0 |
| Y | 输入 | Integer | 0 |
| Depth Meters | 输出 | Float | |
| Return Value | 输出 | Boolean |
Get Depth Preview Texture
Section titled “Get Depth Preview Texture”Get Depth Preview TextureTarget is UBot Image FrameTargetReturn Value
返回最近一次 Update Depth Preview 生成的贴图,还没生成过时为空。
| 引脚 | 方向 | 类型 |
|---|---|---|
| Return Value | 输出 | Texture 2D对象引用 |
Get Pixel Data Size Bytes
Section titled “Get Pixel Data Size Bytes”Get Pixel Data Size BytesTarget is UBot Image FrameTargetReturn Value
CPU 上像素数据的字节数,还没读回时为 0。
| 引脚 | 方向 | 类型 |
|---|---|---|
| Return Value | 输出 | Integer |
Has CPUPixel Data
Section titled “Has CPUPixel Data”Has CPUPixel DataTarget is UBot Image FrameTargetReturn Value
像素或深度是否已经读到 CPU。
| 引脚 | 方向 | 类型 |
|---|---|---|
| Return Value | 输出 | Boolean |
Request Pixel Readback
Section titled “Request Pixel Readback”Request Pixel ReadbackTarget is UBot Image FrameTargetError MessageReturn Value
把这一帧的像素读回 CPU。同步执行,开销高;只有最新一次采集的帧能读回,失败原因在 Error Message 里。
| 引脚 | 方向 | 类型 |
|---|---|---|
| Error Message | 输出 | String |
| Return Value | 输出 | Boolean |
Update Depth Preview
Section titled “Update Depth Preview”Update Depth PreviewTarget is UBot Image FrameTargetPreview ModeGrayscalePreview Minimum Depth Meters0.0Preview Maximum Depth Meters0.0Error MessageReturn Value
把已读回的深度生成一张预览贴图,无效像素为黑色。预览范围的上限必须大于下限,否则失败;深度还没读回时会先读回。
| 引脚 | 方向 | 类型 | 默认值 |
|---|---|---|---|
| Preview Mode | 输入 | EUBot Depth Preview Mode枚举 | Grayscale |
| Preview Minimum Depth Meters | 输入 | Float | 0.0 |
| Preview Maximum Depth Meters | 输入 | Float | 0.0 |
| Error Message | 输出 | String | |
| Return Value | 输出 | Texture 2D对象引用 |
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
CxCx · Camera | Float | 0.0 | 主点的横坐标,单位像素,等于 (Width - 1) / 2。蓝图只读,Details 不可编辑 |
CyCy · Camera | Float | 0.0 | 主点的纵坐标,单位像素,等于 (Height - 1) / 2。蓝图只读,Details 不可编辑 |
EncodingEncoding · Camera | EUBot Image Encoding枚举 | BGRA8 | 像素编码:BGRA8 或 Depth32FC1。蓝图只读,Details 不可编辑 |
FxFx · Camera | Float | 0.0 | 水平焦距,单位像素,等于 Width / (2 * tan(水平视场 / 2))。蓝图只读,Details 不可编辑 |
FyFy · Camera | Float | 0.0 | 垂直焦距,单位像素,与 Fx 相同(方形像素)。蓝图只读,Details 不可编辑 |
HeaderHeader · Camera | UBot Frame Header结构体 | (Status=Error) | 帧头,含 Valid 和 Status。蓝图只读,Details 不可编辑 |
HeightHeight · Camera | Integer | 0 | 图像高度,单位像素。蓝图只读,Details 不可编辑 |
Horizontal Fov RadiansHorizontalFovRadians · Camera | Float | 0.0 | 水平视场,单位 rad。蓝图只读,Details 不可编辑 |
Raw Capture Render TargetRawCaptureRenderTarget · Camera | Texture Render Target 2D对象引用 | None | 这一帧的图像所在的 Render Target。相机再次采集后它的内容会被新的图像覆盖。蓝图只读,Details 不可编辑 |
Row Stride BytesRowStrideBytes · Camera | Integer | 0 | 每行的字节数,等于 Width 乘以 4。蓝图只读,Details 不可编辑 |
Sensor Transform WorldSensorTransformWorld · Camera | Transform | (Rotation=(X=0.000000,Y=0.000000,Z=0.000000,W=1.000000),Translation=(X=0.000000,Y=0.000000,Z=0.000000),Scale3D=(X=1.000000,Y=1.000000,Z=1.000000)) | 采集时传感器在 UE 世界里的变换,位置单位 cm。蓝图只读,Details 不可编辑 |
Vertical Fov RadiansVerticalFovRadians · Camera | Float | 0.0 | 垂直视场,单位 rad,由宽高比算出。蓝图只读,Details 不可编辑 |
WidthWidth · Camera | Integer | 0 | 图像宽度,单位像素。蓝图只读,Details 不可编辑 |
Capture Group IdCaptureGroupId · Camera|Synchronization | String | "" | 所属采集组的 ID,不在采集组里时为空。蓝图只读,Details 不可编辑 |
Capture SequenceCaptureSequence · Camera|Synchronization | Integer64 | 0 | 组序号,从 1 开始,每采集一组加 1,同一次组采集里的所有相机相同。不在采集组里时为 0。蓝图只读,Details 不可编辑 |
Capture Timestamp SecondsCaptureTimestampSeconds · Camera|Synchronization | Float (double) | 0.0 | 采集时间,单位 s。在采集组里是组时间戳,否则等于帧头里的时间戳。蓝图只读,Details 不可编辑 |
SynchronizedbSynchronized · Camera|Synchronization | Boolean | false | 在采集组里采集的帧为 true。蓝图只读,Details 不可编辑 |