08_Trasformation techniques

Transcript

08_Trasformation techniques
Processing techniques
on remotely sensed data (images)
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Transformations
•  Image transformations are operations, which transform the
way their information content is represented
•  Transformed images generally contain the same information as
in the original images (one or more) but with a different
representation
•  Specifically, the transformed images will highlight certain
aspects of their information content
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Transformation
•  different types, loose definition
•  between image correction and actual information extraction
•  a wide range of operations to make the interesting features
emerge from the undesired or non-relevant information
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Where are we?
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Different transformation classes
•  We will consider the following, most common classes of
transformations:
– 
– 
– 
– 
– 
– 
Threshold operations
Mathematical operations
Principal component analysis
IHS transformation
Discrete Fourier Transform
Wavelet transform
•  These transformations will be studied in depth in the MS
course, we provide only some clues here.
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Threshold
•  simplest operation: all pixels below a threshold are set to a
single value, all the others to a different value
⎧ x < thr.
⎪ i, j
⎨ x i, j = thr.
⎪
⎩ x i, j > thr.
•  Result: binary “MASK image”
y i, j = 0
y i, j = {0,1}
y i, j = 1
x = source image; y = thresholded image
€
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Math operators
•  Math operators are applied to single pixels (same-location),
the images must be accurately registered (inaccurate
registration may cause artifacts)
•  Base operations are:
– 
– 
– 
– 
subtraction (e.g. change detection)
sum (e.g. noise reduction)
multiplication (typically by a mask)
division (change detection, index extraction, band comparison …)
•  Operators can be combined
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Principal Component Analysis
•  Spectrally near images tend to be correlated
•  Practically, this means that images “look alike”
Band 1
Università di Pavia
Band 2
Band 3
Band 4
Fabio Dell’Acqua – Gruppo di Telerilevamento
Formal and actual dimension
•  Theoretically n bands = n dimensional data
–  but nearby bands are often strongly correlated
–  “actual” dimension of the data is lower
•  Correlation means redundance. The actual dimensions are
those required to represent data with negligible information
loss
•  How can we deal with it?
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Principal Component Analysis (PCA)
•  The Principal Component Analysis (PCA) defines new axes
along which to project the data
n
•  Based on co-variance: ∑ (x
cov(X,Y ) =
i
− x )(y i − y )
i=1
n
= cov(Y, X)
C n×n = (c i, j : c i, j = cov(Dimi ,Dim j ))
€
€
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Eigencomputation
•  To extract the maximum variability directions, an
eigenproblem has to be set:
n×n
i
i
i
C


