What is PhysTrack?
PhysTrack is a Matlab based video tracking solution for analyzing kinematics of moving bodies. Since Matlab is a very popular analysis tool in physics laboratories around the globe, we have tried to combine the robustness of Matlab computation power with such a friendly user interface which can be found in commercial video tracking software.
Who should use it?
Physics teachers, students and researchers can use PhysTrack to track the motion of moving bodies and investigate the underlying physics in many kinds of experiments. Typical examples of these experiments are rotating and translating discs , spring pendulum systems , bodies colliding on a plane and projectiles , microspheres exhibiting Brownian motion , liquid droplets falling down a stream and the movement of a fruitfly .
Examples of some experiments can be viewed on the Smart Physics Lab website on This Link.
[June 2015] EJP (European Journal of Physics) publishes "PhysTrack: A Matlab based environment for video tracking of kinematics in physics laboratory", a paper which discusses PhysTrack and related concepts in detail.
Requirements for performing an experiment with PhysTrack
In addition to having primary knowledge of kinematics, we assume that the user is accustomed with the basics of Matlab as well.
To capture videos a good slow motion camera is required. In PhysLab, we usually use a Canon PowerShot SX280HS mounted on a tripod stand which works very well with most of the mechanics experiments. This camera can capture video at as high a frame rate as 240fps with a frame size of 320x240 pixels.
For investigating microscopic motion, a video microscope is also required. In PhysLab, we usually use a Motic BA210 Trinocular for investigating the Brownian motion of micro particles.
Usually, to move the objects in required fashion, an apparatus is also recommended.
You are only a couple of steps away from using PhysTrack for your own experiments.
Download and extract the latest PhysTrack source from the downloads section. It also contains some additional experiment scripts which serve as an example for creating your own experiments.
Also, choose and download a sample video from the this link.
Open Matlab and change the current directory to the downloaded package. You should see the "+PhysTrack" and "GUIs" directory along with some "analyze motion" scripts in the current address window.
Depending upon the type of experiment required, select any script from the window and run it. (Or you can type in the name of that experiment in the command window and hit "Enter".
The scripts are designed to be user interactive. They communicate with the user through GUI's and message boxes and guide through the whole process. The script will also ask to load the experiment video you downloaded in the previous steps.
Once done, peruse the sample scripts, which are well commented, and try to understand how you can modify the codes for your own experiment. You will also find help on the usage of each function from the PhysTrack Wiki.
Capture your own experiment's video and start making robust video tracking experiment scripts.
Performing a physics experiment with PhysTrack
Performing a classical mechanics experiments using video tracking and performing advance analysis is very simple.
- We capture video of the moving object using a digital camera,
- use one of the automated trackers of PhysTrack to track the objects and generate position and orientation data,
- to investigate the motion, use the in-built Matlab tools or those included in PhysTrack like numerical differentiation, curve fitting, object stitching and coordinate system transformation and
- present the results using Matlab plots and video plots included in PhysTrack.
Once the video is captured, PhysTrack is used in Matlab for extracting data, performing analysis and presenting the results. When using the sample "analyze motion" scripts from the previous section, the process is similar for all the experiments. Users can also take these experiments as a base for creating new scrips and automated experiments.
- PhysTrack Wiki.
- Primer: Investigating kinematics with PhysTrack.
- Examples of mechanics experiments.
- Example of experiment with video microscopy.
- PhysLab website.
- PhysTrack paper published in EJP (European Journal of Physics): "PhysTrack": a Matlab based environment for video tracking of kinematics in the physics laboratory.
The whole work is an effort of PhysLab of the Lahore University of Management Sciences (LUMS), Lahore, Pakistan. Kindly feel free to contact in case you wish to contribute in the development and improvement of this library.
M. Umar Hassan, M. Sabieh Anwar.
 J. Poonyawatpornkul and P. Wattanakasiwich, "High-speed video analysis of a rolling disc in three dimensions", Eur. J. Phys. 36 065027 (2015).
 J. Poonyawatpornkul and P. Wattanakasiwich, "High-speed video analysis of damped harmonic motion", Eur. J. Phys. 48 6 (2013).
 Loo Kang Wee, Charles Chew, Giam Hwee Goh, Samuel Tan and Tat Leong Lee, "Using Tracker as a pedagogical tool for understanding projectile motion" Eur. J. Phys. 47 448 (2012).
 Paul Nakroshis, Matthew Amoroso, Jason Legere and Christian Smith, "Measuring Boltzmann’s constant using video microscopy of Brownian motion", Am. J. Phys, 71, 568 (2003).
The first version uploaded on GitHub is v2.1 and a comprehensive documentation of this code can be viewed on PhysTrack Wiki on This Link.