Short Description

Computes fast quasi-exact euclidean distance transforms in 2D/3D from a set of regions of interest.

Documentation

Description

Computing exact distance transforms is a common problem in image processing and computer vision.

This toolbox provides the generic framework for distance transform algorithms, and comes bundled with 2 fast quasi-exact approximation methods based on chamfer mask propagation (one is based on a 3x3x3 neighborhood mask, the other on a 5x5x5 neighborhood mask). These chamfer algorithms just need to sweep through the image data twice to compute the distance map, which makes them very fast and efficient, while yielding only minor errors compared to absolute Euclidean distance.

In addition, a third (more accurate) method has been implemented using Icy internal distance transform calculator. It is based on Saito’s article “New Algorithms for euclidean distance transformation of an n-dimensional digitized picture with applications” by Toyofumi Saito and Jun-Ichiro Toriwaki published in Pattern Recognition Vol. 27 No. 11, 1994. If you’re looking for measuring large distances between objects with high accuracy, then this is the method to use.

In the following images an example of each algorithm is presented to show their accuracy on a circular seed ROI. The images were created a modified LUT to make distance rings visible.

Seed element
Seed element
Chamfer 3 distance precision
Chamfer 3 method distance precision
Chamfer 5 distance precision
Chamfer 5 method distance precision
Saito distance precision
Saito’s method distance precision

Adding new algorithms

The chamfer algorithms are very fast and efficient, although they may not be of sufficient precision in some very specific applications. You might also want to work with larger chamfer sizes that aren’t currently available. In both cases you are very welcome to implement your own algorithms and integrate them seemlessly with this one, simply by creating a new plug-in in which you extend the abstract class “DistanceTransform” with your own code. Once installed, this new plug-in will be automatically recognised and added it to the list of algorithms available in the graphical user interface (both in standalone and Protocols mode).

Leave a Review

Leave a review
Cancel review
View full changelog
Close changelog

Changelog

  • Version 3.0.0.0 • Released on: 2021-02-02 12:03:22
    Download
    Description:

    Mavenized project.
    Added Saito method to improve distance transform accuracy

  • Version 2.1.3.0 • Released on: 2020-04-20 14:25:00
    Download
    Description:

    Added Inversion parameter on EzPlugin

  • Version 2.1.2.0 • Released on: 2017-03-24 18:51:29
    Download
    Description:

    Improved performance on 3D mesh ROI

  • Version 2.1.1.0 • Released on: 2017-02-21 11:53:22
    Download
    Description:

    Fixed the data iterator issue (hopefully one last time!)

  • Version 2.1.0.0 • Released on: 2017-02-20 20:46:24
    Download
    Description:

    * Circumvent an issue in SequenceDataIterator (Icy versions up to 1.8.6)
    * New: multi-thread computation on time-lapse data

  • Version 2.0.4.0 • Released on: 2017-02-20 14:59:00
    Download
    Description:

    Fixed an issue on the 3D Chamfer3 algorithm

  • Version 2.0.3.0 • Released on: 2017-02-20 12:44:41
    Download
    Description:

    Fixed an issue introduced in the previous update where in temporal (T=-1) ROI were not processed correctly

  • Version 2.0.2.0 • Released on: 2017-02-13 17:30:00
    Download
    Description:

    Fixed an issue with time series analysis

  • Version 2.0.1.0 • Released on: 2017-01-11 19:03:21
    Download
    Description:

    Fixed an issue in the 5x5x5 Chamfer distance algorithm

  • Version 2.0.0.0 • Released on: 2015-05-20 13:53:45
    Download
    Description:

    * Code refactoring & simplification.
    * Pixel size can be taken into account
    * 2D ROI with a specific Z can now be used to calculate 3D maps

  • Version 1.1.1.0 • Released on: 2015-03-25 09:24:22
    Download
    Description:

    Fixed handling of multiple ROI

  • Version 1.1.0.0 • Released on: 2015-03-19 11:33:32
    Download
    Description:

    Fixed distance map computation in 3D

  • Version 1.0.0.0 • Released on: 2014-06-27 01:24:12
    Download
    Description:

    Bumped version to 1.0 (no code change)

  • Version 0.0.1.0 • Released on: 2014-06-27 01:22:15
    Download