- Convert the aligned color & depth images to PointCloud for each RGB-D camera according to the given cameras' intrinsics.
- By now I have two half-box PointClouds in their relative camera frame. Since each cameras' extrinsics is provided, I applied a homogeneous transform to convert each PointCloud from camera frame to world frame.
- Then I used PCL PassThrough filter to get the corresponding box points.
- Concatenate these two filtered half-box PointClouds, I get a 360-degree view of the the whole box with respect to world frame.
- I tried to estimate the box pose as this GASD tutorial suggests. It generated a homogeneous transform matrix that aligns box to the origin of world frame. So the inverse translation of this matrix tells me where the box center is.
- Using PCL Visualizer to show the box and
shift + mouse left click
to output point coordinate in console.
make build && cd build
cmake .. && make
./box_pose_estimation -1_802212060971_color.png -1_802212060971_aligned_depth.png -1_821312062288_color.png -1_821312062288_aligned_depth.png
MacOS Mojave + Homebrew installed Point Cloud Library (PCL).
Win7 + msvc2017 + PCL-1.9.1-AllInOne-msvc2017-win64.exe