Need help or advice ? Come to the Icy club ! - Every Wenesday morning from 9h30 to 12h30 - Francois Jacob Building - Main hall - Pasteur

User reviews

5 star
4 star
3 star
2 star
1 star
average rating: 5

Please log-in to post a review
09 Feb 2017 16:27
Really nice tool! But it would be very helpful if the protocol version could be extended by the size filter for the output "Multiple ROI".
Thank you very much! :)
13 Jul 2016 20:25
Excellent tool! Thank you very much! I'd love to see a progress bar showing the approximate percentage of task completion, instead of the one showing that the operation is ongoing.
13 Oct 2013 01:51
Really convenient. The exports in ROI and/or sequence are particularly usefull. I would love a graphical interface enabling the setting of the threshold limits over the histogram.
Thomas Provoost
27 Feb 2013 10:52
Good for manual and auto thresholding.


by Alexandre Dufour

Extract image features based on one or more intensity thresholds, and output the result as a labeled image or as a region of interest.

Publication Id
See technical details
View complete changelog


This plug-in extracts area in the image according to their pixel value, based on some user-defined (or automatically calculated) thresholds.

For the purpose of describing how the plug-in works, let's assume we have a single channel 8-bit image (values ranging from 0 to 255). The description below still stands for multi-channel data (each channel will be processed separately) and non 8-bit data (there is no restriction on the data type).

The plug-in has two general working modes:

1. Manual mode (Method = "MANUAL", this is the default mode when you start the plug-in)

In this mode, the "Manual Thresholds" field expects you to manually enter one (or more) threshold values (multiple values should be separated by spaces).

If you indicate only a single value (e.g. 155), the result will be a "traditional" binary image such that:

  • [image values between 0 and 155] => 0
  • [image values between 156 and 255] => 1

If you indicate 2 values (this is what the plug-in suggests at startup with "100.0 200.0"), the result will be a pseudo-binary (aka labeled) image such that:

  • [image values between 0 and 100] => 0
  • [image values between 101 and 200] => 1
  • [image values between 201 and 255] => 2

Using 2 thresholds can be useful when you have an image containing a dark background, and a combination of dim and bright structures that you wish to isolate separately.

You can of course indicate more than 2 values, and the result will follow the same pattern: you will obtain a pseudo-binary image with each label describing each range of intensity ("class" is the technical term for each intensity range, or area in the histogram).

2. Automated mode (Method = "KMeans")

In this mode, you do *not* have to indicate the threshold values yourself. However, you have to indicate how many "classes" (i.e. areas in the histogram) you which to distinguish.

If you indicate "2" (the minimum possible value), you are basically telling the plug-in that your histogram has 2 distinct areas (aka classes), and that the plug-in should automatically calculate the (one) threshold value that best separates them (think of a histogram with two modes or peaks, the optimal threshold would be the midpoint between these 2 peaks). In comparison with the manual mode, it may calculate the same value of 155, but it could have given 157 if it believes this is statistically a better threshold based on the histogram.

If you indicate "3", you are now asking the plug-in to distinguish 3 classes in the histogram. The plug-in will therefore calculate 2 threshold values (to separate the 3 classes). Again this is equivalent to giving (manually) 2 thresholds as in the example above.

The algorithm used in this mode to automatically calculate the final threshold value(s) is called "KMeans", and basically will try to statistically optimise the position of the threshold(s) in the histogram such that the final classes are as dense as possible, and as well separated as possible, by maximising the variance between classes.

3. Output

By default, the plug-in will produce a binary (or pseudo-binary) image following the conventions defined above. This output is however not the most handy, as it does not give you any information on the extracted areas (size, number of objects, intensity statistics on the original image, etc.). A much more user-friendly way to manipulate the output is to convert this image into one or more Regions of Interest (ROI). There are two ways to produce regions of interests from thresholded data:

  • This plug-in itself has a field called "Output as" which lets you select between "Sequence" and "ROI" modes. While "Sequence" (the default mode) produces a binary or pseudo-binary image, "ROI" will convert each histogram class into a ROI that is added onto the original image (and accessible via Icy's ROI panel), with a name that indicates the corresponding threshold value (this is useful to double-check the threshold values, especially when if they have been calculated automatically).
  • The "ROI" option will not distinguish multiple objects within a given class that might be spatially separated. If you wish to create a ROI for each object separately, then you should ask instead to produce a pseudo-binary image, and extract objects from that image using the Label Extractor plug-in.