0% found this document useful (0 votes)
16 views9 pages

L6-Image Enhancement Point Operations

The document discusses image enhancement techniques aimed at improving the visual quality of images through various methods, including spatial and frequency domain techniques. It details point and mask operations for brightness modification, contrast stretching, and histogram manipulation, among others. Additionally, it covers important transformations such as image negative, log transformation, and gamma correction to adjust image brightness and contrast effectively.

Uploaded by

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

L6-Image Enhancement Point Operations

The document discusses image enhancement techniques aimed at improving the visual quality of images through various methods, including spatial and frequency domain techniques. It details point and mask operations for brightness modification, contrast stretching, and histogram manipulation, among others. Additionally, it covers important transformations such as image negative, log transformation, and gamma correction to adjust image brightness and contrast effectively.

Uploaded by

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

Image Enhancement

• 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

• Spatial Domain and Frequency Domain

• 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 : Each pixel is modified by an equation


g(m,n)=T[f(m,n)] T is the operator ( one to one mapping)

• Mask Operation: Each pixel is modified according to values in a small neighborhood (


filtering operation)

Point and Mask Operations

• 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

• Increasing/Decreasing Brightness : Simple method is to add/subtract a constant


value to every pixel of the image.

• If f[m,n] is the original image, then modified image


g[m,n]=f[m,n] + b (increase)
g[m,n]=f[m,n] - b (decrease)

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’

• Second part of figure produces a 2-level binary image.


• This form of mapping is called thresholding function

• if r1=S1 and r2=S2 it is a linear function ( no change)


• If r1=r2, S1=0 and S2=L-1, it is a thresholding function creates binary image
• Intermediate values of r1 and r2 produces various degrees of spread in the gray
levels thus affecting the contrast

Gray-level slicing

• Highlights specific range of gray levels in an image

• 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

Some Important Transforms


Image Negative:
• Reverse Scaling of gray level
• 𝑆 =𝐿−1−𝑟
• If L=256, then 𝑆 = 255 − 𝑟

LOG transformation

• The general form of the transform is


𝑆 = 𝐶 𝑙𝑜𝑔(|𝑟|+1) where C is the scaling factor.
• This is a non-linear scaling
• Compresses the dynamic range
• Maps a narrow range of low-level gray levels in the input into a wider range in the
output levels
• Used to expand the values of the dark pixels and compress the higher-level values
• Advantage: Compresses the dynamic range of the image with large variation in the
pixel values
• Eg: Displaying 2D Fourier Transform
Power Law Transformation (Gamma Correction)

• This transformation expands the dynamic range by using the relation


𝑆 = 𝐶𝑟 < where C and 𝛾 are constants
• The numerical value of the exponent is called gamma ( Can take both integer as well
as fraction value)
• When 𝛾<1, it maps a narrow range of dark input variables into a wider range of
output values
• Opposite happens when 𝛾>1
• Eg. CRT devices have an intensity to voltage response that is a power function(
exponents varying from 1.8 to 2.5). Hence images tend to be darker
• Gamma correction is done by preprocessing the input image with C=1 and
𝛾=1/2.5=0.4

• The human perception of brightness follows an approximate power function(as


shown below) according to Stevens’ power law for brightness perception (Figure
below)

• 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

• Histogram of an image is the plot of number of occurances of gray levels in the


image against the gray level values
ℎ(𝑟? ) = 𝑛?

Where 𝑟? =kth gray level and 𝑛? =no. of pixels having gray level 𝑟?

• Histogram provides a convenient summary of the intensities of the image


• Does not provide any information about relations amongst pixels

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

Eg : If pixel values are between 0-7 , bits required=3 (2I = 8)


If pixel values are between 0-15 , bits required=4 (2K = 16)
If pixel values are between 0-31 , bits required=5 (2M = 32)
If pixel values are between 0-255 , bits required=8 (2N = 256)

• Step 3: Total number of pixels= 25


• Step 4: Find the number of pixels for each gray level
44444
⎡3 4 5 4 3⎤
⎢ ⎥
f(m,n)=⎢ 3 5 5 5 3 ⎥ ;
⎢3 4 5 4 3 ⎥
⎣4 4 4 4 4⎦
• h(0)=0; h(1)=0; h(2)=0; h(3)=6; h(4)=14; h(5)=5; h(6)=0; h(7)=0

Histogram
15

10

0
1 2 3 4 5 6 7

Calculation of Equalized Histogram

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

Original Gray Level 0 1 2 3 4 5 6 7


Final gray Level 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⎦

Histogram of original and equalized


16
14
12
10
8
6
4
2
0
1 2 3 4 5 6 7

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy