You are on page 1of 42

Technical University of Mombasa

Faculty of Engineering and Technology

DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING

Bachelor of Science in Electrical and Electronic Engineering

Project proposal report submitted in partial fulfilment requirements for the degree of
Bachelor of Science in Electrical and Electronic Engineering

AIR POLLUTION DETECTION

by
ISAAC NJUGUNA KIMARU BSEE/010J/2013

Supervisor: Mrs Kasuku

Date submitted July 2018


DECLARATION
I, Isaac Njuguna Kimaru, declare that the contents of this project report represent my own
unaided work, and that the report has not previously been submitted for academic examination
towards any qualification. Furthermore, it represents my own opinions and not necessarily those
of the Technical University of Mombasa.

Signed Date

ii
ABSTRACT
Pollution from industries, vehicles, change of weather, indoor pollution among other sources
negatively impacts the health of employees and neighbouring communities and the potential for
adverse health outcomes is heightened when the industries are located in rural areas where the
bulk of the population is vulnerable because of limited information about their rights and limited
capacity to defend themselves or influence policy decisions. Furthermore, the situation is
compounded by the fact that developing countries have limited air quality management systems
due to inadequate legislation and lack of political will, among other challenges. Maintaining a
balance between economic development and sustainable environment is a challenge, hence
investments in pollution prevention technologies get side lined in favour of short-term benefits
from increased production and job creation. This lack of air quality management capability
translates into lack of air pollution data, hence the false belief that there is no problem (Omanga
et al). This however, is not the case and only further conceals a major public health crisis
The purpose of this project is to examine the use of digital cameras to detect the magnitude of
atmospheric pollution present in the atmosphere. Digital cameras are inexpensive and are being
used in countless areas, many of which are outdoors and very public.
The theory presented in this paper could help agencies to monitor air quality at any of these sites.
The project aims at availing information to policy makers and researchers concerning public
awareness and attitudes towards environmental pollution pertinent to development and
implementation of environmental policies for public health.

iii
ACKNOWLEDGEMENTS
I wish to thank the following people for their unending support in ensuring the success of this
project.
My Project Supervisor, Mrs Kasuku for regular guidance and encouragement. I am really
grateful to her for her valuable suggestions and unflinching co-operation throughout the work.
I would be remiss if I did not express my sincere appreciation to my family and friends who have
been my pillars of strength throughout the course of carrying out this project. Their
encouragement and pressure has led to my perseverance to perform the best I could. I would not
be in my position today without their help.

iv
DEDICATION
For my loving parents John and Sofia and my lovely sister Mary.

v
Table of Contents
DECLARATION.............................................................................................................................ii

ABSTRACT...................................................................................................................................iii

ACKNOWLEDGEMENTS............................................................................................................iv

DEDICATION.................................................................................................................................v

GLOSSARY..................................................................................................................................vii

CHAPTER ONE..............................................................................................................................1

1.1 Introduction.......................................................................................................................1

1.2 Overall Objective.............................................................................................................2

1.3 Specific Objectives...........................................................................................................2

1.4 Problem statement.............................................................................................................2

1.5 Scope of work...................................................................................................................3

1.6 Assumptions and delimitations.........................................................................................3

1.7 Significance and Motivation of Study..............................................................................4

CHAPTER TWO.............................................................................................................................5

2.2 Air Quality Assessment in Selected Sites in Kenya.........................................................6

2.4 Previous projects on Air pollution monitoring.................................................................8

2.4.1 Satellite Image Processing and Air Pollution Detection............................................8

2.4.3 A Digital Image Processing Method for Detecting Pollution in the Atmosphere
from Camera Video..................................................................................................................9

2.4.4 Particle Pollution Estimation Based on Image Analysis.........................................10

2.5.1 Matlab Software.......................................................................................................11

2.5.2 CCTV Camera.........................................................................................................12

2.5.3 CCDP Camera.........................................................................................................12

vi
2.5.4 Principles of Image Sensor Operation.....................................................................12

CHAPTER THREE.......................................................................................................................15

3.0 Methodology...................................................................................................................15

3.1 Introduction....................................................................................................................15

3.2 Design.............................................................................................................................15

3.2.1 Introduction.................................................................................................................15

3.2.3 Exploring possible software solution strategies and selection of most...................16

viable solution........................................................................................................................16

3.2.4 Overall circuit diagram and circuit operation..............................................................16

3.2.5 Design summary......................................................................................................17

3.3 Challenges encountered..................................................................................................17

3.4 Deliverables achieved.....................................................................................................17

3.5 Method of Data collection..............................................................................................17

3.6 Results.............................................................................................................................20

3.7 Project Costing................................................................................................................23

3.8 Project Time Management..............................................................................................24

3.9 Ethical Considerations....................................................................................................24

3.10 Conclusion......................................................................................................................25

3.11 Recommendations...........................................................................................................25

REFERENCES..............................................................................................................................27

APPENDIX: Determining the RGB histogram for a sky images..................................................29

vii
LIST OF FIGURES
Figure 2.1: Electromagnetic spectrum…………………………………………………………....5
Figure 2.2: Levels of air pollutants in ambient air………………………………………………..7
Figure 3.1: The schematic set-up of CCTV cameras used as remote sensor……………………17
Figure 3.2: The schematic set-up of CCTV cameras used as remote sensor……………………18
Figure 3.3: Pure image RGB histogram…………………………………..…………….……….22
Figure 3.4: Slightly polluted image RGB histogram…………………………………………....22
Figure 3.5: Polluted image RGB histogram…………………………………………………......22

