Digital Image Processing: Dr. Zohair Al-Ameen
Digital Image Processing: Dr. Zohair Al-Ameen
1 pixel
Image Representation Inside The Computer
What Is Digital Image Processing?
• Digital Image Processing (DIP) is the use of computer
algorithms to process digital images.
• Digital image processing encompasses three types of
computerized processes in this field: low-, mid-, and high-
level processes.
Low Level Process Mid Level Process High Level Process
Input: Image Input: Image Input: Attributes
Output: Image Output: Attributes Output: Understanding
Examples: Noise Examples: Object Examples: Scene
removal, image recognition, understanding,
sharpening segmentation independent navigation
History of Digital Image Processing
• Frequency Domain:
• Transform the image to its frequency representation using Fourier transformation.
• Perform the processing on complex numbers.
• Compute inverse transform back to the spatial domain using an inverse Fourier
transformation.
DFT
M −1 N −1
F (u ,v ) = f
x =0 y =0
(x , y )e − j 2 (ux / M +vy / N )
•i =
2 -1
• Multiplying By the Conjugate:
• The rule:
• (a + bi)(a - bi) = a2 + b2
• Example:
• (4 - 5i)(4 + 5i) = 42 + 52
Image Degradations
• Are the factors that reduces the image quality and
make it appear as a different version of the original
scene.
• Image degradations are caused by many factors.
• Imaging systems may introduce some amounts of
distortions.
• Image quality is a characteristic of an image that
measures the apparent image degradation
(typically, compared to an ideal or perfect image).
Image Degradations
• The observed image can be summarized as a number of key
elements.
• In general, a digital image (s) can be formalized as a mathematical
model:
• The original scene (o)
• The point spread function (PSF).
• The additive noise n.
• The result is the observed image.
Image Degradations
• PSF: this describes the way information on the
object function is spread as a result of recording the
data.
• Original Scene: this describes the object (or scene)
that is being imaged.
• Noise: is the unwanted component of the image.
• Convolution operator (*): A mathematical operation
which ‘smears’ (i.e. convolves) one function with
another.
Image Degradations
• Image noise is a random variation of brightness or color
information in images.
• Three famous types of noise: (Additive White Gaussian noise, Salt-and-
pepper noise and Colored noise).
• Image blur makes the image appear unclear.
• Two famous types of blur: (Motion and Gaussian Blur).
• Image enhancement is basically improving the perception of
information in images for human viewers by providing `better'
illuminated results.
• Examples: Low/High Contrast , Low/High Brightness, Color imperfections.
Image Noise
• Noise in general happen due to different reasons:
1. Hardware and software errors.
2. Sensor errors.
3. Analog-to-digital converter errors
4. transmission errors.
5. Variation in the number of photons sensed at a given exposure level.
6. Low photons absorption.
7. low light environments.
8. longer shutter speeds lead to increased noise.
9. The size of the image sensor. (larger sensors typically create lower noise images than
smaller sensors).
10. Temperature can also have an effect on the amount of noise produced by an image
sensor. (more noise is produced during summer than winter).
Image Noise (Examples)
Colored Noise
Image Blur
• Blur in general happen due to different reasons:
1. The subject moves while the shutter is open.
2. The camera moves while the shutter is open.
3. Imaging a long-distance object (the atmosphere).
4. Imperfect resolution of the imaging system.
5. Losing information during the acquisition process.
6. Slow Shutter Speed.
7. Employing low-pass filters for reducing noise leads to
blur amplification.
Image Blur (Examples)
Gaussian Blur
Image Blur (Examples)
Motion Blur
Image Blur (Examples)
Motion Blur
Image Enhancement
• Image enhancement is among the simplest and
most appealing areas of digital image processing.
• Basically, the idea behind enhancement techniques
is to bring out detail that is obscured, or simply to
highlight certain features of interest in an image.
• A familiar example of enhancement is when we
increase the contrast of an image because “it looks
better.”
Image Enhancement
• Brightness is an attribute of visual perception in which a source appears to be
radiating or reflecting light.
• Contrast describes tones, specifically the relationship between the darkest
and brightest parts of an image.
• Contrast is the different between the minimum and maximum pixel values in
an image.
• High difference → image has high contrast.
• Low difference → image has low contrast.
• High contrast images are perceived better.
• Low contrast images have a hazy look.
• Color is the term that describes every tint, tone, hue or shade that the human
eye can see, including white, black, and gray.
Image Enhancement (Examples)
• But there is a loss of detail in color-highlighted areas that makes color contrast too strong and uncomfortable.
• E.g., over saturation of skin tones leaves them looking too orange and unnatural.
• Over saturation can happen with only one color channel (e.g., red color is extremely eye-catching).
• Some over saturation happens intentionally by post-processing, stylization, or high-dynamic-range (HDR) imaging techniques.
• Under Saturation:
• Under-saturated photos look muted, blended, and close to gray color.
• There is a loss of color information that leads to old, faded, inactive, or washed-out styles.
• By looking at the histogram for a specific image a viewer will be able to judge the entire
tonal distribution at a glance.
• The horizontal axis of the graph represents the tonal variations, while the vertical axis
represents the total number of pixels in that particular tone.
• The left side of the horizontal axis represents the dark areas, the middle represents mid-
tone values and the right hand side represents light areas.
• The vertical axis represents the size of the area (total number of pixels) that is captured
in each one of these zones.
Image Enhancement (Examples with Histograms)
Histogram (Color Image)
• Color histogram is a representation of the distribution of colors in an image.
• For digital images, a color histogram represents the number of pixels that have
colors in each of a fixed list of color ranges, that span the image's color space,
the set of all possible colors.
• The color histogram can be built for any kind of color space, although the term is
more often used for three-dimensional spaces like RGB or HSV.
THE END