Java程序辅导

C C++ Java Python Processing编程在线培训 程序编写 软件开发 视频讲解

客服在线QQ:2653320439 微信:ittutor Email:itutor@qq.com
wx: cjtutor
QQ: 2653320439
Video-Based Motion Analysis 
 
Bruce McKay 
 
Saint Ignatius College 
 
 
Introduction 
 
This session will cover the basics of recording and producing video clips for analysis. 
Video analysis provides the opportunity to make accurate measurement of motion 
outside the Physics lab as well as inside. Analyse everyday motion, not just whatever 
is available in a physics lab. Challenge students to produce imaginative projects or 
come up with your own creative uses. 
Participants in this session, working in small groups, will use a digital video camera 
to record their own video clips, edit and export them as QuickTime Movies and then 
analyse their video. 
Two different Video Analysis Applications will be used, each available for Mac and 
PC: “Tracker” which is free and Java based, and “VideoPoint: Physics Fundamentals” 
which is the recently released commercial replacement for “VideoPoint”. 
 
Why Video? 
 
You probably will not be prepared to even admit to knowing anything of the days of 
physics pracs being performed with a Polaroid camera and strobe light to analyse 
motion and collisions on an airtrack, or of the Project Physics flim loops. But some of 
us do remember the dim dark ages of the 1970s and 80s. Video cameras did not exist 
then. Imagine what it would have been like in those days to say “Here is digital video 
camera, take it and film …….…. then we will transfer the video to computer for a 
frame by frame analysis! Perhaps you are a fan of data loggers and motion sensors but 
the choice and scope offered by a video camera opens up a whole new range of 
activities. I like students to analyse real everyday motion rather than be restricted to 
activities in a laboratory.  
I started using VideoPoint about seven years ago. A digital video camera was well 
over $2000 but they have dropped considerably in price, I think you can find 
something now for about $600. If you want to put up with lower quality, you can even 
use an iSight camera or a web camera.  
I used to use VideoPoint to analyse movies but became frustrated as it was not 
updated beyond version 2.5.1 for Mac or version 2.1 for Windows. It required 
QuickTime 3 so that gives an idea of its true vintage. It continued to run on Mac 
Classic and probably on Windows XP but my frustration as a Mac user was that it 
would not run in Mac OS-X.  
I then heard of “Tracker” a Java based application written by Doug Brown at Cabrillo 
College  http://www.cabrillo.edu/~dbrown/tracker/ . I started using Tracker and then 
found VideoPoint: Physics Fundamentals in 2005. Tracker is free and is regularly 
updated. VideoPoint: Physics Fundamentals is available as a 30 day trial version but 
is not cheap. It can be purchased on line: Single user US$180, 5 user US$375, 10 user 
US$675 and 30 user US$1375. 
 2 
I am happy with Tracker but some other physics teachers prefer the interface and ease 
of use of VP Fundamentals. 
 
 
Videoing the motion 
 
There are a few simple precautions that are necessary.  
 
• The camera should be mounted on a tripod at a sufficient distance from 
the action to enable the complete motion to be viewed in the frame. 
(One projectile motion project was a javelin being thrown and the 
camera had to be a long way away to keep the motion in view.) 
• The motion should be perpendicular to the camera view. 
  • An object should be measured or a distance marked out in such a way 
  as to enable the scale to be determined. (This will be input into the  
  analysis application.) 
• It is helpful if the motion goes from left to right. That will help with 
  measuring and graphing the motion. 
 
Transferring from Camera to Computer, Editing and Exporting as a 
QuickTime Movie 
 
As a Mac user, I import the video to computer using iMovie, but I am told that a 
similar method is available using Windows XP. (VideoPoint: Physics Fundamentals 
comes with the VideoPoint Capture application which works on Mac or PC but it is 
not required on a Mac.) 
 
The remainder of this section will describe how this is done in iMovie on a Mac. 
 
The camera is connected using a firewire cable and iMovie should open 
automatically.  
 
 
 
 3 
