Image Based Stroke-Rate Detection System for Swim Race Analysis

Similar documents
Inter-analyst variability in swimming competition analysis

Impact Points and Their Effect on Trajectory in Soccer

Towards determining absolute velocity of freestyle swimming using 3-axis accelerometers

A Feedback System for the Motor Learning of Skills in Golf

Development of a Simulation Model for Swimming with Diving Fins

Video Based Accurate Step Counting for Treadmills

Non-invasive, spatio-temporal gait analysis for sprint running using a single camera

Effect of the Grip Angle on Off-Spin Bowling Performance Parameters, Analysed with a Smart Cricket Ball

WHAT CAN WE LEARN FROM COMPETITION ANALYSIS AT THE 1999 PAN PACIFIC SWIMMING CHAMPIONSHIPS?

Kinematic Differences between Set- and Jump-Shot Motions in Basketball

Swimming Stroke Mechanics

THe rip currents are very fast moving narrow channels,

SIMULTANEOUS RECORDINGS OF VELOCITY AND VIDEO DURING SWIMMING

Optimal Football Pressure as a Function of a Footballer s Physical Abilities

Competition Policy Regional and Club Meets

Traffic Parameter Methods for Surrogate Safety Comparative Study of Three Non-Intrusive Sensor Technologies

Jodi M. Cossor and Bruce R. Mason Australian lnstitute of Sport Biomechanics Department, Canberra, Australia

Using image processing for biomechanics measures in swimming

A COMPARISON OF SELECTED BIOMECHANICAL PARAMETERS OF FRONT ROW SPIKE BETWEEN SHORT SET AND HIGH SET BALL

Key words: biomechanics, injury, technique, measurement, strength, evaluation

Competitive Performance of Elite Olympic-Distance Triathletes: Reliability and Smallest Worthwhile Enhancement

Available online at ScienceDirect. Procedia Engineering 112 (2015 )

Open Research Online The Open University s repository of research publications and other research outputs

Saturday 2 nd March 2019 Stevenage Swimming Centre (St Georges Way, Stevenage, Hertfordshire, SG1 1XY)

Detecting and Sonifying Temporal Patterns of Body Segments When Batting

Real-Time Smoothness Measurements on Concrete Pavements During Construction

SWIMMING 2017 GENERAL RULES

Image-Based Measurement of Alveoli Volume Expansion in an Animal Model of a Diseased Lung

APPROACH RUN VELOCITIES OF FEMALE POLE VAULTERS

AQUATICS CENTRE JOHN CHARLES CENTRE FOR SPORT

AQUATICS CENTRE JOHN CHARLES CENTRE FOR SPORT

Inertial sensor, 3D and 2D assessment of stroke phases in freestyle swimming

Development of a New Performance Metric for Golf Clubs Using COR Maps and Impact Probability Data

Cricket umpire assistance and ball tracking system using a single smartphone camera

Recognition of Tennis Strokes using Key Postures

CSE 190a Project Report: Golf Club Head Tracking

University of Kassel Swim Start Research

Team Luton Swimming Club May Long Course Meet 2016

EXSC 408L Fall '03 Problem Set #2 Linear Motion. Linear Motion

Bristol North SC Junior Level 3 Open Meet Sept -17

Deakin Research Online

Activity profiles in adolescent netball: A combination of global positioning system technology and time-motion analysis

Hamilton Aquatics Development Series This competition is run under Hamilton Aquatics Promoters Conditions

2018/19 TYR SUPER SERIES LEVEL 2 SHORT COURSE OPEN MEET

Title: 4-Way-Stop Wait-Time Prediction Group members (1): David Held

Goodyear Safety Research Project 2008 Presentation by Competitive Measure at the FEI Eventing Safety Forum. Presented by Tim Deans and Martin Herbert

PSY201: Chapter 5: The Normal Curve and Standard Scores

Friction properties of the face of a hand-held tennis racket

Flow transients in multiphase pipelines

Analysis of stroke technique using acceleration sensor IC in freestyle swimming

An Overview of Mn/DOT s Pavement Condition Rating Procedures and Indices (March 27, 2003)

Video recording setup

Accelerometers: An Underutilized Resource in Sports Monitoring

