Lecture 6
Image Processing
Image Processing Overview
Image processing involves techniques used to modify, improve, or analyze
images. It is mainly used in remote sensing, medical imaging, photography, and
computer vision. The three major types of image processing techniques are:
1. Image Enhancement – Improves image quality for better visual
interpretation.
2. Image Transformations – Changes an image mathematically to highlight
specific details.
3. Image Classification – Categorizes different areas of an image based on
color and brightness.
Image Enhancement
Image enhancement is used to make an image clearer and easier to understand.
Sometimes, images might be too dark, too bright, or blurry. Enhancement
techniques adjust brightness, contrast, and details to improve visibility.
Contrast Enhancement
Many images do not use the full range of brightness values (0–255 in an 8-bit
image). This means important details might not be visible. Contrast
enhancement spreads out the brightness values to increase the difference
between objects and their backgrounds.
For example, a satellite image of a city may look dull because all buildings appear
in similar shades of gray. Contrast enhancement makes some buildings appear
lighter and others darker, making them easier to distinguish.
Image Histogram
A histogram is a graph that shows how many pixels have each brightness value.
If an image has mostly dark pixels, the histogram will be concentrated toward the
left side. If it has mostly bright pixels, the histogram will be concentrated toward
the right side.
By looking at the histogram, we can decide how to adjust the contrast to improve
the image.
Linear Contrast Stretch
Linear contrast stretches spreads brightness values evenly over the full range (0–
255). This means:
• Dark areas become darker.
• Bright areas become brighter.
This method makes objects in the image more distinguishable. It is commonly
used in satellite images to make roads, rivers, or buildings stand out.
Histogram Equalization
This technique redistributes brightness values so that commonly occurring
brightness levels get more display values. It helps bring out details in parts of the
image that were originally too bright or too dark.
For example, if an image has a lot of shadows and only a small bright area,
histogram equalization can adjust it so that the shadow areas are more detailed.
Spatial Filtering
Spatial filtering changes an image based on the surrounding pixels. It is used to
highlight or remove details.
For example, in a satellite image, we might want to remove noise (unwanted
variations) or enhance edges (like roads and buildings).
Spatial Frequency
Spatial frequency refers to how quickly brightness changes in an image:
• High spatial frequency – Areas with a lot of detail, like forests or textured
surfaces.
• Low spatial frequency – Smooth areas like lakes or skies.
Understanding spatial frequency helps in designing filters that can enhance or
remove specific details.
Convolution Filtering
Convolution filtering applies a small grid (such as 3×3 pixels) to an image. It
moves across the image and changes pixel values based on the average of the
surrounding pixels. This method is used to enhance or suppress different features.
Low-Pass Filters
Low-pass filters smooth an image by reducing small details and noise. These
filters make an image look less sharp but help in removing unwanted variations.
High-Pass Filters
High-pass filters do the opposite—they sharpen the image by increasing the
contrast between edges. This makes fine details, such as cracks in a road or small
objects, stand out.
Directional or Edge Filters
Edge filters highlight the boundaries of objects. These filters are useful for
detecting roads, rivers, and buildings in satellite images. They can also be
adjusted to highlight edges in specific directions.
Image Transformations
Image transformations modify images by combining multiple bands of data. This
helps highlight specific properties that might not be visible in a single band.
Image Arithmetic (Example: Image Subtraction)
This technique applies mathematical operations (addition, subtraction,
multiplication, or division) to pixel values.
Example: Image Subtraction
If we take two images of a city—one from last year and one from this year—we
can subtract them to see what has changed, such as new buildings or
deforestation.
Spectral Ratioing
Different materials reflect light differently. By dividing the brightness values of
two bands, we can highlight subtle differences in the surface materials.
For example, soil and water might appear similar in one band but show clear
differences when ratioed with another band.
Vegetation Ratio Example
Healthy plants reflect a lot of near-infrared (NIR) light but absorb red light. If
we take the ratio of these two, we can clearly distinguish vegetation from other
surfaces like soil and water.
Normalized Difference Vegetation Index (NDVI)
NDVI is a formula used to analyze vegetation health:
𝑁𝑒𝑎𝑟 𝐼𝑅 − 𝑅𝑒𝑑
𝑁𝐷𝑉𝐼 =
𝑁𝑒𝑎𝑟 𝐼𝑅 + 𝑅𝑒𝑑
A higher NDVI value means healthier vegetation, while a lower value means less
or no vegetation.
Principal Component Analysis (PCA)
PCA is a method used to reduce the number of image bands while keeping the
most important information. This helps in:
1. Compressing data.
2. Removing redundant information.
3. Enhancing key features.
For example, a satellite image might have multiple bands of data, some of which
contain similar information. PCA helps combine them into fewer bands that
highlight important details.
Image Classification
Image classification assigns each pixel to a category, such as:
• Water
• Forest
• Urban area
• Agricultural land
This helps in creating thematic maps for applications like land use planning,
agriculture, and environmental monitoring.
Information Classes vs. Spectral Classes
• Information Classes – Real-world objects like forests, buildings, or roads.
• Spectral Classes – Groups of pixels with similar brightness values in
different spectral bands.
The goal of classification is to match spectral classes to meaningful information
classes.
Methods of Image Classification
1. Supervised Classification – The analyst selects known land cover samples
(training areas) and the computer classifies the rest of the image based on
these samples.
2. Unsupervised Classification – The computer automatically groups pixels
based on their similarities, and the analyst later assigns real-world
meanings to these groups.
Supervised Classification
The analyst selects training areas that represent known land cover types. The
system then categorizes the entire image based on these known examples.
For example, an analyst might select areas of forest, water, and urban land, and
the software will then classify similar areas throughout the image.
Unsupervised Classification
In unsupervised classification, the system groups pixels based only on their
spectral similarities. The analyst later examines these groups and assigns them to
real-world categories.
This method is useful when the analyst does not have prior knowledge of the area.