Download presentation
Presentation is loading. Please wait.
1
Gray-level images
2
Image thresholding During the thresholding process, individual pixels in an image are marked as “object” pixels if their value is greater than some threshold value (assuming an object to be brighter than the background) and as “background” pixels otherwise. This convention is known as threshold above. Variants include threshold below, which is opposite of threshold above; threshold inside, where a pixel is labeled "object" if its value is between two thresholds; and threshold outside, which is the opposite of threshold inside (Shapiro, et al. 2001:83). Typically, an object pixel is given a value of “1” while a background pixel is given a value of “0.” Finally, a binary image is created by coloring each pixel white or black, depending on a pixel's label.
3
Image thresholding Sezgin and Sankur (2004) categorize thresholding methods into the following six groups based on the information the algorithm manipulates (Sezgin et al., 2004): histogram shape-based methods, where, for example, the peaks, valleys and curvatures of the smoothed histogram are analyzed clustering-based methods, where the gray-level samples are clustered in two parts as background and foreground (object), or alternately are modeled as a mixture of two Gaussians entropy-based methods result in algorithms that use the entropy of the foreground and background regions, the cross-entropy between the original and binarized image, etc. object attribute-based methods search a measure of similarity between the gray-level and the binarized images, such as fuzzy shape similarity, edge coincidence, etc. spatial methods [that] use higher-order probability distribution and/or correlation between pixels local methods adapt the threshold value on each pixel to the local image characteristics."
4
Mathematical morphology
Mathematical Morphology was born in 1964 from the collaborative work of Georges Matheron and Jean Serra, at the École des Mines de Paris, France. Matheron supervised the PhD thesis of Serra, devoted to the quantification of mineral characteristics from thin cross sections, and this work resulted in a novel practical approach, as well as theoretical advancements in integral geometry and topology.
5
In 1968, the Centre de Morphologie Mathématique was founded by the École des
Mines de Paris in Fontainebleau, France, lead by Matheron and Serra. During the rest of the 1960's and most of the 1970's, MM dealt essentially with binary images, treated as sets, and generated a large number of binary operators and techniques: Hit-or-miss transform, dilation, erosion, opening, closing, granulometry, thinning, skeletonization, ultimate erosion, conditional bisector, and others. A random approach was also developed, based on novel image models. Most of the work in that period was developed in Fontainebleau. The name ‘Mathematical Morphology’ for the new discipline was coined in a pub.
6
From mid-1970's to mid-1980's, MM was generalized to grayscale functions
and images as well. Besides extending the main concepts (such as dilation, erosion, etc...) to functions, this generalization yielded new operators, such as morphological gradients, top-hat transform and the Watershed (MM's main segmentation approach). In the 1980's and 1990's, MM gained a wider recognition, as research centers in several countries began to adopt and investigate the method. MM started to be applied to a large number of imaging problems and applications.
7
In 1986, Jean Serra further generalized MM, this time to a theoretical
framework based on complete lattices. This generalization brought flexibility to the theory, enabling its application to a much larger number of structures, including color images, video, graphs, meshes, etc... At the same time, Matheron and Serra also formulated a theory for morphological filtering, based on the new lattice framework. The 1990's and 2000's also saw further theoretical advancements, including the concepts of connections and levelings.
29
When the structuring element B has a center (e. g
When the structuring element B has a center (e.g., B is a disk or a square), and this center is located on the origin of E, then the erosion of A by B can be understood as the locus of points reached by the center of B when B moves inside A.
31
Erosion and dilation in Matlab
32
The erosion of the dark-blue square by a disk, resulting in the light-blue square.
41
Dilation Alternative way to "see it"
46
Opening
47
Opening Alternative way to "see it"
49
Closing
65
Grayscale Dilation Grayscale Dilation: A grayscale image F dilated by a grayscale SE K is defined as: It generally brighten the source image. Bright regions surrounded by dark regions grow in size, and dark regions surrounded by bright regions shrink in size. Small dark spots in images will disappear as they get `filled in' to the surrounding intensity value. Small bright spots will become larger spots. The effect is most marked at places in the image where the intensity changes rapidly and regions of fairly uniform intensity will be largely unchanged except at their edges.
66
Grayscale Dilation Bright regions surrounded by dark regions grow in size Dark regions surrounded by bright regions shrink in size. Small dark spots in images will disappear as they get `filled in' to the surrounding intensity value. Small bright spots will become larger spots. The effect is most marked at places in the image where the intensity changes rapidly and regions of fairly uniform intensity will be largely unchanged except at their edges.
67
Grayscale Dilation Matlab code
function [out] = graydil(im,se) if (~isa(se,'strel')) se=strel(se); end seq=getsequence(se); lunghezza=size(seq,1); out=gdil(im,getnhood(seq(1)),2); for ii=2:lunghezza out=gdil(out,getnhood(seq(ii)),2);
68
Grayscale Dilation dilation dilation over original
69
Grayscale Dilation Source image Dilated image
70
Grayscale Erosion Grayscale Erosion: A grayscale image F eroded by a grayscale SE K is defined as: It generally darken the image. Bright regions surrounded by dark regions shrink in size, and dark regions surrounded by bright regions grow in size. Small bright spots in images will disappear as they get eroded away down to the surrounding intensity value, and small dark spots will become larger spots. The effect is most marked at places in the image where the intensity changes rapidly, and regions of fairly uniform intensity will be left more or less unchanged except at their edges.
71
Grayscale Erosion Bright regions surrounded by dark regions shrink in size Dark regions surrounded by bright regions grow in size. Small bright spots in images will disappear as they get eroded away down to the surrounding intensity value Small dark spots will become larger spots. The effect is most marked at places in the image where the intensity changes rapidly, and regions of fairly uniform intensity will be left more or less unchanged except at their edges.
72
Grayscale Erosion Matlab code
function [out] = grayero(im,se) if (~isa(se,'strel')) se=strel(se); end seq=getsequence(se); lunghezza=size(seq,1); out=gerod(im,getnhood(seq(1)),2); for ii=2:lunghezza out=gerod(out,getnhood(seq(ii)),2);
73
Grayscale Erosion erosion erosion under original
74
Grayscale Erosion Source image Eroded image
75
Grayscale Opening Grayscale Opening: A grayscale image F opened by a grayscale SE K is defined as: It can be used to select and preserve particular intensity patterns while attenuating others Width of Opening kernel intensity intensity The important thing to notice here is the way in which bright features smaller than the structuring element should be greatly reduced in intensity, while larger features have remained more or less unchanged in intensity. scan line scan line
76
Grayscale Opening opening opened & original
77
Grayscale Opening Source image Opened image
78
Grayscale Closing Grayscale Closing: A grayscale image F closed by a grayscale SE K is defined as: It is another way to select and preserve particular intensity patterns while attenuating others. Width of closing kernel intensity intensity scan line scan line
79
Grayscale Closing closing closing & original
80
Grayscale Closing Source image Closed image
81
Grayscale Dilation and Erosion
Grayscale dilation and erosion with disk‐shaped structuring elements of radius r = 2.5, 5.0, 10.0
82
Grayscale Dilation and Erosion
Grayscale dilation and erosion with various free‐form structuring elements
83
Grayscale Opening and Closing
Grayscale opening and closing with disk‐shaped structuring elements of radius r = 2.5, 5.0, 10.0
84
Morphological Edge Detection
Morphological Edge Detection is based on Binary Dilation, Binary Erosion and Image Subtraction. Morphological Edge Detection Algorithms: Standard: External: Internal:
85
Morphological Edge Detection
F K F F K K
86
Morphological Edge Detection
F
87
Morphological Gradient
Morphological Gradient is calculated by grayscale dilation and grayscale Erosion. It is quite similar to the standard edge detection We also have external and internal gradient
88
Morphological Gradient
Standard External Internal
89
Morphological Smoothing
Morphological Smoothing is based on the observation that a grayscale opening smoothes a grayscale image from above the brightness surface and the grayscale closing smoothes from below. So we could get both smooth like:
90
Morphological Smoothing
Frequency spectrum, in linear system theory, provides a measure of similarity between a function and the collection of all the possible sinusoids, whereas pattern spectrum, in mathematical morphology, provides a measure of a set and the collection of all the possible structuring elements.
91
Operators In Software VTK: vtkImageContinuousDilate3D()
vtkImageContinuousErode3D() ITK: itkGrayscaleDilateImageFilter() (Flat SE) itkGrayscaleErodeImageFilter() (Flat SE) itkGrayscaleFunctionDilateImageFilter() (Grayscale SE) itkGrayscaleFunctionErodeImageFilter() (Grayscale SE) MATLAB: mmdil(), mmero(), mmopen(),mmclose(), mmgradm()
92
Top-hat Transform Top-hat Transform (TT): An efficient segmentation tool for extracting bright (respectively dark) objects from uneven background. White Top-hat Transform (WTT): (ri is the scalar of SE) Black Top-hat Transform (BTT):
93
Top-hat Transform tophat + opened = original
tophat: original - opening
94
Top-hat Transform BTT WTT
95
Top-hat Transform BTT WTT
96
Application 1 Detecting runways in satellite airport imagery
Source WTT Threshold Detect long feature Final result Reconstruction
97
The End
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.