COMPARISON STUDY BETWEEN THE EFFICIENY OF THE START TECHNIQUES IN THE ROMANIAN COMPETITIVE SWIMMING

Event Information and Entry Forms (All Session Times to Be Confirmed)

2016 Swimming Australia Grand Prix 1-2 July Brisbane, Australia

Effect on Bowling Performance Parameters When Intentionally Increasing the Spin Rate, Analysed with a Smart Cricket Ball

DX Summer Spectacular Sprint Meet

1. GOVERNING RULES & LAWS 1.1. This meet shall be conducted under ASA Laws and the FINA Technical Rules of Swimming.

Bicycle Safety Map System Based on Smartphone Aided Sensor Network

Simulation analysis of the influence of breathing on the performance in breaststroke

Available online at ScienceDirect. Energy Procedia 53 (2014 )

CALIBRATION OF THE PLATOON DISPERSION MODEL BY CONSIDERING THE IMPACT OF THE PERCENTAGE OF BUSES AT SIGNALIZED INTERSECTIONS

THE MANCHESTER OPEN MEET 2018

Comparison of Active Drag Using the MRT-Method and the MAD-System in Front Crawl Swimming

Northumberland & Durham Swimming Association 2019 Championships (under Swim England Laws & Technical Rules) MEET INFORMATION

Vibration Analysis and Test of Backup Roll in Temper Mill

An Overview of Mn/DOT s Pavement Condition Rating Procedures and Indices (September 2015)

IMAGE-BASED STUDY OF BREAKING AND BROKEN WAVE CHARACTERISTICS IN FRONT OF THE SEAWALL

RSKtools for Matlab processing RBR data

Opleiding Informatica

Validation of Measurements from a ZephIR Lidar

The effect of start block configuration and swimmer kinematics on starting performance in elite swimmers using the Omega OSB11 block

P.O.Box 43 Blindern, 0313 Oslo, Norway Tel.: , Fax: Statkraft,Postboks 200 Lilleaker, 0216 Oslo, Norway ABSTRACT

April Long Course Meet 2018

REPRESENTATION OF HUMAN GAIT TRAJECTORY THROUGH TEMPOROSPATIAL IMAGE MODELLING

Changes in speed and efficiency in the front crawl swimming technique at 100m track

Biomechanics and Models of Locomotion

PROGRAMME OF EVENTS. SATURDAY 6 th January 2018

Estimating energy expenditure during front crawl swimming using accelerometers

Autumn Level 3 Open Meet 2018

Assessment of an International Breaststroke Swimmer Using a Race Readiness Test

THE TECHNICAL ECONOMY INDEX: A tool for cyclic sports

A System Development for Creating Indoor Floor Plan of Walking Route using Video and Movement Data 1 2

Manchester International Swim Meet (MISM) 2017

NO FRILLS MEET THIS IS A LEVEL 1 LICENSED MEET FOR ENTRY INTO NATIONAL COMPETITIONS AND CHAMPIONSHIPS Licence No.

The Effects of Specific Drills on the Flip Turns of Freestyle Swimmers Based on a Kinesiology Analysis

(Affiliated to the Essex SE and London Region) RTSC Early County Qualifiers Meet 2018

Available online at Procedia Engineering 00 (2011) Field Measurements of Softball Player Swing Speed

Interface Pressure Mapping (IPM) Clinical Use of the Literature

Variable Face Milling to Normalize Putter Ball Speed and Maximize Forgiveness

March Long Course Meet 2019

Gravity wave effects on the calibration uncertainty of hydrometric current meters

BLACK LION LEVEL 3 SPRING OPEN MEET 2016

Millfield Pool (Long Course Level 1 Meet)

Northumberland & Durham Swimming Association 2019 Championships (under Swim England Laws & Technical Rules) MEET INFORMATION

THE MANCHESTER OPEN MEET 2018

Step Detection Algorithm For Accurate Distance Estimation Using Dynamic Step Length

Performance of Fully Automated 3D Cracking Survey with Pixel Accuracy based on Deep Learning

4. Learning Pedestrian Models

Transcription:

Proceedings Image Based Stroke-Rate Detection System for Swim Race Analysis Heather Driscoll 1, *, Chris Hudson 2, Marcus Dunn 2 and John Kelley 2 1 AMRC Training Centre, University of Sheffield, Rotherham S60 5BL, UK 2 Centre for Sports Engineering Research, Sheffield Hallam University, Sheffield S10 2LW, UK; c.hudson@shu.ac.uk (C.H.); m.dunn@shu.ac.uk (M.D.); j.kelley@shu.ac.uk (J.K.) * Correspondence: h.driscoll@sheffield.ac.uk; Tel.: +44-114-215-8085 Presented at the 12th Conference of the International Sports Engineering Association, Brisbane, Queensland, Australia, 26 29 March 2018. Published: 23 February 2018 Abstract: Swim race analysis systems often rely on manual digitization of recorded videos to obtain performance related metrics such as stroke-rate, stroke-length or swim velocity. Using imageprocessing algorithms, a stroke tagging system has been developed that can be used in competitive swimming environments. Test images from video footage of a women s 200 m medley race recorded at the 2012 Olympic Games, was segmented into regions of interest (ROI) consisting of individual lanes. Analysis of ROI indicated that the red component of the RGB color map corresponded well with the splash generated by the swimmer. Detected red values from the splash were filtered and a sine-fitting function applied; the frequency of which was used to estimate stroke-rate. Results were compared to manually identified parameters and demonstrated excellent agreement for all four disciplines. Future developments will look to improve the accuracy of the identification of swimmer position allowing swim velocity to be calculated. Keywords: swimming; image processing; performance analysis 1. Introduction Analysis of competitive swimming races provides much sought after data on the performance of athletes and their competitors. Performance parameters such as stroke-rate, stroke-length and swim velocity provide coaches with quantitative information allowing further discussion on the swimmer s strengths and weaknesses, effect of training implementations or success of race strategies [1]. Many elite swimming teams have dedicated sports analysts who film the races and later digitize to extract the required performance parameters. Filming positions are usually in the spectator stands, capturing an above-water view of the race [2]. Typically, the race analysis will be broken down into phases: start, turns, finish and clean swimming in between. The clean swimming phase is often the focus for performance parameters as the speed or time taken during the phase has been shown to have the highest correlation with overall race time [3]. Digistisation is required to extract performance parameters from video footage. This can be done manually using tagging systems; however, these methods can be time consuming and subject to user error. Digital image processing techniques can be used to automate the process, although, to date no fully automated swimming competition analysis system has been published. Pogalin et al. [4] developed an automated video-based system to measure swimmer lap times in training but it was not applicable to competition environments due to the number and positions of cameras required. Automated video-based systems have also been developed for drowning prevention applications using a variety of image processing techniques such as block-based models for background and foreground objects [5], Kalman filters [6] and classification of the temporal Proceedings 2018, 2, 286; doi:10.3390/proceedings2060286 www.mdpi.com/journal/proceedings

Proceedings 2018, 2, 286 2 of 6 variation in a pixel s color [7]. These techniques have potential to be used to track swimmers in competitive race environments but the complexity may lead to difficulties in implementation and long execution times to run. Collection of performance parameters during training rather than competition allows the use of alternative measurement techniques such as wireless accelerometers or inertial sensors [8 10]. These systems offer real-time feedback and valuable velocity data of the swimmers, but unfortunately are not able to be used in competitive environments. The aim of this research was to develop an automated stroke-rate detection system for use in competitive swimming environments. The system was required to work for all four swim disciplines: breaststroke, butterfly, backstroke and freestyle, using a single camera mounted in the spectator stands. 2. Method 2.1. Equipment and Data Collection Video footage was collected (with permission from British Swimming) at the 2012 Olympic Games using a Sony HDR-PJ260VE camera (1920 1080 pixels, 50 Hz, progressive scan). The camera was mounted at the highest point in the temporary seating stand of the London Aquatics Centre. The optical axis was approximately perpendicular to the swimming direction, 25 m along the long axis of the pool (Figure 1). The.MTS video files were converted to.png images using Avisynth and VirtualDub. MATLAB (2012a), image processing and statistics toolboxes were used for the analysis. Footage of a women s 200 m medley race was used for algorithm development and validation of the proposed system. 2.2. Image Processing Algorithm This section reports the image processing algorithm that was used to obtain the signal relating to the approximate position of the swimmer. The first stage of the algorithm was to segment the pool into regions of interest (ROI) consisting of individual lanes. This allowed either analysis of a single lane for computational efficiency, or the potential for multi-lane analysis. Further processes were then applied to identify the position of a swimmer along a lane. Analysis of the RGB color map used by MATLAB indicated that tracking the splash leading or trailing a swimmer was more reliable than attempting to identify the body of a swimmer. As such, the resulting signal relates only to the approximate location of the swimmer. A description of the processes used is outlined below. For this, and subsequent stages, a background image was required; this was an image of the pool in which no swimmers were in the water, the lane rope markers were undisturbed and the camera was located in the same position as used for race capture (Figure 1). Figure 1. Camera view of the pool with no swimmers in the water and lane rope markers undisturbed (background image).

