0% found this document useful (0 votes)
24 views145 pages

Dip S8ece Module4

This document discusses image restoration techniques. It begins with an introduction to image restoration versus enhancement, describing restoration as an objective process to recover an original image from distortions. It then covers degradation models, including those involving only noise. Common noise models like Gaussian, Rayleigh, and impulse noise are described. Spatial filtering approaches for restoration when only noise is present are discussed, including mean, median, max, min, and alpha-trimmed filters. Adaptive filtering is also introduced.

Uploaded by

Neeraja John
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views145 pages

Dip S8ece Module4

This document discusses image restoration techniques. It begins with an introduction to image restoration versus enhancement, describing restoration as an objective process to recover an original image from distortions. It then covers degradation models, including those involving only noise. Common noise models like Gaussian, Rayleigh, and impulse noise are described. Spatial filtering approaches for restoration when only noise is present are discussed, including mean, median, max, min, and alpha-trimmed filters. Adaptive filtering is also introduced.

Uploaded by

Neeraja John
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 145

DIGITAL IMAGE PROCESSING

(ELECTIVE - III) LA806-5


MODULE 5
Prepared by
AKAS G KAMAL
Asst. Professor
ECE Department
Amaljyothi College of Engineering
Module 4

• Image Restoration –
• Degradation model –
• Inverse filtering –
• Wiener Filter –
• Interactive restoration –
• Image analysis & vision -basic
principles only.
Outline

Image Restoration
• Image enhancement vs. restoration
• Degradation model
– Noise only
– Linear, space-invariant
• General approaches
– Inverse filters
– Wiener filters

3
IMAGE RESTORATION
• The main objective of restoration
is to improve the quality of a
digital image which has been
degraded due to Various phenomena
like:

Image degradation can
occur…..
• Motion
• Improper focusing of Camera during
image acquisition.
• Atmospheric turbulence
• Noise
Blurring due to uniform motion
Degradation due to Atmospheric turbulence
Degradation due to noise
Noise models – periodic noise

10
Image enhancement vs. restoration

• Image enhancement : process image so


that the result is more suitable for a
specific application, is largely a
subjective process.
• Image restoration : recover image from
distortions to its original image, is
largely an objective process.

11
Enhancement vs. Restoration
• Remove
“Better”effects
visual representation
of sensing environment

• Objective
Subjective

• No
Mathematical,
quantitativemodel
measures
dependent quantitative
measures
General approaches

• Model the degradation


• Apply the inverse process to recover
the original image

13
Degradation Model
• Given g(x,y), some knowledge about the

f ( x, y )  ( x, y )
degradation function h(x,y), and some  ( x , y )
knowledge about the additive noise term

• -- objective
f ( x , y: )to obtain an estimate of the original
Frequency domain
imageSpatial domain

14
Degradation models : noise only
g ( x , y )  f ( x , y )   ( x, y )
G (u, v)  F (u, v)  N (u, v)
• Images are often degraded by random noise
• Noise models
– Spatial characteristics (independent or
dependent)
– Intensity ( distribution, spectrum)
• Uniform, Gaussian, Rayleigh, Gamma (Erlang),
Exponential, impulse
– Correlation with the image (additive,
multiplicative)

15
Noise Models
• Noise can occur during
– image capture,
– transmission or processing,

• Noise is usually described by its


probabilistic characteristics

16
Noise Models
• Most types of noise are
modeled as known probability
density functions
• Noise model is decided based
on understanding of the
physics of the sources of
noise.
– Gaussian: poor illumination
– Rayleigh: range image
– Gamma, exp: laser imaging
– Impulse: faulty switch during
imaging,
– Uniform is least used.
• Parameters can be estimated
Noise Removal Restoration
Method
• Mean filters • Adaptive filters
– Arithmetic mean filter – Adaptive local noise
– Geometric mean filter reduction filter
– Harmonic mean filter – Adaptive median filter
– Contra-harmonic mean
filter
• Order statistics filters
– Median filter
– Max and min filters
– Mid-point filter
– alpha-trimmed filters
Gaussian (Normal) noise
• A very good
approximation of
noise that occurs
in many practical
cases
• Probability density
of the random
variable is given by
the Gaussian
function 19
Rayleigh noise

