

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!


CSE152 – Intro to Computer Vision – Assignment # Instructor: Prof. David Kriegman. http://cseweb.ucsd.edu/classes/sp12/cse152-a Due Date: Thu. April 26, 2012.
(a) [3 points] Assume camera A has an image plane at a focal length of fA = 1 in front of the camera. Find the intrinsic parameter matrix AMin for camera A. (b) [5 points] Assume the camera is positioned (relative to world coordinates) by applying a rotation of π 4 radians about the x-axis, followed by a rotation of − π 4 radians about the y-axis. The center of the camera is placed such that the origin is at AO = (0,. 5 , 2)T^ in the coordinate system of camera A. Compute the 3X3 rotation matrix AR going from world coordinates to camera coordinates. (c) [4 points] Compute the 4X4 extrinsic parameter matrix AMex defining a rigid trans- formation going from world coordinates to camera coordinates. Use it to solve for the vertices of the square in camera A’s coordinate system AP 1 , AP 2 , AP 3 , AP 4. (d) [5 points] Combine the results of the previous two parts to solve for the 3X4 perspective camera projection matrix. Use it to solve for the projection of P 1 , P 2 , P 3 , P 4 onto the image plane and plot their locations (e.g., draw a quadrilateral depicting the projected image of the square). (e) [4 points] Solve for the 2 vanishing points of the projected image of the square. (f) [4 points] Find the affine projection matrix that approximates the perspective projection from part c and corresponds to an expansion about the center of the square AO. Compute the projected locations of AP 1 , AP 2 , AP 3 , AP 4 under this affine camera model, and plot the results as in part d. (g) [4 points] Find the orthographic projection matrix that approximates the perspective projection from part c and corresponds to an expansion about the center of the square AO. Compute the projected locations of AP 1 ,^
4 under this orthographic camera model, and plot the results as in part d. (h) [6 points] Suppose we were to move the camera to a new configuration B, obtained by zooming in the camera while panning out, such that the projected image of the square stays roughly the same size. This effect is achieved by setting the focal length of the camera to fB = 10, while moving the camera further away to B^ O = (0, 5 , 20)T^. Are the affine and orthographic camera approximations more appropriate for camera configuration
A or for camera configuration B (a camera approximation is appropriate if the projection onto the image plane is similar to the projection using the full perspective camera matrix)? Explain your answer.
DO NOT use the built-in rgb2hsv or hsv2rgb functions in Matlab, except to compare your re- sults. Test your function on the image color.bmp, and generate results for TransformHSV(img,90,1,1), TransformHSV(img,0,.3,1), TransformHSV(img,0,1,.3). Include the generated images in your writeup.
x^2 + 4y^2 for all x^2 + 4y^2 ≤ 1. The first point light source is located at (1, 1 , 2)T^ , and the second light source is located at (− 1 , − 1 , 2)T^. Both light sources have intensity .5. The ellipsoid surface is Lambertian, and has an albedo of 1 throughout the entire surface. Write a Matlab function that renders a 401x201 image of the surface with pixels corresponding to the locations x = −1 : 0.005 : 1 and y = −.5 : 0.005 : .5. Set all pixels outside the circle x^2 + 4y^2 > 1 equal to 0. Generate an image of the surface that is illuminated by just the first light source, a second image that is illuminated by just the second light source, and a 3rd image that is illuminated by both light sources. Include all 3 output images in your writeup.