viii
LIST OF TABLES
Table 3.1: Selected demographic characteristics of the study population.............................…...23
Table 2.2: Project costing………………………………………………………………………..24
Table 3.3: Project time management……………………...……………………………………..25

ix
GLOSSARY
COPD Chronic Obstruction Pulmonary Disease. A group of diseases that block airflow
and make it difficult to breath.
CCTV Closed Circuit Television
ARI Acute Respiratory Infection
MOH Ministry of Health
HVS High Volume Samplers
GEMS Global Environmental Monitoring System
WHO World Health Organization
NEMA National Environmental Management Authority
PAPA Public Health and Air Pollution in Asia
CO Carbon Monoxide
CO2 Carbon Dioxide
SO2 Sulphur Dioxide
PM Particulate Matter
NO2 Nitrogen Dioxide
CCDP Closed-Circuit Digital Photography
CCD Charged Coupled Device
CMOS Complementary Metal Oxide Semiconductor
ENVI Environment for Visualizing Images
MOS Metal Oxide Semiconductor

x
CHAPTER ONE
1.1 Introduction
Air pollution is one of the major and most prevalent forms of environmental pollution
worldwide including in Kenya. Industrial activities and emissions, vehicles, construction
and agricultural activities, incineration and windblown dust are some of the main
contributors of hazardous air pollutants. Other pollutants include particulate matter,
chlorine, sulphur dioxides, hydrogen sulphides, carbon dioxide, carbon monoxides and
nitrous oxides and hydrogen sulphide.
A significant number of roads and industries in this country are in close proximities to
heavily populated human settlements and residential areas. A substantial percentage of
the local population is therefore continuously exposed to polluted air, as a result of
industrial activities and vehicular emissions. Continuous exposures to hazardous air
pollutants often result in various forms of ailments including respiratory diseases.
Ailments usually result in loss of productivity and sometimes loss of life. Air pollutants
can further be transported over long distances and frequently end up in terrestrial and
aquatic ecosystems, through wet and dry deposition. Sulphur dioxide, nitrogen dioxide
and particulate matter are some of the prevalent air pollutants in Kenya, especially in
urban areas and industrial sites. They have been widely associated with adverse effects on
human health and the environment including, aggravation of asthma and chronic
bronchitis respiratory ailments, eye and throat irritation, acidification of aquatic
ecosystems through acid rain and reduction of soil fertility, acceleration of corrosion and
destruction of some components of buildings, inflammation of lung tissues, pulmonary
fibrosis, respiratory irritation, impairment of lung defences, respiratory diseases and eye
irritation.
Astoundingly, most developing countries, especially in sub-Saharan Africa, do not have
air quality management systems because of inadequate legislation, budgetary constraints
and lack of political will, among other things (Mulaku GC, 2001). In these regions, there
is a major challenge in maintaining a balance between economic development and a
sustainable environment; hence investments in pollution prevention technologies like
emission controls are commonly outweighed by the short-term benefits that accrue from

1
increased production and job creation. The lack of air quality management capabilities in
these regions translate into lack of air pollution data, which in most cases gives the false
belief that it is not a problem. (Eunice Omanga, 2014) This however, is not the case and
only further conceals a major public health crisis in the developing world.
There are many researches done in environmental analysis and how pollutants affect the
atmosphere around us. However very few give an easy and inexpensive way by which
one can analyse the air quality we breathe, hence this project proposes an easy and cheap
method of pollution detection using Matlab software and digital cameras.
The theory is based on how certain molecules and particles that are present in clean air
absorb, luminesce, refract, reflect, or scatter the red, green, and blue (RGB) visible light
spectrum in a measurable manner. The longer wavelength components (red side) of
visible light through the atmosphere are scattered less than the shorter wavelength
components (blue side). The blue component is scattered more than the other colour
components (and, thus, is responsible for blue sky). The longer wavelength components
of visible light are also refracted less than the shorter wavelength components. The
presence of certain pollutants and suspended particles in air will cause different levels of
absorption, re-emission, refraction, or scattering in the RGB spectrum than that for
cleaner air.
1.2 Overall Objective
This project study seeks to design, construct and test the air pollution detection Matlab
algorithm for simulation and determine the level of pollution in a given region.
1.3 Specific Objectives
1. Perform literature review on air pollution detection.
2. Come up with the a Matlab code for decomposing and obtain RGB histogram
from a digital sky images hence determine if they were taken from a polluted area
or not.
3. Carry out a research by use of a questionnaire to investigate the community
awareness and risk perception on air pollution in Bamburi, Mombasa county.
1.4 Problem statement
Air pollution has become a serious issue in the present times. The carbon dioxide,
particulate matter, nitrogen dioxide and sulphur dioxide levels are increasing due to

2
human activities. These pollutants cause a significant risk factor for a number of
pollution-related diseases and heath conditions including respiratory infections, heart
disease, COPD, stroke and lung cancer. Unfortunately, very few has been done in taming
this situation hence this project seeks to identify the most viable way of availing data for
the purpose of air quality monitoring and air pollution control.
1.5 Scope of work
The scope of this work focuses on the literature review, design and data collection. The
environmental impact investigated in this research is limited to air. The data was
collected in Bamburi and Nyali in Mombasa county. These sites include Bamburi and
Nyali. For the purposes of data collection, a digital camera will be used in place of the
CCTV camera.
1.6 Assumptions and delimitations
Assumption

