You are on page 1of 23

Digital Image

Processing
Lecture 4
Intensity Transformations
Intensity Transformation and Spatial
Filtering
• Intensity
Transformation
• operates on
single pixels
individually
• Also called
point processing
• Spatial Filtering
is working along
with
neighborhood of
every pixel
Intensity Transformation Function
• Simplest representation of all Image Processing Techniques
• Value of pixels before and after processing will be denoted by r and s
respectively.

s= T( r )
• T is the transformation function for each pixel
Some basic Intensity Transformation
Functions
3.2.1 Image Negative
3.2.2 Log Transformation
3.2.3 Power Law (Gamma) Transformations
3.2.4 Piecewise-Linear Transformation Functions
Contrast stretching
Thresholding (Converting to B&W)
Intensity-level slicing
Bit-plane slicing
Image Negative

s= L – 1 – r OR s= max – r
For a pixel of value 181 we will have
s = 255 – 181 = 74
78 ?
233 ?
250 ?
255 ?
0?
Image Negative
• Suited for enhancing white or grey details embedded in dark regions
• Especially when dark/black areas are dominantl
Image Negative

Representing same visual contents but analysis is easier in negative image.


Log Transformation
s = c log(1+r)
• Where c is a constant and r>=0
• Shape of log curve shows that this transformation maps a narrow
range of low intensity values in the input to a wider range of output
levels

>>r=[0:255];
>>s=log(1+r);
>>plot(r,s)
Power Law (gamma) Transformations

s=c r γ
• Where c and γ are positive constants
Power Law (gamma) Transformations
Intensity-level slicing
• Highlights a specific range of intensities in an image
• Implemented in several ways most of them are variations of two of
the following basic themes
I. Display all the gray-levels of interest in one intensity level (say White or
Black) and making rest of the pixels opposite to what has been done to the
pixels of interest. Result is a binary image.
II. Display all the gray-levels of interest in one intensity level (say White or
Black) and keep rest of the pixels unchanged.
Intensity-level slicing
Bit-plane slicing
• 8-bit pixel has 256 different gray-levels.
• Each bit has a significance depending on the position it holds
• A pixel having gray-value 111 will have binary equivalent ?
• Bit-pane slicing is extracting each of these bits individually so that the
significance of them can be viewed graphically.
• How to extract these bit planes (Problem 3.4 in the book)
Bit-plane slicing
Bit-plane slicing
• Border of this image has pixel value 194
• 194 in binary ?
Image reconstruction using the extracted
bit-plane

You might also like