Landini Threshold - Automatic Segmentation

Implementation of a method for automatic adaptive local thresholding and segmentation of greyscale images.
32 download
Aggiornato 28 dic 2022

Visualizza la licenza

This is an implementation of the algorithm developed by:
G. LANDINI, D. A. RANDELL, S. FOUAD & A. GALTON, "Automatic thresholding from the gradients of region boundaries", Journal of Microscopy, Vol. 265, Issue 2 2017, pp. 185–195
"We present an approach for automatic threshold segmenta-tionofgreyscaleimages.Theprocedureisinspiredbyareinter-pretation of the strategy observed in human operators whenadjusting thresholds manually and interactively by means of‘slider’ controls. The approach translates into two methods.The first one is suitable for single or multiple global thresh-olds to be applied globally to images and consists of searchingfor a threshold value that generates a phase whose bound-ary coincides with the largest gradients in the original image.The second method is a variation, implemented to operate onthe discrete connected components of the thresholded phase(i.e. the binary regions) independently. Consequently, this be-comes an adaptive local threshold procedure, which operatesrelative to regions, rather than to local image subsets as is thecaseinmostlocalthresholdingmethodspreviouslypublished.Adding constraints for specifying certain classes of expectedobjects in the images can improve the output of the methodover the traditional ‘segmenting first, then classify’ approach"
Example usage:
Amin = min particle area to detect
Amax = max particle area to detect
Cmin = min particle circularity to detect
Lmin = Lower threshold grayscale level
Lmax = Upper threshold grayscale level
For very large images the "for" in line 46 can be swapped for "parfor" if you have the paralel computing toolbox. This will speed up the algorithm.
I = imread('coins.png');
Rfill = Landini_Threshold(I,Amin,Amax,Cmin,Lmin,Lmax);
imshow(Rfill)

Cita come

Robin Hartley (2024). Landini Threshold - Automatic Segmentation (https://www.mathworks.com/matlabcentral/fileexchange/119913-landini-threshold-automatic-segmentation), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2022b
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versione Pubblicato Note della release
1.0.2

Fixed bug which prevented blobs that overlapped with the image edge from being detected

1.0.1

Update citation

1.0.0