Title: IMAGE ENHANCEMENT IN THE SPATIAL DOMAIN
1IMAGE ENHANCEMENT IN THE SPATIAL DOMAIN
Main objective To improve contrast, reduce
noise Qualitative Measure of contrast Dynamic
range of gray levels. Image having a wide range
of gray levels is said to have higher
contrast. Quantitative measure of contrast
Standard deviation of the gray level of an image.
Many of the slides appearing here are downloaded
from the website of Profs. Gonzalez Woods
2STANDARD DEVIATION Size of image M x N
pixels Possible range of gray levels 0 to L 1
(where L 2k) or
ri is the gray level of the ith pixel
3- Techniques for improving (stretching) contrast
- Gray-level transformations
- Histogram processing
- Spatial domain filters
4Image Enhancement in the Spatial Domain
Thresholding
r gray levels of pixels in input image s gray
levels of pixels in output image
s 1 exp(-krn)
Slide courtesy of Profs. Gonzalez Woods
5Some Basic Gray level transformations
Mapping S T(r)
6Image Negatives s L-1-r (input gray level
ranges from 0 to L-1) Application Enhancing dark
regions in a white background
7(No Transcript)
8How to obtain the pixel values from the image
file?
Using MATLAB 'Program to take negative of an
image' aimread(filename','jpg') aim2double(a)
a11256(1-a) a11uint8(a11) imwrite(a11,outp
utfilename.jpg','jpg')
9Log Transformations S c log(1r) r and s both
run from 0 to L-1 Therefore c (L-1) / log(L)
10Use of Log transformation
11Power Law Transformations
S crg
12Necessity for Power law transformations Devices
used for image capture, printing and display
respond according to power law. Eg Cathode ray
tubes have an Intensity-to-voltage response that
is a power function,i.e, I const x VW Where
W varies from 1.8 to 2.5. Such display systems (
W gt 1) would produce images that are darker than
the actual object. Therefore the transformation
s c r1/W is used to preprocess the input before
giving it as input to the monitor.
13Gamma Correction
14Effect of power law transformation
15Piecewise Linear Transformation functions
Advantage Can be arbitrarily complex. Disadvantag
e Requires more user input
16Piecewise-Linear Transformation Functions
17Gray-level Slicing
18Bit-plane slicing
Used in Image compression.
19Bit-Plane slicing
20Bit-plane representation of image
21Bit- Plane slicing Extracting the MSB plane
22Bit- Plane slicing Extracting the MSB plane
23Extracting the k-1th bit plane
L-1
0 L/4 L/2 3L/4 L-1
Alternatively use AND function Eg To extract
the 7th bit plane of an 8-bit image, use s r
AND 1000000 Then divide the result by 128.