SPIN
SPIN copied to clipboard
The formula for camera translation
in demo.py
camera_translation = torch.stack([pred_camera[:,1], pred_camera[:,2], 2*constants.FOCAL_LENGTH/(constants.IMG_RES * pred_camera[:,0] +1e-9)],dim=-1)
Can you explain why tz the camera translation in z coordinate is
2*constants.FOCAL_LENGTH / constants.IMG_RES * pred_camera[:,0]
= 2 * f / Resolution * scale_factor