Introduction to grayscale image processing by mathematical morphology Jean Cousty MorphoGraph and Imagery 2011 J. Cousty : Morpho, graphes et imagerie 3D 1/15
Outline of the lecture 1 Grayscale images 2 Operators on grayscale images J. Cousty : Morpho, graphes et imagerie 3D 2/15
Grayscale images Images Definition Let V be a set of values An image (on E with values in V) is a map I from E into V I (x) is called the value of the point (pixel) x for I J. Cousty : Morpho, graphes et imagerie 3D 3/15
Grayscale images Images Definition Let V be a set of values An image (on E with values in V) is a map I from E into V I (x) is called the value of the point (pixel) x for I Example Images with values in R + : euclidean distance map D X to a set X P(E) Images with values in Z + : distance map D X for a geodesic distance in a uniform network J. Cousty : Morpho, graphes et imagerie 3D 3/15
Grayscale images Grayscale images We denote by I the set of all images with integers values on E An image in I is also called grayscale (or graylevel) image J. Cousty : Morpho, graphes et imagerie 3D 4/15
Grayscale images Grayscale images We denote by I the set of all images with integers values on E An image in I is also called grayscale (or graylevel) image We denote by I an arbitrary image in I The value I (x) of a point x E is also called the gray level of x, or the gray intensity at x J. Cousty : Morpho, graphes et imagerie 3D 4/15
Grayscale images Topographical interpretation An grayscale image I can be seen as a topographical relief I (x) is called the altitude of x J. Cousty : Morpho, graphes et imagerie 3D 5/15
Grayscale images Topographical interpretation An grayscale image I can be seen as a topographical relief I (x) is called the altitude of x Bright regions: mountains, crests, hills Dark regions: bassins, valleys J. Cousty : Morpho, graphes et imagerie 3D 5/15
Grayscale images Level set Definition Let k Z The k-level set (or k-section, or k-threshold) of I, denoted by I k, is the subset of E defined by: I k = {x E I (x) k} J. Cousty : Morpho, graphes et imagerie 3D 6/15
Grayscale images Level set Definition Let k Z The k-level set (or k-section, or k-threshold) of I, denoted by I k, is the subset of E defined by: I k = {x E I (x) k} I I 80 I 150 I 220 J. Cousty : Morpho, graphes et imagerie 3D 6/15
Grayscale images Reconstruction Property k, k Z, k > k = I k I k I (x) = max{k Z x I k } J. Cousty : Morpho, graphes et imagerie 3D 7/15
grayscale operators An operator (on I) is a map from I into I J. Cousty : Morpho, graphes et imagerie 3D 8/15
grayscale operators An operator (on I) is a map from I into I Definition (flat operators) Let γ be an increasing operator on E The stack operator induced by γ is the operator on I, also denoted by γ, defined by: I I, k Z, [γ(i )] k = γ(i k ) J. Cousty : Morpho, graphes et imagerie 3D 8/15
grayscale operators An operator (on I) is a map from I into I Definition (flat operators) Let γ be an increasing operator on E The stack operator induced by γ is the operator on I, also denoted by γ, defined by: I I, k Z, [γ(i )] k = γ(i k ) Exercice. Show that a same construction cannot be used to derive an operator on I from an operator on E that is not increasing. J. Cousty : Morpho, graphes et imagerie 3D 8/15
Characterisation of grayscale operators Property Let γ be an increasing operator on E [γ(i )](x) = max{k Z x γ(i k )} J. Cousty : Morpho, graphes et imagerie 3D 9/15
Characterisation of grayscale operators Property Let γ be an increasing operator on E [γ(i )](x) = max{k Z x γ(i k )} Remark. Untill now, all operators seen in the MorphoGraph and Imagery course are increasing J. Cousty : Morpho, graphes et imagerie 3D 9/15
Illustration: dilation on I by Γ I I 80 I 150 I 220 δ Γ (I ) δ Γ (I ) 80 δ Γ (I ) 150 δ Γ (I ) 220 J. Cousty : Morpho, graphes et imagerie 3D 10/15
Illustration: erosion on I by Γ I I 80 I 150 I 220 ɛ Γ (I ) ɛ Γ (I ) 80 ɛ Γ (I ) 150 ɛ Γ (I ) 220 J. Cousty : Morpho, graphes et imagerie 3D 11/15
Illustration: opening on I by Γ I I 80 I 150 I 220 γ Γ (I ) γ Γ (I ) 80 γ Γ (I ) 150 γ Γ (I ) 220 J. Cousty : Morpho, graphes et imagerie 3D 12/15
Illustration: closing on I by Γ I I 80 I 150 I 220 φ Γ (I ) φ Γ (I ) 80 φ Γ (I ) 150 φ Γ (I ) 220 J. Cousty : Morpho, graphes et imagerie 3D 13/15
Dilation/Erosion by a structuring element: characterisation Property (duality) Let Γ be a structuring element ɛ Γ (I ) = δ Γ 1( I ) J. Cousty : Morpho, graphes et imagerie 3D 14/15
Dilation/Erosion by a structuring element: characterisation Property (duality) Let Γ be a structuring element ɛ Γ (I ) = δ Γ 1( I ) Property Let Γ be a structuring element [δ Γ (I )](x) = max{i (y) y Γ 1 (x)} [ɛ Γ (I )](x) = min{i (y) y Γ(x)} J. Cousty : Morpho, graphes et imagerie 3D 14/15
Exercise Write an algorithm whose data are a graph (E, Γ) and a grayscale image I on E and whose result is the image I = δ Γ (I ) J. Cousty : Morpho, graphes et imagerie 3D 15/15