Digital Image Processing: Dr. Mohannad K. Sabir Biomedical Engineering Department Fifth Class
Digital Image Processing: Dr. Mohannad K. Sabir Biomedical Engineering Department Fifth Class
2. Log Transformations:
• The general form of the
log transformation is
s=c log(1+r) ----- 4
• where c is a constant and
Fourier spectrum displayed as a grayscale image.
it is assumed that r >= 0.
• The shape of the log curve
shows that this
transformation maps a
narrow range of low
intensity values in the
input into a wider range of
output levels. Result of applying the log transformation
Digital Image Processing
3. Power-Law (Gamma)
Transformations
• Power-law transformations have
the form:
s=c rɣ ------ 5
• where c and ɣ are positive
constants.
• Figure shows plots of s as a
function of r for various values of
ɣ
• As with log transformations,
power-law curves with fractional
values of map a narrow range of
dark input values into a wider
range of output values, with the
opposite being true for higher
values of input levels.
• Curves generated with values of
ɣ>1 have exactly the opposite
effect as those generated with
values of ɣ<1.
Digital Image Processing
(a) Image of a human retina.
(b) Image as it appears on a
monitor with a gamma setting
of 2.5 (note the darkness).
(c) Gamma- corrected image
(d) Corrected image, as it appears
on the same monitor (compare
with the original image).
• gamma correction consists of
using the transformation s=r0.4
to preprocess the image before
inputting it into the monitor.
• Sometimes, a higher gamma
makes the displayed image look
better to viewers than the
original because of an increase
in contrast. However, the
objective of gamma correction
is to produce a faithful display
of an input image
Digital Image Processing
a) Magnetic
resonance image
(MRI) of a
fractured human
spine (the region
of the fracture is
enclosed by the
circle).
(b)–(d) Results of
applying the
transformation
with c=1 and
ɣ=0.6, 0.4 and 0.3,
respectively.
Digital Image Processing
(a) Aerial image.
(b)–(d) Results of
applying the
transformation with
ɣ=3.0, 4,0 and 5.0,
respectively. ( in all )
• The latter result has
a slightly more
appealing
appearance because
it has higher
contrast.
• The airport runways
near the middle of
the image appears
clearer
Digital Image Processing
Piecewise Linear Transformation Functions
• An approach complementary to the methods
discussed in the previous three sections is to use
piecewise linear functions.
• The advantage of these functions over those
discussed thus far is that the form of piecewise
functions can be arbitrarily complex.
• The main disadvantage of these functions is that
their specification requires considerable user
input.
Digital Image Processing
1- Contrast Stretching
• Low-contrast images can result from poor
illumination, lack of dynamic range in the
imaging sensor, or even the wrong setting of a
lens aperture during image acquisition.
• Contrast stretching expands the range of
intensity levels in an image so that it spans the
ideal full intensity range of the recording
medium or display device.
Digital Image Processing
(b) shows an 8-bit image with low
contrast.
(c) shows the result of contrast
stretching, obtained by setting
(r1,s1)=(rmin,0) and
(r2,s2)=(rmax,L-1), where rmin
and rmax denote the minimum
and maximum intensity levels
in the input image,
respectively. The
transformation stretched the
intensity levels linearly to the
full intensity range, [0, L-1].
(d) shows the result of using the
thresholding function, with
(r1,s1)=(m,0) and (r2,s2)=(m,L-1)
where m is the mean intensity
level in the image.
(a) Piecewise linear
transformation function.
Digital Image Processing
2- Intensity-Level Slicing:
• There are applications in which it is of interest to
highlight a specific range of intensities in an
image.
• Some of these applications include enhancing
features in satellite imagery, such as masses of
water, and enhancing flaws in X-ray images.
• The method, called intensity level slicing, can be
implemented in several ways, but most are
variations of two basic themes.
Digital Image Processing
1. One approach is to display in
one value (say, white) all the
values in the range of interest
and in another (say, black) all
other intensities. This
produces a binary image. In
the image the range of
intensities of interest selected
in the upper end of the gray
scale.
2. The second approach, based
on the transformation
brightens (or darkens) the
desired range of intensities,
but leaves all other intensity
levels in the image unchanged.
In the image the selected
range set near black, so that
the grays in the area of the
blood vessels and kidneys
were preserved.
Digital Image Processing
3-Bit-Plane Slicing:
• Pixel values are integers
composed of bits. For example,
values in a 256-level gray-scale
image are composed of 8 bits
(one byte).
• Instead of highlighting intensity-
level ranges, we could highlight
the contribution made to total
image appearance by specific
bits.
• As Fig. illustrates, an 8-bit
image may be considered as
being composed of eight one-bit
planes, with plane 1 containing
the lowest-order bit of all pixels
in the image, and plane 8 all the
highest-order bits.
Digital Image Processing
(a) An 8-bit gray-
scale image of
size 837x988
pixels.
(b) through (i) Bit
planes 8 through
1, respectively,
where plane 1
contains the
least significant
bit. Each bit
plane is a binary
image.
Digital Image Processing
• Decomposing an image into its bit planes
is useful for analyzing the relative Image
importance of each bit in the image, a reconstructed from
process that aids in determining the bit planes: 8 and 7
adequacy of the number of bits used to
quantize the image. Also, this type of
decomposition is useful for image
compression in which fewer than all Image
planes are used in reconstructing an reconstructed
image. from bit planes:8,
• The reconstruction is done by 7, and 6
multiplying the pixels of the nth plane by
the constant 2n-1,
• This converts the nth significant binary Image
bit to decimal. Each bit plane is reconstructed
multiplied by the corresponding from bit planes:8,
constant, and all resulting planes are
7,6, and 5.
added to obtain the grayscale image.