You now have control of the camera from the computer using the Play, Fast Forward 
and Rewind buttons. When you have found the section of video you want, click 
Import and then Stop when you reach the end. 
 
Now that you have imported the video, it is a matter of selecting the small amount 
that you want and then exporting it. 
 
 
 
The bottom triangle markers have been moved to the start and finish of the motion 
and with the triangular playhead in this selection, it can be copied or cut and then 
pasted into the timeline of iMovie. 
 
 
 
 
This can now be exported as a QuickTime movie and the best option is Full Quality 
DV. 
 
This QuickTime movie is now available for analysis in either Tracker  or VP 
Fundamentals. 
 
 4 
Analysis using “Tracker” 
 
Introduction 
 
Tracker is currently at version 1.5.1. It requires Java and QuickTime 7 and of course 
it runs in OS-X. It was developed by Doug Brown at Cabrillo College  
http://www.cabrillo.edu/~dbrown/tracker/  on a PC and there were initially some 
small difficulties running on a Mac, but Doug made it known that he wanted feedback 
and wanted to get it running properly on a Mac. I did contact him about a small 
problem I was having and he replied very quickly. I sent an email at night and a reply 
was waiting in the morning.  
Tracker has excellent help included and comes with video samples for analysis but I 
much prefer students to produce their own videos. 
 
Tracker enables students to perform a frame-by-frame analysis of a QuickTime 
movie. Various data can be calculated and graphed. A full window is shown below 
but the various parts of the window can be opened or closed. 
 
 
Downloading and Installing Tracker 
 
After you visit the http://www.cabrillo.edu/~dbrown/tracker/  and download 
Tracker.zip, it is a simple matter to unzip it by double clicking. The latest version of 
the actual application Tracker.jar may be later than that in the unzipped file. You may 
have to download it separately. 
 
 
 
 
 
 5 
Using Tracker 
 
Locate the file Tracker.jar and double click to open Tracker. 
 
Select IMPORT from the FILE menu and navigate to the QuickTime movie you wish 
to analyse. (It must have the .mov extension.) (OPEN should work just as well 
IMPORT with a QuickTime movie.) 
 
When the movie is opened the image will probably look terrible. From the VIDEO 
menu, Select FILTERS, NEW and DEINTERLACE. Select odd or even, it does not 
matter which and you should now see a high quality image. 
 
Click the play button to preview the video in tracker. 
 
Now by either selecting the axes icon in the top left, or by selecting AXES from the 
TRACK menu, show the axes, drag the origin to your preferred place and then LOCK 
the axes (from the TRACK menu). You will see other options that are available. 
 
Now similarly, show the tape measure, drag the ends to your measured length, double 
click on the number and enter your value and then lock the tape measure from the 
TRACK menu. You can choose either to show or hide the tape measure. 
 
Next, from the TRACK menu select NEW and choose POINT MASS, or do likewise 
from the Track icon. 
 
You should see in yellow  “Shift-click to mark Mass A”. Move the cursor to the part 
of the object you are going to track and shift-click (or right-click). The Apple Mighty 
Mouse works fine with tracker. 
 
The point is marked and the movie advances automatically to the next frame. 
Continue until you have the data points you desire. 
 
To view the data and to graph it, look for the small faint triangles at the bottom right 
of the main window. If you click on the correct triangle, you will bring in Plot and 
Data windows on the right. (You can also split the main window into two, one above 
the other.) You can change the size of these windows. 
 
If you click on the icon on the left hand top of the Data Table, you will see that you 
can change it to World View or Plot View and similarly the icon at the top left of the 
Plot View can be changed to World View or Datatable View. 
 
Clicking on “Data” on the top right of the Data View, should show the quantities that 
can be included in the table. (Sometimes there are no quantities visible in this window 
but a slight change in size––drag the bottom right hand corner of the window, brings 
things right.) 
 
The graph can be changed by moving the cursor over the quantity on either axis. The 
cursor changes to a “hand” and clicking brings up all the quantities you can graph. 
 
 6 
