SPIN icon indicating copy to clipboard operation
SPIN copied to clipboard

The formula for camera translation

Open ahnHeejune opened this issue 2 years ago • 0 comments

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

ahnHeejune avatar Feb 20 '23 07:02 ahnHeejune