The setMin
and setMax
methods of the pcl::CropBox
filter each take an Eigen::Vector4f
as a parameter.
Why 4f and not 3f? What's the fourth dimension for?
The setMin
and setMax
methods of the 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.
setTransform
needs to be updated. The updated on is this: pointclouds.org/documentation/… right? –
Mercier setTransform
work but so far haven't got a solid understanding. So, to confirm, when I specify setMin
, setMax
, by default, my cropBox
would be parallelogram, right? (2) Through setRotation
& setTranslate
I can rotate & translate, respectively, that parallelogram w.r.t. the coordinate system of the point cloud not the coordinate system of cropBox itself, right? But even in this case my parallelogram would remain parallelogram only, right? –
Mercier setTransform
can I transform my parallelogram cropBox to parallelepiped cropBox? If yes then how? (4) If yes then I have another doubt: as per the link I mentioned above, " setTransform
sets a transformation that should be applied to the cloud before filtering." So, it transforms the point cloud not the cropBox, right? –
Mercier © 2022 - 2024 — McMap. All rights reserved.