Proceedings 2018, 2, 286 3 of 6 2.2.1. Stage 1: Lane Segmentation Aim: Generate image coordinates of ROI relating to lane rope boundaries. Method: The background image was masked and cropped to a trapezoid boundary defined by the corners of the swimming pool (manually identified by user). A perspective transform was applied to create an image of the pool in which the swimming lanes ran parallel to the horizontal and were equally spaced vertically. The number and width of the lanes were used to generate a coordinate matrix defining 11 horizontal points along the length of each lane. A reverse transformation was applied to convert the coordinate matrix back to the original image coordinate system. Polynomial lines were formed from the 11 evenly spaced points, defining the lane ropes; thus segmenting the pool into ROIs. Segmentation of the pool into ROI reduced the computational processes required to analyze a single swimmer (hence single lane and just one ROI) and provided the potential for multilane/swimmer analysis. 2.2.2. Stage 2: Swimmer Identification Aim: Provide an approximate location of the swimmer in the ROI and return a signal from which stroke parameters can be identified. Method: An image (1080 1920 array, three 8-bit pixels in the RGB color space) containing a swimmer during the butterfly stroke (at time of arms entering the water) was used for the initial algorithm development. This image was chosen as it contained both a splash event and the swimmer was visible out of the water. The RGB components of the image were viewed and results indicated that the water was predominately formed of the blue and green components. The red component (RGBr) formed a low percentage of the water composition, but increased in intensity around the swimmer, most notably in the region of splash at the feet and arms of the swimmer where the water appeared white instead of blue (Figure 2). No advantage in identifying the swimmer (or splash) location was seen by converting the image into alternative color spaces (e.g., HSV or L*a*b) and as such, RGBr was selected for further analysis. 300 Start of water Start of splash End of splash End of water Pixel intensity (0-255) 250 200 150 100 50 0 0 200 400 600 800 1000 1200 1400 1600 1800 2000 Pixel position along profile line Figure 2. Top: RGB profile along the center of lane 1. To reduce computation time, RGBr values along profile lines were analyzed rather than the complete intensity array from the whole ROI. Five profile lines were defined that ran parallel to the lane boundaries identified in stage 1. The lines were equally spaced about the center of the ROI, with a larger spacing at each lane rope to account for interference from lane rope markers or splash from adjacent swimmers. For the images used in this analysis, the profile lines had a spacing of four pixels (1/8th of the ROI). The RGBr values along the five profile lines were obtained for each image from the video as well as the background image. The background image RGBr values were subtracted to reduce the influence of consistent noise such as reflections or permanent objects in the water. Visually, a distinct peak of increased RGBr values was seen around the region of splash, but due to the unstable water surface, the signal contained a high level of noise that triggered false positives. A filtering stage was used to improve the likelihood of correct detection. The values from all five profile lines were sorted into ascending order and a threshold value was assigned at the 98th

Proceedings 2018, 2, 286 4 of 6 percentile. Each profile line was filtered and RGBr values below the threshold were set to zero. The mean of the filtered profile lines was calculated and the values sorted into ascending order. The 50th percentile was selected as a second threshold. Further filtering with the second threshold returned a group of values along the profile line, the position of which corresponded to the start and end of the splash. The position of both the first and last values from the filtered group were important due to the change in direction of the swimmer at each lap. Swimming left to right (with respect to camera view), the last value detected was the most reliable signal (relating to splash from arms) with the first value detected (foot splash) showing high variations in location. When the swimmer changed direction (right to left), the first value became the leading splash (from arms) and the more stable signal for tracking. The signal exported for further analysis contained three values: (1) pixel position along ROI relating to the first detected value and (2) last detected value; and (3) the magnitude of the RGBr value. 2.3. Signal Processing The second phase of the developed system was to use the signal generated from the image processing algorithm to obtain stroke parameters. The chosen parameter for validation was the stroke duration: the time from the start of one stroke cycle to the start of the next i.e., hand entry to hand entry (butterfly), right/left hand entry to right/left hand entry (backstroke and freestyle) or head breakout to head breakout (breaststroke). 2.3.1. Stage 3: Lap Segmentation Aim: Identify video frame number corresponding to the start and end of each lap. Method: The change in gradient on the plot of detected pixel position against frame number was used to segment the race into lanes. The difference between consecutive values of pixel position were calculated and filtered using a Boolean statement with the 90th percentile used as the threshold. The running mean of 100 consecutive values was then calculated and when the mean value was below 0.01, this identified the start of the lap; when the mean value rose above 0.01, this signaled the end of a lap. For the 200 m medley race, the signal was divided using this method into four data sets relating to each swim discipline. 2.3.2. Stage 4: Identification of Stroke Parameters Aim: Calculation of mean stroke duration for each lap of the race. Method: For the butterfly, backstroke and freestyle disciplines (lap 1, 2 and 4 respectively) the following signal processing steps were applied: 1. The raw pixel positions from stage 4 were filtered to remove values that may lead to false stroke identification: a. A linear polynomial regression line was calculated; b. If the pixel position was greater than the set threshold (default = 100) it was replaced with the value from the regression line; c. The filtered data was smoothed using a five-point moving average filter; 2. A five-step central differencing method was used to calculate the pseudo velocity of the swimmer; 3. The velocity signal was smoothed using a five-point moving average filter; 4. A sum of sine curve was fitted to the smoothed velocity signal (Figure 3); 5. The maxima of the sine curve signal were identified using the peakfinder function [11] and the corresponding frame numbers returned; 6. The difference between each maxima were calculated and the mean value obtained for each lap. A different approach was used for the breaststroke disciple; the long glide phase followed by a sudden splash as the arms and head break out from the water gave greater periodicity in the intensity of the splash than the pseudo velocity profile. The magnitude of the RGBr value was instead used as the signal. This was filtered using a five-point moving average and a sum of sine curve was fitted.

Proceedings 2018, 2, 286 5 of 6 Again, the maxima of the sine curve were identified and the mean of the difference calculated to obtain the stroke duration. Figure 3. Pseudo velocity signal for butterfly ( ). Stroke-rate detected using a sine-fit function ( ). 3. Validation This section outlines a practical example of the system used to analyze a women s 200 m medley race. The results were validated by comparison to manual identification of strokes based on the notational analysis method used by performance analysts (Table 1). Only the clean swim phase of each lap was considered. Table 1. Comparison between manual and automated stroke rate parameters (mean and standard deviation of stroke duration, number of strokes counted and corresponding stroke-rate). Discipline Manual Analysis Developed System 1.25 ± 0.09 s 1.23 ± 0.09 s Butterfly N = 14 N = 15 48 stroke min 1 49 stroke min 1 Backstroke * Breaststroke Freestyle * 1.50 ± 0.09 s 1.50 ± 0.01 s N = 28 N = 28 40 stroke min 1 40 stroke min 1 1.49 ± 0.05 s 1.50 ± 0.01 s N = 14 N = 14 40 stroke min 1 40 stroke min 1 1.41 ± 0.04 s 1.42 ± 0.01 s N = 19 N = 21 43 stroke min 1 42 stroke min 1 * Half strokes were detected and values multiplied by two to give full stroke information. N = number of strokes. A maximum difference of 0.02 s (one frame at 50 fps) was observed between the manual digitization method and the developed system. An accuracy of ±1 frame was considered to demonstrate excellent agreement between the two measures (no significance in t-test). For the freestyle lap, the developed system was not able to detect two strokes; it is likely these occurred near the turn or finish of the race. The developed system for the butterfly lap detected an additional stroke. This is thought to be an artifact of applying the sine-fitting function. 4. Conclusions The proposed system used a single camera that was positioned in the spectator stands. The system consisted of two developed processing algorithms for the image and signal. The RGB values along the profile lines were obtained. RGBr values were filtered and taken forward to the signal processing stage of the system. From the approximated swimmer position, a five-step central differencing method was used to calculate the pseudo velocity of the swimmer. In future developments of the system, it would be interesting to compare the obtained velocity profile with data from wireless inertial sensors. The velocity profile obtained was periodic and clear peaks were