- It is assumed that the images captured with the digital camera will have the same
information as those captured by the CCTV cameras installed in major urban
centres in Kenya (that is, Mombasa and Nairobi)

- It’s assumed that the air pollution in Nyali, Mombasa county is so small that it’s
assumed to be negligible.

- It is assumed that weather will not affect the information in the images captured.

Limitations

- The study area is limited to few sites in Mombasa, Kwale and Kilifi counties and
the findings cannot be generalized to the whole country due to the fact that the
sampling methods applied are non-random.

- Lack of sufficient funds to carry out data collection in every part of the country.

- Presence of clouds may affect the efficiency of the obtained results

3
1.7 Significance and Motivation of Study
The lack of air quality management capabilities in Kenya translate into lack of air
pollution data, which in most cases gives the false belief that it is not a problem. This
however, is not the case and only further conceals a major public health crisis.

The primary purpose of this project is to avail information to policy makers and
researchers concerning public awareness and attitudes towards environmental pollution
pertinent to development and implementation of environmental policies for public health.

4
CHAPTER TWO
2.0 Literature Review
2.1 Introduction
Light is an electromagnetic radiation within a certain portion of the electromagnetic
spectrum. Light usually refers to visible light, which is the spectrum visible to human eye
and responsible for the sense of sight. Visible light is usually defined as having
wavelengths in the range of 400-700 nanometres (nm), between the infrared and the
ultraviolet radiations. This radiation is characterised by comprising energy carried in
small, discrete parcels called photons. Schematic representations of a blue, red and green
photons are shown in the figure below.
Blue, green and red photons have wavelengths of around 0.45, 0.55 and 0.65 microns,
respectively. The colour properties of light depend on its behaviour both as waves and as
particles.

Figure 2.1: Electromagnetic spectrum


When light strikes an object, certain colour of photons are captured by molecules in that
object. Different types of molecules capture photons of different colours. The only
colours we see are those photons that the surface reflects. For instance chlorophyll in
leaves captures red and blue light and allows green photons to bounce back, thus
providing green appearance of leaves. Nitrogen dioxide, gas emitted into the atmosphere

5
by combustion sources, captures blue photons. Consequently, nitrogen dioxide gas tends
to look reddish brown.
The basic way of representing a digital coloured image in a computer's memory is a
bitmap. A bitmap is constituted of rows of pixels. Each pixel has a particular value which
determines its appearing colour. This value is qualified by three numbers giving the
decomposition of the colour in the three primary colours red, green and blue. Any colour
visible to human eye can be represented this way.
The decomposition of a colour in the three primary colours is quantified by a number
between 0 and 255. For example, white will be coded as R = 255, G = 255, B = 255;
black will be known as (R,G,B)= (0,0,0); and say, bright pink will be : (255,0,255). An
image is an enormous two dimensional array of colour values of pixels, each of which is
coded on 3 bytes, representing the three primary colours. This allows the image to
contain a total of 256x256x256 = 16.8 million different colours. This technique is also
known as RGB encoding, and is specifically adapted to human vision.
The range of 0-255 has the advantage that the human eye is not sensible enough to make
the difference between more than 256 levels of intensity (1/256 = 0.39%) for a colour.
That is to say, an image presented to a human observer will not be improved by using
more than 256 levels of grey (256 shades of grey between black and white). Therefore
256 seems enough quality. The second reason for the value of 255 is that it is convenient
for computer storage. Indeed one byte, which is the computer’s memory unit, can be
coded up to 256 values.
Digital image pixel tonality (darkness or lightness) for 24 bit RGB colour is expressed as
a number between 0 and 255. 0 equals pure black and 255 equals pure white. The mid-
point at about 127 would be the equivalent of middle grey in density. An image
histogram is a type of histogram that acts as a graphical representation of the tonal
distribution in a digital image. It plots the number of pixels for each tonal value. The
horizontal axis of the graph represents the tonal variations, while the vertical axis
represents the number of pixels in that particular tone. By looking at the histogram for a
specific image, entire tonal distribution can be analysed at a glance.

6
2.2 Air Quality Assessment in Selected Sites in Kenya
In a study done by Prof Shem O. Wandiga (2015), the following data was obtained from
selected sites in Kenya as shown in the diagram below.

Figure 2.2: Levels of air pollutants in ambient air

Nrb -Nairobi county, industrial area


Kky- Kikuyu Town
Ksm -Kisumu county, Kibos area
Trk -Turkana county, Lokichar
Ldw- Lodwar town
Klf -Kilifi County, Vipingo
Art -Athi River Town
From the above chart the following observations can be made;
 The concentrations of Sulphur dioxide in Nairobi, Kikuyu and Athi River Town
exceeds the 24-hour WHO guidelines of 125 to 150µg/m3.
 The levels of sulphur dioxide at all sites, except in Vipingo exceeded the 1-year
guideline of 60µg/m3.

7
 The concentration of nitrogen dioxide in industrial area Nairobi exceeds the WHO
guidelines (1 year guideline of 40µg/m3 and the 8 year guideline of 120µg/m3).
 The concentrations of the particulate matter at all sites except in Vipingo, exceeds
the one year WHO guideline and the 24 hour WHO guideline.

2.4 Previous projects on Air pollution monitoring


