From: Daniel DeMenthon [daniel@cfar.umd.edu] Sent: Thursday, September 21, 2000 11:20 AM To: cmsc828d@umiacs.umd.edu Subject: Homework 4 Here are suggestions for Problem 5 of Homework 4: Read about rotation and translation of coordinate systems, for example from http://www.srl.gatech.edu/education/ME6175/notes/xforms.html Use Matlab functions that transform coordinates between coordinate systems that have been translated, and rotated around one axis. The link above has examples of such Matlab functions. In the rare cases when rotation around more than one axis is needed, these single axis rotation functions can be called one after the other. Always use right-handed coordinate systems. Watch for the signs of the angles when you call the rotation functions. Always check your coordinate transformation operations by using a few points for which you can verify by hand what the coordinates should be in each coordinate system. Use one coordinate system for the camera, and another coordinate system for the scene (the road), in such a way that there is only a translation and a rotation around one axis between the two coordinate systems. Find the coordinates of the first square in the road coordinate system. In the road plane, you can define a local rotated coordinate system for the second square. Assume that the road turns to the right. Transform the coordinates of the second square to the coordinate system of the first square. Then transform the coordinates of the squares obtained in the road coordinate system to the camera coordinate system. Write a Matlab function that performs perspective projection. Perform the perspective projection in the camera coordinate system. Translate the coordinates of the image points found by perspective projection so that the pixel (0,0) is at the top left of the image. Daniel