Vision · University · about 35 min
Focal length in pixels, the principal point, and measuring them from known geometry.
[1 mark]A 3.6 mm lens sits on a sensor 4.8 mm wide that produces images 640 pixels wide. What is the focal length in pixels?
[1 mark]The 320 pixel wide BugBot image, with fx = 92.4, is downsampled to 160 pixels wide. What is fx for the small image, in pixels?
[1 mark]What does a camera calibration actually compute?
[1 mark]Every calibration image shows the chessboard square on to the camera. What goes wrong?
[1 mark]Four tags give tan(bearing) and the observed u - 160. The model u - 160 = f tan(bearing) is a line through the origin, fitted by least squares. What does this print?
tans = [0.0, 30 / 70, -40 / 50, 40 / 30] offsets = [0.0, 40.0, -74.0, 123.0] f = sum(t * o for t, o in zip(tans, offsets)) / sum(t * t for t in tans) residuals = [round(o - f * t, 1) for t, o in zip(tans, offsets)] print(round(f, 1)) print(residuals)
[1 mark]Why does a tag straight ahead of the robot carry no information about f?
[1 mark]A calibration reports a root mean square reprojection error of 1.4 pixels. What should you conclude?
Four tags are on the mat at (100, 130), (130, 110), (60, 90) and (140, 70). The robot stands at (100, 40) facing along +y. Print focal length:, fitted in pixels, and field of view:, the full horizontal field of view in degrees that your focal length implies.
from bugbot import *
import math
connect()
ROBOT = (100.0, 40.0)
TAGS = {1: (100.0, 130.0), 2: (130.0, 110.0), 3: (60.0, 90.0), 4: (140.0, 70.0)}
set_cv("apriltag")
wait(0.3)Plan your program here, then type it in and press Run.
f predicts. Is it under a pixel?f.