Landini Threshold - Automatic Segmentation

版本 1.0.2 (2.1 KB) 作者: Robin Hartley
Implementation of a method for automatic adaptive local thresholding and segmentation of greyscale images.
32.0 次下载
更新时间 2022/12/28

查看许可证

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)

引用格式

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

MATLAB 版本兼容性
创建方式 R2022b
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
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