Selecting a Video Format to Support Teaching of Swimming

A computer application that supports the teaching and learning of sporting techniques is presented. It was developed as a tool to assist sports trainers in identifying, analyzing, relating, and evaluating the learning of sporting techniques. At times trainers fail to visualize all the details of an athlete's technical gestures, mainly because of the speed of the movements. Based on this concept of observational method, the developed software is simple to use and includes digital videos in a natural form for trainers who are not computer experts. To select an adequate video format for analyzing sporting techniques, compression tests and video compression with different codecs were made. Once the format had been chosen, its compression was tested at different video qualities with the selected codec. To verify the functionalities of the developed tool, the chosen sport was swimming. The results obtained with the tool had excellent usability, since most of the functions were mastered without problems by the trainers.


Introduction
According to the study of Kurz et al. (2009) they say "with the increase and ease of technology use in our schools and classrooms, video cases have been created as a constructive component to enhance instruction and learning by integrating multiple themes and approaches to support teacher development".The findings of the research published by Moreno and Ortegano-Layne (2008) support an experimental theory of learning by showing that presentation of visual classroom exemplars (videos and animations) helped athlete´s apply theoretical principles to practice.The potential for quality education has increased with the appearance of innovative teaching methods that use multimedia equipment and resources (Baca et al. 2005).The use of computational tools to support teaching is an important factor to improve the learning of sporting techniques (Arellano 2003).In this relation, the development of multimedia applications represents an important advance in the discipline of "computer science in sport" (Baca et al. 2006).It allows the teacher or trainer (from now on the trainer) to "show" and present sporting techniques, compare their application, teach how to improve them, explain step by step the different phases of a technique, present their action and effect, etc.A multimedia application is an excelent presentation tool in the theoretical teaching sessions of any sport, but it does not provide feedback to verify the degree of learning progress.A computational tool based on the method of observation and supported by technology to provide visual feedback can facilitate the analysis of the techniques for improving the teaching and learning of the techniques.The teacher can apply all his (her) knowledge when using this kind of tool to analyze and facilitate the teaching of the techniques.With this tool a teacher can: • Observe sporting techniques in alternative ways.
• Verify the degree of progress and the improvement in the athlete's (or student's) achievements (from now on the athlete).• Compare the application of an athlete's technique over time.
• Compare the techniques of different athletes.
• Visualize errors and suggest corrective exercises.
• Guide the application of the correct technical gesture.
• Make quantitative measurements such as speed, angles, distance, time, and frequency.
• Make a qualitative analysis to verify the correct posture for the movements.
• Reproduce a technique at a lower speed to analyze carefully every detail of the technique.
• Establish points of reference in the techniques making a detailed analysis of the chosen point to facilitate the detection of possible errors in the application of the technique.On the other hand, for the athlete it is a motivating element to see himself (herself) and verify his (her) own sporting movements.The tool presented in this article, called Sportware, is focused on a product for trainers of all sports and is oriented at athletes of all levels, beginners, amateurs, middle and advanced, children, and third age.Sportware provides automatically the parameters of interest in each sport, is simple to use, and does not require special servers or specialized configurations.To obtain a tool with the characteristics mentioned above, use was made of a software development methodology whose stages are analysis, system and object design, and implementation.This methodology provided a tool that can be used in all sports, but with the purpose of experimenting with it and validating it, swimming was chosen as the testing sport.However, the design of the tool allows the incorporation of any sport, being the most interesting contribution.At the same time as Sportware was developed, recordings were made of the swimmers with a video camera to: • Make compression tests of the videos using different codecs and selecting the proper codec for use as a medium in a computer system for sports analysis.• Obtain testing videos of swimming techniques.
• Generate a recording protocol as a trainer's guide to make recordings of the techniques and later analyze them with the tool.The protocol is presented in Appendix 1.The theoretical foundations of the science of sport, of techniques, and indices of swimming are mentioned in section "State of the Art".Section "The Video Camera as a Means of Analysis" presents the basics of digital video as a means of analysis, showing the results and the tests made to choose the digital format and the compression level of the digital video.Section "Development of the Software" describes the steps for the construction of the software, the engineering for setting the requirements, the functional requirements, use cases, tasks and operations, and specification of the user interface, as well as describes the tests and the results obtained.Finally, the conclusions and future work are presented.

State of the Art
Some examples of tools that facilitate learning sporting techniques are X-Training Olympics (2009), Video STAT 2.0 (2009), Dartfish (2009), andNational Instruments Vision (2009), among others (Wilson 2008).Briefly, their main characteristics are the following:  (2009) there is a detailed analysis of the available products and their descriptions.

