Multi-Camera running in fusion mode, how to get correct projection matrix?

how can I get the correct projection matrix for each camera? I know that we can get camera pose data, but have no idea how to properly use it.

What I want to accomplish is using multiple cameras to track players in the field, then I can view the fused skeletons using any one of the cameras with correct perspective projection.


Hi @qiansen, welcome to the forums!

You can get the cameras’ pose data from the vector of sl::FusionConfiguration that is probably initialized from the configuration file at the beginning of your code, like in this sample.

You can use it like this to get the translation for example:

auto pos = configurations[1].pose.getTranslation();

The coordinates are given in the Fusion reference system, the first camera is at the origin + its height (so 0,y,0).

Then for your visualization, it would depend on your implementation.

The following sample should help you: 3D fused pose reprojection into 2D plane from the perspective of each Zed 2i stereo camera in a multi-camera setup - #6 by SL-PY

Sorry, I should’ve used fused pose data, not the one read directly from the configuration file. All things work as expected now.