Using thresholding method on root images

Posted by Guillaume Lobet on May 15, 2011 · 5 mins read

Many root image analysis procedures have a thresholding step in their workflow (e.i. WinRHIZO or EZ-RHIZO). The thresholding step aims at segmenting the original image (fig. 1A) in two parts: the “object” (the roots) and the “background”, and to assign to each of them a different pixel value (typically 1 and 0). The subsequent binary image (fig. 1B) can be used, for instance, to generate a “root skeleton” (fig. 1C) or to estimate root diameter.

threshold workflow

Figure 1. A. Original image. B. Binary image. C. Skeleton

Even if thresholding is a common image manipulation, it** has to be performed carefully** on root images. Indeed, the threshold value, defining the separation between the objects and the background, can have a great influence on the obtained binary image and therefore on the final results.Inappropriate threshold value can lead to a poor segmentation, typically “forgetting” the thinner roots (fig. 2B) or “creating” roots that are too large (fig. 2C).

threshold diameter

Figure 2. A. Original image. B. Threshold is too low, thinner roots where not selected. C. Threshold is too high, roots are too large

How to choose a threshold value?

As the threshold value influences the final results of the analysis it important the follow an identical methodology for the all the roots of the same experiment (or group of experiments). For this reason, it is not recommended to visually determine a threshold on every images as the human estimation could vary over time. It is also important that all the images of the same experiment have been acquired in the same conditions (light, devise, background, resolution, etc).

imagej threshold

Figure 3. ImageJ thresholding window

The type of analysis that has to be done at the end of the image processing also influences the choice of a threshold . The image requirement are not the same if you want to analyse root length (all the roots have to be on the image) or root diameter (root diameter has to be the same on the original and binary image).In ImageJ, thresholding an image can be achieved with the function Image > Adjust > Threshold. The threshold can then be set either manually or automatically with one of the implemented thresholding algorithm (fig. 3).

Manual threshold

Manual threshold value can be used if the same value is used for all the images. It can be evaluated on a typical (or several) image and then applied to all of them in the analysis workflow.

Automatic threshold

Automated thresholding algorithms define a threshold value based on the image pixels statistics (mean, mode, histograms, etc). The use of such and algorithm might lead to different threshold values for the different images, but always based on an the same logic. For instance, visually thresholding the same image two days in a row might lead to different values while a predefined algorithm will choose always the same.As for the manual threshold, the choice of the appropriate algorithm has to be done on one or several typical images. This algorithm has to be applied to all the images of the experiment.

In a recent paper, Tajima and Kato have tested the different algorithms implemented in ImageJ to analysed scanned images of rice roots. Their conclusion was that the Triangle algorithm was the more appropriate for rice root images (compared to WinRHIZO). Here, I would like to quote Pierre Soille who said that:

...any non-specialist faced with an image analysis problem rapidly realises that a unique image transformation usually fails to solve it.

The idea is that a single method, even if it is highly appropriate for a specific application, might not be good enough for slightly different usage. In this particular example, the Triangle algorithm works great with scanned root images having a good contrast, but is not optimal for images having an uneven background and a poor contrast…An algorithm has to be always validated on a specific image before using it.

If you liked this post, you can share it with your followers or follow me on Twitter!