Structure Characterization Using Mathematical Morphology
Total Page:16
File Type:pdf, Size:1020Kb
Structure Characterization Using Mathematical Morphology Proefschrift ter verkrijging van de graad van doctor aan de Technische Universiteit Delft, op gezag van de Rector Magnificus prof. dr. ir. J.T. Fokkema, voorzitter van het College voor Promoties, in het openbaar te verdedigen op dinsdag 20 januari 2004 om 13.00 uur door Cristian Luis LUENGO HENDRIKS natuurkundig ingenieur geboren te Leiden Dit proefschrift is goedgekeurd door de promotor: Prof. dr. ir. L.J. van Vliet Samenstelling promotiecommissie: Rector Magnificus, voorzitter Prof. dr. ir. L.J. van Vliet, Technische Universiteit Delft, promotor Prof. dr. ir. J. Biemond, Technische Universiteit Delft Prof. dr. S.M. Luthi, Technische Universiteit Delft Prof. dr. E. Pirard, Université de Liège (Belgique) Prof. dr. J.B.T.M. Roerdink, Rijksuniversiteit Groningen Dr. P. Soille, EC JRC Space Applications Institute (Italy) Dr. ir. R. van den Boomgaard, Universiteit van Amsterdan Prof. dr. I.T. Young, Technische Universiteit Delft, reservelid This work was partially supported by the Dutch Ministry of Economic Affairs, through their Innovation-Driven Research Programme (IOP Beeldverwerking), project number IBV98006. Advanced School for Computing and Imaging This work was carried out in graduate school ASCI. ASCI dissertation series number 96. ISBN: 90-75691-10-6 ©2003 Cris Luengo. All rights reserved. The cover art is ©2003 Carla Hendriks. All rights reserved. Contents Summary (English) ................................. 9 Samenvatting (Nederlands) ............................. 11 Resumen (Español) ................................. 13 Introduction 15 Characterizing Structure .............................. 16 Digital Images .................................... 17 Invariance and Isotropy ............................... 20 This Thesis ..................................... 22 1. Mathematical Morphology 25 1.1 Dilation and Erosion ............................. 27 1.2 Closing and Opening ............................. 33 1.3 Other Morphological Tools .......................... 37 2. RIA Morphology 41 2.1 RIA Sedimentation and Wear ......................... 43 2.2 RIA Closing and Opening ........................... 48 2.3 Morphological Orientation-Space and RIA Morphology ........... 56 3. Granulometries 57 3.1 The Sieve and the Pattern Spectrum ..................... 58 3.2 The Size Distribution ............................. 59 3.3 Discrete Granulometries ........................... 61 3.4 Sampling the Binary Structuring Element .................. 64 3.5 Using Gray-Value Structuring Elements ................... 67 6 Contents 3.6 Method Evaluation .............................. 68 4. Sampling-Free Morphology on 1D Images 75 4.1 Continuous Representation of a Signal .................... 76 4.2 Sampling-Free Dilations ........................... 78 4.3 Sampling-Free Erosions, Closings and Openings .............. 82 4.4 Method Evaluation .............................. 82 4.5 Extension to Multi-Dimensional Images ................... 85 5. Discrete Morphology with Line SEs 89 5.1 Basic Discrete Lines: Bresenham Lines ................... 90 5.2 Periodic Lines ................................. 92 5.3 Interpolated Lines by Skewing the Image .................. 93 5.4 True Interpolated Lines ............................ 95 5.5 Band-Limited Lines .............................. 96 5.6 Comparison of Discrete Line Implementations ................ 97 5.7 Angular Selectivity .............................. 102 6. Assorted Topics Related to Granulometries 107 6.1 Alternative Granulometries .......................... 107 6.2 Pre-processing ................................. 112 6.3 The UpperEnvelope Algorithm ........................ 117 7. Applications 125 7.1 Detecting Minute Differences in Structure .................. 126 7.2 Time Evolution of Characteristic Length ................... 128 7.3 Counting Broken Rice Kernels ........................ 132 8. The Radon Transform 141 8.1 Introduction .................................. 141 8.2 Sampling the Radon transform ........................ 149 8.3 Accuracy of the parameter space ....................... 154 8.4 Reducing memory requirements ....................... 155 8.5 Results ..................................... 157 Contents 7 9. Conclusions 165 9.1 The Granulometry ............................... 165 9.2 Sampling and Morphology .......................... 167 9.3 The Radon Transform ............................. 170 A. Underestimation in the Radon Transform 171 A.1 Introduction .................................. 171 A.2 The 2D case .................................. 174 A.3 The 3D case .................................. 175 A.4 Kernel Normalization ............................. 177 Acknowledgement ................................. 179 Curriculum Vitae .................................. 181 References ...................................... 185 Index of Terms ................................... 201 Summary This thesis deals with the application of mathematical morphology to images of some kind of structure, with the intention of characterizing (or describing) that structure. The emphasis is placed on measuring properties of the real-world scene, rather than mea- suring properties of the digital image. That is, we require that the measurement tools are sampling-invariant, or at least produce a sampling-related error that is as small as possible. Filters defined by mathematical morphology can be defined both in the con- tinuous space and the sampled space, but will produce different results in both spaces. We term these differences “discretization errors”. Many of the results presented in this thesis decrease the discretization errors of morphological filters. The size distribution is the main tool used in this thesis to characterize structures. We estimate it using a granulometry, which is the projection of a morphological scale-space on the scale axis. This morphological scale-space is built with a sieve: an operation that is extensive (or anti-extensive), increasing and absorbing. The volume-weighted, cumulative size distribution of the objects in the image follows by normalization of the granulometry. Two variants of this granulometry receive the most attention: one based on isotropic, structural openings or closings, and one based on Rotation-Invariant Anisotropic (RIA) morphology. RIA openings and closings complement the isotropic ones, in that the latter remove objects based on their smallest diameter, whereas the former remove objects based on any of the other diameters (such as the length). Isotropic structural openings and closings use a disk (or an n-ball in n-D) as structuring element. The RIA openings and closings we are interested in use line segments as struc- turing elements. These two shapes are extensively studied in this thesis, and we propose various improvements to the classical algorithms that decrease the discretization errors (that is, they improve the discrete approximation to the continuous operation). For any shape, interpolation directly reduces discretization errors by reducing the relative sam- pling error of that shape. In addition to that, for disks and balls we propose a small shift with respect to the sampling grid to further reduce discretization errors. For the line seg- 10 Summary ment we propose an algorithm based on skews (with interpolation) of the image. Both these shapes can also be improved by using gray-value structuring elements. The only way of completely avoiding discretization errors in mathematical morphology is using an alternative image representation. For one-dimensional images we propose to use a piece-wise polynomial representation, based on spline interpolation. Due to the continuous nature of this representation, discretization effects are no longer relevant. We also study the selection of the morphological operation for the granulometry, and some useful pre-processing steps to prepare the image so that the estimated size distri- bution is more accurate. Among other things, we look at noise-reduction filters and their effect on the estimated granulometry. On a somewhat different note, the Radon transform (also known as Hough transform) is studied. It detects parameterized shapes in an image, and can therefore also be used to construct a size distribution. The most important difference between the Radon trans- form and the granulometry is that the former is linear, whereas the latter is strongly non-linear. Both methods do not require any form of segmentation, although they can benefit from pre-processing. We show how the Radon transform can be defined such that the resulting parameter response function is band-limited. This makes it possible to define a minimal sampling rate for this function, avoiding aliasing. The parameters can therefore be estimated with sub-pixel accuracy. Secondly, the accuracy and precision of the Radon transform for spheres is examined. In particular, we derive a theoretical approximation for the bias in the estimated radii, and propose a way to modify the transform to reduce this bias. Finally, a memory-efficient algorithm for the Radon transform is proposed. Samenvatting Dit proefschrift behandeld het toepassen van mathematische morfologie, op beelden van een structuur, met de bedoeling deze structuur te karakteriseren (of te beschrijven). De nadruk ligt op het meten van eigenschappen in de werkelijke wereld, in tegenstelling tot het meten van eigenschappen van het digitale beeld. Dat is, we eisen dat de meetinstru- menten bemonstering-invariant zijn, of tenminste een minimale