2.4.1 Satellite Image Processing and Air Pollution Detection
According to A. Prochazka et. al (2000), environmental sensing is closely related to
digital processing of observed signal and images. The paper is devoted to the analysis of
mathematical methods allowing detection of concentration of dust particles observed by
ground measuring stations and satellites. The first part of the contribution presents basic
methods of two dimensional interpolations allowing the estimate of observed variables
over the whole region of interest. Owing to simultaneous observations on different
frequencies it is possible to detect image differences and to compare them with surface
measurements. The paper is devoted to the design and varication of algorithms of image
denoising including wavelet use and their correlation.
The results presented in the paper justify correspondence between satellite and ground
observations in case of appropriate weather conditions as correlation of surface and
satellite measurements give very satisfactory results for some regions in which
concentration of dust particles in the air is measured. The satellite images did contain
information on air pollution. More detailed statements on how this information can be
used for evaluation of air pollution should be made after greater volumes of data are
processed. Mathematical background used for these studies will include further methods
of time series processing including two dimensional interpolation using non-linear
methods and wavelet functions. Furthermore, image processing, filtering, image
enhancement and channels correlation will be applied.
2.4.2 Development of Low Cost Air Quality Monitoring System by Using Image
Processing Technique.
C.J. Wong et al. (2009), in their study propposed development of a state-of-art image
processing technique to enhance the capability of an internet video surveillance (IVS)
camera for real time air quality monitoring. This technique is able to detect particulate
matter with diameter less than 10 micrometres (PM10). An empirical algorithm was

8
developed and tested based on the atmospheric characteristic to determine PM10
concentrations using multispectral data obtained from the IVS camera. A program is
developed by using this algorithm to determine the real-time air quality information
automatically. This development showed that the modern Information and
Communications Technologies (ICT) and digital image processing technology could
monitor air quality at multi location simultaneously from a central monitoring station.
They developed this algorithm based on the fundamental optical theory, such as light
absorption, light scattering and light reflection. This is a skylight model, which was
developed to indicate the existence of particulate matter in the air. The skylight is an
indirect radiation, which occurs when the radiation from the sun being scattered by
elements within the air pollutant column
Traditionally the air quality monitoring systems are involved with high set-up cost and
also high operating cost. These have become the major obstacles for setting up more air
quality monitoring systems at multi location. The purpose is to give an indicator to
human for preventing the air quality become worst and worst. In this study, we have
showed that the temporal air quality can be monitored by our own developed image
processing technique. This technique is using the newly developed algorithm to process
the image captured by the internet video surveillance camera. It produced real time air
quality information with high accuracies. This technique uses relatively inexpensive
equipment and it is easy to operate compared to other air pollution monitoring
instruments. This showed that the IVS camera imagery gives an alternative way to
overcome the difficulty of obtaining satellite image in the equatorial region and provides
real time air quality information.
2.4.3 A Digital Image Processing Method for Detecting Pollution in the Atmosphere from
Camera Video
Amritphale (2013), in his thesis, examines the use of digital cameras to detect the
magnitude of atmospheric pollution present in the atmosphere. Digital cameras are
inexpensive and are being used in countless areas, many of which are outdoors and very
public. For example, we see digital cameras located at street intersections, city and state
parks, and recreation areas. He presented a theory that could help agencies to monitor air
quality at any of the sites.

9
The presence of certain pollutants and suspended particles in air will cause different
levels of absorption, re-emission, refraction, or scattering in the RGB spectrum than that
for cleaner air.
In the paper he successfully invented methods to detect pollution in the atmosphere. He
achieved this with the help of image processing techniques, which are useful to analyse
hidden information in an image. These methods include-
 Analysing the RGB colour channel histogram of an image
 Analysing the shift in channels in comparison with an unpolluted sky image
 Analysing the frequency bands in an image using a Haar wavelet
 Analysing the standard deviation of energies in comparison with an unpolluted
sky image
The result of each of the above mentioned methods supports the findings of all the other
methods.
The paper did not only explain the theory regarding the aforementioned methods of
pollution detection, but also implemented them effectively. Implemented methods are
tested on the sky images from both CMOS and CCD cameras, which showed expected
results. This gave the stated theory a stronger proof of its feasibility, which can be
implemented in countless areas.
However more research is required to check which types of pollutants cause more
standard deviation and frequency bands to display more energy.

2.4.4 Particle Pollution Estimation Based on Image Analysis


Liu et al (2016), were able to develop an image-based method to estimate PM index in
air. They have extracted various image features, including transmission, image contrast
and entropy, sky smoothness and colour, and studied their correlations with the reported
PM indices in Beijing, Shanghai and Phoenix. They have also examined the effects of
solar zenith angle, and weather conditions on the accuracy of the predictions. Using the
image and non-image features, they have analysed a large number of images captured in
Beijing (327 images, one per day for 327 days), Shanghai (1954 images, and 8 images
per day for 245 days), and Phoenix (4306 images, and 16 images per day for 270 days),
and concluded that the method can provide reasonable prediction of PM index over a
wide PM index range. Though this method is not expected to replace the gold standard
10
particle counting apparatus, however, simplicity and smartphone readiness can help
promote air pollution awareness, and alert people with serious respiratory diseases to stay
away from suspected polluted air.

2.5.1 Matlab Software


