assignment attached
1 The four points are linearly transformed through each of the actions. Specify the 2D transformation matrix for each time. (6 points) x0 = [ 10, 5 ]T , x1 = [ 13, 10 ]T , x2 = [ 5, 10 ]T , x3 = [ 3, 3 ]T 1. Rotate the points −90° with respect to (w.r.t) the origin. Counterclockwise (CCW) is positive. 2. Translate the points 7 along the X-axis and 3 along the Y-axis. 3. Scale the points by the scale factor of 1.5 w.r.t the origin. 4. Shear the points by 10° parallel to the X-axis and by 45° parallel to the Y-axis. 5. Show the transformation matrix that describes the whole sequence from problem 1.1 to problem 1.4 6. Using the transformation matrix from problem 1.3, what are the transformed coordinates of the four points w.r.t the origin? 2 Now, we have four points in 3D. Calculate the transformation matrix and transformed coordinate of four points w.r.t the ori- gin for each step. The rotation is in Euler angle notation. (6 points) x0 = [ 10, 5, 3 ]T , x1 = [ 13, 10, 2 ]T , x2 = [ 5, 10, 8 ]T , x3 = [ 3, 3, 5 ]T 1. Rotate the points by following sequences. 90° w.r.t the X-axis, 45° w.r.t the Y-axis, and 30° w.r.t the Z-axis. 2. Rotate the points by following sequences. 45° w.r.t the Y-axis, 90° w.r.t the X-axis, and 30° w.r.t the Z-axis. 3. Translate the points by [ 10, 5, 3 ]T , then apply the transformation matrix that you obtained from problem 2.1. 1 The Trial Version 4. Apply the transformation matrix that you obtained from problem 2.1 to the points, then translate by[ 10, 5, 3 ]T . 5. Compare the results of problem 2.1 to problem 2.2. 6. Compare the results of problem 2.3 to problem 2.4 3 The 3D shear matrix is shown below. Please find the transfor- mation matrix that describes the following sequence. (6 points) Shear = 1 sx sy0 1 sz 0 0 1 1. Make a 4x4 transformation matrix by using the rotation matrix that you obtained from problem 2.2, the translation of [ 1, 0, 0 ]T , and shear 10° parallel to the X-axis. 2. Make a 4x4 transformation matrix by using the rotation matrix that you obtained from problem 2.3, translation of [ 0, 1, 0 ]T , and scale by factor of 2 along the y-axis. 4 Show the properties of transformation matrix. (4 points) 1. Use transformation matrix that you obtained from problem 3.2. Show the inverse of T is [ RT −RT t 01x3 1 ] 2. Show TT−1 = I 5 Consider a world frame, a camera frame, a image frame, and a point w.r.t the world frame. The Transform Matrix T ab maps b’s coordinates in frame a. e.g.) T cw maps the world coordinates in camera frame, where w is world frame, c is camera frame. Pw is point coordinate w.r.t the world frame. The K matrix is the intrinsic matrix of the camera. (8 points) T cw = 0 0 1 −10 1 0 0 −3 0 1 0 −5 0 0 0 1 Pw = [15 30 50]T K = 300 0 9600 300 540 0 0 1 1. What is the origin of the camera coordinate w.r.t the world frame? What is the rotation of the camera w.r.t the world frame? Use any representations that you have learned in the class. 2. What is the point’s coordinate w.r.t the world frame? What is the point’s coordinate w.r.t image frame? 2 The Trial Version 3. What is the pose (rotation and translation) of the point w.r.t the camera frame? 4. What is the resolution of the camera? e.g.) 4k, 1080p or VGA. Could you guess it from the K matrix? Write down your thoughts. 6 Open the HW 1 6.jpg file and follow the instruction. (10 points) 1. Find the four vertices coordinate of the NYU flag w.r.t the image coordinate. You can use any softwares (e.g. Photo shop, Python Matplolib or Matlab) 2. Draw the four vertices on the image and show it in your report. 3. Find all possible line equations from the the four vertices coordinate. 4. What is the coordinate of the center of the flag w.r.t the image coordinate? Use the duality of line and points properties. 5. Assume the width and height of the windows is 36” x 72”. Calculate the width and height of the flag. Would you consider the perspective distortion when you find the flag length and height? Please explain why. 7 The following five points are measured from an image. Find the line of the best fit of the points by using least square error method. (9 points) p0 = [ 3, 8 ]T , p1 = [ 10, 30 ]T , p2 = [ 5, 15 ]T , p3 = [ 8, 20 ]T , p4 = [ 7, 19 ]T 1. Find the system of equations of the five points, such as AX = b. Please write down the A and b matrices. 2. Find the equation for the line of best fit by using pseudo inverse. 3. Find the line fitting problem by SVD method. 8 2D line Fitting.csv file contains 200 data points with noise. Fol- low the instructions. (12 points) 1. Plot the data points and show how it looks like. The plot should be look like Figure 1 Figure 1: The plot of 200 data points 3 The Trial Version 2. Use least squares error method to find line of the best fit. Draw the fitted line on the plot that you draw in problem 8.1. 3. Describe how to fit the line with the noise using RANSAC. 4. Write codes to fit the line equation and show the fitted line on the plot with the data set. You can write down the RANSAC code or use any existing codes on the online (e.g. Github, OpenCV library, or Matlab). 9 Use the pyAprilTag package that provided in the class, or other packages (e.g. Matlab or OpenCV) to calibrate your camera. After the calibration, taking a picture that is suitable for finding at least three vanishing point. (10 points) 1. Find the vanishing points and two vanishing lines per the vanishing point. Please report the camera matrix, and the equations and plot the vanishing line and vanishing points in your picture. 10 The following two pictures are taken from the Zed M stereo camera (15 points) The great advantage of using a stereo camera is we can find the depth information. The Fig.2 shows Zed M stereo camera. The two images, Stereo image 0.png and Stereo image 1.png are taken from the Zed M stereo camera at the same time. Answer the following questions to find the depth of the corresponding points from the two images. Figure 2: Zed M stereo camera Figure 3: Is it from left or right? Figure 4: Is it from left or right? 1. Which one is taken from the left side? Write down your answer with your thoughts. 2. How to find corresponding points between the left and the right picture? 4 The Trial Version 3. Define the epipolar point in your words. What does the epipolar lines of the two pictures look like? 4. Find the disparity of the corresponding points. The left camera’s image origin is [656.8490, 365.7700]T and right camera’s image origin is [539.4190, 347.2900]T . 5. Find the depth of the corresponding points with following information. The distance of right camera’s center of images w.r.t left camera’s center of image is 62 pixels, and the two camera’s focal length is 699 pixels. 6. In real-life, the left and the right intrinsic variables are not the same. Even the two camera’s optic axes are not parallel. After the stereo camera is calibrated, I got the following variables. What is the meaning of the variables? (a) Left Camera fx = 699.7690, fy = 699.7690, cx = 656.8490, cy = 365.7700 (b) Right Camera fx = 694.0210, fy = 694.0210, cx = 539.4190, cy = 347.2900 (c) Tx = 62.5303, Ty =0, Tz = 0, Rx = -0.0261 Ry = 0.1387, Rz = -0.0026 7. Can you imagine, in a real-life situation, how you can find the depth of the corresponding points with the variables? 11 The entrance of NYU Bern Dibner library are taken from three different views. Find the matched points from the three pic- tures. (7 points) Figure 5: left view Figure 6: center view Figure 7: right view 1. Describe how you would find key points of each picture and matched key points with other images? Please name the algorithm that you would like to use it. 2. Assuming that we have the matched key points. Can we make a panorama picture from the three images? Write down your thoughts with your supports. 3. Try any libraries or software and show the matched key points and explain the result. The files are HW 1 12 0.jpg, HW 1 12 1.jpg, and HW 1 12 2.jpg. If you find interesting results, report the findings, too. 5 The Trial Version 12 Let’s re-use the stereo images. If the two cameras were not calibrated we don’t know the K matrix. Still, we can find the mapping function between the two pictures. The mapping matrix is the F matrix that we have learned in class. (7 points) 1. How many corresponding points are needed at least to calculate the F matrix? Why do we need that many corresponding points? Please write down the reasons. 2. Describe how you would find F matrix from the corresponding points. 3. Find the F matrix. 6 The Trial Version