Chapter 4: Image Enhancement - PowerPoint PPT Presentation

1 / 54
About This Presentation
Title:

Chapter 4: Image Enhancement

Description:

Image enhancement techniques are used to emphasize and sharpen ... range of the local gain factor, i.e. set a minimum and maximum for the local gain factor. ... – PowerPoint PPT presentation

Number of Views:442
Avg rating:3.0/5.0
Slides: 55
Provided by: metalabU
Category:

less

Transcript and Presenter's Notes

Title: Chapter 4: Image Enhancement


1
Chapter 4 Image Enhancement
  • Introduction and Gray-Scale Modification

2
Introduction
  • Image enhancement techniques are used to
    emphasize and sharpen image features for display
    and analysis.
  • In general, image enhancement is used to generate
    a visually desirable image.
  • It can be used as a preprocess or a postprocess.
  • Highly application dependent. A technique that
    works for one application may not work for
    another.

3
Introduction
  • There are three types of image enhancement
    techniques
  • Point operations each pixel is modified
    according to a particular equation, independent
    of the other pixels.
  • Mask operations each pixel is modified according
    to the values of the pixels neighbors.
  • Global operations all the pixel values in the
    image or subimage are taken into consideration.

4
Overview of Gray-Scale Modification
  • Gray-scale modification methods belong in the
    category of point operations.
  • They function by changing the pixels gray-level
    value by using a mapping equation.
  • The mapping function maps the original gray-level
    values to other, specified values.
  • The primary operations applied to the gray scale
    of an image are to compress or stretch it.

5
Overview of Gray-Scale Modification
  • Gray-level compression is done to gray-level
    ranges that are of little interest.
  • Gray-level stretching is done to gray-level
    ranges where we desire more information.
  • The gray-level compression and stretching can be
    illustrate using the graph of modified gray-level
    vs. original gray-level.

6
Overview of Gray-Scale Modification
7
Overview of Gray-Scale Modification
Original Image
Image after gray-level stretching
8
Overview of Gray-Scale Modification
  • If the mapping line has a slope between 0 and 1,
    this is called gray-level compression.
  • If the slope is greater than one, then it is
    called gray-level stretching.
  • In the previous example, the range of gray-level
    values from 28 to 75 is stretched, while other
    gray-level values are left alone.

9
Overview of Gray-Scale Modification
  • Stretching a particular gray-level range can
    expose a previously hidden visual info.
  • In some cases, we may want to stretch a specific
    range of gray levels, while clipping the values
    at the low and high ends.
  • The effect of doing this is that the contrast of
    the image is enhanced.

10
Overview of Gray-Scale Modification
11
Overview of Gray-Scale Modification
Original Image
Image after gray-level stretching
12
Overview of Gray-Scale Modification
  • Another type of mapping equation is called the
    intensity-level slicing.
  • Used for feature extraction.
  • Here we select specific gray-level values of
    interest and map them to a specified, typically
    higher, value.
  • Using this method, we can bring out the feature
    of interest in the image.

13
Overview of Gray-Scale Modification
14
Overview of Gray-Scale Modification
15
Overview of Gray-Scale Modification
16
Histogram Modification
  • An alternate perspective to gray-level
    modification that performs a similar function is
    referred to as histogram modification.
  • The gray-level histogram of an image is the
    distribution of the gray levels in an image.
  • The characteristics of an image can be determined
    from its histogram (refer to Histogram Features
    in Chapter 2).

17
Histogram Modification
18
Histogram Modification
  • The histogram can be modified by a mapping
    function which will stretch, shrink or slide the
    histogram.
  • This will change the contrast or brightness of
    the image.
  • The graphical representation of histogram
    stretch, shrink and slide can be seen in the
    following diagrams.

19
Histogram Modification
20
Histogram Modification
21
Histogram Modification
22
Histogram Modification
  • The mapping equation for histogram stretch can be
    found as follows

I(r,c)MAX is the largest gray level value in the
image I(r,c) I(r,c)MIN is the smallest gray level
value in I(r,c) MAX and MIN correspond to the
maximum and minimum gray-level values of the new
range.
23
Histogram Modification
  • This equation will take an image and stretch the
    histogram across the entire gray-level range.
  • This will increase the contrast of a low-contrast
    image.
  • If a stretch is desired over a smaller range,
    different MAX and MIN values can be specified.

24
Histogram Modification
Low-contrast image
Histogram of low-contrast image
25
Histogram Modification
Image after histogram stretching
Histogram of image after stretching
26
Histogram Modification
  • If most of the pixel values in an image fall
    within a small range, but a few outliners force
    the histogram to span the entire range, a pure
    histogram stretch will not improve the image.
  • In this case, it is useful to allow a small
    percentage of the pixel values to be clipped at
    the low and high end of the range.

