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
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
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
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
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
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
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
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
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
Grayscale images
Reconstruction
Property
∀k, k 0 ∈ Z , k 0 > k = ⇒ I k
0⊆ I k I (x) = max{k ∈ Z | x ∈ I k }
J. Cousty : Morpho, graphes et imagerie 3D 7/15
Operators on grayscale images
grayscale operators
An operator (on I) is a map from I into I
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.
Operators on grayscale images
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
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.
Operators on grayscale images
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
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
Operators on grayscale images
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
Operators on grayscale images
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
Operators on grayscale images
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
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)}
Operators on grayscale images
Exercise
Write an algorithm whose data are a graph (E , Γ) and a grayscale image I on E and whose result is the image I 0 = δ Γ (I 0 )
J. Cousty : Morpho, graphes et imagerie 3D 15/15