Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Image Processing

Download as pdf or txt
Download as pdf or txt
You are on page 1of 87

Application of Image Processing in Soil Science

Dr. Somsubhra Chakraborty, Ph.D


Associate Professor
Soil Sensor Lab, Agricultural and Food Engineering Department
Indian Institute of Technology Kharagpur
Overview of the Lecture

Digital Image and Image Processing

Principles and Operations of Image Processing

Hyperspectral Imaging

Statistical Methods for Image Processing

Application of Image Processing in Soil Science


Image Processing
• A series of techniques and
algorithms designed to
manipulate and analyze
visual data for various
purposes, ranging from
enhancing image quality
to extracting valuable
insights
Image Processing in Daily Life
Digital Image Acquisition and Representation
Digital Image
• Defined as a two-
dimensional function,
F(x,y), where x and y are
spatial coordinates, and
the amplitude of F at any
pair of coordinates (x,y) is
called the intensity of that
image at that point

• Image= 2D array

• Composed of finite
number of elements/
pixels
Digital Image

• An image composed of
pixels
• Pixel= picture element
• The digital image contains
a fixed number of rows
and columns of pixels
• Usually, raster
• Pixels are the smallest
individual element in an
image, holding values that
represent the brightness
of a given color at any
specific point
• Arranged in 2D grid
Digital Image
Digital Image
• Pixels approximate the actual
image
• Resolution= # of pixels in an
image
• More Pixels= more resolution=
more closely the image
resembles the original
• Width x Height or Single number
• 1280 x 1024
• Megapixel= MP= Million pixels
• 5 MP= pixels along the width
multiplied by the pixels along the
height of the image taken by the
camera equals 5 million pixels
• 1280 x 1024 monitors= 1.31 MP
Digital Image

• Typically, the pixels are stored


in computer memory as a
raster image or raster map, a
two-dimensional array of
small integers

• These values are often


transmitted or stored in a
compressed form (JPEG)

• Raster images can be created


by digital camera, scanners,
airborne RADAR etc.
Types of Digital Image
• BINARY IMAGE–contain only
two pixel elements i.e 0 &
1,where 0 refers to black and 1
refers to white. This image is
also known as Monochrome.

• BLACK AND WHITE IMAGE–


consist of only black and white
color is called BLACK AND WHITE
IMAGE.
Types of Digital Image
• 8 bit COLOR FORMAT–most
famous image format. It has
256 different shades of colors
in it and commonly known as
Grayscale Image. In this
format, 0 stands for Black, and
255 stands for white, and 127
stands for gray.

• 16 bit COLOR FORMAT– It is a


color image format. It has
65,536 different colors in it. It
is also known as High Color
Format. In this format the
distribution of color is not as
same as Grayscale image.
Image Quantization
• 256 gray levels (8bits/pixel) 32 gray levels (5 bits/pixel) 16 gray levels (4 bits/pixel)

• 8 gray levels (3 bits/pixel) 4 gray levels (2 bits/pixel) 2 gray levels (1 bit/pixel)


Types of Digital Image
• 16 bit format is divided into RGB format

Pixel
Different Color Models

RGB color mode is best for digital work, while CMYK is used for print products
Different Color Models
Color Digital Image
Video: Frame by Frame
Different Color Models

Unlike RGB and CMYK, which use primary colors, HSV is


closer to how humans perceive color.
It has three components: hue, saturation, and value.
Different Color Models

RGB color mode is best for digital work, while CMYK is used for
print products
Digital Image Processing
• Manipulation of digital images
through a digital computer
using computer algorithms
• It is a subfield of signals and
systems but focus particularly
on images
• The input of that system is a
digital image and the system
process that image using
efficient algorithms, and gives
an image as an output
• Most common example:
Adobe Photoshop
Digital Image Processing

• In this example, an image


has been captured by a
camera and has been sent
to a digital system to
remove all the other
details, and just focus on
the plant and soil by
zooming it in such a way
that the quality of the
image remains the same.
Steps of Digital Image Processing

1. Import the image via image


acquisition tools/devices
2. Analyze and manipulate the
image
3. Produce altered image or
extract image features
Digital Image Processing: Principles/Steps

1. ACQUISITION– It could
be as simple as being
given an image which is
in digital form. The main
steps involves:
a) Scaling
b)Color conversion
(RGB to CMYK or Gray or
vice-versa)
Digital Image Processing: Principles
2. Image Pre-processing: image normalization

• Enhance image quality and correct inherent


imperfections.
• This phase involves operations like noise reduction,
contrast adjustment, and image normalization, aimed
at optimizing the input data for subsequent analysis.
• Normalization: also known as Histogram equalization,
used for performing contrast adjustments to the image
so that the intensity values of the image span the
entire intensity range. Furthermore, this larger span of
the intensity values allows for sharper differences
between dark and bright regions.
• The objective is to prepare the images for more
accurate and reliable processing in the later stages.
• For instance, in crop monitoring, pre-processing might Image normalization
involve normalization to account for variations in
lighting conditions, ensuring accurate assessment of
crop health
Digital Image Processing: Principles
2. Image Pre-processing: image normalization

Image normalization
Digital Image Processing: Principles
2. Image Pre-processing:

Contrast Enhancement
Digital Image Processing: Principles
2. Image Pre-processing:

Image Enhancement
Digital Image Processing: Principles
2. Image Pre-processing: noise reduction
• Image noise is a common problem you may encounter when preparing images for analysis. The type of noise
you will encounter will depend on the type and quality of your photographic equipment.

Noise reduction by Gaussian Filter Noise reduction by Mean Filter

Noise reduction by Median Filter Noise reduction by Weiner method


Digital Image Processing: Principles
2. Image Pre-processing: image restoration (atmospheric correction in remote sensing)
Digital Image Processing: Principles
2. Image Pre-processing:

Image Compression

Reduces the file size of images without significant loss of relevant information. This is particularly useful in transmitting
drone-captured images from the field to a central database, optimizing data transfer and facilitating timely decision-
making.
Digital Image Processing: Principles
3. Image Segmentation
• Process of dividing an image into meaningful and coherent regions.
• Involves identifying boundaries and distinguishing objects or structures within the image.
• Accurate segmentation is crucial for isolating specific regions of interest and facilitating targeted
analysis in subsequent stages.
• Enables the system to focus on individual components, enhancing the efficiency of feature
extraction.
• Example: Identifying and distinguishing crop rows from weeds or identifying individual plants
within a field are examples of segmentation in agriculture.
Digital Image Processing: Principles
4. Feature Extraction
• Identification and extraction of relevant information or distinctive characteristics from the
segmented regions.
• These features serve as the basis for subsequent analysis and decision-making.
• Depending on the application, features can include color, texture, shape, or other specific attributes
that are pertinent to the objectives of the image processing task.
• Extracting relevant features from segmented regions plays a vital role.
Digital Image Processing: Principles
4. Feature Extraction:

Image normalization
Digital Image Processing: Principles
5. Post-Processing
• Following feature extraction, post-processing techniques are applied to refine and interpret the results.
• Includes tasks such as filtering, smoothing, or further enhancement of specific features.
• Post-processing aims to improve the overall quality of the output and ensure that the information
extracted aligns with the intended objectives of the image processing application.
• In disease detection, post-processing may involve filtering to enhance features indicative of plant
diseases, enabling timely intervention and minimizing crop losses

Gaussian Smoothing
Digital Image Processing: Principles
5. Post-Processing

The Gaussian Smoothing


Operator performs a weighted
average of surrounding pixels
based on the Gaussian
distribution. It is used to
Gaussian Smoothing remove Gaussian noise and is a
realistic model of defocused
lens. Sigma defines the amount
of blurring.
Digital Image Processing: Principles
Electromagnetic Spectrum
Hyperspectral Image
Hyperspectral Image
Hyperspectral Image
Levels of Image Processing
Methods of Image Processing

Convolutional Neural Network

Transfer Learning
DL for Image Processing

VGC16 ResNet50

Xception
Image Processing for Smart Agriculture
Application of Image Processing in Soil
Application of Image Processing in Soil

Image Processing by CNN

USB Microscope for Soil

After histogram equalization


Before histogram equalization
Application of Image Processing in Soil
Application of Image Processing in Soil
Application of Image Processing in Soil
Application of Image Processing in Soil
Image High Pass Filter
A high pass filter tends to retain the
high frequency information within an
image while reducing the low
frequency information
Application of Image Processing in Soil
Application of Image Processing in Soil
Image Processing for Soil Fertility Prediction
Application of Image Processing in Soil

Taneja et al. (2021)


Application of Image Processing in Soil

Kankanet: An artificial neural network-based object detection smartphone application


and mobile microscope as a point-of-care diagnostic aid for soil-transmitted
helminthiases
Land Suitability Evaluation

Dynamic region merging + genetic algorithm.


Nix Color Sensor
Nix for Soil Color
Nix for Soil Color
Low Cost Portable Spectrometer
Image Analysis for Precision Agriculture
Multiple Cameras for Crop Characterization in Field
Thermal Image Analysis for Crop Stress Monitoring

TIR (3.0–100 μm)

Handheld Thermal Imager


Machine Vision for Crop Harvesting

Robotic Pickers
Machine Vision for Autonomous Vehicles
Machine Vision for Autonomous Vehicles
RS Image Analysis for Characterization
RS Image Analysis for Characterization
RS Image Analysis for Characterization

Landsat –based Identification of Areas where Wheat Dried, Australia


Multispectral vs. hyperspectral
Multispectral vs. hyperspectral
High spectral resolution

Quantification: Determines
abundance of materials
Characterization: Determines
variability of identified material (e.g.
wet/dry sand, soil particle size
effects)
Identification: Determines unique
identity of the foregoing generic
categories (i.e. material
identification)
Classification: Separates materials
into spectrally similar groups Sensor-based drone for pollutant detection
Detection: Determines presence of Source : MDPI
materials, objects, activities or events
of interest

Low spectral resolution


Drone based multispectral imaging

P4 Multispectral - DJI
Drone based hyperspectral imaging

• Headwall Micro-and Nano-


Hyperspec VNIR
• UHD 185-Firefly
• PIKA II sensor
• HySpex VNIR
UAV based hyperspectral imaging

• Spectral Dispersion
➢ In hyperspectral imaging
systems, incoming light from the
scene is dispersed into its
constituent spectral components
using a dispersive element such
as a prism or diffraction grating.
Each spectral component
corresponds to a specific
wavelength range within the
electromagnetic spectrum.
Fig. Spectral dispersion through prism
UAV based hyperspectral imaging
• Spatial and Spectral Sampling
➢ Hyperspectral imaging systems typically consist of an array detector, such as a charge-
coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) sensor,
which captures spatial information across the scene.
➢ Additionally, a spectral dispersion mechanism, such as a slit or tunable filter, selects specific
wavelength ranges for each spatial position, resulting in spatially resolved spectral data.
UAV based hyperspectral imaging
• Data Cube Formation
➢ The captured spatial-spectral data
is arranged into a three-
dimensional data cube, where two
dimensions represent spatial
coordinates (rows and columns of
the image) and the third
dimension represents spectral
information (wavelength bands).
Each pixel in the data cube
contains a spectral signature
corresponding to the intensity of
light at different wavelengths for a
specific spatial location. Hyperspectral data cube
Hyperspectral vs Multispectral imaging
Hyperspectral imaging Multispectral imaging
Spectral resolution • High spectral resolution. • Lower spectral resolution
• Can have 100-1000s of spectral bands • Have smaller number of discrete spectral
with narrow bandwidths (often <10 bands, typically ranging from a few to
nm). several dozen bands.
Data acquisition • Acquire data across a continuous • Acquire data at predefined spectral bands
spectral range with narrow bandwidths selected to capture specific features or
for each pixel in an image. properties of interest.
Data analysis • Involves spectral unmixing, • Common techniques include spectral
classification, and feature extraction indices, band ratioing, and supervised or
methods to identify and characterize unsupervised classification methods to
materials or features within derive information from multispectral
hyperspectral images. images.
Cost and complexity • Typically more expensive and complex • Generally more affordable and easier to
due to higher spectral resolution and implement.
advanced data processing • Offer a good balance between spectral
requirements. resolution and cost-effectiveness.
Hyperspectral imaging
• Spatial and spectral resolution
➢ Enables precise mapping and analysis of features at a sub-pixel level, enhancing the
accuracy and reliability of information obtained compared to traditional techniques
with lower spatial and spectral resolution.

Spectral resolution
Spatial resolution
UAV based hyperspectral imaging
MSRS with UAV for Soil
Soil analysis using drones – soil erosion monitoring

Source: MDPI
Soil analysis using drones – soil organic matter mapping

Source: Heil et al. (2022)


Soil analysis using drones – soil organic matter mapping

Source: Zhang et al. (2020)


Soil analysis using drones – soil nutrients

Source: Yang et al. (2021)


THANKS

You might also like