The Science of Sport
Sports involve a set of techniques and strategies.Each sporting technique requires the correct application of a technical gesture that must be repeated until it becomes an integral technique of the athlete.Efficiency in the integral technique is achieved when the technical gesture is made, achieving a sporting motor performance.Once the sporting techniques have been mastered, the strategies to improve the overall sporting performance can be applied successfully.The trainer teaches the sporting techniques analyzing them mainly with his (her) sight, but techniques involving fast movements or hindered movements do not allow a detailed quantitative and qualitative analysis to improve the athlete's technique.Sport is a set of body movements, called the technical gesture, which are the actions that are executed in the strategies to achieve a given end.The techniques are classified according to the objetive to be achieved (Seirul-lo 1987): • Speed or acceleration: the technique must generate great speed and acceleration in the athlete, while resistance to the movement is secondary.• Resistance: the technique must guarantee the proper performance in a given time, while the speed of the movement is secondary.The techniques can also be classified according to the speed of the movement: • Slow: techniques that do not require great speed (e.g., passing or blocking in basketball, receiving in volleyball).
• Fast: techniques in which speed is required, e.g., somersaults in gymnastics or serving in tennis.Swimming is the art of supporting oneself and advancing, coordinating the movements of arms and legs, on or under the water.The four basic techniques in swimming are the crawl, back, breast, and butterfly strokes, whose leg and arm movements require the coordination of slow and fast stages.For example, crawl is the technique that generates the fastest speed.Mastering it requires coordination of the movement that will allow breathing.The movement of the legs is alternate.The movement of the arms consists of a propulsive stage (aquatic) and a recovery stage which is aerial.

Studies of Swimming
According to the literature, studies have been made of indices for estimating the performance of swimmers.Vorontsov and Binevsky (2002) studied the dynamics of stroke frequency, stroke amplitude, and swimming speed during swimming 100m free stroke in 11 to 16 year-old swimmers.They made recordings with a video camera set on a cart moving along with the swimmer over the whole swim.The recordings with the electronic time registers were processed calculating the "pure" swimming speed in 4 sections of the 100m together with the frequency and amplitude for every length of "pure" swim (Toussaint et al. 2006). Thomson et al. (2000) made a similar study, but observing kinematic variables for different swimming distances.Dodson (2009) shows that the swimmers must be taught to improve the amplitude of the stroke in view of its high correlation with speed and efficiency in swimming.This study was made for swimmers of all ages and levels.Rushall et al. (1998) made studies of the relative angle of the body and the central axis of the head with the horizontal plane, suggesting ideas to improve performance.Alberty et al. (2008) analyzed arm coordination in the stroke stages in crawl, determining that the swimmers must have compensating mechanisms to keep their speed.In general, the main indicators of a swimmer's performance that must be considered when developing a computer application to analyze the techniques are swimming speed, cycle frequency, and cycle length.

Swimming speed (v):
This traditional indicator in swimming is defined as the distance (d) in meters divided by the time (t) in seconds it takes the swimmer to cover distance d (Eq.1).v = d/t (Eq. 1) Cycle frequency (SR) (or stroke rate): Cyclic techniques in swimming are defined as the "times a cycle occurs in a given unit of time."One swimming cycle can be considered as the time between the instant one arm goes into the water and the instant that same arm goes again into the water.There are instruments for measuring the cycle, among them the frequency meter, in base three or four, which calculates the formula of Equation 2, where S is the number of strokes completed by the swimmer in time t.In swimming the number of cycles per minute is used.It is possible to calculate the frequency by counting the number of cycles completed by the swimmer in a given time, or by timing a given number of cycles to apply Equation 2. SR = (S/t)*60 (Eq.2) Cycle length (SL) (also stroke amplitude): It corresponds to the distance that the swimmer's body is displaced in an arm cycle, normally in meters per cycle (Equation 3).According to the studies this indicator has a high correlation with anthropometric variables, since the greater it is and with the same stroke efficiency, the greater the cycle length.SL = d /S (Eq. 3)

