Transform a point cloud using a 4x4 matrix (applying rotation and a translation).
- .pcd or .ply file.
Check your .pcd/.ply file with: head <pcd/ply file>
Method: using an Affine3f
0.707107 -0.707107 0 2.5
0.707107 0.707107 0 0
0 0 1 0
0 0 0 1
Point cloud colors : white = original point cloud
red = transformed point cloud
- pcl (Point Cloud Library)
You can install pcl using:
sudo apt install libpcl-dev
You can use the following commands to compile the package:
git clone https://github.com/cristianrubioa/matrix_transformation.git
cd /matrix_transformation
mkdir build && cd build
cmake ../src/
make
Stand in the "build" folder and run:
cd ~/matrix_transformation/build
./matrix_transformation ../models/ply or pcd file>
./matrix_transform ../models/cube.ply #e.g.