



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




MEM: Intro to Robotics
φ = tan−^1
d 2 f
The aim of this problem is find a simple conversion so that you would be able to compute what the actual focal length will be in your new camera before purchasing a lens which was designed for a different film/sensor size. Let’s fix some notation; unless otherwise mentioned, this notation is consistent through all parts of the problem:
(a) Using (1), write an expression for the field of view φ in terms of the focal length f of the lens youd like to buy, and the sensor width df ilm. Using your newfound expression, what is the field of view φ if the focal length f is 50 mm and ddigital = 21. 8 mm?
(b) Now that you have computed the field of view φ in terms of ddigital, once again use (1) to find an expression for fe. Assume the field of view φ is what you obtained from (a) and replace
Figure 1: Diagram showing the field of view φ with respect to the focal length f and sensor size d.
f with fe. Simplify your answer so that fe in solely expressed in terms of f , df ilm, and ddigital.
(c) From the equation found in part b), compute what the effective focal length would be if you were to use the 50 mm lens in your ddigital = 21. 8 mm camera. What would the effective focal length be in the case of 35 or 80 mm lenses?
(d) Finally, repeat part c) for two more digital cameras: the Nikon Coolpix 5000 with a sensor size of 8.8 x 6. 6 mm and the Kodak 760 with a sensor size of 27.8 x 18.5 mm. For each lens and camera, write the corresponding effective focal length in the table below:
50 mm 50 mm 80 mm
Canon D
Nikon Coolpix 5000
Kodak 760
h 2 D 2 + f
d/ 2 f
1500 + f
f
which yields a focal length f = 50.5 mm. In this case, the tower will appear as half the image height, or 1440/2 = 720 pixels tall. Note that in order for this to be true it would be incorrect to simply solve for f in (1) by taking only half the field of view, as the height of the object does not correspond to the arclength of the circular sector of angle ϕ.
Figure 4: Standard camera geomtry.
(a) Given the same settings as above, verify that the size of each pixel corresponds to 10. 1 μm. If the focal length f is given to be 50 mm and the distance D 2 from the tower to the sensor is 1500 m, what would be the resulting height of the tower in pixels?
(b) If the focal length f is given to be 50 mm at what distance D 2 should the camera be positioned in order for the Eiffel tower to be completely within the field of view? At what distance D 1 should the person stand in order to appear of the same height as the tower in the final image?
For the last two parts, fix the position of the camera with respect to the Eiffel tower (fix f + D 2 ), as in the previous part, and denote the distance D from the sensor to the tower Dt.
(c) What would the new focal length f ′^ need to be in order to have only half of the tower in the field of view (and hence make it twice as big)?
(d) At what new distance D 1 should the person stand in order to still fill the field of view completely (so that now the tower would look closer to the person)?
(x, y, z) −→ (−d
x z , −d
y z ) = (xp, yp) (3)
The standard projection is shown in Figure 4. Note that the camera points in the negative z direction so that a point on the projection plane is given by (xp, yp, −d) where d is now the focal length. This simple camera projection equation results in several non-trivial facts. After seeing the effect that focal length had on depth compression, we now look at how the camera position affects how the vanishing lines appear in the 2D image. Recall the line on the floor shown in the lecture slides. The line can be represented by intersecting the floor plane given by y = −1 and the plane given by x = az + b. At the horizon (when z → −∞) a point on this line projects to (a, 0) on the image plane. In this problem, we will study how the projection is affected when the camera is rotated by an angle θ about the x-axis (and the y-axis, too).
(a) If we tilt the camera by an angle θ about the x-axis, we rotate the y-z plane. The 3x3 matrix
representing this rotation is given by:
Rx =
0 cos θ − sin θ 0 sin θ cos θ
What would the new coordinates (x′, y′, z′) of a point (x, y, z) be after this rotation is applied?
(b) If for simplicity we rewrite our line in a parametric form with respect to a single variable t, the initial line can be expressed as follows:
x = at + b y = − 1 (5) z = t
This means that every point on the line can be mapped to a unique value of −∞ ≤ t ≤ ∞ (which makes sense, since a line is a 1D structure). What would be x′, y′, z′^ be for the line in terms of the rotated coordinate system?
(c) Rewriting (3) in terms of the new coordinates yields:
(x′, y′, z′) −→ (−d x′ z′^
, −d y′ z′^
) = (x′ p, y′ p) (6)
What will x′ p and y′ p be in terms of the new coordinates found in part (b)?
(d) To find where a point on the horizon will project to in the image, let t → −∞. What will be the image coordinates of this point?
(e) Finally, what would happen if after rotating the camera about the x-axis, we also rotate the camera about the y-axis? (Hint: after computing x′, y′, z′^ in part (a) multiply the latter by a new rotation matrix Ry and then repeat parts (b)-(d) to find the new projected point).
What to turn in for Problem 4. Submit your version of the ccl MEM455.m code. I will run your code on a different image to see whether it works or not. In your write-up, make sure you include all the output images. Remember, your PDF files must be no larger than 5MBs.