Easily Measure and Visualize Motility

Quantification of Helminth Larvae Motility: A Case Study

  • Easily Measure and Visualize Motility - Quantification of Helminth Larvae Motility: A Case StudyEasily Measure and Visualize Motility - Quantification of Helminth Larvae Motility: A Case Study
  • Easily Measure and Visualize Motility - Quantification of Helminth Larvae Motility: A Case Study
  • Fig. 1: Processing. (A) Raw images, are processed with a Sobel edge detector (Fiji, "Find Edges" filter) to highlight sharp changes in intensity and thus helps in separating the worms from the background. This is followed by a "Median Filter" in order to smooth the image and improve the subsequent thresholding step. The difference in masks between two consecutive frames (B) was calculated using the "Exclusive OR operator" (XOR) (C). Results that could be obtained with "AND" and "OR" operators are also shown for comprehension.
  • Fig. 2: Measurement. (A) The area of binary images are measured and used to calculate the <<Relative Movement Index>>. The Area of the XOR image is normalized by the average Area of the image used to generate the XOR. (B) The "Relative Movement Index" was measured on three time-lapse series for five different temperature conditions. All the frames were used for the analysis (50 Frames per second) or only 1 frame every 10 (5 Frames per second).
  • Fig. 3: Visualization. (A) Representative images o a time-lapse at 15°C and another at 35°C and their corresponding XOR images colored through time using the "physics" look up table. (B) Projection of the XOR image colored through time.

Automated image processing has brought accuracy, reliability and reproducibility to image quantification. We demonstrate how a rather simple microscope setup can be turned into a quantitative microscopy tool by the use of a customizable image processing workflow using the macro language of ImageJ. This enabled the precise measurement of helminth larvae motility and underlines the necessity to interlock image acquisition and analysis as early as possible.


In former times, images arising from a microscope were solely used to exemplify a phenotype, a particular localization or any other qualitative feature. Later microscopy images were manually analyzed by applying phenotypes and grade classifications. The digital era and the use of some automated image processing brought image analysis to a new level, and came with higher reliability of the analysis, and an increase in accuracy and throughput.

From the many tools that are available for image processing and analysis, ImageJ is unquestionably the most popular in the life science community [1]. One of the reasons for this success is the existence of the ImageJ macro language that makes this software easy to use and allows quick assembly of pipelines/workflows. This is especially important for multi-user facilities which offer support in image analysis and where the delivery of a robust workflow fitted to the biological question in a minimum of time is crucial.

As an example for workflow creation and validation, we present the straightforward and precise measurement of helminth larvae motility - being of particular importance since a third of the world‘s population is supposed to be affected by chronic helminth infections. Because macrophages were shown to be a crucial component of the protective immunity against infections by intestinal helminth, the impact of macrophages on the motility of helminth larvae needed to be analyzed by time-lapse series and analyzed quantitatively [2][3].

Acquisition Set-Up

A regular brightfield transmission microscope (which can be regarded as a very simple microscope setup) is used in order to acquire time-lapse series of helminth larvae under various conditions. This allowed the reduction of the exposure time, thereby minimizing unwanted phototoxic effects. Additionally, neither living specimen-compatible probes nor fluorescent proteins are needed making the assay easily reproducible and portable. A caveat of this approach is obviously the lack of specificity which tends to make the automated image processing more challenging as the resulting image contains both larvae and macrophages. During the time-course of the acquisition, the size of the worm itself remains unchanged. However the shape of fully healthy and motile larvae will vary from frame to frame in contrast to macrophages which are much less mobile. Therefore we propose a workflow based on frame to frame differences allowing us to distinguish these two entities and enabling the precise motility measurement of the helminth larvae.

Image Analysis Workflow

As depicted in figure 1A a Sobel edge detector (Fiji, "Find Edges" filter) is applied to enhance sharp changes in intensities, which is suited to distinguish worms and macrophages from the background. The following "Median Filter" is smoothing the image and improves the subsequent thresholding step. Thereafter the difference between two consecutive frames was calculated using the "Exclusive or operator" (XOR) based on the thresholded images (illustrated in figs. 1B and 1C). This operator returns the differences between two consecutives frames as measureable areas. Since macrophages (in this in vitro assay) are much less mobile than the larvae, the resulting image can be easily correlated with the larvae movements.

In order to extract numbers from the image sequence (fig. 2A) the area of the XOR image is divided by the average area of the input images resulting in a "Relative Movement Index" (RMI). This normalization using the area average of the images used to create the XOR images helps to prevent bias caused by a potentially varying number of larvae within the images.

To validate the measurement strategy, the RMI is calculated for five different temperature conditions (fig. 2B). Either all recorded frames were used for the analysis (50 frames per second) or only 1 frame out of 10 (5 frames per second). The same trend can be observed for both analyses strategies. Larvae motility increased with temperature, as was to be expected. Furthermore a lower image repetition rate tends to increase the RMI because changes obviously depend on the time gap between two images. Nevertheless, the lowest and highest conditions are affected differently as lower framerates probably do not provide sufficient sampling to accurately assess the movement of the larvae. Moreover, we notice that if the larvae move slowly, the variability of the RMI increases while if the larvae move quickly it tends to decrease the variability.

Finally, for quick evaluation of different conditions, a visual read-out is proposed. A colored temporal projection of the XOR image sequence is generated (fig. 3A and 3B). The more the helminth larvae move, the more colored is the resulting image. On the contrary, a larva resting around the same location leads to white color output. (due to maximum projection and overlapping of the colored frames). Finally, if the helminth larvae are immobile, the area seems empty (due to the XOR operator removing common parts of consecutive images).


We described here a simple method that allows unbiased and precise measurements of helminth larvae. This method delivers a reliable parameter, the so called RMI, which nicely correlates with the motility of the larvae. Additionally it is enriched with a temporal color projection image giving the user a rapid overview of the result. This image processing and measurement workflow could be applicable to many more cases, and since it was written in the ImageJ [1] macro language, it is accessible to anyone.

The authors thank Prof. Nicola L. Harris for generous support of the project and helpful suggestions. Dr. Julia Esser-von Bieren is acknowledged for sample preparation.

[1] Schneider C.A. et al.: Nature Methods 9, 671-675 (2012)
[2] Esser-von Bieren J. et al.: J Immunol. 194 (3) 1154-63 (2015)
[3] Esser-von Bieren J. et al.: PLoS Pathog. 9 (11) e1003771 (2013)

Dr. Arne Seitz
Dr. Romain Guiet
Dr. Oliver Burri

Bioimaging and Optics Platform (PT-BIOP)
Ecole Polytechnique Fédérale de Lausanne (EPFL)
Faculty of Life Sciences
Lausanne, Switzerland


EPFL Ecole Polytechnique Federale de Lausanne

1015 Lausanne
Phone: +41 21 69 31162

Register now!

The latest information directly via newsletter.

To prevent automated spam submissions leave this field empty.