Professional Documents
Culture Documents
Pre-Processing of Images
Pre-Processing of Images
Pre-processing of images
Why pre-processing
Why pre-processing?
1- The instrument/detector.
3- The radiation
1
19/11/2017
Why pre-processing
Targets of pre-processing
Why pre-processing
Steps of pre-processing
There are many particular problems that must be solved in a particular manner
shape
2
19/11/2017
Why pre-processing
Steps of pre-processing
There are many particular problems that must be solved in a particular manner
background saturation
roughness
Why pre-processing
Steps of pre-processing
There are many particular problems that must be solved in a particular manner
background Edges
Saturation
Shapes
3
19/11/2017
Why pre-processing
Steps of pre-processing
Why pre-processing
Steps of pre-processing
4
19/11/2017
Why pre-processing
Steps of pre-processing
Image compression
5
19/11/2017
Image compression
Image compression
Image compression
Matlab Only useful for storage of images. Matlab mostly work with double
precission numbers.
Out of the scope of this course. But useful for reading from hyperspectral cameras.
6
19/11/2017
Image compression
Floating point number Method for representing real world numbers in computers
mantissa
Image compression
7
19/11/2017
Image compression
When the spatial resolution is too big (many pixels in a small area)
Calculate the mean (or median) spectrum of a sub-window of the hyperspectral image
10 5
Image compression
Consequences:
8
19/11/2017
Image compression
Image compression
Consequences:
9
19/11/2017
Image compression
Useful for storage. Before using the hyperspectral images again, they must be
reconstructed.
Two examples:
3D wavelets transformation
Image compression
Scores and loadings are stored, together with the explained variance
Many more PCs are stored in order to be sure that the noise contains just noise
Example:
10
19/11/2017
Image compression
3D wavelet transformations
There is no rule (again) for selecting the type of wavelet. Some advices:
Image compression
11
19/11/2017
Image compression
Image compression
Model approach
Consequences:
12
19/11/2017
Background removal
Background removal
The shape of the sample or the distance between elements play an important role
13
19/11/2017
Background removal
The shape of the sample or the distance between elements play an important role
Background removal
14
19/11/2017
Background removal
Consequences:
Many possibilities
Surface smoothing
15
19/11/2017
Surface smoothing
Surface noise
Gaussian
Surface smoothing
Surface noise
Gaussian noise
The Gaussian noise (normal noise) is the noise that models the noise generated
by the sensors. Usually because of the lack of illumination.
16
19/11/2017
Surface smoothing
Surface noise
The salt and pepper noise is normally produced in the quantitation step of the
digitalization
Surface smoothing
17
19/11/2017
Surface smoothing
Gaussian filters
Surface smoothing
Wiener filters
18
19/11/2017
Surface smoothing
Consequences:
Mostly used for RGB, digital and Multispectral images from different sources
19
19/11/2017
Dead pixels and/or lines are usually caused by anomalies in the detectors.
Dead pixels can distort multivariate models; whereas many of the routines for
multivariate data analysis (e.g. PCA or MCR) can handle only a limited amount of
missing values.
They may be present as missing, infinite or zero values; and their location and size may
vary between being a specific pixel, a group of pixels or a complete pixel line
20
19/11/2017
Spiked wavelenths
23
x 10
2 3
-2 2
-6 1
-10 0
4000 5000 6000 7000 4000 5000 6000 7000
wavelength (cm-1) wavelength (cm-1)
Spiked wavelenths
For each pixel, calculate the mean spectrum plus the standard deviation. Then,
establishing a threshold they can be easily detected.
Change the value by the mean of a sub-window with the neighbor values.
23
x 10 4
2
-2
3
-6
2
-10
4000 5000 6000 7000
wavelength (cm-1) 4000 5000 6000 7000
wavelength (cm-1)
21
19/11/2017
Spiked wavelenths
For each pixel, calculate the mean spectrum plus the standard deviation. Then,
establishing a threshold they can be easily detected.
Change the value by the mean of a sub-window with the neighbor values.
3 1.2
1 0.6
0
4000 5000 6000 7000 0.2
4000 5000 6000 7000
wavelength (cm-1)
wavelength (cm-1)
Spectral pre-processing
22
19/11/2017
Spectral pre-processing
Spectral pre-processing
As usual, there are many filters (and they might be the same, with different name)
Spectral pre-processing
Minimize scattering
Derivatives
Smoothing
Fourier transform
Increase variability
Derivatives
FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk
23
19/11/2017
Spectral pre-processing
Spectrum to be corrected
Reference spectrum
Spectral pre-processing
Spectrum to be corrected
Δy
Δy
Δx m=
Δx
oo
Reference spectrum
24
19/11/2017
Spectral pre-processing
Raw spectrum – oo
Spectrum corrected =
m
Spectral pre-processing
Consequences:
25
19/11/2017
Spectral pre-processing
Consequences:
Spectral pre-processing
Each spectrum is substracted the mean value and divided by the standard deviation.
a) Raw data and single wave number image for API at 5984 cm-1 b) SNV and smoothed data and single wave number image
Absorbance (a.u.)
0.1
Absorbance (a.u.)
0.3 1
20 0.2 20
0.5 0
0.2
40 0 40 -0.1
0.1
0.1 -0.5
-0.2
60 -1 60
0 0 -0.3
-1.5
-0.1 80 80
5000 5500 6000 6500 7000 20 40 60 80 5000 5500 6000 6500 7000 20 40 60 80
26
19/11/2017
Spectral pre-processing
Consequences:
It removes additive artifacts in the spectra
It is extremely simple and does NOT change the shape of the spectrum
The shadows and shapes are minimized
Spectral pre-processing
- MSC is based on a least square regression, therefore is less sensitive to the noise
- Effects correction
* SNV Additive effects
* MSC Multiplicative effects
- Relationship:
27
19/11/2017
Spectral pre-processing
Smoothing
Window of 5
Window of 13
Spectral pre-processing
Smoothing
Window of 5
Window of 13
28
19/11/2017
Spectral pre-processing
Smoothing
Consequences:
Spectral pre-processing
Derivatives (Savitzky-Golay)
29
19/11/2017
Spectral pre-processing
Derivatives (Savitzky-Golay)
Additive (scattering)
correction
Multiplicative
correction
Spectral pre-processing
Derivatives (Savitzky-Golay)
Consequences:
30
19/11/2017
Spectral pre-processing
Spectral pre-processing
200
Intensity (a.u.)
150
100
50
500 600 700 800 900
Wavelengths (nm.)
31
19/11/2017
Spectral pre-processing
0.6
0.5 R1150
Reflectance
0.4 R1200
0.3
R1250
0.2
R1400
0.1
1000 1100 1200 1300 1400 1500 1600 1700
Wavelength (nm)
Spectral pre-processing
32
19/11/2017
Full pre-processing
Summary
33