The Video Camera as a Means of Analysis
A video is a set of images (a picture consisting of pixels in a given number of colors) which change at a given image per second rate.The quality of the videos depends on three different resolutions: • image resolution in pixels (N pixels high by M pixels wide); • time resolution, usually expressed as frames per second (fps); and • color depth, which is the radiometric resolution that determines how finely a system can represent or distinguish differences of intensity, and is usually expressed as a number of bits (depth).The higher the radiometric resolution, the better subtle intensity differences can be represented.
The data flow (DF) that must be processed when a video is reproduced on a computer is the number of pixels of the video in one second (Equation 4).DF = N(pixels)*M(pixels)*depth(bits)*fps (Eq.4) On the other hand, videos require a large amount of memory for storing.For example, applying Equation 5 to a twohour video (t in seconds) with a depth of 24 bits (16 million colors), size 720x480 pixels at 30 fps requires 208.5 GB of memory space.This is the reason why it is necessary to work with formats that use algorithms (with or without loss) to compress the information, thereby occupying less memory space.
Transmitting a losslessly compressed 800x600 24-bit color image over a 56 kbps connection will require about 60 seconds.Even with increased bandwidth, transmitting large images such as pictures captured by digital cameras is still relatively slow.Experiments have shown that if the delay is too long (> 5-10 sec), the user will feel nervous and even give up (Hu et al. 2004).A disadvantage of compression with loss is a reduction in image quality.
The different video formats have their own compression and decompression algorithms, which are located in a program called codec.

Selection of the video format and of the codec
Sporting techniques vary: from some with few body movements to others with movements of the whole body; from some that are slow to others that are very fast.The studies show that the closer to the ideal technical gesture the movement made by the athlete, the greater the probability of achieving a good performance (Seirul-lo 1987).Sportware allows the trainer to visualize fully the technical gesture to analyze the techniques in which he (she) is or is not capable of observing the athlete's movement with his (her) senses, mainly his (her) sight.
Trainers normally use videos to analyze the techniques, so Sportware does not impose a new paradigm because it uses elements with which they have already worked, and it is rather one more reason to accept it.Sportware uses digital video as input, since it allows: • Reproducing the technique at different speeds, without losing details of the athlete's movements.
• Visualizing the techniques in a format familiar to the trainer because of its similarity with DVD.Since there is a large diversity of digital video formats, the one most appropriate for use in sports must be chosen correctly.A basic characteristic of the format to be used is that it must be highly compressible without losing important details in reproduction, beside doing it at an adequate speed.The following criteria were used to select the format: • Image quality: Compression algorithms with loss due to their high effectiveness in compression must be used (algorithms without loss have a low compression ratio), so the original image quality will not be retained.The final image quality after the compression must remain within a reasonable quality range, so visual tests must be made.
• Time used for compression: Compression requires long processing time, so the codec that takes less time will have an advantage over others.• Format compatibility: Compatibility is the ability to reproduce the format on a standard computer without the need to buy/install/configure a special program.• Future of the format: Verify how widespread is the format, what is its projected expected life, and what is its probability of disappearing or becoming obsolete.The compression tests made with the different codecs considered the size of the video, the data flow, and the codec itself.All the tests were made with a video captured by a digital camera to analyze the quality of the video format in relation to the final video image and the time taken for compression.The specifications of the test video are given in Table 1.The formats that were analyzed are DIVX, XVID, MPEG, and WMV (Table 2).They were evaluated at a flow rate of 2000 kbps (DF), at which all the codecs showed equal quality.The differences exist at flow rates of 1000 kbps and 500 kbps.Table 2 shows the codecs used for compressing.The size in KB of the video file after compression (Size) is shown in the first column, followed by the data flow (DF) in kbps at which the video is compressed, the time in seconds for compressing the video (Compression time), and the image Quality after the compression, identified as follows: • Poor (P): In some part of the video the athlete cannot be distinguished because the image is blurred or the athlete cannot be distinguished from the background.• Medium (M): In some part of the video the athlete cannot be distinguished.
• Good (G): The athlete can be distinguished well from the background.
• Excellent (E): The athlete can be distinguished well from the background, and also details such as, in the case of swimming, the fingers, the hands, or elements of the technique like water drops that are splashed.From the tests, and considering compression time and image quality, it is seen that the WMV (Windows Media Video) codec has advantages over the other codecs.As to compatibility, WMV is the Microsoft format, so a computer operating on Windows has the codec required to reproduce the video already installed.To reproduce other video formats the corresponding codec would have to be installed.Finally, to choose definitely the WMV format, it can be mentioned that it was standardized under the name VC-1, and has been adopted as the codec of the digital video media Blu-Ray and HD-DVD.

