为什么 pcl::CropBox 的最小和最大向量是 4 维的? [英] Why are the min and max vectors for pcl::CropBox 4-dimensional?

查看:165
本文介绍了为什么 pcl::CropBox 的最小和最大向量是 4 维的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

pcl::CropBox 每个过滤器都以 Eigen::Vector4f 作为参数.

为什么是 4f 而不是 3f?什么是第四维?

解决方案

Vector4F 有什么用?

Vector4f 对应于 齐次坐标.例如,(3, 4, 5, 1)和(6, 8, 10, 2)在齐次坐标系中是同一个点.在这种情况下,您可以将 (a, b, c, d) 归一化为 (a/d, b/d, c/d, 1).

<块引用>

简单的答案是:只需将最后一位数字设置为 1

为什么 PCL CropBox 需要 Vector4f?

这是因为 PCL CropBox 可以通过 pcl::CropBox filter each take an Eigen::Vector4f as a parameter.

Why 4f and not 3f? What's the fourth dimension for?

解决方案

What's the Vector4F for?

The Vector4f corresponds to the homogeneous coordinate. For example, (3, 4, 5, 1) and (6, 8, 10, 2) is the same point in homogeneous coordinates system. You can normalize(a, b, c, d) to (a/d, b/d, c/d, 1) in this case.

Easy answer is: Just set the last digit to 1

Why PCL CropBox needs Vector4f?

It's because PCL CropBox can handle any box transformation via setTransform

Transformation matrix usually contains a 4x4 matrix, example shown below where r is a 3x3 rotation matrix and t is a 3-d vector

[[r0, r1, r2, t0],
 [r3, r4, r5, t1],
 [r6, r7, r8, t2],
 [ 0,  0,  0,  1]]

It's just easier to matrix multiply a homogeneous coordinate (1x4) vector with (4x4) matrix.

Feel free to ask more question, as I can update this answer.

这篇关于为什么 pcl::CropBox 的最小和最大向量是 4 维的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