L6-Image Enhancement Point Operations
L6-Image Enhancement Point Operations
• Process by which we try improve an image so that it looks subjectively better. Better
Means:
q Somehow looks better
q More details are seen
q Contrast is better
q Unwanted flickering has been removed
Enhancement Techniques
• The spatial domain technique deals with the manipulation of the pixel values. Hence
can be broadly classified as Point Operation and Mask Operation
• Point Operation
• Brightness Modification
• Contrast Stretching
• Noise Clipping
• Window Slicing
• Histogram Modelling
• Mask Operation
• Noise Smoothing
• Median Filtering
• Usharp Filtering
• LP/HP/BP filtering
Point Operations
• Zero memory operation
• Given gray level 𝑢 ∈ [0, 𝐿] is mapped into a gray level 𝑣 ∈ [0, 𝐿] according to a
transform
𝑣 = 𝑓(𝑢)
or
S=T(r)
Brightness Modification
Contrast Stretching
• Transformation T(r) show that it would produce an image of higher contrast than
original by darkening levels below ‘m’ and brightening levels above ‘m’
Gray-level slicing
• Fig 1: Display high value for all gray levels in the range of interest and low for all
other gray levels
• Fig 2: Highlights the region of interest but preserves the background and the gray
level tonalities
LOG transformation
• If we change input from 0 to 10, the output changes from 0 to 50 (approx.) but
changing input from 240 to 255 does not really change the output value.
• This means that we are more sensitive to changes in dark as compared to bright.
Unlike human perception, camera follows a linear relationship. This means that if
light falling on the camera is increased by 2 times, the output will also increase 2
folds (See Figure below)
Gamma Correction(Display)
• All display devices like computer screen have Intensity to voltage response curve
which is a power function with exponents(Gamma) varying from 1.8 to 2.5.
• This means for any input signal(say from a camera), the output will be transformed
by gamma because of non-linear intensity to voltage relationship of the display
screen.
• This results in images that are darker than intended.
• To correct this, apply gamma correction to the input signal(we know the intensity
and voltage relationship we simply take the complement)
• This gamma is automatically applied by the conversion algorithms like jpeg etc. thus
the image looks normal to us.
• This input cancels out the effects generated by the display and we see the image as
it is.
Histogram Manipulation
Where 𝑟? =kth gray level and 𝑛? =no. of pixels having gray level 𝑟?
Histogram Plot
• Plots obtained by plotting ℎ(𝑟? ) vs 𝑟? (𝑟? on hor axis and ℎ(𝑟? ) on vert axis
• Plot of dark image clustered around lower gray level
• Plot of bright image clustered around higher gray level
• Low contrast image gives narrow spread of gray level
• High contrast image gives an equal spread of gray level
Histogram Equalization
• Equalization is a process that spread out the gray levels in an image
• Gray levels are equally distributed across their range
• Provides more visually pleasing results
• Let us perform histogram equalization of the image
44444
⎡3 4 5 4 3⎤
⎢ ⎥
f(m,n)=⎢ 3 5 5 5 3 ⎥
⎢3 4 5 4 3 ⎥
⎣4 4 4 4 4⎦
• Step 1 : Maximum value of gray level (here Maximum value is 5)
• Step 2: Find the minimum no of bits required to represent the value
Histogram
15
10
0
1 2 3 4 5 6 7
Gray Level 0 1 2 3 4 5 6 7
No of Pixels 0 0 0 6 14 5 0 0
Running Sum 0 0 0 6 20 25 25 25
Running
Sum/No. of 0/25 0/25 0/25 6/25 20/25 25/25 25/25 25/25
pixels
Above result X 7 0 0 0 42/25=1.68 140/25=5.6 7 7 7
Round Off 0 0 0 2 6 7 7 7
44444 66666
⎡3 4 5 4 3⎤ ⎡2 6 7 6 2⎤
⎢ ⎥ ⎢ ⎥
f(m,n)=⎢ 3 5 5 5 3 ⎥ f(m,n)=⎢ 2 7 7 7 2 ⎥
⎢3 4 5 4 3 ⎥ ⎢2 6 7 6 2 ⎥
⎣4 4 4 4 4⎦ ⎣6 6 6 6 6⎦