Choice of data flow
The chosen codec was subjected to tests to determine the adequate data flow balance without harming image quality.Image quality must allow fast and slow movement techniques to be analyzed, and on the other hand minimize file size to store the greatest number of minutes recorded.Table 3 shows the tests made with data flows from 500 kbps to 1500 kbps with two videos: one with fast movements and the other with slow movements.The videos with slow or almost no movement have high compression, because the images look much alike.The greater the movement the lower the compression.A movement is considered fast when the athlete applies a technique that is considered fast or when the take is dynamic.On the contrary, a movement is slow when the technique used by the athlete is considered slow and the take is static (see Appendix 1).In Table 3 the Quality uses the same concepts described for Table 2 as Poor (P), Medium (M), Good (G) and Excellent (E).The columns "With Sunlight" and "Without Sunlight" mean that the video recording was made outdoors (with sunlight) or indoors (without sunlight).
Analyzing the results of Table 3, it was decided to use three compression options: • Normal: With a data flow of 700 kbps, quality focused on slow movement techniques, mainly with takes with a static camera.
• Good: With a data flow of 1,100 kbps, quality focused on techniques with all kinds of movements, but recommended for sports in daylight as well as for takes with a static camera.
• Excellent: With a data flow of 1,300 kbps, quality focused on techniques with all kinds of movements, regardless of whether it is indoors (without sunlight) or outdoors (with sunlight), or whether the take is static or dynamic.

Development of the Software
One of the characteristics that a computer application must have is the ability to incorporate new elements or functionalities.Sportware was designed for all sports.The implementation presented here is applied to swimming, but it can be incorporated easily to other sports, being this the most interesting contribution of this work.
Requirements analysis was done by techniques proposed by Cubillos ( 2007), avoiding misunderstandings in the specifications.To understand the problem, interviews were used as the technique for requirements analysis.Once the requirements were understood, the storyboard technique (Solar et al. 2000) was used, and it was completed or modified by the trainers, making it possible to: • Verify if the requirements are well established.
• Have feedback on how the system should interact with the user.
• Have a guide to generate graphic interfaces whose use is not complex.The next stage was the creation of use cases to identify the tasks and the operations extracted from requirements analysis, and then continue with the process of creating the program.Once the system has been implemented those use cases are used as test cases.
After the getting requirements cycle the prototypes technique was used to develop the interfaces created based on the required functionalities, the use cases, and the storyboards, achieving the confirmation of the requirements and starting the specifications stage.
The functional requirements identified are: Handling athletes: The system allows entering the athletes and their data that are considered indispensable to identify them and provide the possibility of including the athlete's complementary data specific for each sport.
The system allows the removal of athletes.

Analysis of techniques:
The system provides tools for the analysis of sporting techniques.The analysis of the technique can be qualitative or quantitative, or both.With respect to quantitative analysis, it can make an analysis of indicators belonging to the sport that makes it possible to visualize the athlete's progress in his (her) discipline.In this article the reported sport is swimming, and the indicators analyzed by Sportware are: swimming time, cycle frequency (stroke), swimming speed, and stroke length, according to the equations 1, 2, and 3. On the other hand, the objective of the qualitative analysis is to correct the technical gesture executed by the athlete when practicing the technique.Sportware provides tools that can detect and visualize the movement made by the athlete, regardless of the speed of the technique.Sportware has tools in colors chosen by the user to mark or indicate errors in the movement; they are lines, rectangles, ellipses, angles, and zoom.Another tool is an eraser to delete the marks that have been made.

Saving, opening and modifying analysis:
The analysis made by the trainer can be: • Temporary, or both the qualitative and quantitative analyses can be stored.
• Opened, if it has been saved earlier to compare the techniques at different times and verify learning progress.
• Recovered, and either the quantitative or qualitative analysis can be modified to complete the analysis.
Printing the analysis: The analysis made is saved in the trainer's or the sports institution's computer, so it is necessary to give the printed analysis to the athlete so that he (she) can see what needs improvement.
Comparing techniques: Once the analyses of the athlete's techniques have been saved, they can be compared with analyses of the same athlete or analyses of other athletes.Showing theories or advice for carrying out the techniques: Sportware has the option of showing how to carry out the techniques of the sport whose analysis is being made, as a guide to the trainer.
Graphing the results of the analysis: With all the data obtained from the analyses, the progress made by the athlete can be graphed.The graph has as its x coordinate the date of the analysis versus the specific indicators of each sport.To compare the indicators, two graphs can be superimposed.

Tests of the Software
Black box tests: Each function was tested to verify if its functionality agreed with the specifications.These tests were made over the software interfaces.The cases of the use of getting requirements provide the guidelines of what the system must do, and they were used as test cases in this stage.After evaluation, all the functions operated correctly.

White box tests:
To guarantee that the internal operation of the software agrees with the specifications, the procedures were examined, checking the software's logical paths: o A follow-up of the code was made to verify its correct logical operation.o The code is commented to facilitate access by other programmers who may want to modify it or verify it.o The code was cleaned, removing any variable or function that is not used in the application.
Usability tests: This test consisted in using the system to quantify its usability.For that purpose, trainers that were not acquainted with Sportware carried out the test cases, measuring the time it took them to do it (Table 4).The user takes some time to remember, but does it.