Proceedings 2018, 2, 286 6 of 6 observed that correlated with the individual swimming strokes. A sine-fitting function was used to quantify the location of the peaks, from which the frequency was used to define stroke-duration and thus, stroke-rate. The following limitations of the system were noted: Taking the mean of the stroke-rate and duration during the clean swimming phase prevents the ability to detect changes in stroke parameters during the lap. Changes in the background have not be modelled; instead careful positioning of the profile lines to avoid problematic regions such as lane rope markers was used. This would therefore not be appropriate to track swimmers adjacent to the lane ropes. The current system is not suitable for near real-time analysis; this could be improved by using alternative programming environments. The robustness of the system has not been fully tested. A 200 m women s medley race was used for development. It is not known whether this system would be able to detect faster rate events such as the men s 50 m freestyle or longer distance events such as 200 m breaststroke or 1500 m freestyle. These events are likely to generate the extremes of splash. The developed system was able to detect periodic motion from a single camera view of a swimming pool. It is thought that the algorithms developed have the potential to be used to detect performance parameters from other periodic sports such as cycling or rowing. Acknowledgments: Original research funded by the Ideas4Innovation Garage Award 2011. Conflicts of Interest: The authors declare no conflict of interest. The funding sponsors had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, and in the decision to publish the results. References 1. Smith, D.J.; Norris, S.R.; Hogg, J.M. Performance evaluation of swimmers: Scientific tools. Sports Med. 2002, 32, 539 554. 2. Hudson, C. Automated Tracking of Swimmers in the Clean Swimming Phase of a Race. Ph.D. Thesis, Sheffield Hallam University, Sheffield, UK, 2015. 3. Thompson, K.G.; Haljand, R.; MacLaren D.P. An analysis of selected kinematic variables in national and elite male and female 100 m and 200 m breaststroke swimmers. J. Sport Sci. 2000, 18, 421 431. 4. Pogalin, E.; Thean, A.; Baan, J.; Schipper, N.W.; Smeulders, A.W.M. Video-based training registration for swimmers. Int. J. Comput. Sci. Sport 2007, 6, 4 17. 5. Eng, H.-L.; Toh, K.-A.; Kam, A.H.; Wang, J. An automated drowning detection surveillance system for challenging outdoor pool environments. In Proceedings of the Ninth IEEE International Conference on Computer Vision, Nice, France, 13 16 October 2003; pp. 532 539. 6. Lu, W.; Tan Y.P.T. A vision-based approach to early detection of drowning incidents in swimming pools. IEEE Trans. Circ. Syst. Video Technol. 2004, 14, 159 178. 7. Wang, J.; Eng, H.-L.; Kam, A.H.; Yau, W.-Y. Integrating color and motion to enhance human detection within aquatic environment. In Proceedings of the IEEE International Conference on Multimedia and Expo, Taipei, Taiwan, 20 27 June 2004; pp. 1179 1182. 8. Le Sage, T.; Bindel, A.; Conway, P.P.; Justham, L.M.; Slawson, S.E.; West, A.A. Embedded programming and real-time signal processing of swimming strokes. Sports Eng. 2011, 14, 1 14. 9. Stamm, A.; James, D.; Thiel, D. Velocity profiling using inertial sensors for freestyle swimming. Sports Eng. 2013, 16, 1 11. 10. Zhao, Y.; Gerhard, D.; Barden, J. Periodicity-based swimming performance feature extraction and parameter estimation. Sports Eng. 2015, 18, 177 189. 11. Yoder, N. Peakfinder. In MATLAB Central File Exchange; 2016. 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).