B can be defined as important).
2
⊖ = { ∈ ∶ + ∈ , ∈ } Application→ It can open a gap between
object connected by a thin bridge of
Definig traslation of object A by a vector t pixels. Any region survived by erosion,
2
= { ∈ ∶ = + , ∈ } are restored by the dilation.
The erosion can be defined as the
intersection of all the (negative) • Closing
translaion : the closing of an image is a dilation
⊖ = ⋂ followed by an erosion
−
∈ ⋅ = ( ⊕ ) ⊝
Erosion erodes away the boundaries
region of foregroground pixels that is not →
Method basically we filled the holes.
completely sourrounded by other white
pixels→ pixels of object become →
Application Smooth contours, fuses
backgrounds, the once connected to the narrow breaks and fills holes keeping the
background. initial region size.
→
Method We start to slide the SE on
the image: everytime we have a NB: the shape of the SE is the key!
COMPLETE match between the all SE and
the pixel of the image, we put 1 only in
the corresponding output pixel. • Region filling
→
Application shrinking of the object, we : it fills a region A given its boundaries
expand holes, we remove small things. β(A) (from an edge detection for ex)
→
Method x=X is known inside the
0
NB: the dilation and the erosion are boundaries.
→
connected erode an image is the same to We start taking the complement of A,
dilate the background (or dilate the inverse of then we need a seed point inside the
the image). object; the first operation dilate the seed
with SE, then we take the intersection
c
with A … at certain point you can see that
we have no changes so we stop the A mathematical description of an object can be
iteration. achieved as through a series of number, each
term represents the importance of a particular
ℎ ≠ spatial frequency for that object. Any periodic
−1 signal can be decomposed in a series of
(
= ⊕ )⋂ oscillating function and in many practical cases,
−1 we need only few component to have a good
= ⋃ reconstruction of the signal.
This is a conditional dilation: you start
from a point and dilate until you reach a fourier transform
point outside the boundaries. ➢ Fourier synthesis: to generate a signal as
a weighted combination of its elementary
• Skeleton frequencies
Def: it finds the skeleton S(A) of set A. ➢ Fourier analysis: to decompose the signal
⊖ = ((( ⊝ ) ⊝
Defining: into its oscillatinf function
➢
) … ⊝ ) Fourier spectrum: amplitude of the varius
frequencies component
The skeleton is: : the white noise is a period signal having
equal intensity at different frequencies, giving it a
() (
= ⊖ ) − [( ⊝ ) ∘ ]
constant power spectral density.
( ⊖ )
The notation denotes the kth : the fourier transform produces as output a
iteration of successive erosion of A by B. complex number (for each frequency) which can
be displayed in two images, either with real and
Method→basically it’s an iteration of k imaginary part or with magnitude and phase.
erosion and finally an dilation and the we In image processing we usually take only the
do the difference between the original magnitude of the fourier transformed.
image and results of these successive
erosion and 1 dilation. : the fourier transform pair in 1D signal are
given by (rispectively direct and inverse function)
Ideally the skeleton should be one line of +∞
pixel and connected, but it’s not −2
() = ∫ ()
guaranteed. −∞
+∞ 2
() = ∫ ()
−∞
fourier in image processing In 2d signal +∞ +∞
: the Fourier transform is an important tool −2(+)
(, ) = ∫ ∫ (, )
which allow us to decompose an image in sin and −∞ −∞
cos functions. The output represents the image in +∞ +∞ 2(+)
(, ) = ∫ ∫ (, )
the frequency domain. −∞ −∞
→
NB: lower frequencies higher distance NB: when we look at the spectrum it’s better to take
: The discrete fourier transform (DFT) is the log(|F(u,v)|) of the magnitudine because the DC
sampled fourier trasformed and therefore component is much greater than the other
doesn’t contain all the frequencies forming an frequencies and if we take simpy the magnitude we se
image, but a set of sample which fully describes all black with a white spot at the center that is the dc.
the spatial domain image Properities of Fourier trasform:
−1
1 −2 /
() = ∑ () = 0,1,2 … ➢ Distributivity: the FT is distributive over
→
=0 addition but not over multiplication useful
to decompose the image in simpler
−1
1 2 / frequencies to detect noise and maybe
() = ∑ () = 0,1,2 …
remove it.
=0 ➢ The rotation of an image results in equivalent
Utilizin the Euler formula we can replace the rotation of its Fourier transform
exponential with sin and cos function to make more
explicit the depence from the various frequencies
component interpreting the spectrum
−1
1 2 − 2
() = ∑ () [ ] we have not immediate relation between the
=0 →
spectrum and the image if we look at the
magnitude we lose all spatial info.
the domain F(u) is called frequency domain, General rules to associate frequencies with
where u Is the frequency of the various siusoidal pattern of intensity variation in an image:
components. ➢ Low frequencies correspond to slowly
: The discrete fourier trasform in 2d signal →
variant component of an image they
−1 −1 are at the central part of the spectrum
1 −2(/−/)
(, ) = ∑ ∑ (, ) and they are responsible for the general
∙ =0 =0 appearance of the image
➢
−1 −1 Higher frequencies correspond to faster
1 2(/−/)
(, ) = ∑ ∑ (, ) →
and faster grey levels changes They
∙ =0 =0 are away from the center of the spetrum
→ and they are resposable for the details.
MxN pixels in spatial domain MxN pixels in ➢
frequency domain For 2d signal we have mirroring:
|(, )| = |(−, −)|
We can look at the output number also as its So every time I have a spot I have also a
magnitude →
mirror spot the infos come from
2 2 2
|(. (,
(, ) = )| = ) + (, ) MxN/2 pixels because the other one are
the same.
EX: if we have an image with only one spot I
: The DC component Is the fourier trasform in expect to see 3 spots = DC, one spot and its
the origin (u,v)=(0,0) and this turns to be exactly →
mirror one in fourier spectrum its only a sin
the avarage grey level. function.
−1 −1
1 convolution theorem
(, ) = ∑ ∑ (, )
∙ =0 =0 The relation between the spatial and the
The DC component is shifted exactly at the center of frequency domain and the action of spatial filter
the spectrum.
can be seen through the convolution theorem removing noise and small details: we cut
(infact in spatial domain the operation are called sharp transition and smooth the image.
filters). ➢ Butterwoth Low pass filter
Def: given the convolution of the image f(x,y) and ➢ Gaussian Low pass filter
a kernel h(x,y) •
−1 −1 High-pass filter
(, ) ∗ ℎ(, ) = ∑ ∑ (, ) ∙ ℎ( − , − ) filter which removes low
=0 =0 frequencies.
F(u,v) and H(u,v) are the fourier transform of f and h
and we can see that the convolution in spatial domain We can imagine this filter as an image all
results as a multiplication in the frequency domain. white (1) with a black (0) circle at the
→
center (=ideal high pass filter)
removing low frequencies means
filters removing uniform things and extract fine
details: we cut slow transition.
There are 2 ways in order to apply a filter: ➢ Sharpening High-pass filter
➢ Spatial domain: convolution with spatial
operators • Band-pass filter
➢ Frequency domain: : A band-pass filter or bandpass filter
1. We move to frequency domain using (BPF) is a device that passes frequencies
the fourier trasnform within a certain range and rejects
2. We multiply the FT and the filter (attenuates) frequencies outside that
(filtering the image means multiply range.
the image with the filter pixel by
pixel)
3. We do the inverse trasform of the Passing to frequency domain it’s useful when we
product to re-obtain the image have noise with a well defined pattern. Looking at
Sometimes it’s easier working in the frequency the spectrum:
domain and the FT allow us also to isolate some ➢ When we have a noisy image we can see
frequencies. frequencies that are not there in the real
→
image and are due to noise mainly the
noise is located at high frequency.
➢ When we have a blurred image we miss
some frequencies that are present in the
→
real spectrum of the image attention:
you can’t recover this frequencies
because with filter we remove things!
• Low-pass filter image segmentation
filter which removes high
frequencies. : the image segmentation is partition an
image into meaninful regions with respect to a
We can imagine this filter as an image all particular applications→ it divides the image into
black (0) with a white (1) circle at the subregions which have simnilarities within the
→
center (=ideal low pass filter) region and some differences between adjacent
removing high frequencies means region.
The segmentation is based on measurements It is perfect for step edges corrupted
taken from the image, like grey levels, colour, by noise.
texture… Requirements:
The goal is usually find indi
-
Digital Image Processing - Riassunto
-
Image Cartonization
-
Riassunto esame Elaborazione delle immagini, Prof. Placidi Giuseppe, libro consigliato Digital Image Processing, Ra…
-
Digital Image Correlation Tecnique (DIC)