27
Histogram Modification
Original Image
Histogram of the original image
28
Histogram Modification
Image after histogram stretching without clipping
Histogram of the image
29
Histogram Modification
Image after histogram stretching with clipping 3
low and high value
Histogram of the image
30
Histogram Modification
  • The opposite of histogram stretch is a histogram
    shrink, which will decrease image contrast by
    compressing the gray levels.
  • The histogram shrinking equation is generally the
    same as the one for stretching.
  • But for histogram shrinking, MAX and MIN should
    be set to the maximum and minimum of the new,
    compressed range.

31
Histogram Modification
Original image
Histogram of original image
32
Histogram Modification
Histogram of the image
Image after histogram shrink to the range 75,
175
33
Histogram Modification
  • In general, histogram shrink reduces contrast and
    may not seem to be useful as image enhancement
    tool.
  • However, there is an image-sharpening technique
    algorithm that uses the histogram shrink process
    as a part of the enhancement technique.

34
Histogram Modification
  • The histogram slide technique can be used to make
    an image either darker or lighter.
  • Darker slide histogram towards low end.
  • Lighter slide histogram towards high end.
  • Histogram slide is done by adding or subtracting
    a fixed number from all the gray-level values.

35
Histogram Modification
  • Any values slid past the minimum or maximum
    values will be clipped to the respective minimum
    and maximum.
  • A positive OFFSET will increase the overall
    brightness.
  • A negative OFFSET will create a darker image.

36
Histogram Modification
Original image
Histogram of original image
37
Histogram Modification
Image after positive-value histogram sliding
Histogram of image after sliding
38
Histogram Modification
  • Histogram equalization is a popular technique for
    improving the appearance of a poor image.
  • Its function is similar to that of histogram
    stretch but often provides more visually pleasing
    results across a wider range of images.

39
Histogram Modification
  • The histogram equalization process consists of
    four steps
  • Find the running sum of the histogram values.
  • Normalize the values from step 1 by dividing by
    the total number of pixels.
  • Multiply the values from step 2 by the maximum
    gray level value and round.
  • Map the gray-level values to the result from step
    3 using one-to-one correspondence.

40
Histogram Modification
  • Example You are given a 3 bits/pixel image with
    the following histogram
  • Next, perform the four steps histogram
    equalization process as mentioned before. The
    result can be seen in the tables in the next
    slide.

41
Histogram Modification
The first three steps
The fourth step
42
Histogram Modification
Original image
Histogram of original image
43
Histogram Modification
Image after histogram equalization
Histogram after equalization
44
Histogram Specification
  • Sometimes, it is useful to be able to define a
    histogram and modify the histogram of the
    original image to match the histogram that we
    define.
  • Such as process is called histogram
    specification.
  • This process can be implemented in 4 steps

45
Histogram Specification
  • Find the mapping table to histogram-equalize the
    image (this is basically the result of histogram
    equalization).
  • Specify the desired histogram.
  • Find the mapping table to histogram-equalize the
    values of the desired histogram (this is done by
    applying histogram equalization to the specified
    histogram in step 2).
  • Map the original values to the values from step 3.

46
Histogram Specification
Step 1 Use histogram equalization result from
last example
Step 2 Specify the desired histogram
47
Histogram Specification
Step 3 Find the histogram equalization mapping
table for the desired histogram
Step 4 Map the original values to the values
from step 3
48
Adaptive Contrast Enhancement
  • Adaptive Contrast Enhancement (ACE) filter is
    used with an image with uneven contrast.
  • In this case, we want to adjust the contrast
    differently in different regions of the image.
  • Regions with low contrast should be given more
    contrast compared to other regions.
  • This is different from image modification
    techniques, which are based only on global
    parameters.

49
Adaptive Contrast Enhancement
  • ACE works by using both the local and global
    image statistics to determine the amount of
    contrast adjustment required.
  • The image is processed using the sliding window
    concept.
  • The local image statistics are found by
    considering only the current window.
  • The global statistics are found by considering
    the entire image.

50
Adaptive Contrast Enhancement
  • The ACE equation is as follows
  • mI(r,c) is the mean for the entire image I(r,c)
  • sl local standard deviation (in the window)
  • ml local mean (average in window)
  • k1, k2 constants, vary between 0 and 1

51
Adaptive Contrast Enhancement
  • This filter subtracts the local mean from the
    original data and weights the result by the local
    gain factor k1mI(r,c)/sl(r,c).
  • This has the effect of intensifying local
    variations.
  • Can be controlled by the constant k1.
  • Areas of low contrast (low values of sl(r,c)) are
    boosted.

52
Adaptive Contrast Enhancement
  • The mean is then added back to the result,
    weighted by k2 to restore the local average
    brightness.
  • In practice, it is often helpful to shrink the
    histogram of image before applying this filter.
  • It is also helpful to limit the range of the
    local gain factor, i.e. set a minimum and maximum
    for the local gain factor.

53
Adaptive Contrast Enhancement
Original Image
Histogram equalized version of original image
54
Adaptive Contrast Enhancement
Image after being applied with ACE filter. k1
0.9, k2 0.5 Local gain max 25
Histogram equalized version of ACE filtered image
Write a Comment
User Comments (0)
About PowerShow.com