程序代写代做代考 algorithm Last Lecture

Last Lecture

Today

Image Enhancement

Image Enhancement
 Spatial domain techniques: Techniques are based on direct manipulation of pixels in an image
• Spatial transforms
• Histogram equalisation
• Spatial filtering
 Frequency domain techniques: Techniques are based on modifying the Fourier transform of an image

Spatial Domain

Spatial Domain

Transformations in Spatial Domain

Intensity Transformations
• Intensity transformation techniques are also called point-processing, as opposed to the neighbourhood processing techniques
• Simple to implement (algorithm, table map)
• Used to enhance images that are devoted to visual processing:
 no general rule for stating the optimality  application-dependent
 user-dependent

Dynamic Range, Visibility and Contrast Enhancement
• Contrast enhancing point functions expand the dynamic range occupied by certain “interesting” pixel values in input image
• These pixel values in input image are difficult to distinguish
• Goal of contrast enhancement is to make them “more visible” in output image
• We have a limited dynamic range (0-255)

Contrast Stretching Transformations
Contrast stretching
• Darkens levels below m
• Brightens levels above m
Thresholding
• Replace values below m to black (0)
• Replace values above m to white (255)

Binary Thresholding

Lookup Table: Threshold

Contrast Stretching Transformations
S
S

Contrast Stretching Transformations

Intensity Transformations

Logarithmic Transformations

Gamma Transformations

Gamma Transformations

Image Negative

Histogram

Histogram

Histogram

Histogram Based Transformations
• Histogram provides an intuitive (visual) tool for evaluating some statistical properties of the image.
• Histogram based transformations are numerous:  Enhancement
 Stretching-compression
 Segmentation
• and can be easily implemented:  Cheap
 Dedicated hardware

Histogram Stretching

Dark Image
Histogram components are localized to low intensity values

Dark Image
Histogram components are localized to high intensity values

Low Contrast Image
Histogram components are localized in a narrow region of intensity values

High Contrast Image
Histogram components are distributed over all intensity range

High Contrast Image
• Distribution is almost uniform, with few peaks
• If distribution is uniform, image tends to have a high dynamic range
• Details are more easily perceived
Histogram components are distributed over all intensity range

Equalisation
• Equalisation transformation, s = T(r ), is steeper where r is more probable
• Mapping intervals of r values with low probability into narrow intervals of s
• Mapping intervals of r values with high probability into large intervals of s

Equalization of a discrete random variable

Equalization of a Discrete Random Variable

Equalization of a Discrete Random Variable

Histogram Equalisation
• Histogram equalization is a basic procedure that allow to obtain a processed image with a specified intensity distribution
• Goal is to make the histogram of the output image as uniform/flat as possible irrespective of histogram of input image
• Stretch/Compress an image such that:
• Pixel values that occur frequently in input image occupy a bigger dynamic range in output
image, i.e., get stretched and become more visible
• Pixel values that occur infrequently in input image occupy a smaller dynamic range in output image, i.e., get compressed and become less visible

Histogram Equalisation
Dark Image Equalisation Bright Image Equalisation Low-Contrast Image Equalisation

Histogram Equalisation
High-Contrast Image Equalisation

Histogram Equalisation
T(r)
1) Dark Image Equalisation
2) Bright Image Equalisation
3) Low-Contrast Image
Equalisation
4) High-Contrast Image
Equalisation
Transformation for (4) is close to identity
r

Histogram Equalisation
T(r)
1) Dark Image Equalisation
2) Bright Image Equalisation
3) Low-Contrast Image
Equalisation
4) High-Contrast Image
Equalisation
Transformation for (4) is close to identity
(1)
(3)
(4)
(2)
r

Recommended Reading
“Digital Image Processing”, R.C. Gonzalez and R.E. Woods, 3rd edition, Pearson Prentice Hall, 2008
Chapter 3