Documentation status PyPI status DOI

PyTrx (short for 'Python Tracking') is a Python object-oriented toolset created for the purpose of calculating real-world measurements from oblique images and time-lapse image series. Its primary purpose is to obtain velocities, surface areas, and distances from imagery of glacial environments.

PyTrx is freely available to use, either by cloning the repository from Github or using pip install. Documentation for using the toolset is available at readthedocs.


About PyTrx

PyTrx has been developed with object-oriented design, meaning that the core functions are wrapped in callable-objects, which make it accessible to beginners in programming whilst also serving those more experienced.

Ice velocities from Kronebreen
Demonstration of PyTrx’s dense feature-tracking and georectification capabilities (from our Frontiers publication). The sequence shows an early season speed-up at the terminus of the glacier

The following main functions can be performed with the toolset: dense template matching and sparse Optical Flow methods for deriving velocities, automated detection of area features (such as supraglacial lakes), manual delineation of area and line features (e.g. meltwater plume footprints, terminus position), and camera calibration and optimisation for refining the georectification of measurements from the images.


The origin of PyTrx

PyTrx came about as we wanted to derive measurements from time-lapse imagery, which I had collected from tidewater glaciers in Svalbard as part of my PhD. However, we couldn't find any openly available toolset that met our needs. There are a handful of toolsets for processing ice velocities from time-lapse imagery (see ImGRAFT, Pointcatcher and EMT - three great examples), but we wanted to also process other types of measurements, such as meltwater plume footprint extents, supraglacial lake areas, and changes in terminus position.

Delineating meltwater plume footprints using PyTrx
Example showing changes in meltwater plume extent distinguished from time-lapse imagery of Kronebreen using PyTrx (from our Frontiers publication). The surface expression of the meltwater plume has been tracked through images captured on 5 July 2014 at 18:00 (A), 20:00 (B), and 22:00 (C) to demonstrate part of its diurnal recession. Each plot shows the plume definition in the image plane (top) and its translation to real-world coordinates and plotted onto a coinciding Landsat 8 satellite image (bottom)

Additionally, most toolsets that we came across were programmed in a limited range of programming languages. We felt there was a need for a toolset in an open-source programming language for those who wanted an alternative that did not rely upon a licensed software. Before long, we realised there was a need for this toolset in the public domain, with growing interest from others; hence why we began focusing on finalising PyTrx as an operational package that anyone could use.


PyTrx citations

We are happy for others to use and adapt PyTrx for their own processing needs. If used, please cite the following key publication and Digital Object Identifier:

How et al. (2020) PyTrx: a Python-based monoscopic terrestrial photogrammetry toolset for glaciology. Frontiers in Earth Science 8:21, doi:10.3389/feart.2020.00021

PyTrx has also been used in many applications in glaciology. Please see our Github repository readme for more information on other publications, permission and acknowledgements.