Image Enhancement v3
Image Enhancement v3
Image Enhancement v3
Image Enhancement - 2
bartolomeo.montrucchio@polito.it
Spatial domain
Spatial domain g(x) = T[f(x,y)] the neighborhood can also be 1x1
Image Enhancement - 2
Thresholding
Image Enhancement - 2
thresholding
Transformation functions
s=T(r) menu curves in image processing software see example with Moon image see p.675 [Zakia] for the quadrant diagram in photography
Image Enhancement - 2
Log transformation
Image Enhancement - 2
s = c log(1+r) where c is a constant and r >= 0 a narrow range of low-level values in the input image is mapped in a wide range of output levels at right the spectrum values are now more similar and easier to be represented
Gamma correction
A CRT monitor has a gamma value of 1.8-2.5
Image Enhancement - 2
Image Enhancement - 2
Gamma correction
Image Enhancement - 2
Gamma correction
Image Enhancement - 2
Contrast stretching
Image Enhancement - 2
Image Enhancement - 2
Image Enhancement - 2
Bit-plane slicing
Image Enhancement - 2
Bit-plane slicing
Image Enhancement - 2
Bit-plane slicing
Image Enhancement - 2
Histograms
The histogram is a discrete function h(rk)=nk where rk is the kth gray level and nk is the number of pixels having gray level rk Usually is normalized p(rk)=nk/n where n is the total number of pixels Over/under-exposure are easily seen in the histogram in the digital camera display
Image Enhancement - 2
Image Enhancement - 2
sk = T (rk )
= ! pr ( r j )
j =1 k
=!
19922008 R. C. Gonzalez & R. E. Woods
nj n
j =1
Image Enhancement - 2
Image Enhancement - 2
Image Enhancement - 2
10
Image Enhancement - 2
Histogram specification
Image Enhancement - 2
11
Histogram specification
1. Mapping of the levels in the original image into sk, starting from the histogram of the original image sk= T(rk) 2. Computes G function vk=G(zk ) starting from the desired histogram as a T(zk) like sk (please note that after both applying T to the original image or G to the desired and unknown image, results should be the same) 3. Computes G-1 4. Computes the desidered levels of the image applying G-1 zk=G-1[T(rk)] zk=G-1(sk)
19922008 R. C. Gonzalez & R. E. Woods
Image Enhancement - 2
Histogram specification
Image Enhancement - 2
12
Histogram specification
Image Enhancement - 2
Histogram specification
Image Enhancement - 2
The function in (b),(2) is the inverse of that in (b),(1) It can be obtained (geometrically) reflecting the graph across the line y = x (not always it is possible)
19922008 R. C. Gonzalez & R. E. Woods
13
Image Enhancement - 2
Image Enhancement - 2
14
Image Enhancement - 2
Mathematical operations
Image subtraction used in segmentation and enhancement Image addition Image division multiplication of one image by the reciprocal of the other (e.g. for uneven illumination) Image averaging used for contrasting noise (e.g. in astronomy)
19922008 R. C. Gonzalez & R. E. Woods
Image Enhancement - 2
15
Image Enhancement - 2
Convolution
+%
f (x) o g(x) =
&
$%
&
$%
f (# )g(x $ # )d#
Convolution theorem
f (x) " g(x) # F(u)G(u) f (x)g(x) # F(u) " G(u)
Image Enhancement - 2
16
Image Enhancement - 2
g(x, y) =
# # w(s,t) f (x + s, y + t)
s="a t="b
Example of convolution mask, where the image f has size MxN, the filter mask has size mxn, a=(m-1)/2, b=(n-1)/2 Linear spatial filtering is often referred as convolving a mask with ! an image
Image Enhancement - 2
112.5 m (core is 22.5 m) for a ~f20 lens, seen through a 3.75m pixel-wide CCD
19922008 R. C. Gonzalez & R. E. Woods
17
Image Enhancement - 2
Image Enhancement - 2
18
Image Enhancement - 2
Image Enhancement - 2
median is the numerical value separating the higher half from the lower half median lter computes the median under the mask (here 3x3) and uses it as a resulting value it is very effective for some images
19922008 R. C. Gonzalez & R. E. Woods
19
Image Enhancement - 2
Derivatives
20