Page 49 - MSDN Magazine, November 2018
P. 49

Figure 6 Charts for Flexion Angle During the Dive
the sensor. The details of this implementation are discussed further in the code sample available on GitHub at bit.ly/2IjjkUO.
Tracking Diver in Flight Computer vision is also used to deter- mine the exact moment when the diver leaves the board. A simple technique called optical flow, often used in object tracking, pro- vides information on the directionality and velocity of a selected point from one image to another. We used the Lucas-Kanade Optical Flow algorithm to determine the time the diver jumps off the board, as well as to determine the speed and the height of the jump. This video-motion analysis (as shown in Figure 7) gives coaches the ability to grasp more insight from each dive.
Youcangetthesourcecodeformovementtrackingatbit.ly/2QduA7X. Initially, we specify the source video file for our capture:
cap = cv2.VideoCapture("YOUR-VIDEO-FILE.MP4")
Once the file is selected, we prompt the user to select a point in the initial video image to be tracked. With this selected, we call
the calcOpticalFlowPyrLK method from OpenCV, which cal- culates an optical flow for a sparse feature set using the iterative Lucas-Kanade method, as shown in Figure 8.
Wrapping Up
The goal is for this solution to be easy to use for coaches and invis- ible to divers. These attributes will allow integration into routine training sessions and make it a standard coaching tool, much the way video playback has been over the past two decades. Coaches will be able to assess the quality of the diver’s takeoff by analyzing key metrics:
• Time in the air during the hurdle indicates how much potential energy is available to the dive.
• Amount of board flexion indicates how effectively the diver has “loaded the springboard” to launch them into the air.
• Time on the board indicates how well the diver rides the
flexed springboard and takes advantage of its energy, converting it into height and spin at takeoff.
The benefits of our combined sensor and video approach are clear. From sensors, we gather imme- diate insight into important takeoff characteristics, allowing coaches to correct technique. Tracking per- formance indicators over time also allows assessment of changes in diver takeoffs historically and tracks the progress. This feedback loop can act as a powerful incentive for divers to improve their takeoff metrics at each practice, yielding more height and, thus, more time to complete each dive.
The ultimate goal of the project is to provide more detailed knowledge about takeoff and dive biome- chanics for our elite U.S. divers, so they can achieve
November 2018 43
Figure 7 Tracking Diver Movement in the Air with Video-Motion Analysis msdnmagazine.com


































































































   47   48   49   50   51