Print Analysis
The user had no problem, it is just pressing a button.

Show Theory
The user had no problem, it is just pressing a button. 2 Make Quantitative Analysis The user had no major problem, it took him some time to perform the case exactly, but remembers how to do it.

Make Qualitative Analysis
The user had no major problem, but the analysis procedure requires many steps.It depends on skill with peripherals.

Graph
The user had minor problems, but with an oral explanation he was able to carry out the task with no problems.

4
Before performing the test they were given an explanation on how to use the program, and then they used it according to the interfaces shown in Figure 1 and 2. From the results shown in Table 4, Sportware had good usability, since most of the functions were mastered without problems by the users after showing them their operation once.For those functions on which there were some doubts, an oral explanation was sufficient for using them.

Video Analysis of the Sporting Techniques
An important factor in the physical performance of an athlete is mechanical efficiency.Energy saving is based on more efficient execution, so correcting each movement by the trainer in training sessions is fundamental for improving mechanical efficiency.This correction and analysis is usually made by the trainer viewing an image over a short time, and that has a different significance in each individual.Therefore, retention of that image in the trainer's memory is difficult, and important points are probably omitted.Sportware reduces these difficulties considerably, and it is very useful to the trainer to correct and evaluate the sporting techniques.Analysis of the sporting techniques is based not only on subjective observations and the experience of the trainer's eyesight, but it has objective indicators like the quantification (stroke frequency and length, angles of the body segments) as well as the qualification (slow motion, frame by frame, and image superposition) of the sporting technique.
Another advantage of Sportware in the control of the technique is the reduction of the time to get data for their later analysis.Table 5 shows a comparison of getting parameters with and without Sportware.One of Sportware's most significant advantages is that it replaces slow manual stroke counting by the trainer's in vitro observation.

Conclusions and Future Work
Sportware offers a number of tools that make it possible to identify, analyze, relate, and evaluate the learning and improvement of the sporting techniques in swimming.
The chosen video format allows a correct visualization of sporting images, without blurred zones, and with low compression time.
• Recording with static camera: Oriented mainly at the analysis of techniques with little or no displacement.The camera should be placed on a horizontal surface (preferably a tripod).Before starting the recording, frame the part of the body that you want to analyze in the center of the viewer (it can be with zoom) and leave a 30% margin on the four sides of the image.Once the recording is started do not change the framing.• Recording with a moving camera: Oriented at techniques that involve displacement.It consists in keeping the athlete at all times within the same recording angle.The athlete is recorded following him (her) parallel to his (her) displacement at a fixed distance that depends on the sport that is analyzed (in general, four meters is a recommended distance).After framing the image as in the previous case, when the recording is started the camera must only be displaced.Ideally, the camera should be mounted on rails, to avoid movements that would deteriorate the quality of the recording.If no system is available for the displacement (rails), it can be simulated by walking next to the athlete, trying to avoid the movements caused by walking.
In the case of swimming, the recording should be made from different angles to make a complete analysis.
Recording from the side allows quantitative analysis to be made.For the qualitative analysis it is recommended to record at least from the side, the front, and below as detailed in what follows (a complete qualitative analysis requires a take from above): • From the side: For qualitative and quantitative analysis a moving camera is used for a level take, keeping it parallel to the athlete's displacement at a distance of four to five meters.• From the front: Used mainly for qualitative analysis of the technique with a fixed camera and a level take.It should be placed at the end of the athlete's lane, on the edge of the pool.Frame the athlete with the zoom, and because of the little displacement, follow him (her) with the zoom, trying to keep the same framing.If you want to make a quantitative analysis, when the swimmer reaches the edge of the pool the camera must be tilted downward to record when the swimmer touches the edge.• From above or diagonally from above: For qualitative and quantitative analysis with a moving camera and diving or zenithal take.It must be kept parallel to the athlete's displacement at a distance of four to five meters.
Recommendations at the time of recording: • Start (End) the recording two or three seconds before (after) the beginning (end) of the technique.
• The recordings of the techniques that will be analyzed qualitatively require tecording when the athlete touches the edge of the pool, as a reference for later analysis.• Care must be taken with the reflection of sunlight or artificial lights that occurs on the surface of the water.It is recommended to record from the incident side of the light, being careful to avoid the formation of shadows.• The athlete should wear clothes of a color that contrasts with the color of the pool.

Table 1 :
Specification of the test video

Table 2 .
Results of the compression tests with different codecs

Table 3 .
Results of the compression tests with WMV Quality

Table 4 .
Test cases

Table 5 .
Comparison table