APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

upload processed data that can be displayed in the tracker graphs post and replies

Return to the upload processed data that can be displayed in the tracker graphs thread
Login to post to this thread

upload processed data to tracker - June 28 at 8:05:PM
Gordon Judd
5 Posts

I have taken the sampled pixel values in a tracker file and used the raw pixel data in various Python programs.  

Those programs have access to the extensive processing functions available in Python, and for example can  use spline fitting techniques to produce smoothed angle, angular velocity, and angular acceleration graphs.

This approach would also get rid of the large ripple effects that result from the  simple finite difference approaches used to calculate the velocity and acceleration graphs in Tracker for high speed videos.

Is there someway to input that processed data to a input tracker file so that data can be shown in the tracker graphs rather than the default velocity and acceleration graphs?

It would also be useful if processed pixel data for the rotation angle of bat or stick could be input to tracker and have them displayed on athe final output video.

Thank you for making such a useful tool available for digitizing high speed videos.  The ability to "nudge" sampled points with a second pass through the video is especially useful.


Replies to upload processed data to tracker

Re: upload processed data to tracker - June 30 1:19:PM
Douglas Brown Avatar
Douglas Brown
279 Posts

It's an interesting idea but there is currently no way to load velocity data into Tracker. You can load position data into an "external model" track but not velocity or acceleration.

External model data can define multiple points so you could certainly load your rotation data by defining positions for the two ends of a stick. Read more about it in Tracker help for external models.

> Re: upload processed data to tracker
>
> I have taken the sampled pixel values in a tracker
> file and used the raw pixel data in various Python
> programs.  
>
> Those programs have access to the extensive
> processing functions available in Python, and for
> example can  use spline fitting techniques to produce
> smoothed angle, angular velocity, and angular acceleration
> graphs.
>
> This approach would also get rid of the large
> ripple effects that result from the  simple finite
> difference approaches used to calculate the velocity
> and acceleration graphs in Tracker for high speed videos
>
>
> Is there someway to input that processed data to
> a input tracker file so that data can be shown in
> the tracker graphs rather than the default velocity
> and acceleration graphs?
>
> It would also be useful
> if processed pixel data for the rotation angle of
> bat or stick could be input to tracker and have them
> displayed on athe final output video.
>
> Thank you for
> making such a useful tool available for digitizing
> high speed videos.  The ability to "nudge" sampled
> points with a second pass through the video is especially
> useful.



Re: upload processed data to tracker - July 06 12:33:AM
Gordon Judd
5 Posts

Thank you for your reply.

Is the x and y data for a given mass particle in an  external model file given in pixels?  The examples given in the help discussion were not clear what the desired formal needed to be.

I think if I input smoothed x and y tracking data then the velocity you calculate with finite differences should be much smoother as well,  so that might be a good solution to getting ripple free velocity and acceleration plots.



Re: upload processed data to tracker - July 06 12:29:PM
Douglas Brown Avatar
Douglas Brown
279 Posts

The (x, y) data for an external model is in real-world coordinates, not pixels. (This mean that their image position on the video depends on the coordinate system so the video must be calibrated as usual.)

Your idea to create an external model with smoothed data might work well--you should definitely try it and see. Please report your results to this forum, I will be very interested to hear how it works!  Doug


> Is the x and y data for
> a given mass particle in an  external model file given
> in pixels?  The examples given in the help discussion
> were not clear what the desired formal needed to be
>
>
> I think if I input smoothed x and y tracking data
> then the velocity you calculate with finite differences
> should be much smoother as well,  so that might be
> a good solution to getting ripple free velocity and
> acceleration plots.



Re: upload processed data to tracker - July 06 4:52:PM
Gordon Judd
5 Posts

Doug,
Your external model idea worked out great.  As hoped, the spline smoothing that can be done in Python smoothed out Tracker's velocity and acceleration plots as well.

I am interested in the dynamics of fly casting and how good casters translate and rotate a fly rod in different casting situations.  Here is a frame grab produced for a distance cast made by Chris Korich at a tournament casting clinic Chris conducted at the Long Beach Casting club a few years ago.

It was very straightforward to input the processed data for the hand path (red marker) and the butt rotation (yellow line) into tracker and use the many processing options available in Tracker to analyze my high speed (300 fps) video of Chris' cast.

The attached screen shot shows when he reached his maximum angular velocity for that cast.  Tracker had no problems in deciphering the tab delimited data file that was produced with Python.

You have produced a very powerful tool for motion analysis that can be easily integrated with the extensive data processing options in Python.

My congratulations to you and all of the people who developed such a useful video processing package.

Attached File: Korich__MAV.jpg



Re: upload processed data to tracker - July 06 6:40:PM
Douglas Brown Avatar
Douglas Brown
279 Posts

Gordon, what a beautiful analysis you have done of this fly cast! Looks like an excellent video and your results are amazing!

Your project is the first I know of that involves (a) tracking video features as point masses, (b) exporting the position data into Python for smoothing, and (c) importing the smoothed data into an external model. Nice workflow!

I'm sure this could be the basis for a great lab or other teaching resource that you could add to ComPADRE.   If you save everything as a single Tracker project file (TRZ) then you can use the Quick Suggestion tab at https://www.compadre.org/osp/items/suggest.cfm.  I really hope you'll do this--I'm sure many instructors and students will want to use it.

Doug


> Doug,
> Your external model idea worked out great.
> As hoped, the spline smoothing that can be done in
> Python smoothed out Tracker's velocity and acceleration
> plots as well.
>
> I am interested in the dynamics of
> fly casting and how good casters translate and rotate
> a fly rod in different casting situations.  Here is
> a frame grab produced for a distance cast made by
> Chris Korich at a tournament casting clinic Chris
> conducted at the Long Beach Casting club a few years ago
>
>
> It was very straightforward to input the processed
> data for the hand path (red marker) and the butt rotation
> (yellow line) into tracker and use the many processing
> options available in Tracker to analyze my high speed
> (300 fps) video of Chris' cast.
>
> The attached screen
> shot shows when he reached his maximum angular velocity
> for that cast.  Tracker had no problems in deciphering
> the tab delimited data file that was produced with Python
>
>
> You have produced a very powerful tool for motion
> analysis that can be easily integrated with the extensive
> data processing options in Python.
>
> My congratulations
> to you and all of the people who developed such a
> useful video processing package.



Re: upload processed data to tracker - July 07 12:54:AM
Gordon Judd
5 Posts

I'm sure this could be the basis for a great lab or other teaching resource that you could add to ComPADRE
Doug,
I submitted a suggestion to ComPADRE that included the tracker TRZ file that also contained  my Python routines under the title of Tracker/Excel/Python/Tracker Data Analysis.

Real Python programmers will no doubt be amused by my inexpert Python routines as I just started using it to convert some of my MATLAB fly casting analysis routines that can be run on Windows 10 computers.

Gordy Judd



Re: upload processed data to tracker - July 07 8:15:AM
Wolfgang
135 Posts

This file is now available as an item in the ComPADRE OSP Collection.

https://www.compadre.org/OSP/items/detail.cfm?ID=15430



The OSP Network:
Open Source Physics - Tracker - EJS Modeling
Physlet Physics
Physlet Quantum Physics