After viewing the graphs in Tracker, I prefer to copy and paste data to Excel. To copy 
data, highlight the data required and with the data selected, CONTROL CLICK or 
Right Click to bring up a pop-up menu that gives Copy as an option. I use WPtools in 
Excel to analyse and fit data and to produce graphs. 
 
The latest version of Tracker, 1.5.1, now gives Analyse as another option. I have not 
yet tried this but as it provides statistics and also curve fitting, it may no longer be 
necessary to use Excel. 
 
Information on WPtools is available from   
http://physics.dickinson.edu/~wp_web/wp_resources/Documentation.html 
WPtools can be downloaded free from 
http://physics.dickinson.edu/~wp_web/wp_Resources/wp_downloads.html 
 
While it does not have the most elegant interface, I have found that WPtools still 
works with the latest versions of Excel and it filled a gap that Tracker formerly failed 
to fill. 
 
VideoPoint: Physics Fundamentals 
 
VP Fundamentals leads you through the whole process as the following images 
indicate. 
 
 
 
 
VP Fundamentals presents the option of capturing a movie, of opening the resource 
library (of videos provided with VP Fundamentals) or of opening a QuickTime 
movie. The last option is not as obvious but is achieved from the OPEN menu which 
sits above the window shown above. After clicking on Open, you use the usual 
navigation to find and open your movie 
 7 
The text in the images is self explanatory, but in case it is not clearly visible, it is 
reproduced below each image. 
 
Preview: Preview the movie before moving to the next step. 
 
 
Calibrate Movie: In the movie frame, select an object of known length. Drag the ends 
of the yellow meter stick to either end of this object. In the field below the movie, 
indicate the length (in chosen units) that the selected object represents in the real 
scene.  
Click OK before moving to the next scene. 
 8 
 
Set Up Analysis:  The position of the origin, the rotation of the axes and the frame 
which corresponds to zero time can be set. 
 
 
 
 
Collect Data.     Clicking on an object marks its position and advances to the next 
frame. It is possible to magnify that part of the image (as shown). 
 9 
 
Plot Data.   
 
 
After the data has been plotted, it is possible to play the video and watch the circle 
move along the graph as it moves through the video. 
 
 
 
 10 
 
The data has been plotted and a curve fit can be done. A Manual Fit is available but to 
do an Auto Fit it is necessary to open Preferences and select Allow auto fit. 
 
 
 
The auto fit has been performed. 
 
 
 11 
Discussion 
 
VideoPoint: Physics Fundamentals has a nice new interface and now runs well in Mac 
OS-X and in Windows XP. It is easy to use and students are led through the whole 
process.  
 
Tracker does something similar, with a different interface which in some cases is not 
quite as intuitive for a Macintosh user. 
 
VideoPoint: Physics Fundamentals is supplied with a user manual as a .pdf file. The 
manual is hardly necessary but might be helpful if problems arise. 
 
Tracker has a Help Menu which provides excellent information. 
 
I am happy to use Tracker and it is free. VideoPoint: Physics Fundamentals is 
moderately expensive but perhaps it is worth it. If you are interested in video-based 
motion analysis, you can get started for a low outlay. You have to make your own 
decision as to where your money is best spent. 
 
 
 
Useful Websites 
 
Tracker Home: http://www.cabrillo.edu/~dbrown/tracker/ 
 
Tracker Download: http://www.cabrillo.edu/~dbrown/tracker/download.html 
 
Tracker Webstart: http://www.cabrillo.edu/~dbrown/tracker/webstart/ 
 
Videos from Cabrillo College:  
http://www.cabrillo.edu/academics/physics/videos.html 
 
VideoPoint:  http://www.lsw.com/videopoint/ 
 
VideoPoint: Physics Fundamentals: 
 http://www.vpfundamentals.com/ 
 
WPtools:  http://physics.dickinson.edu/~wp_web/wp_resources/Documentation.html 
 
WPtools Download: http://physics.dickinson.edu/~wp_web/wp_lab&equip/wp_Software.html