Matlab is a program that uses numerical calculations based on linear algebra. It started as
a “Matrix Laboratory” platform, and has been developed enough to become a powerful
tool in the implementation of simulations and modelling systems, planning, research,
engineering, and communications/telecommunications.
Its technical language is compact and descriptive, which allows the modelling of various
systems using an easy-to-learn code. These features make Matlab an attractive and
powerful tool that can be used by the tutor to effectively teach many courses such as the
automatic control systems.
Matlab supports developing applications with graphical user interface (GUI) features.
Matlab includes GUIDE (GUI development environment) for graphically designing
GUIs. It also has tightly integrated graph-plotting features.
Matlab offers a rich library of functions for vector and and matrix (2D) array
manipulation. Thus it often used for quick prototyping and testing of image algorithms
and heuristics. A (2D) image is basically a two dimensional array of pixels. Most of the
common image operations are manipulation of this 2 dimensional data.
Matlab can be used to represent images in five ways;
 Grayscale. A grayscale image M pixels tall and N pixels wide is represented as a
matrix of double data type of size M×N
 True colour RGB. A true colour red-green-blue (RGB) is represented as a three
dimensional M×N×3 double matrix. Each pixel has red, green, blue components
along with the third dimension with values in [0, 1].
 Indexed. Indexed (palette) images are represented with an index matrix for size
M×N and a colourmap matrix of size K×3. The colourmap holds all colours used
in the image while the index matrix represents the pixels by referring to colours in
the colourmap. For example, if the 22nd colour is magenta MyColormap (22,) = [1,
0, 1], then MyImage (m, n) = 22 is a magenta-coloured pixel.

11
 Binary. A binary image is represented by an M×N logical matrix where pixel
values are 1(true) or 0 (false).
 Unit8. This type uses less memory and some operations compute faster than with
double entries.
2.5.2 CCTV Camera
Closed-circuit television (CCTV), also known as video surveillance, is the use of video
cameras to transmit a signal to a specific place, on a limited set of monitors. It differs
from broadcast television in that the signal is not openly transmitted, though it may
employ point to point (P2P), point to multipoint (P2MP), or mesh wired or wireless links.
Though almost all video cameras fit this definition, the term is most often applied to
those used for surveillance in areas that may need monitoring such as banks, stores, and
other areas where security is needed. Though Videotelephony is seldom called "CCTV"
one exception is the use of video in distance education, where it is an important tool.
Recently CCTV technology has been enhanced with a shift toward Internet-based
products and systems, and other technological developments.
2.5.3 CCDP Camera
A development in the world of CCTV is in the use of closed-circuit digital photography
still camera to take very high resolution images of the camera scene either on a time
lapse. Images taken by this type of cameras have higher resolution than those taken with
a typical video camera. Images of the camera scene are transferred automatically to a
computer every few seconds. Images may be monitored remotely if the computer is
connected to a network.
2.5.4 Principles of Image Sensor Operation
Charge Coupled Device (CCD)
Invented by Willard Boyle and George Smith at Bell Laboratories in 1970, the device
consists of millions of light sensitive cells\pixels capable of producing an electrical
charge proportional to the amount of light they receive. They are either arranged in a
single line (linear array CCDs) or two-dimensional (2D) grid array CCDs. Digital
cameras use area array CCDs. The resolution of a CCD refers to the number of pixels in a
digital image. The first CCD camera had a resolution of 100×100, today the largest
resolution is 9000×7000 equivalent to over 63 million pixels.

12
CCDs are manufactured using metal oxide semiconductors (MOS) fabrication technology
and each pixel can be thought of as a MOS capacitor that converts photons (light) into
electrical charge and stores.
There are two types of CCDs; buried channel CCD and surface channel CCD. The buried
channel CCD offers major advantages hence mostly used. It is built on a p-type silicon
substrate (approximately 300µm thick) with an n-type layer (approximately 1 µm thick)
formed on the surface. Next a thin diode layer (approximately 0.1µm thick) is grown
followed by a metal electrode (gate). Application of a positive voltage to the electrode
reverse biases the p-n junction causing a potential well to form in the n-type silicon
directly below the electrode. Incident light generates electron-hole pairs in the depletion
region and due to the applied voltage the electrons migrate upwards into the n-type
silicon layer and are trapped in the potential well. The build up of the negative charges is
thus directly proportional to the level of incident light. Once exposure time is over (also
known as integration time) has elapsed, the charge trapped in the potential well is
transferred out of the CCD before being converted into an equivalent digital value.
Complementary Metal Oxide Semiconductor (CMOS)
CMOS image sensors are formed from a grid of light sensitive elements capable of
producing an electrical signal/charge proportional to the incident light. Each CMOS pixel
is made of a photodiode, a capacitor and up to three (3) transistors. When the integration
period begins the charge on the capacitor is allowed to slowly drain away through the
photodiode, the rate of drain being directly proportional to the level of incident light. At
the end of integration period, the charge remaining in the capacitor is read out and
digitalised.
Comparison between CMOS and CCD image sensors.
 Product integration-CMOS image sensors have a high level product integration. It
is possible to include timing, logic, exposure control analogue to digital
conversion and image compression circuitry on chip with the sensor to make a
complete single chip camera.
 CMOS traditionally consumes little power. Implementing a sensor in CMOS
yields a low power sensor. CCDs consume as much as 100 times more power
than an equivalent CMOS sensor.

13
 CMOS chips can be fabricated on any standard silicon production line, so they
tend to be extremely inexpensive compared to CCD sensors
 Because each pixel on a CMOS sensor has several transistors located next to it,
the light sensitivity of a CMOS chip tends to be lower. Many of the photons
hitting the chip hit the transistors instead of the photodiode.
 CCD camera sensors are less prone to rolling shutter wobble.

14
CHAPTER THREE

3.0 Methodology
3.1 Introduction
This chapter contains the method to be used in the design of this project, the design, and
simulation. It also contains the project costing and time management.

3.2 Design
3.2.1 Introduction
This project seeks to come up with simple, cheap and easily implementable ways of
determining the air quality of a given area using digital sky images. Matlab software is to
be used for decomposing the digital images, obtaining RGB histogram from the images
hence determine if they were taken from a polluted area or not. Furthermore, a research
was carried out by use of a questionnaire to investigate the community awareness and risk
perception on air pollution in Bamburi, Mombasa county.

3.2.2 Design considerations

Software considerations

Cost- the cost of the software to be used matters so much. Avery expensive software may
make the project to be economically unviable. Matlab costs less compared to ENVI
software.

Availability- the software selected should he easily available. Matlab is readily available
compared to ENVI software.

Usability -ENVI software requires to be programmed in python. Python programming


language is hard to learn therefore which makes Matlab to be more usable than the ENVI.

Study design

This was a descriptive cross-sectional study in Bamburi, Mombasa county where residents
living within a four-kilometre radius of Bamburi cement filled the questionnaire on their
pollution and health perceptions.

The sample was stratified and proportionally allocated to include key informants of the
stake holders in the community as well as the general population. Such a system was
15
successfully utilized by Omanga et al (2014), in their study of Industrial air pollution in
rural Kenya: community awareness, risk perception and associations between risk
variables. Prospective respondents were informed of the study and assured of
confidentiality.

3.2.3 Exploring possible software solution strategies and selection of most viable solution
ENVI (an acronym for "Environment for Visualizing Images") is a software application
used to process and analyse geospatial imagery. It is commonly used by remote sensing
professionals and image analysts. The software bundles together a number of scientific
algorithms for image processing a lot of which are contained in automated, wizard-based
approach that walks users through complex tasks.

Matlab offers a very large database of built-in algorithms for image processing and
computer vision applications. Furthermore, the software has the ability to process both
still images and video as well as ability to call external libraries, such as OpenCV and
ability to read in a wide variety of both common and domain specific image formats.
Therefore, Matlab software is the most viable.

3.2.4 Overall circuit diagram and circuit operation


The block diagram below shows the overall diagram. The remote monitoring sensor used
in this air quality monitoring study is the 4G internet connected CCTV surveillance
cameras installed in the major cities of Kenya. These cameras can be used to monitor the
concentrations of particles less than 10 micrometers in diameter. The 4G connection,
allows image data transfer over the standard computer networks internet. The cameras
provide a continuous, on-line, real-time monitoring for air pollution at multiple locations.
The continuously captured outdoor images can be processed by using the developed
algorithm.

16
Continuousl Load the
y capture images into
Start Matlab
sky images

Display
the
loaded
image

Split into RGB


channels

Get histogram
values for each
channel

Plot values
in one plot

Stop

Figure 3.1: The flowchart diagram of CCTV cameras used as remote sensor to monitor air
quality.

17
By using this image processing method, it is able to immediately detect the presence of
particulates air pollution, in the air and helps to ensure the continuing safety of environmental air
for living creatures.

Camera1
Computer

Camera2

Computer
Internet
Server

Figure 3.2: The schematic set-up of CCTV cameras used as remote sensor to monitor air quality.

3.2.5 Design summary


A method of air pollution monitoring by processing of digital sky images was
successfully designed. Matlab software is being employed due to its easiness of use,
lower cost and its rich libraries compared to other softwares such as ENVI.
3.3 Challenges encountered
The weather was a great challenge experienced. This method of pollution detection
cannot be accurate on a cloudy day. The sky should be clear.
3.4 Deliverables achieved
Through this method, data was successfully collected and decomposed to determine if the
digital images were taken from a polluted area or not.

18
A research was successfully carried out using a survey questionnaire to investigate the
community awareness and risk perception on air pollution in Bamburi, Mombasa County.
3.5 Method of Data collection
For the purpose of this project, a digital camera used for the purpose of data collection.
Data was collected in form of raw images taken in the selected county of Mombasa The
sites are; Bamburi, Nyali and Tudor. There after the images were analysed and compared
against images taken Nyali, assumed to free of any pollution.
The quantitative survey instrument was a questionnaire developed primarily by reviewing
and adapting questionnaires from literature. For environmental perception, literature
reviewed included previous risk perception, environmental health and environmental
psychometric surveys within and outside Kenya which were then modified for relevance.
The survey questionnaire consisted of a list of items reported in literature as known or
potential environmental health hazards from industrial facilities and environmental health
perception indicators. Questions were developed based on variables representing aspects
of perceived health risks identified from the above literature pertinent to the study area
and population.
Skylight model for air quality assessment
The skylight is an indirect radiation, which occurs when the radiation from the sun is
scattered from direct solar beam by elements within the air pollutant column in the
atmosphere. The model can indicate the presence of particulate matter in the air. The
algorithm is developed based on the fundamental optical theory, such as light absorption,
light scattering and light reflection. This is a skylight model, which was developed to
indicate the existence of particulate matter in the air.
The reflectance caused by the atmospheric scattering Ra is the reflectance recorded by
the digital sensor Rs subtracted by the reflectance of the known references Rr.

(3.1)
In a single scattering of visible electromagnetic radiation by aerosol in atmosphere, the
atmospheric reflectance due to molecules scattering, Rr is proportional to the optical
thickness for molecules, τr, as given by Liu, et al. (1996). This atmospheric reflectance
due to molecule scattering, Rr can be written as

19
(3.2)
where
τr = Aerosol optical thickness (Molecule)
Pr(Θ) = Rayleigh scattering phase function
uv= Cosine of viewing angle
μs = Cosine of solar zenith angle
An assumption is made that the atmospheric reflectance due to particle, Ra, is also linear
with the τa King, et al., (1999) and Fukushima, et al., (2000). This assumption is valid
because Liu, et al., (1996) also found the linear relationship between both aerosol and
molecule scattering.

(3.3)
where
τa = Aerosol optical thickness (aerosol)
Pa(Θ) = Aerosol scattering phase function
Atmospheric reflectance is the sum of the particle reflectance and molecule reflectance,
Ratm, (Vermote, et al., 1997).

(3.4)
where
Ratm = atmospheric reflectance
Ra = particle reflectance
Rr = molecule reflectance
By substituting equation and equation (3.3) into equation (3.4), we obtain

(3.5)

20
(3.6)
The optical depth, τ given by Camagni and Sandroni, (1983) as expressed in equation
(3.6), (3.7) and (3.8).

(3.7)
Where
τ= optical depth
= absorption
s = finite path
τ= τa+ τr

(3.8)

(3.9)

(1.10)

(3.11)

(3.12)
Where;
P = Particle concentration (PM10)
G = Molecule concentration
Ratm(li) = Atmospheric reflectance, i = 1, 2 are the band number

21
aj = Algorithm coefficients, j = 0, 1 are then empirically determined.

3.6 Results
By analysing the shift between red, green and blue histograms of polluted sky and
unpolluted sky. The peak in every histogram represents the average of red, green and blue
components in an image. Compare by how many times the peak has been shifted for a
polluted sky in comparison with the unpolluted sky. Figure 3.9 shows the histogram of
image1 unpolluted sky (from Nyali area) and image2 polluted sky ( in Bamburi). It can
be clearly observed that the histograms of red, green and blue are overlapping with each
other in the case of a polluted sky. On the other hand, histograms of red, green and blue
of the unpolluted sky from Nyali shows non-overlapping histograms. This shows that
pollutants which are mixed in the air are causing the red, green and blue components
values to be changed. This is because pollutants present in the atmosphere cause the red
and green components to scatter and attenuate the blue component, thus absorbing the
blue component and promoting the red component. Thus blue component histogram
shifts to the left and red histogram shifts to the right in the case of polluted sky. The
more shift, the more polluted the sky.

Figure 3.3: Pure image RGB histogram

22
Figure 3.4: Slightly polluted image RGB histogram

Figure 3.5: Polluted image RGB histogram

23
Table 3.1: Selected demographic characteristics of the study population
Gender Male 60%
Female 40%
Education Background Post-secondary 80%
Secondary 20%

Rating of the air quality In place of residence Poor 13%

Fair 76%

Good 11%

In place of work Fair 58%

Good 42%

Main causes of air Industrial sources 100%


pollution Construction activities 80%
Household cooking 11%
Motor Vehicles 62.5%
Cigarrete smoke 56%
Waste disposal 65%
Burning of wastes 71%

Levels of concern on the Air pollution 76%


various environmental Water pollution 82%
pollutants Soil pollution 64%

Over 75% of respondents perceived industrial pollution as posing a considerable risk to


them. Respondents also argued that they had not been actively involved in identifying
solutions to the environmental challenges. The study revealed a significant association
between industrial pollution as a risk and, perception of risk from other familiar health
hazards. The most important factors influencing the respondents’ pollution risk
perception were environmental awareness and family health status.

24
Additionally, over 70% of the responds feel the need for the government to do more in
promoting and encourage better environment conservation practices. More so, 80% of the
respondents confirmed that they routinely take part in environmental conservation
activities.

3.7 Project Costing


Table 3.2: Project costing
Item Price

Data collection 2500

Typing and printing 600

Photocopying and binding 300

Consultation 1500

Software 3000

Miscellaneous 1000

Total cost 8900

25
3.8 Project Time Management
Table 3.3: Project time management
SEP OCT NOV DEC JAN FEB MAR APL MAY JUN JUL
2017 2017 2017 2017 2018 2018 2018 2018 2018 2018 2018

Concept
paper
presentation

Proposal
writing

Proposal
presentation

Final
presentation

3.9 Ethical Considerations


While carrying out the research and during the data collection from the respondents, the
study will observe the following ethical considerations.
1. The respondents will be guaranteed confidentiality in the information they
provided thus the study will ensure that the information given will be confidential.
2. There will be freedom of participation to the respondents in that, the data
collection and collection of information gathered will be given to the researcher
voluntarily.
3. The respondents will be of all ranks in the companies where the research will be
carried out.
3.10 Conclusion
The presence of certain pollutants and suspended particles in air will cause different
levels of absorption, re-emission, refraction, or scattering in the RGB spectrum than that

26
for cleaner air. With the help of image processing techniques, pollution can be detected in
the atmosphere using methods which are useful to analyse hidden information in an
image. These methods include-
 Analysing the RGB colour channel histogram of an image
 Analysing the shift in channels in comparison with an unpolluted sky image
3.11 Recommendations
Since there are CCTV cameras already installed in the major cities (that is, Mombasa,
Nairobi and Kisumu), these cameras can be used for provision of the sky images
necessary for this cheap method of air pollution detection.
Furthermore, the government should consider installing CCDP camera which can take
very high resolution images. Images taken by this type of cameras have higher resolution
than those taken with a typical video camera. Images of the camera scene are transferred
automatically to a computer every few seconds. Images may be monitored remotely if the
computer is connected to a network.
The government should support the adoption of policies to reduce the emission of air
pollutants and greenhouse gas emissions by installing energy efficiency requirements
buildings, fostering the development of energy from renewable sources, introducing tax
subsidies that primarily benefit low polluting companies. More so, the government
should develop environmental information systems that will expand the country's air
quality monitoring network.
Additionally, the government should fully implement the Environmental Conservation
and Management Act of 1999, which requires that the government shall;
 Ensure compliance with air quality standards and strengthen enforcement
capacity.
 Promote efficient non-motorised, non-polluting and efficient infrastructure for
mass transport system.
 Promote non-polluting modes of transport.
 Promote alternative cooking stoves and technologies that are none polluting and
construction of well ventilated houses.

27
REFERENCES
A. Prochazka, M. K. J. F. P. H. K. H., 2000. Satelite Image Processing and Air Pollution
Detection. Istanbul, IEEE.

Amritphale, A. N., 2013. A Digital Image Processing Method for Detecting Pollution in the
Atmosphere from Camera Video. UNLV Theses, Dissertations, Professional Papers, and
Capstones. 1793.

Anita kulkarni, T. R. T., 2014. Automated System for Air Pollution Detection and Control in
Vehicles. International Journal of Advanced Research in Electrical, Electronics and
Instrumentation Engineering, III(9).

C. H. LIU, A. J. C. &. G. R. L., 1996. An image-based retrieval algorithm of aerosol


characteristics and surface reflectance for satellite images. International Journal of Remote
Sensing, 17(17), pp. 3477-3500.

C.J. Wong, M. M. K. A. a. H. L., 2009. Development of Low Cost Air Quality Monitoring
System by Using Image Processing Technique. In: Y. Chen, ed. Image Processing. Croatia:
Intech, pp. 106-114.

Eunice Omanga, L. U. Z. B. M. G., 2014. Industrial air pollution in rural Kenya: community
awareness, risk perception and associations between risk variables. BMC Public Health , pp.
2-3.

Harada, K. H. T. a. K., 2007. Haar Wavelet Based Approach for Image Compression and
Quality Assessment of Compressed Image. IAENG International Journal of A
pplied Mathematics.

Mulaku GC, K. L., 2001. Mapping and Analysis of air Pollution in Nairobi. Nairobi,
Institution of Surveyors of Kenya.

28
Sіnecen, M., 2016. Digital Image Processing with MATLAB. In: Image Processing . Aydin,:
Intech.
Teng., L. M., 2011. The Environmental Impacts of Construction Activities.

Wandiga, P. S. O., 2015. Air Quality Assessment in Selected Sites in Kenya. Nairobi, s.n.

WHO Regional Office for Europe, 2013. Review of evidence on health aspects of air pollution
–REVIHAAP Project, Copenhagen: World Health Organization

29
APPENDIX: Determining the RGB histogram for a sky images
clc
clearvars
% Program to simulate the RGB histogram of a pure image
%Load the pure image from the computer internal storage
image=imread('D:\PURE.jpg');
%Display the loaded image
figure,imshow(image);

%Split into RGB channels


red=image(:,:,1);
green=image(:,:,2);
blue=image(:,:,3);

%Get histogram values for each channel


[yred,x]=imhist(red);
[ygreen,x]=imhist(green);
[yblue,x]=imhist(blue);

%Plot these values together in one plot


figure
plot(x,yred,'red',x,ygreen,'green',x,yblue,'blue');
title('Pure Image RGB Histogram');
image=imread('D:\PJTI\P15.JPG');
imshow(image);
r=image(:,:,1);
b=image(:,:,2);
g=image(:,:,3);
histogram(r,'BinMethod','integers','FaceColor','r','EdgeAlpha',0,'FaceAlpha',1)
hold on

30
histogram(g,'BinMethod','integers','FaceColor','g','EdgeAlpha',0,'FaceAlpha',0.7)
histogram(b,'BinMethod','integers','FaceColor','b','EdgeAlpha',0,'FaceAlpha',0.7)
xlabel('RGB value')
ylabel('Frequency')
title('Color histogram in RGB color space')
xlim([0 257])

clc
clearvars
% Program to simulate the RGB histogram of a polluted image
%Load the polluted image from the computer internal storage
image=imread('D:\POLLUTED.jpg');
%Display the loaded image
figure,imshow(image);

%Split into RGB channels


red=image(:,:,1);
green=image(:,:,2);
blue=image(:,:,3);

%Get histogram values for each channel


[yred,x]=imhist(red);
[ygreen,x]=imhist(green);
[yblue,x]=imhist(blue);

%Plot these values together in one plot


figure
plot(x,yred,'red',x,ygreen,'green',x,yblue,'blue');
title('Polluted Image RGB Histogram');

31
32

You might also like