In this paper, a comprehensive set of fast algorithms for computing granulometries in binary images is first proposed: linear granulometries (i.e., granulometries based on openings with line segments) constitute the easiest case, and are computed using image `run-length'. The 2D case (granulometries with square or `diamond'-shaped structuring elements, or granulometries with unions of line-segments at different orientations) involves the determination of opening functions or granulometry functions. The grayscale case is then addressed, and a new algorithm for computing grayscale linear granulometries is introduced. This algorithm is orders of magnitude faster than any previously available technique. The techniques introduced in this paper open up a new range of applications for granulometries, examples of which are described in the paper.
Luc M. Vincent, Luc M. Vincent,
"Fast opening functions and morphological granulometries", Proc. SPIE 2300, Image Algebra and Morphological Image Processing V, (30 June 1994); doi: 10.1117/12.179208; https://doi.org/10.1117/12.179208