• Note
– The
displacement
from the origin
(Gaussian)
– The shape is
skewed to the
right

20
Gamma noise

• a > 0, b :
positive integer
• Laser imaging

21
Images & histograms
resulting from adding noises

22
Exponential noise &
Uniform noise
• Exponential
noise

• Uniform noise
23
Impulse noise (Salt and
Pepper Noise)
• Appearance is
randomly
scattered white
(salt) or black
(pepper) pixels
over the image

24
Images & histograms
resulting from adding noises

25
Periodic Noise
• It irises typically from electrical or
electromechanical interference during
image acquisition
• Periodic noise can be reduced significantly
– via frequency domain filtering
• The Fourier transform of a pure sinusoid :
– a pair of conjugate impulses located at the
conjugate frequencies of the sine wave
• Only periodic noise is global effect.
• Others can be models as local degradation
26
Image corrupted by
sinusoidal noise
Image corrupted
by sinusoidal
noise

Spectrum (each pair of


conjugate impulses
corresponds to one
sine wave )
27
Estimation of Noise
Parameters (Ⅰ)
• The parameters of noise PDFs may be
known partially from sensor
specification, but it is often necessary
to estimate them for a particular
imaging arrangement
– estimate the parameters of the PDF from
small patches of reasonably constant gray
level

28
Estimation of Noise
Parameters
• The shape of the histogram identifies
the closest PDF match
– get mean & variance of the gray levels
– use mean & variance to solve for the
parameters a & b
• Gaussian noise : mean & variance only
• Impulse noise : the actual probability of
occurrence of white & black pixels are needed

29
Restoration in the Presence of
Noise Only – Spatial Filtering
• The only degradation present in an image is noise
– Noise : unknown cannot be subtracted from
image or Fourier spectrum

• exception : periodic noise


• Spatial filtering is the method of choice in situations
when only additive noise is present
– Enhancement & restoration become almost
indistinguishable disciplines in this particular case
30
Mean filters (Ⅰ)
• Arithmetic :
– average value of the corrupted image g(s,t)
in the area defined by mask S of size m x n
– The kernel contains coefficients of value
1/mn

– Smoothing local variations; noise reduction


as a result of blurring

31
Mean filters (Ⅱ)
• Geometric :
– Smoothing is comparable to arithmetic mean
– Tend to lose less image detail

• What are the drawbacks with mean


filtering?
– A single pixel with a very unrepresentative value can
significantly affect the mean value of all the pixels
in its neighborhood
– When the filter neighborhood straddles an edge,
the filter will interpolate new values for pixels on
the edge and so will blur that edge. This may be a 32
problem if sharp edges are required in the output
Order-Statistics Filter (Ⅰ)
• The response is based on ordering the
pixels contained in the image area
encompassed by the filter
• There are several variations:

– Median filter : f x, y   median
a ,b  S
g x  a, y  b
– Max filter : reduce pepper noise

f x, y   max g x  a, y  b
a ,b S
– Min filter : reduce
 salt noise
f x, y   min g x  a, y  b 
a ,b  S

33
Order-Statistics Filter (Ⅱ)
– Midpoint filter : works best for Gaussian or
uniform noise
• Order statistics + averaging
 1
f x , y   max g x  a , y  b  min g x  a , y  b 
2  a ,b  S a , b  S 

– Alpha-trimmed mean filter :


• Delete the d/2 lowest and d/2 highest gray-level
values of g (x-a,y-b)
• Let gr (x,y) be the sum of the remaining pixels
• Useful in situations involving multiple types of noise
 g r x , y 
f x , y   34
mn  d
Demo1
• Repeated application of the median filter

Corrupted by pepper-
and-salt noise 1st time

2nd time 3rd time

35
Demo2

original Corrupted by
pepper noise

Max filter Min filter


? ?

36
Order-Statistics Filter: Drawback
• Relatively expensive and complex to
compute. To find the median it is
necessary to sort all the values in the
neighborhood into numerical order and
this is relatively slow, even with fast
sorting algorithms such as quicksort

