Revision exercises for CSMC5711 (Ver. 1,4b) 1) A 3D point X is at X , Y , Z 2.3,1.1,4.2 (in meters) in the world coordinate system. The parameters of a camera are shown below: The world coordinate system and the camera coordinate system are the same. The focal length F=6mm. Horizontal pixel width sx= Vertical pixel width sy The CCD sensor size = 10mm x 10mm. The resolution of the image captured by the camera is 500x500. The image centre is at (4.8 mm, 5.1 mm) from the right bottom corner of the image plane. The origin (1,1) of the image is at the right bottom corner. The x-coordinate is increasing from right to left, and y-coordinate is increasing from bottom to top. a) Find sx and sy in meters. b) Find the image centre (Ox, Oy) in pixels. c) Find the focal length in pixels. d) Find the 2D image position of the point X in pixels. T T 2) A 3D point is at [0.5, 0.6, 1.2]T meters from the world centre. a) The 3D point X is rotated (by R1) around the world centre and then translated (by T=[Tx,Ty,Tz] T ) to a new position X’, where 3 2 r11 r12 r13 X ' X Tx 1 ' Y ' R1 Y Ty , assume R 3 1 1 r21 r22 r23 , Z ' Z Tz 2 1 1 r31 r32 r33 where1 , 2 , 3 are small rotation angles around (X, Y, Z) axes respective ly. . The camera rotation angles are 1 =1.2, 2 =0 and 3 =0.57 (in degrees), and the translation is Tx , Ty , Tz 0.4,0.2,1 meters. Calculate the position of the 3D point X’ in meters. (Hint: The entries of R are in radian) T T b) If the rotation R1 is not rotating around the world centre but around a 3D point Y instead ( where Y is [0.45, 0.25, 1.05]T in meters from the world centre). All other parameters remain unchanged, calculate the position of the 3D point X’ in meters again. 3 2 r11 r12 r13 1 T R 3 1 1 r21 r22 r23 , T T1 , T2 , T3 2 1 1 r31 r32 r33 where1 , 2 , 3 are rotation angles around X, Y, Z axes respective ly. 3) An image X1 and a mask mask1 are shown below 1 3 X 1 2 4, and 4 3 1 1 mask1 2 2 a) Find the convolution result of X1 and mask1, the result should include partial overlapping cases. b) Describe how to find the edge image of a gray level input image using convolution and Sobel kernel masks. Revision exercises for CSMC5711 (Ver. 1,4b) Page 2 of 4 4) An original gray level image has resolution M=100 row and N=100 columns. The gray level resolution (L) of each pixel is 6. R(k) is the gray level of index k, N(k) is the number of pixels that have level R(k). Pr(R(k)) is the probability of the pixels in the image having gray level R(k). After histogram normalization, S(k) is the normalized gray level of index k. a) Discuss why histogram normalization is important in image processing. b) Based on the following table (you may copy it to your answer book first), fill in the blanks. c) Discuss the term “histogram back projection” and its applications. Find the histogram back projection of a pixel with gray level 3 in the original image. r(k) N(k) Pr(r(k)) r(0) 135 r(1) 278 r(2) 4521 r(3) 244 r(4) 3987 r(5) 1352 S(k) Round off (S(k)) 5) In a stereo system, a 3-D Point P1=[X1,Y1,Z1]T is in the left (reference) camera coordinate system and its projection is q1 in the left image. And this point becomes P2 =[X2,Y2,Z2]T in the right camera coordinate system and its projection is q2 in the right image. q1 and q2 are in homogenous coordinates. P1 and P2 are related by P2=R*P1 +T, where R and T are the rotation and translation of the right camera respectively. a) Draw the diagram depicting i) the two cameras, ii) the point P1 in 3D, iii) image projections of P1 in both images, iv) the epipoles, v) the epipolar lines in the right image of two left image feature points ‘a’ and ‘b’ (you are free to select any two image points). b) Write the Essential matrix E in term of R and T. c) Write the relation of q1, q2, T and R. d) Discuss the relation between essential matrix E and fundamental matrix F. Use formulas to illustrate your answer. e) Describe the algorithm to find F. Revision exercises for CSMC5711 (Ver. 1,4b) Page 3 of 4 6) Pose estimation At time t , the pose of an object has two terms : T T1 T2 1 translatio n vector , R 3 2 And T1 , T2 , T3 are translat ions 1 , 2 , 3 are rotation 3 1 1 T3 is the T 2 1 is the rotational matrix. 1 along X, Y, Z axes repectivel y, while angles around X, Y, Z axes respectively The object is in motion describe d by R,T . A point [X,Y , Z ] on the object wil l become a new 3 - D position [X',Y' , Z' ], where X i ' X i T1 Y ' R Y T i i 2 Z i ' Z i T3 The image projection qi u i ,vi of the new 3 - D position [X i',Y' i , Z i' ] is captured T by a camera of focal length f . The optical center [Ox,Oy] T [ 0,0 ] T . (a) Find u i , vi in terms of f , X i ,Yi ,Z i , T1 ,T2 T3 and 1 , 2 , 3 , (b) Find the partital derivaties of u i v and i . 2 T3 (c) Describe an iterative pose estimation algorithm for an obejct of known model points. Your answer should include the formulas and iterative procedures . (function) (d) Write the jacobian matrix formula (in terms of partial derivates only, e.g , ( variable) and no need to find the derivative results) for finding the pose of a knwon object wit h 4 feature points using an iterative pose estimation algorithm. 7) 2 2 An image I 2 2 2 2 2 2 2 2 1 2 2 2 2 2 1 1 1 0 1 1 and Pr ewitt _ x 1 0 1, Pr ewitt _ y 0 0 0 . 1 0 1 1 1 1 Find the edge image if we use Prewitt masks and the threshold is set to be 0.5. Show your calculation steps. (Consider cases only when the mask and image are fully overlapped). Revision exercises for CSMC5711 (Ver. 1,4b) Page 4 of 4 8) y 0 1 1 2 3 4 5 6 7 8 9 10 11 12 2 3 4 5 6 7 8 9 1 1 1 1 1 2 1 1 1 1 3 1 1 1 1 1 1 10 11 12 13 14 x As shown above, an object has pixels of gray levels 1 or above. The empty cells have gray level 0. A mean shift algorithm is applied to find the position of the object of size around 5x5 with gray level 1 or above. That means you need to find the centre of a 5x5 window covering pixels of the object. The initial window is centred at (x,y)=(4,5) as shown above. a) Describe the procedure of finding the object by a mean-shift algorithm. Find the location of the centre of the 5x5 box at each step of the mean-shift algorithm. Round off numbers to integers during your calculations. Note: 1-6 are exam questions of year 12-13 7-8 are exam questions of year 10-11