Lecture 2. DIP PDF
Lecture 2. DIP PDF
How to sense
Incoming energy is transformed into a voltage by the combination of input
electrical power and sensor material that is responsive to the particular type
of energy being detected.
The output voltage waveform is the response of the sensor(s) and a digital
quantity is obtained from each sensor by digitizing its response
Image Sensing and Acquisition (con’t)
f(x,y)=i(x,y)r(x,y)+n(x,y)
0<i(x,y)<∞ illumination
0<r(x,y)<1 reflectance
n(x,y) noise
Image interpolation
Zooming :
nearest neighbor
interpolation
pixel replication
bilinear interpolation
to use more neighbors
shrinking :
the reverse of zooming
Basic relationships between pixels
Neighbors, adjacency
neighbors of a pixel p
4-neighbors
four diagonal neighbors
8-neighbors
adjacency of two pixels
4-adjacency
8-adjacency
m (mixed)-adjacency: without confusion
adjacency of two image subsets
path (or curve) from pixel p to pixel q
length of path
closed path
Basic relationships between pixels (con’t)
Distance measures
Euclidean distance D8 distance For pixels p, q, and z , with coordinate s
(2-norm) (checkboard distance)
(x,y), (s,t), and (v,w), respective ly,
2 2 5 2 52 2 2 2 2 2 2
2 1 2 5 1
D is a distance function or metric if
5 2 1 1 2
2 1 0 1 2 2 1 0 1 2 (a) D ( p, q ) 0 ( D ( p, q ) = 0 iff p = q )
5 2 1 2 5 2 1 1 1 2 (b) D ( p,q ) = D (q,p ), and
2 2 5 2 52 2 2 2 2 2 2 (c) D ( p,z ) D ( p,q ) + D (q,z )
D4 distance
(city-block distance)
De ( p, q ) = ( x − s ) 2 + ( y − t ) 2
4 3 2 3 4
3 2 1 2 3 D4 ( p, q ) = x − s + y − t
2 1 0 1 2
1
D8 ( p, q ) = max( x − s , y − t )
3 2 2 3
4 3 2 3 4 Dm = shortest m - path
Mathematical Tools used in DIP
Logical operations
AND
OR
NOT
XOR
Mathematical Tools used in DIP (con’t)
Spatial Operations
Single-pixel operations
Neighborhood operations
Geometric spatial transformations
Chapter 3. Intensity Transformations and
Spatial Filtering
Contents
Histogram:
Normalized Histogram
Histogram Processing (con’t)
Histogram Equalization
The intensity levels in an image may be viewed as random variables in the
interval [0, L-1].
A fundamental descriptor of a random variable is its probability density
function (PDF)
Histogram Equalization
Example
Histogram Processing (con’t)
Histogram Equalization
Example
Transformation functions
Histogram Processing (con’t)
Histogram Matching
(Specification)
Example
Histogram Processing (con’t)
Local Enhancement
Previous enhancement methods are global (an entire image)
Global filters are useful for overall enhancement
There are cases in which it is necessary to enhance details over small areas in
an image
To map the intensity of the pixel centered in the neighborhood
To reduce computation is to utilize nonoverlapping regions -> ‘blocky’ effect
Histogram Processing (con’t)
Enhancement by Statistics
Histogram Processing (con’t)
Original image
(500 x 500 pixels) 3 x 3 mask
5 x 5 mask
9 x 9 mask
15 x 15 mask 35 x 35 mask
Smoothing Spatial Filters (con’t)
Second-Order derivatives
Sharpening Spatial Filters
Roberts operators
Sobel operators
Sharpening Spatial Filters (con’t)