Grayscale reconstruction
Optional · supplementary note 7 of 9 for IP 09 · Morphological Image Processing. Nothing in the main text depends on it; citation numbers refer to the reference list at the bottom of this page.
Navigate: this page and this track: Navigate: this page and this track
All reconstruction definitions carry over, with replaced by the point-wise minimum and by the maximum . Geodesic dilation of a marker image under a mask image (with ) is
and reconstruction by dilation iterates this to stability. Grayscale reconstruction powers several useful filters [7]:
- Opening by reconstruction, : removes bright details smaller than the SE but restores the exact shape of everything else. A top-hat by reconstruction, , is cleaner than the ordinary top-hat because the background estimate does not have rounded “shoulders”.
- Regional maxima and the h-dome transform: reconstruct from the marker . The reconstruction flattens every peak of height at most ; subtracting it from keeps only the “domes” (peaks), each at most tall. Thresholding the domes detects bright blobs regardless of the local background level.
Code · Python · 7 lines
from skimage import data, morphology, util
import numpy as np
f = util.img_as_float(data.camera())
h = 0.1
background = morphology.reconstruction(np.clip(f - h, 0, None), f, method="dilation")
domes = f - background # bright peaks, each at most h tallReferences
- R. C. Gonzalez and R. E. Woods, Digital Image Processing, 4th ed., Pearson, 2018, Ch. 9. publisher page
- G. Matheron, Random Sets and Integral Geometry, Wiley, 1975. library record
- J. Serra, Image Analysis and Mathematical Morphology, Academic Press, 1982. library record
- R. M. Haralick, S. R. Sternberg, and X. Zhuang, “Image Analysis Using Mathematical Morphology,” IEEE Trans. Pattern Analysis and Machine Intelligence, vol. PAMI-9, pp. 532–550, 1987. doi
- P. Soille, Morphological Image Analysis, Springer, 2004. doi
- T. Y. Zhang and C. Y. Suen, “A Fast Parallel Algorithm for Thinning Digital Patterns,” Communications of the ACM, vol. 27, pp. 236–239, 1984. doi
- L. Vincent, “Morphological Grayscale Reconstruction in Image Analysis: Applications and Efficient Algorithms,” IEEE Trans. Image Processing, vol. 2, pp. 176–201, 1993. doi
- P. Maragos, “Pattern Spectrum and Multiscale Shape Representation,” IEEE Trans. Pattern Analysis and Machine Intelligence, vol. 11, no. 7, pp. 701–716, 1989. doi
- E. J. Breen and R. Jones, “Attribute Openings, Thinnings, and Granulometries,” Computer Vision and Image Understanding, vol. 64, no. 3, pp. 377–389, 1996. doi
- P. Salembier and M. H. F. Wilkinson, “Connected Operators: A Review of Region-Based Morphological Image Processing Techniques,” IEEE Signal Processing Magazine, vol. 26, no. 6, pp. 136–157, 2009. doi
- E. Carlinet and T. Géraud, “A Comparative Review of Component Tree Computation Algorithms,” IEEE Trans. Image Processing, vol. 23, pp. 3885–3895, 2014. doi
- S. van der Walt et al., “scikit-image: Image Processing in Python,” PeerJ, 2014. arXiv
- R. Mondal, S. Santra, S. S. Mukherjee, and B. Chanda, “Morphological Network: How Far Can We Go with Morphological Neurons?,” BMVC, 2022. arXiv
- K. Nogueira, J. Chanussot, M. Dalla Mura, and J. A. dos Santos, “An Introduction to Deep Morphological Networks,” arXiv:1906.01751, 2019. arXiv
- R. Hermary, G. Tochon, É. Puybareau, A. Kirszenberg, and J. Angulo, “Learning Grayscale Mathematical Morphology with Smooth Morphological Layers,” Journal of Mathematical Imaging and Vision, vol. 64, pp. 736–753, 2022. doi
- A. Kirszenberg, G. Tochon, É. Puybareau, and J. Angulo, “Going Beyond p-convolutions to Learn Grayscale Morphological Operators,” arXiv:2102.10038, 2021. arXiv
- S. Shit et al., “clDice — A Novel Topology-Preserving Loss Function for Tubular Structure Segmentation,” CVPR, 2021. arXiv