Trajectory of pingpong ball + Racket detection Replicating trajectory of the ball by interpolating 3D coordinates.
Purpose –Interpolation of ball trajectory. Result data of “3D transformation” –Detection of pingpong rackets. –Data ready for visualisation. CSV(comma seperated value)
Realisation Tools: –Matlab 2010: Easy to use matrix calculations Built-in interpolation functions –Perl: XML -> CSV Easy to transform dataformats Information: –Matlab help, tutorials, internet Blackbox for end user: –XML -> -> Data for visualisation BlackBox
Implementation Blackbox uses 5 steps –Step 1: XML -> Matlab matrix –Step 2: Detectionof curves –Step 3: Spline generation –Step 4: Detection of ping pong rackets –Step 5: Data ready for visualisation
Implementation Blackbox in detail: # steps –Step 1: xml -> csv -> matlab matrix 1.Perscript called from within matlab –xml -> csv –Status = dos(‘perl perlscript.pl’) 2.Matlab –csv -> matlab matrix –readcsv(“nameFile”)
Implementation –Step 2: Detection of curves Curve? –Set of 3D coordinates Why? –Direction and position of the ball –Position of pingpong racket Detection: –Input: 2D matrix [X;Y;Z] –Method: »Minimal: direction change on x-axis »Optional: + direction change on y-axis –Direction changes are indicated with a flag –Result:
Implementation Flag = -1 start and beginning x-axis & y-axis
Implementation –Step 3: Spline generation Purpose: –Replecating trajectory of the ball »Interpolating givin coordinates –Speed of ball »Constant speed »Variable speed Draw spline for each detected curve. Each curve has two splines –XY plane & YZ plane Merge the two splines Append coordinates Time stamps
DemoResult.csv
Interpolation
Implementation –Step 4: Detection of rackets Change of direction on X-axis Result of Step 3 Time stamps –Step 5: Data ready for visualisation Matrices -> Ballc.csv & Racketc.csv –Example
Conclusion XML of 3D coordinates interpolated Result data ready for visualisation Room for improvement