⋅e = λ ⋅e
•  first, eigenvalues must be computed:
C
n×n
− λI = 0 → λi
•  Then replacing eigenvalues in eq. above, eigenvectors can be
computed.
€
€
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
•  Eigenvectors ei represent the axes of the new reference system,
generally organized by decreasing eigenvalues
•  e1 defines the PRINCIPAL COMPONENT of the image
•  Moreover:
–  the first ei ’s, i.e. for low i, are termed Principal Components
–  every successive axis adds completely new information
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
multiband image example
•  LANDSAT-7 image on Canon City, Colorado, USA
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Principal components
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Minimum Noise Fraction
•  A variation can be introduced if a noise model is available
•  The transformation can be adjusted to maximize the action of
pushing noise away from principal components
•  A method exists called Minimum Noise Fraction or MNF
–  the co-variance of noise is estimated;
–  the image is transformed to decorrelate noise
–  the resulting image is then transformed again to separate data
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Transformations
Histogram transformations
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
What is a histogram?
•  An image histogram is a diagram acting as a graphical
representation of the tonal distribution in a digital image
•  Frequency (number) distribution of pixel values
Frequency,
or number
of events
Pixel value
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Image histogram
abscissa: pixel values (e.g. 0-255)
ordinates: pixel frequency, or
pixel number
image shade distribution can be
judged at a glance
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Color image histogram
•  For colour images, histograms are drawn on each colour
component
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Histogram transformations
•  Different operations, all leading to specific, systematic DN
replacements (ALL pixels with a given DN are replaced with
the same new DN)
–  physical meaning is altered (original radiance/reflectance is lost!)
–  spatial relations are unchanged (pixels are NOT “moved”)
–  spatial proximity is not relevant (“point operation”)
•  Generally, hist. transformations are used for visualization
enhancement purposes or very specific processing
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Histogram transformation
•  Pixel operation: described by a in-to-out pixel value
relationship.
out
modified pixel value
in
original pixel value
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Other pixel operations
•  Thresholding:
out
thresholded pixel value
in
original pixel value
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Contrast (linear) stretching
* computation of min, max
* linear stretching to fit the
entire available value range
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
EO example
linear stretch
linear -2%
Optical images: sun glint / Radar images: speckle noise
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Scattergrams
•  Scattergrams are the 2-D equivalent of histograms, for
multiband data
DN – II band
Canonical form:
#/ freq.
DN – I band
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Scattergrams
•  Frequency/# is generally color-coded
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Transformations
Image filtering
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Filtering
•  In image processing, filtering denotes a wide range of possible
operations performed on a local neighbourhood of a pixel.
•  Filters can be LINEAR or Non-LINEAR
•  Linear filters are defined by a convolution operation:
http://homepages.inf.ed.ac.uk/rbf/HIPR2/filtops.htm
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Kernel
•  Convolution can be visualized as an operation on a window
(the size of the “kernel”) sliding on the image
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Boundary effects
•  Boundary pixels lack some adjacent pixels
•  Two possible approaches
–  suppressing boundary results
–  build dummy additional rows/columns by replicating boundary pixels
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Linear filters
•  In image processing, linear filters are mainly used:
–  either to suppress the high frequencies in the image, i.e. smoothing the
image, or
–  to suppress the low frequencies, i.e. enhancing or detecting edges in the
image
•  It is up to the KERNEL coefficients!
Università di Pavia
k11
k12
k13
k21
k22
k23
k31
k32
k33
Fabio Dell’Acqua – Gruppo di Telerilevamento
Low pass filtering
•  Image smoothing; replace each pixel value in an image with
the mean (average) value of its neighbors, including itself
•  “sliding average”
•  the larger the kernel, the stronger the smoothing effect
•  to eliminate pixel values which are unrepresentative of their
surroundings.
Università di Pavia
1/9
1/9
1/9
1/9
1/9
1/9
1/9
1/9
1/9
Fabio Dell’Acqua – Gruppo di Telerilevamento
low pass filtering
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
high-pass filtering
•  Complementary to the low-pass filter
•  enhances differences
•  removes average
Università di Pavia
-1/9
-1/9
-1/9
-1/9
8/9
-1/9
-1/9
-1/9
-1/9
Fabio Dell’Acqua – Gruppo di Telerilevamento
high-pass filter
high-spatial-variability
components are enhanced
averages are suppressed (lake
becomes gray)
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Non-linear filtering
•  The operations on the kernel may be non-linear: NONLINEAR FILTERING
•  Major classes are:
– 
– 
– 
– 
feature extractors (e.g. edge extractors)
morphological operations
texture filters
adaptive filters
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Morphology
•  Morphological operators:
–  take a binary image and a structuring element (kernel) as input
–  combine them using a set operator (intersection, union, inclusion,
complement)
•  Kernel:
0
1
0
1
1
1
0
1
0
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Dilation, erosion
•  The operation on the pixels involved in the kernel masking can
be for example:
–  minimum: EROSION operation
–  maximum: DILATION operation
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Examples
Kernel
1
1
1
1
1
1
1
1
1
DILATION
EROSION
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Texture filters
•  Texture filters provide results related to local statistics
•  Statistics are computed on the given kernel
single local statistic on kernel-defined elements
original image
Università di Pavia
texture map
Fabio Dell’Acqua – Gruppo di Telerilevamento
Principle scheme
kernel on original image
Texture map
σ = …
σ refernce pixel
(kernel centre)
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Texture maps
•  Two types
–  OCCURRENCE FILTERS: the order of samples within the kernel is
NOT relevant
–  CO-OCCURRENCE FILTERS: scrambling samples changes results
•  Steps:
– 
– 
– 
– 
Define a Grey Level Co-occurrence Matrix (GLCM)
Fill in the GLCM
use it to compute the local texture value
repeat for every possible kernel location
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Adaptive Filters
•  All filters examined so far use the same parameters and
algorithms everywhere
•  Image characteristics may vary spatially:
–  optical: illumination gradient, look angle (airborne)
–  radar: multiplicative noise
•  Adaptive filters estimate local parameters and adapt their
behaviour accordingly: ADAPTIVE filters
–  gamma, Lee filters for radar data
–  adaptive thresholding for optical data
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
and so on…
•  huge variety of possible “filtering” operations in literature
•  brand new ones keep coming up
•  Just to get a flavour:
–  R.A. Schowengerdt, Remote Sensing: Models and Methods for Image
Processing, Academic Press, San Diego and London, 1997.
–  J.R. Jensen, Introductory Digital Image Processing: A Remote Sensing
Perspective, 2nd Edition, Prentice Hall, NJ 1996.
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Feature detection
•  identification of meaningful image features on the basis of
distributions of pixel graylevels
–  line detection
–  circle detection
–  template matching
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Hough transform
•  can be used to isolate features of a particular shape (lines,
circles) within an image
–  parametric description of the shape
–  transformation of image into parametric space
–  search for shape in the parameter space
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Segmentation
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Image Segmentation
•  Segmenting an image means partitioning the image (data) into
connected, homogeneous areas, generally associated with
specific objects or with background
•  Segmentation can be a good base for successive steps to build
upon, because
–  isolates objects – useful to specialize processing
–  groups “similar pixels” – enlarges statistical basis
http://people.csail.mit.edu/seth/pubs/taskforce/paragraph3_5_0_0_3.html
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Example
http://code.google.com/p/k-identify/wiki/Output
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Watershed segmentation
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Image Segmentation
•  For intensity images (point-wise intensity levels) four popular
approaches are:
– 
– 
– 
– 
threshold techniques,
edge-based methods,
region-based techniques, and
connectivity-preserving relaxation methods
http://people.csail.mit.edu/seth/pubs/taskforce/paragraph3_5_0_0_3.html
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Edge-based: example
C/S image of Chengdu, P.R.C.
Hough-based edge extraction
edge dilation
Università di Pavia
edge extension
labelling, gap filling
Fabio Dell’Acqua – Gruppo di Telerilevamento
C/S image on Port-au-Prince, Haiti
12 Dec
2009
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento
Segmentation result
Università di Pavia
Fabio Dell’Acqua – Gruppo di Telerilevamento