Electronic Pitch Trainer University of Pennsylvania Department of Electrical and Systems Engineering Authors: Jonathan Hodrick, ESE ‘11 James Silverstein, ESE ’11 Alex Slocum, ESE ‘11 TEAM #10 Advisor: Dr.

Download Report

Transcript Electronic Pitch Trainer University of Pennsylvania Department of Electrical and Systems Engineering Authors: Jonathan Hodrick, ESE ‘11 James Silverstein, ESE ’11 Alex Slocum, ESE ‘11 TEAM #10 Advisor: Dr.

Electronic Pitch Trainer University of Pennsylvania Department of Electrical and Systems Engineering Authors:

Jonathan Hodrick, ESE ‘11 James Silverstein, ESE ’11 Alex Slocum, ESE ‘11

TEAM #10 Advisor:

Dr. Daniel Lee, ESE

Problem Statement

In baseball, pitchers are trained by coaches or trainers. Pitchers’ skills are honed through the use of the experience and perception of coaches, trainers, and themselves. Although the experience of trained professionals is valuable, the human eye cannot perceive the minute aspects of a thrown pitch. Due to the high speeds at which pitches are thrown (as high as 100 mph), the speed, trajectory, and break, and accuracy of the pitch are difficult to detect. The goal of this project is to augment the pitch training process, providing details on these key categories used to assess a pitcher that trainers are not able to detect accurately. The Electronic Pitch Trainer will stream real-time pitch footage to the PC system next to the pitcher on the field that processes and extracts location data points. Those data points are then analyzed in MATLAB to calculate speed, trajectory and break of the pitch. This data is also stored on the local hard drive as a pitch archive that shows statistically how a pitcher is trending based on speed, break, accuracy, and pitch type.

Abstract:

A baseball pitch has many properties that vary from pitch-to-pitch. Some of the more apparent properties are the release time, the speed, spin, and break of the ball, and the overall trajectory of the ball. The behavior of the ball path follows Newtonian projectile physics relating to velocity, trajectory, and angular velocity. The difficulty lies in the fact that not all of these attributes can be easily scrutinized. Because of the high speed at which pitches are thrown (~60 – 100 mph), it is difficult to see the variations between the spin and trajectory of a ball with the naked eye. Therefore some malformed pitches that could be attributed to the spin of the ball may not be accurately judged and corrected. Our system aims to remedy this problem.

• • •

Project Goals

Measure and display the speed, break, trajectory, and accuracy of a pitched balled in a GUI accessible to the pitcher and coach on the field without the need for trained analysts.

Store an archive of pitches for each player that provides statistics showing how a given pitcher is trending.

Improve upon the 1 inch object recognition accuracy of the mainstream pitch tracking software “Pitch f/x”.

By using object recognition software to isolate the baseball from the background during a pitch, the location of the ball is found at each frame of the recording. That information is then processed so that pertinent information, such as speed, trajectory, break, and strike zone location are relayed to the pitcher.

Capturing the Pitch

The user manually inputs to the system when he is ready to throw his pitch. The system then begins recording the streamed footage as pixel data. After the pitch is thrown, the user manually inputs to the system to stop recording. OpenCV is then used to create a video of the pitch based on this pixel data. In addition, the statistics of each pitch are saved, and can be accessed by the pitcher in order to see how certain pitches are trending in terms of speed, break, and accuracy. The coach can also access the information in order to see how his team is trending as a whole, and isolate which pitchers have been performing well recently.

Special Thanks to Siddharth Deliwala, Doug Glanville, Steven Eillis

DEMO TIMES:

Thursday, April 21

st

, 2011 AM: 10:00, 10:30 PM: 2:00, 2:30

System Block Diagram Object Recognition

Our object recognition software with the OpenCV library works by detecting changes from a static background indication motion. Before each pitch, a snapshot of the background is taken. When the ball passes by at each frame, its location is recorded and saved to a text file. The recorded points in each frame can be seen in

Figure 1.

Two text files are created from the side view and top view cameras in order to have the necessary points to create a three dimensional coordinate system. These text files are then sent to MATLAB to calculate of speed, break, trajectory, and accuracy based on these location points.

Figure 1: Pitch Recognition with OpenCV Analysis and Interface

We use MATLAB to process the text files and plot them on graphs depicting the x-y motion (side view) and the x-z (top view). We also plot a 3-D graph combining the two, and the location where the ball passes the strike zone, as seen in

Figure 2.

These points along with the frame rate information of the camera allow us to calculate the speed of the pitch. These points are also compared to Newtonian equations for projectile motion to show the trajectory of the ball, which yields the break.

We also create a window in MATLAB is to allow users to set where they intend to pitch the ball. This setting is compared to the strike zone location of the ball, of which the difference is used to show accuracy of the pitch.

Figure 2: Pitch Results Database

All of the pitch quantities (speed, break, accuracy, and pitch type) are stored on the local hard drive in text files. The text files can be sorted by pitcher, session, and pitch type so that statistics can be gathered to show trends in pitching ability, shown in

Figure 3.

Figure 3: Archive Statistics

Results:

We have succeeded in making a system that analyzes pitches. The accuracy of the Electronic Pitch Trainer system improved upon the PITCH f/x accuracy of 1 inch. Our system has a worst case deviation from the trajectory line of 0.227 inches and average deviation of 0.05 inches.