Skip to content


Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Pixel Difference and related tools

These tools are meant for processing Ultrasound Tongue Imaging (UTI) data. The first to be implemented -- Pixel Difference and Scanline Based Pixel Difference -- work on raw, uniterpolated data and produce measures of change over the course of a recording. How they work is explained in Chapter 3 of Pertti Palo's PhD thesis. The next stage is a automated reaction time measure, followed possibly by spline distance measures and optic flow.

Getting Started

Download the repository to either a subdirectory of the project you want to use the tools on or a suitable place that you then add to your $PYTHONPATH.


PD is written in Python3 and developed with version 3.7.4.

In addition to built in Python modules, to use the tools you will need the following packages (or newer versions of them):

  • MatPlotLib 3.1.1
  • NumPy 1.17.2
  • SciPy 1.3.1

A handy way of getting MatPlotLib, NumPy, and SciPy is to get them as part of the Anaconda distribution.

What's included

See manifest.txt for a description of the contents.

Running the examples

There are three small datasets included in the distribution. You can run tests on them with the test script Currently the following work and produce a new spaghetti_plot.pdf and a transcript in [directory_name].log.

python test1_1
python test1_1 exclusion_list.csv
python test1_2
python test1_2 exclusion_list.csv

The first example directory contains recordings with all files present while the second is intentionally missing some files. The latter case should therefore produce warnings in the resulting log. Running without the exclusion list specified should produce a plot with a couple more curves in it.

The routines to deal with a directory structure like that of test2 are yet to be implemented.

Running the tests

Proper testing is yet to be implemented.


Please get in touch with Pertti, if you would like to contribute to the project.


We use SemVer for versioning under the rules as set out by PEP 440 with the additional understanding that releases before 1.0 (i.e. current releases at time of writing) have not been tested in any way.

For the versions available, see the tags on this repository.


  • Pertti Palo - Initial work - giuthas

List of contributors will be updated once there are more people working on this project.

Copyright and License

The Pixel Difference tools (PD for short) and examples is a tool box for analysing articulatory data.

Pixel Difference tools Copyright (C) 2019-2020 Pertti Palo

Example data Copyright (C) 2013-2020 Pertti Palo

Program license

Program License

This program (see below for data) is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see

Data license

Data License

The data in directories test1_1, test1_2, and test2 are licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) License. See for details.


  • Inspiration for PD was drawn from previous projects using Euclidean distance to measure change in articulatory speech data. For references, see Pertti Palo's PhD thesis.

  • The project uses a nifty python tool called licenseheaders by Johann Petrak and contributors to add and update license headers for python files.


This is a Python3 toolkit for processing articulatory speech data from tongue ultrasound..








No packages published