37
Adaptive Filtering (Ⅰ)
• Changing the behavior according to the
values of the grayscales under the mask
2

mf  2 2
g  m f 
f

 f  g
Current
Mean under Variance of grayscale
the mask the image

Variance under
the mask

38
Adaptive Filtering (Ⅱ)
• If  2f is high, then the fraction is close
to 1; the output is close to the original
value g
– High  2f implies significant detail, such as
edges
mf
• If the local variance is low, such as the
background, the fraction is close to 0; the
output is close to 2
f
mf  2 2
g  m f 
 f  g 39
Adaptive Filtering:
• 
2
g
Variation
is often unknown, so is taken as the
mean of all values of  2f over the
entire image
• In practice, we adopt the slight variant :
max 0 ,  2
  g2 
mf 
f
g  m 
max  ,  
2 2 f
f g
• 3 purposes :
– Remove salt-and-pepper noise
– Smooth other noise that are not be impulsive
– Reduce distortion( e.g., excessive
thinning/thickening of object boundaries) 40
Demo (7x7 mask)

Corrupted by
original Gaussian noise
with
variance=1000

Adaptive filtering
Mean filter

41
Noise models – examples

42
Noise models – examples

43
Noise models – periodic noise

44
Estimation of Degradation Model
Degradation model:
g ( x, y )  f ( x, y )  h( x, y )   ( x, y )
or
G(u, v )  F (u, v ) H (u, v )  N (u, v )
Purpose: to estimate h(x,y) or H(u,v)

Why? If we know exactly h(x,y), regardless of noise, we can do


deconvolution to get f(x,y) back from g(x,y).

Methods:
1. Estimation by Image Observation

2. Estimation by Experiment

3. Estimation by Modeling
Estimation by Image Observation
Original image (unknown) Degraded image

f(x,y) f(x,y)*h(x,y) g(x,y)

Observation

DFT Subimage
Estimated Transfer
function Gs (u, v ) g s ( x, y )
Restoration
G ( u, v ) process by
H ( u, v )  H s ( u, v )  s estimation
Fˆs (u, v )
DFT Reconstructed
This case is used when we ˆ
F ( u, v )
know only g(x,y) and cannots
Subimage
repeat the experiment!
fˆs ( x, y )
Estimation by Experiment
Used when we have the same equipment set up and can repeat the
experiment.
Response image from
Input impulse image the system

System
H( )

A ( x, y ) g ( x, y )
DFT DFT

DFT A ( x, y ) A G ( u, v )


G ( u, v )
H ( u, v ) 
A
Estimation by Modeling
Used when we know physical mechanism underlying the image
formation process that can be expressed mathematically.

Original image Severe turbulence Example:

Atmospheric
Turbulence model

 k ( u 2  v 2 )5 / 6
H ( u, v )  e
k = 0.0025

Mild turbulence Low turbulence

k = 0.001 k = 0.00025
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Estimation by Modeling: Motion Blurring
Assume that camera velocity is ( x0 (t ), y0 (t ))
The blurred image is obtained by

T
g ( x, y )   f ( x  x0 (t ), y  y0 (t ))dt
0
where T = exposure time.

 

 
 j 2 ( ux  vy )
G ( u, v )  g ( x , y ) e dxdy
  
 
T   j 2 ( uxvy )
     f ( x  x0 (t ), y  y0 (t ))dt  e dxdy
   0 
T
  
     f ( x  x0 (t ), y  y0 (t ))e  j 2 ( ux  vy )
dxdy dt
0     
Estimation by Modeling: Motion Blurring (cont.)
T
  
G (u, v )      f ( x  x0 (t ), y  y0 (t ))e  j 2 ( ux  vy )
dxdy dt
0     
T

  F (u, v )e  j 2 ( ux0 ( t )vy0 ( t )) dt
0
T
 F (u, v )  e  j 2 ( ux0 ( t ) vy0 ( t )) dt
0
Then we get, the motion blurring transfer function:
T
H (u, v )   e  j 2 ( ux0 ( t )vy0 ( t )) dt
0

