Skip to content

Multi Camera Registration

Ahmet Oğuz Mermerkaya edited this page Jan 24, 2024 · 9 revisions

Good news! Our documentation has moved to antmedia.io/docs.

Getting Transformation Matrixes

To get started you need to:

  • Plug 6 Azure Kinect Sensor and complete the Initial Configuration Steps on each machine
  • All of the computers you will use should be on the same network
  • Print the calibration pattern “pattern.jpg” on a piece of paper (A4)

Step 1: Get and then extract the Spaceport Multi-Camera Calibration Tool

Then Choose a computer that will act as a server (this computer may also be a client at the same time), we recommend that it is the most powerful of the available machines.

Step 2: Use the sendjob script to start all publishers on the server. In a nutshell, the sendjob script will connect to your devices and run publishers on each device at the same time to avoid sync issues.

Edit following script for your configuration:

#!/bin/bash
# $(($(date +%s%N)/1000000))


if pgrep roscore >/dev/null 2>&1
  then
     tput setaf 1; echo "roscore is already running"
  else
     roscore &
     tput setaf 1; echo "roscore just started"
     sleep 4
fi

#device_1
ssh antmedia@192.168.0.107  << EOF & 
        source /opt/ros/melodic/setup.bash 
        export DISPLAY=:0 
        export ROS_IP=192.168.0.107 
        export ROS_MASTER_URI=http://hal:11311 
        /home/path/of/k4AROSPublisher --postime $1 
EOF

#device_2
ssh antmedia@192.168.0.103  << EOF & 
        source /opt/ros/melodic/setup.bash 
        export DISPLAY=:0 
        export ROS_IP=192.168.0.103 
        export ROS_MASTER_URI=http://hal:11311 
        /home/path/of/k4AROSPublisher --postime $1  
EOF

#device_3
ssh antmedia@192.168.0.106  << EOF & 
        source /opt/ros/melodic/setup.bash 
        export DISPLAY=:0 
        export ROS_IP=192.168.0.106 
        export ROS_MASTER_URI=http://hal:11311 
        /home/path/of/k4AROSPublisher --postime $1 
EOF

#device_4
ssh antmedia@192.168.0.109  << EOF &
        source /opt/ros/melodic/setup.bash
        export DISPLAY=:0
        export ROS_IP=192.168.0.109
        export ROS_MASTER_URI=http://hal:11311
         /home/path/of/k4AROSPublisher --postime $1 
EOF

#device_5
ssh antmedia@192.168.0.102  << EOF &

        source /opt/ros/melodic/setup.bash
        export DISPLAY=:0
        export ROS_IP=192.168.0.102
        export ROS_MASTER_URI=http://hal:11311
	/home/path/of/k4AROSPublisher --postime $1
EOF

cd Spaceport-Multi-Camera-Registration-Tool bash sendjob.sh $(($(date +%s%N)/1000000))`

Step 4: In order to run the clients you need the printed calibration pattern. Once printed, attach it to something rigid and place it in a position where it is visible to all sensors.

Step 5: Create a serial.txt. The format should be as follows

null = for reference camera 0 = looking to the same side as the reference camera

1 = looking to the opposite side with the reference camera

Step 6: Then run the startReg.sh on the chosen machine.

cd /VolumetricVideoRegistration/src/registraiton bash startReg.sh

Note: After you found contours you can press s and then capture a new frame for the same camera pairs. Thus you can expand registration quality.

Step 9: Back to Step 7 until all camera pairs are registered

Result: You are going to get the transformation matrices for each camera in a similar way below.

1.out 2.out 3.out 4.out 5.out

Once the Transformation matrices of all cameras have been calculated, move these values into binaries/spaceport/TransDir.

Next Step: Volumetric Capture

User Guide

Reference

Troubleshooting

Draft

Proposals

Clone this wiki locally