1 2D and 3D Motion Analysis Shadie Broumandi December 2013 In this project we will focus on the 2D motion analysis in sport activities. We are going to do some measurements to analyze an athlete’s movements on a rowing machine. The aim is to measure the distance of the handle of the rowing machine and its speed. On the other hand, we are going to measure the angle between his shoulders and knees at the hip point. We choose the video with the proper megapixel of: Frame width (1280), Frame height (720) and Frame rate of (29 frames/second). We then cut the part of the video (10 second out of 3.51 min) which is a complete scene from start to end of the movement with windows live movie maker. Next, we select a frame from the start of the movement for “Frame 1” and the end of the movement for “Frame 2”. After that, we assign some points on each frame and name them as below:  A: The handle of the rowing machine.  B: The Base point – It is the point that the cable is connected to the machine and it doesn’t have any movement.  H: Athlete’s Hip.  S: Athlete’s Shoulder  N: Athlete’s Knees  M: End of the rowing machine  N: Head of the rowing machine 2  For our assigned points used in “Frame 1” we are choosing index “1” after our letters to refer to the corresponding frame and index “2” after letters for frame two. Video Frame 1 - Start Video Frame 2 - End 3 Calculating the Angles In this part we will calculate the angle between the athlete’s shoulders and knees at the hip point in both video frames hence we form a triangle with these 3 points. To calculate the angles of the triangle HSK, we measure each side length. In order to measure them, we took the coordinates of points H1, S1 and K1 in “Frame 1”, then H2, S2 and K2 in “Frame 2” and put them in the formula [1]: Formula [1]: After finding the lengths, we will calculate the angles using the formulas [2] and [3]: Formula [2]: Formula [3]: We named each angle corresponding to its corner point’s name: Video Frame 1 Video Frame 2 h1 = angle at the point H1 h2 = angle at the point H2 s1 = angle at the point S1 s2 = angle at the point S2 k1 = angle at the point K1 k2 = angle at the point K2 The following charts show the calculation of angles in “Frame 1” and “Frame 2”. In each chart you will find our given data (inputs) in red color and the calculated data based on the formulas in black (outputs). 4 Calculation of Angles in Video Frame 1 Point 1 (H1) Point 3 (K1) Point 1 (H1) x1 285 x1 389 x1 285 y1 297 y1 223 y1 297 Point 2 (S1) Point 2 (S1) Point 3 (K1) x2 321 x2 321 x2 389 y2 174 y2 174 y2 223 Length 128.16 Length 83.82 Length 127.64 cos s1 = 0.333 cos h1 = 0.785 cos k1 = 0.322 s1 = 70.54 h1 = 38.25 k1 = 71.21 Control s1+h1+k1 = 180.00 Calculation of Angles in Video Frame 2 Point 1 (H2) Point 3 (K2) Point 1 (H2) x1 143 x1 244 x1 143 y1 297 y1 300 y1 297 Point 2 (S2) Point 2 (S2) Point 3 (K2) x2 36 x2 36 x2 244 y2 181 y2 181 y2 300 Length 157.81 Length 239.64 Length 101.04 cos s2 = 0.954 cos h2 = -0.700 cos k2 = 0.882 s2 = 17.54 h2 = 134.39 k2 = 28.07 Control s2+h2+k2 = 180.00 As we have shown in the above charts, the athlete has started his movement in the hip angle of 38.25º and has finished in 134.39º. Then the rotation in hip point from start to end will be: 134.39º - 38.25º = 96.14 º 5 Final Distance and Speed In order to measure the movement of the handle from the point “A1” in “Frame 1” to the point “A2” in “Frame 2”, we needed a base point in each frame, because there is a little camera movement in the video. We considered calibrating each frame dimensions separately to get a better result to cover the movement of the camera. We assigned the points “B1” and “B2” in each frame as a base point and measured the distance between “A1” and “B1” in “Frame 1” and “A2” and “B2” in “Frame 2”. The difference between the length of (A1B1) and (A2B2) will be the movement of the handle of the rowing machine (Distance). As we needed a calibration in each frame, we assigned the overall length of the rower machine as a constant value for calibration. The rowing machine in our video is “Concept 2 – Model D” according to official website of its producer1 , and it overall length is 2.44 meters. After finding the coordinates of all points in both frames in the similar manner by using formula [1], we calculate the distances. The following charts show the calculations: Calculation of Distances in Video Frame 1 Coordinates x y Point1 (A1) 560 249 Point2 (B1) 584 251 d1= 24.1 pixel 9.3 cm 1 pixel = 0.38731818 cm Calibration Coordinates x y Point1 (M1) 106 313 Point2 (N1) 731 392 D1= 630.0 pixel 244 cm 6 Calculation of Distances in Video Frame 2 Coordinates x y Point1 (A2) 146 204 Point2 (B2) 600 256 d2= 457.0 pixel 177.0 cm 1 pixel = 0.38731818 cm calibration Coordinates x y Point1 (M2) 106 313 Point2 (N2) 731 392 D2= 630.0 pixel 244 cm To calculate the speed of the handle, we need duration and distances from “Frame 1” to “Frame 2”. Time at starting point is 4.30 seconds and at the end is 5.20 seconds. The difference in time between frame 2 and frame 1 will be the duration of the movement in seconds. Movement is the difference between “d1” and “d2” where “d1” and “d2” are distances between the handle and the base point in frames 1 and 2. Finally we calculate the speed by dividing the final distance to duration time. The calculations are as the followings: Time in Frame 1 = 4.30 s Duration = 0.90 s Time in Frame 2 = 5.20 s d1 ( Frame 1 ) = 9.3 cm Final Distance = 167.7 cm = 1.677 m d2 ( Frame 2 ) = 177.0 cm v = s / t Speed = 1.863 m/s 1 http://www.concept2.com/indoor-rowers/model-d