For constant motion ( x0 (t ), y0 (t ))  (at, bt)


T
T
H ( u, v )   e  j 2 ( ua  vb )
dt  sin( (ua  vb))e  j ( uavb )
0
 (ua  vb)
Motion Blurring Example
For constant motion

T
H ( u, v )  sin( (ua  vb))e  j ( uavb )
 (ua  vb)

Original image Motion blurred image


a = b = 0.1, T = 1

(Images from Rafael C. Gonzalez and Richard E.


Wood, Digital Image Processing, 2nd Edition.
Inverse Filter
From degradation model:

G(u, v )  F (u, v ) H (u, v )  N (u, v )

after we obtain H(u,v), we can estimate F(u,v) by the inverse filter:

ˆ G ( u, v ) N (u, v )
F ( u, v )   F ( u, v ) 
H ( u, v ) H ( u, v )

Noise is enhanced
when H(u,v) is small.
To avoid the side effect of enhancing
noise, we can apply this formulation
to freq. component (u,v) with in a
radius D0 from the center of H(u,v).

In practical, the inverse filter is not


Popularly used.
Inverse Filter: Example

Result of applying Result of applying


Original image the full filter the filter with D0=40

Blurred image Result of applying Result of applying


Due to Turbulence the filter with D0=70 the filter with D0=85

0.0025( u 2  v 2 )5 / 6
H ( u, v )  e
Wiener Filter: Minimum Mean Square Error Filter
Objective: optimize mean square error: 
e2  E ( f  fˆ )2 
Wiener Filter Formula:

 H *
( u , v ) S ( u , v ) 
Fˆ (u, v )   f
2 G ( u , v )
 S f (u, v ) H (u, v )  S (u, v ) 
 H * ( u, v ) 
 2 G ( u , v )
 H (u, v )  S (u, v ) / S f (u, v ) 
 1 H ( u, v )
2

 2 G ( u , v )
 H (u, v ) H (u, v )  S (u, v ) / S f (u, v ) 
where

H(u,v) = Degradation function


Sh(u,v) = Power spectrum of noise
Sf(u,v) = Power spectrum of the undegraded image
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Approximation of Wiener Filter
Wiener Filter Formula:

 1 H ( u , v )
2

Fˆ (u, v )   2 G ( u , v )
 H (u, v ) H (u, v )  S (u, v ) / S f (u, v ) 

Difficult to estimate
Approximated Formula:

2
 1 H ( u , v ) 
Fˆ (u, v )   2 G ( u , v )
 H (u, v ) H (u, v )  K 
Practically, K is chosen manually to obtained the best visual result!
Wiener Filter: Example

Result of the Result of the inverse


Original image full inverse filter filter with D0=70

Blurred image Result of the


Due to Turbulence full Wiener filter
Wiener Filter: Example (cont.)

Result of the inverse


Original image filter with D0=70

Blurred image Result of the


Due to Turbulence Wiener filter
Example: Wiener Filter and Motion Blurring
Image Result of the Result of the
degraded inverse filter Wiener filter
by motion
blur +
AWGN

sh2=650

sh2=325
Note: K is
chosen
manually

sh2=130
Wiener Filtering (Least Mean Square Filtering)

• Minimum mean-square error filter


– Assume f and  are both 2D random
sequences, uncorrelated to each
other. original, f degraded: g

– Goal: to minimize
20 20
– Solution: Frequency selective
40 40
scaling of inverse filter solution!
60 60

 
2
20 40 60 20 40 60
E f  fˆ inverse filter Wiener filter, K=0.2

20 20

40 40
2
ˆ
– White noise, H (uunknown
, v) Sf(u,vG):(u, v) 60 60
F (u, v)  2
 20 40 60 20 40 60
H (u, v)  S (u, v) / S f (u, v) H (u, v)

2
H (u , v) G (u, v)
Fˆ (u , v)  2

H (u, v )  K H (u , v)
Derivation of Wiener Filters
• Given the degraded image
g, the Wiener filter is an
optimal filter hwin such that
CE  f  hwin
**g
2
 
 E F (u, v)  H win (u, v)G (u, v)
2

E{|| f – hwin**g||2} is 
 E F (u , v)
2
 H win (u, v)  E F * (u, v)G (u, v)
minimized.
• Assume that f and  are
*
 H win 
(u , v)  E F (u , v)G* (u , v)  H win (u, v)  E G (u , v)
2 2

uncorrelated zero mean
stationary 2D random
2
 2
 S f (u, v)  H win (u, v)  H (u, v)  S f (u, v)  Sn (u, v) 
sequences with known *
 H win (u , v)  H (u , v)  S f (u , v)  H win (u , v)  H * (u, v)  S f (u, v)
power spectrum Sf and Sn.
Thus, Set C/H win (u, v)  0 
H * (u , v ) S f (u , v)
H win (u , v)  2
H (u , v) S f (u , v)  S n (u, v)

E F (u , v)   S (u, v)
2
f

E  N (u , v)   S (u , v)
2
n

E F (u , v ) N * (u , v )
 E F * (u , v) N (u , v)  0
Interactive Restoration
Example 1 (periodic noise):
Manually detect peaks
In the spectrum and
Construct a band-reject
filter.

Modified from
restoration.ppt by
Interactive Restoration
Example 2:

Take the IDFT of the


peaks in the spectrum
and construct the noise
image (e.g. Image c here)

Subtract locally weighted


noise image from the
degraded image. The
weights can be estimated
by trying to minimize the
variance of the resulting
image

Modified from
restoration.ppt by(a)Original (b) Spectrum (c) IDFT of the peaks (d) Result
IMAGE ANALYSIS
AND COMPUTER
VISION
Why is Computer Vision Difficult?

Dog or Cat?
Any four year old can tell the difference but even
the most sophisticated computers would have
difficulty making the distinction.
Why is Computer Vision Difficult?
• It is a many-to-one mapping
– A variety of surfaces with different material
and geometrical properties, possibly under
different lighting conditions, could lead to
identical images
– Inverse mapping has non unique solution (a lot of
information is lost in the transformation from
the 3D world to the 2D image)
• It is computationally intensive
• We do not understand the recognition
problem
An Industrial Computer Vision System
The Three Processing Levels
• Low-level processing
– Standard procedures are applied to improve image quality
– Procedures are required to have no intelligent
capabilities.
The Three Processing Levels
(cont’d)
• Intermediate-level processing
– Extract and characterize components in the image
– Some intelligent capabilities are required.
The Three Processing Levels
(cont’d)
• High-level processing
– Recognition and interpretation.
– Procedures require high intelligent capabilities.
Computer vision system
(another view)
The role of color
What is this object?
Does color play a role in recognition?
Might this be easier to recognize from a different view?
The role of texture
• Characteristic image texture can help us readily
recognize objects.
The role of shape
The role of grouping
Computer vision
application
Visual Inspection
Character Recognition
Document Handling
Signature Verification
Biometrics
Fingerprint Verification /
Identification
Fingerprint Identification
Research at UNR
Minutiae Matching

Delaunay Triangulation
Object Recognition
Indexing into Databases
• Shape content
Indexing into Databases
(cont’d)
• Color, texture
Target Recognition
• Department of Defense (Army,
Airforce, Navy)
Interpretation of Aerial
Photography
Interpretation of aerial photography is a problem domain in
both computer vision and photogrammetry.
Autonomous Vehicles
• Land, Underwater, Space
Traffic Monitoring
Face Detection
Face Recognition
Face Detection/Recognition
Facial Expression
Recognition
Face Tracking
Hand Gesture Recognition

• Smart Human-Computer User Interfaces


• Sign Language Recognition
Human Activity
Recognition
Medical Applications
• skin cancer breast cancer
Astronomy Applications
• Identify radio galaxies having a special
morphology called “bent-double” (in collaboration
with Lawrence Livermore National Laboratory)
Morphing
Inserting Artificial Objects
into a Scene
Image analysis
• Image analysis is the extraction of
meaningful information from images;
mainly from digital images by means of 
digital image processing techniques.
Image analysis:

• Image analysis basically involves the


study of
• Feature extraction ,
• segmentation and
• classification
Image analysis:
Spatial feature extraction
• Amplitude features
Spatial feature extraction
• Histogram features
Transform features
Edge detection
-Gradient operator
Edge detection
-compass operator
Edge detection
-compass operator
(example )
Edge detection
-Laplacian and zero crossing
operator
Edge detection
-Stochastic gradient
• Noise environment
– Filter +gradient
Example
Refer Anil K Jain: chapter- Image Analysis and Computer Vision
Boundary extraction
Shape Representation by Using Chain Codes

Chain codes: represent an object boundary by a


connected sequence of straight line segments of
specified length and direction.

4-directional 8-directional
chain code chain code
Examples of Chain Codes

Object Boundary
boundary vertices
(resampling)

4-directional 8-directional
chain code chain code
Polygon Approximation

epresent an object boundary by a polygon

Minimum perimeter
Object boundary
polygon

Minimum perimeter polygon consists of line segments that


minimize distances between boundary pixels.
Polygon Approximation:Splitting Techniques

1. Find the line joining


two extreme points
0. Object boundary
2. Find the
farthest points
from the line

3. Draw a polygon
Distance-Versus-Angle Signatures
Represent an 2-D object boundary in term of
a 1-D function of radial distance with respect to q.
Boundary Segments
Concept: Partitioning an object boundary by
using vertices of a convex hull.

Partitioned boundary

Convex hull (gray color)

Object boundary
Skeletons
Obtained from thinning or skeletonizing processes

Medial axes (dash lines)


Example: Skeletons Obtained from the Thinning Alg.

Skeleton
Boundary Descriptors
1. Simple boundary descriptors:
we can use
- Length of the boundary
- The size of smallest circle or box that can
totally enclosing the object

2. Shape number

3. Fourier descriptor

4. Statistical moments
Shape Number
Shape number of the boundary definition:
the first difference of smallest magnitude 1
The order n of the shape number:
the number of digits in the sequence
2 0

(Images from Rafael C. Gonzalez and Richard E.


Wood, Digital Image Processing, 2nd Edition.
Shape Number (cont.)

Shape numbers of order


4, 6 and 8

(Images from Rafael C. Gonzalez and Richard E.


Wood, Digital Image Processing, 2nd Edition.
Example: Shape Number

2. Find the smallest rectangle


that fits the shape

1. Original boundary

Chain code:
000030032232221211

First difference:
300031033013003130
4. Find the nearest
3. Create grid
Shape No.
Grid.
000310330130031303
Fourier Descriptor
Fourier descriptor: view a coordinate (x,y) as a complex number
(x = real part and y = imaginary part) then apply the Fourier
transform to a sequence of boundary points.

Let s(k) be a coordinate


of a boundary point k : s(k )  x(k )  jy(k )

1 K 1
Fourier descriptor : a (u )   s(k )e 2uk / K
K k 0

Reconstruction formula

1 K 1
s(k )   a (u )e2uk / K
K k 0

Boundary
points
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Example: Fourier Descriptor
Examples of reconstruction from Fourier descriptors

P 1
1
sˆ(k ) 
K
 a
k 0
( u ) e 2uk / K

P is the number of
Fourier coefficients
used to reconstruct
the boundary

(Images from Rafael C. Gonzalez and Richard E.


Wood, Digital Image Processing, 2nd Edition.
Fourier Descriptor Properties

Some properties of Fourier descriptors


Statistical Moments
Definition: the nth moment Example of moment:
K 1 The first moment = mean
n ( r )   ( ri  m) n g ( ri ) The second moment = variance
i 0

where K 1
m   ri g ( ri )
i 0

Boundary
segment
1D graph

1. Convert a boundary segment into 1D graph


2. View a 1D graph as a PDF function
3. Compute the nth order moment of the graph
Regional Descriptors
Purpose: to describe regions or “areas”

1. Some simple regional descriptors


- area of the region
- length of the boundary (perimeter) of the region
- Compactness

A( R )
C 2
P ( R)
where A(R) and P(R) = area and perimeter of region R
Example: a circle is the most compact shape with C = 1/4p
2. Topological Descriptors
3. Texture
4. Moments of 2D Functions
Example: Regional Descriptors

White pixels represent


“light of the cities”

% of white pixels
Region no. compared to the
total white pixels

1 20.4%
2 64.0%
3 4.9%
4 10.7%

Infrared image of America at night


Topological Descriptors
Use to describe holes and connected components of the region

Euler number (E):

E CH

C = the number of connected


components
H = the number of holes

(Images from Rafael C. Gonzalez and Richard E.


Wood, Digital Image Processing, 2nd Edition.
Topological Descriptors (cont.)

E = -1

E=0 Euler Formula

V Q  F  C  H  E

V = the number of vertices


Q = the number of edges
F = the number of faces

E = -2
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Example: Topological Descriptors
ginal image:
ared image After intensity
Washington Thresholding
area (1591 connected
components
with 39 holes)
Euler no. = 1552

The largest
After thinning
connected
area
(8479 Pixels)
(Hudson river)

(Images from Rafael C. Gonzalez and Richard E.


Wood, Digital Image Processing, 2nd Edition.
Texture Descriptors
Purpose: to describe “texture” of the region.

Examples: optical microscope images:

B C

Superconductor Cholesterol Microprocessor


(smooth texture) (coarse texture) (regular texture)

(Images from Rafael C. Gonzalez and Richard E.


Wood, Digital Image Processing, 2nd Edition.
Statistical Approaches for Texture Descriptors
We can use statistical moments computed from an image histogram:
K 1 z = intensity
n ( z )   ( zi  m) p( zi )
n
p(z) = PDF or histogram of z
i 0
where K 1
m   zi p ( zi )
i 0

Example: The 2nd moment = variance  measure “smoothness”


The 3rd moment  measure “skewness”
The 4th moment  measure “uniformity” (flatness)

A
B
C
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Fourier Approach for Texture Descriptor
Concept: convert 2D spectrum into 1D graphs

Fourier
Original FFT2D Divide into areas
coefficient
image +FFTSHIFT by angles
image

Divide into areas Sum all pixels


by radius in each area

R0
S ( )   Sr ( )
r 1

Sum all pixels 


in each area S ( r )   S ( r )
 0
Fourier Approach for Texture Descriptor

Original 2D Spectrum
image (Fourier Tr.)

S (r ) S(q)

Another Another S(q)


image

(Images from Rafael C.


Gonzalez and Richard E.
Wood, Digital Image
Processing, 2nd Edition.
Moments of Two-D Functions
The moment of order p + q

m pq   x p y q f ( x, y ) m10 m01
x y
x y m00 m00
The central moments of order p + q

 pq   ( x  x ) p ( y  y ) q f ( x, y )
x y

00  m00 01  10  0


11  m11  x m01  m11  ym10
20  m20  x m10 02  m02  ym01
21  m21  2 x m11  ym20  2 x 2m01 30  m30  3x m20  2 x 2m10
12  m12  2 ym11  x m02  2 y 2m10 03  m03  3 ym02  2 y 2m01
Invariant Moments of Two-D Functions
The normalized central moments of order p + q

 pq pq
 pq   where   1
00 2
Invariant moments: independent of rotation, translation, scaling,
and reflection

1  20  02 2  20  02   4112


2

3  30  312   321  03  4  30  12   21  03 


2 2 2 2

5  30  312 30  12 30  12  3 21  03 


  
 2
 2

321  03 21  03 330  12 2  21  03 2 



6  20  02 30  12   21  03  
2 2

411 30  12 21  03 
Example: Invariant Moments of Two-D Functions
1. Original image 2. Half size 3. Mirrored

4. Rotated 2 degree5. Rotated 45 degree

(Images from Rafael C. Gonzalez and Richard E.


Wood, Digital Image Processing, 2nd Edition.
Example: Invariant Moments of Two-D Functions

Invariant moments of images in the previous slide

Invariant moments are independent of rotation, translation,


scaling, and reflection

(Images from Rafael C. Gonzalez and Richard E.


Wood, Digital Image Processing, 2nd Edition.

You might also like