Anda di halaman 1dari 37

Detection of Abnormal Conditions in

Wastewater Treatment Plant using Image


Processing and Analysis

Muhammad Burhan Khan(13AGD07933)

Supervisor: Dr Humaira Nisar


Co-supervisor: Dr Ng Choon Aun

Department of Electronic Engineering


Faculty of Engineering and Green Technology
Universiti Tunku Abdul Rahman, Kampus Perak,
31900 Kampar, Perak
1
Content
• Background

• Literature Review
 Image Acquisition
 Image Segmentation
 Image Analysis

• Problem Statement

• Hypothesis

• Research Objectives

• Research Methodology

• Preliminary Work

• Work Schedule

• Publications

• References
2
Background

3
Wastewater Treatment
1. Removal of the organic content of wastewater

2. Removal of trace organics that are recalcitrant to


biodegradation and maybe toxic or carcinogenic.

3. Removal of toxic metals.

4. Removal of nutrients (N, P) to reduce pollution of


receiving surface waters or groundwater if the
effluents are applied onto land.

5. Removal of pathogenic microorganisms and


parasites.
4
Wastewater Treatment Plant

5
Wastewater Treatment Plant
Preliminary Secondary Tertiary
Primary
Treatment Treatment Treatment
Treatment

• Removal of • Fine screening • Biological • Nitrogen removal


debris and • Grit Removal processes (such as (nitrification-
coarse • Flotation aerobic and/or denitrification,
material of • Sedimentation anaerobic process, selective ion exchange,
large size breakpoint
trickling filter,
chlorination, gas
rotating biological stripping, overland
contactors and flow)
aeration tank) • Phosphorous removal
• Physical process of (chemical
sedimentation precipitation)
(secondary • Suspended solids
clarifier) removal (chemical
coagulation, filtration)
• Chemical (such as • Dissolved solids
disinfection). removal (reverse
osmosis, electro
dialysis, distillation)
• Organic and metal
removal (carbon
adsorption)

6
Image Processing and Wastewater
Treatment
• Flocs:
 Particulates with size range of 0.5-1000µm
 Microorganisms aggregate in flocs (flake-like structures) that consist of alive
and dead cells of microorganisms and products of their metabolism.

• Filament:
 Form backbone or rigid support network to the floc structure
 Helps the floc structure to filter out fine particulate matter that will improve
clarifier efficiency.
 help the floc to settle if in small amounts
 reduce the amount of "pin" floc

• In different abnormal conditions, flocs and filaments have different structural


properties like compactness, irregular, open, closed, length, area etc.

• Abnormal or normal states of the activated sludge wastewater treatment can be


detected and monitored by image analysis of filaments and flocs

7
Abnormal Conditions
Dispersed Growth
• High turbidity and disability of bacteria to flocculate
• Dispersion of micro-organisms as small clumps
• Caused by high BOD, less DO and/or toxicity

Viscous or Zoogleal or Non-filamentous bulking


• Reduced settling rate and compaction rate
• Caused by excess polysaccharides produced by bacteria

Pinpoint Flocs
• Low sludge volume index and high turbidity
• Small, compact, weak and roughly spherical flocs
• Caused by lack of filamentous bacteria which act as backbone in forming the flocs

Rising Sludge
• Activated sludge flocs get attached to nitrogen and float on the surface leading to high turbidity, high BOD and less
settling ability
• Caused by excessive denitrification in anoxic zone of secondary treatment where aeration tank is replaced by a
sequence of anaerobic-anoxic-aerobic to remove nitrogen and phosphorous

Filamentous Bulking
• Less settling ability, compactness of flocs and high SVI
• Overgrowth of filamentous bacteria

Foaming or Scum Formation


• May result into overflow of solid into settling tank or walkways
• White, frothy and billowing foam caused by surfactants and detergents
• Thick, brown and stable foam caused by filamentous bacteria: Nocardia, Microthrix Parvicella, type 1683 8
Literature Review

9
Literature Review
• Image Acquisition
 Sample preparation
 Microscopic techniques (Bright field, phase contrast, epifluorescene)
 Nature of plant

• Image Segmentation
 The goal of image segmentation is to partition the image into salient
regions of interest.
 Segmentation algorithms
 Segmentation of flocs and filament

• Image Analysis
 Morphological parameters of segmented flocs and filaments
 Correlation of parameters with physico-chemical measurements
 Identification of abnormal conditions 10
Image Acquisition
No Authors Image Acquisition Nature of Plant

1 Jenne et al.,  Phase contrast Brewery waste


2002  Image acquisition covered humanly identified 100 flocs and 100 filaments water treatment
system
2 Heine et al.,  Bright field Lab-scale 3
2001  10x magnification of microscope objective replica
 Image acquisition covered 20 images per sample

3 Yu et al., 2009  Bright field Experimental


 Online Digital system analysis system was built with micro-lense, and a setup
magnetic pump for online measurements.

4 Mesquita et al.,  Bright field Experimental


2011, Mesquita  Epifluorescene microscopy setup
et al., 2013
5 Sikora et al.,  Bright field Didn’t mention
2001 where the sample
had been taken
from.
6 Chu et al., 2004  Phase contrast WWTP
 Confocal Laser Scanning Microscope (CLSM)
 fluorescence in situ hybridization (FISH)
7 Jina et al., 2004  Bright field 7 Full scale
WWTP

11
Image Acquisition

• Limitations:

 Image resolution has not been mentioned.

 Additional microscopic techniques are used to


include the abnormal conditions.

 Sample size has not been mentioned, though


calculations were done without normalization.

 Additional microscopic techniques may consume


more time. 12
Image Segmentation
No Authors Tasks done

1 Jenné et al., 2003  Segmentation procedure: Histogram based thresholding (Intermeans algorithm).

2 Heine et al., 2001  Image enhancement is done by histogram balance or median filtering.
 Segmentation is done by edge detection algorithm by calculation of local extrema of two
dimensional intensity function of image resulting into gradient image. The procedure is
followed by thresholding.
 Segmentation is also carried out by thresholding, followed by labeling.
3 Sikora & Smolka, 2001  One segmentation approach is: analysis of low spatial frequency component and
thresholding of the smoothed image. The technique performed poorly because of
irregular illumination.
 Separate detection: steps were as follows:
 variance operator(to segment flocs)thresholding
 Laplacian operator(to segment filaments)thresholding
 Joint detection (texture discriminatin operation): edge detection (Canny’s
algorithm)fractal dimensiontwo-level thresholding.

4 Perez et al., 2006  Only flocs were studied.


 Background correctionhistogram, equalizationmedian
filteringsegmentation(dilation, closing, filling, erosion)XOR(with binary image with
flocs contour)(opening, erosion)XORanalysis
5 Yong et al., 2013  Watershed algorithm was used for segmentation of flocs
 90-100% quantification efficiency is achieved.
13
Image Segmentation
• Limitations:

 Flocs and filaments are segmented but the accuracy of algorithms


was not assessed.

 At higher magnification, a part of flocs and filaments is out of focus


and blurred, making a source of error in the whole process of
imaging.

 At least 50 images are recommended to represent the whole sample.

 Limiting factors of the algorithms have not been specifies such as


illumination, recognition of different types of branching in
filamentous bacteria etc.

 Poor image segmentation can make the image analysis useless or


erroneous.
14
Image Analysis
No Authors Tasks done
1 Jenne et al., 2002  Five simple shape descriptors are evaluated for humanly identified 100 flocs and 100 filaments
 Humanly identified discriminating levels for each descriptor to differentiate floc and filaments, and
determined corresponding percentage error
 Radius of gyration is considered the best to differentiate between flocs and filaments
 Determined required number of images of the sample for the task of counting flocs and filaments.
Mean number of flocs and filaments converge after 50 images. With 95% confidence level, 100 images
were taken.
2 Jenné et al., 2003  This paper extends the above paper by doing characterization of flocs and filaments along with
quantification (not just number as in paper no xii).
 Global features extracted: number of floc and filament and their total area.
 Local features: size measures and shape descriptors
 Size measures(local): area, length, breadth, and perimeter
 Shape descriptors(local): roundedness, form factor, reduced radius of gyration.
 Comparison of evolution of SVI and that of local and global features have been made.
 Monitoring of total filament per image and mean form factor of flocs can be used to predict
filamentous bulking.
3 Heine et al., 2001  Correlation between sludge volume index and filament fraction
 Comparison of evolution of two aeration tank with one mechanically treated: obviating the need of
early detection and countermeasure in case of bulking
 Evolution of fraction of flocs with and without toxic substances
 This paper partially reasons to directly relate the abnormal condition of bulking and toxics to the image
analysis parameters like fraction of flocs and fraction of subflocs, without bringing in the physico-
chemical parameters.
 Floc Characterization is done by floc size, floc size distribution, structure of flocs and shape of flocs
 Important survey line: “flocs have strong influence on SVI, flocculation, dewatering ability; and, they are
influenced by sludge load, sludge age, the nature of substrate, for example toxic substances or the C:N:P
ratio.”
 An important line: “characteristics of flocs respond very fast to the changes in operation conditions or
operation failures”. 15
Image Analysis(contd.)
No Authors Tasks done
Yu et al., 2009  Online Digital system analysis system was built.
4
 Particle size distribution is monitored using laser particle size analyzer and using digital image
analysis by considering eq. diameter.
 Pre dominant particle size is 10-40um.
 Particle size distribution from particle analyzer and DIA are different in peaks but almost the same
in shape.
 Found a linear relationship between fractal dimension and SS precipitation efficiency.
 By combining DIA result and ANN, SS concentration and precipitation efficiency are predicted
precisely: 16 sums of 16 different particle sizes were used as input to NN.
 Observed that correlation between particle area/volume and SS is nonlinear as the density is not
constant.
5 Jina et al., 2004  The characterization of flocs is carried out using morphological, physical, chemical and extracellular
polymeric substances (EPS).
 Morphological parameters: floc size, filament index, fractal dimension
 Different sludges had different floc sizes and morphology.
 Flocs with high number of filaments were also large and have relatively lower values of fractal
dimensions (Df) and high capacity of water binding.
6 Mesquita et al., 2011,  Three abnormal and two normal conditions were established in the experimental setup: filamentous
Mesquita et al., 2013 bulking, zoogleal bulking, pinpoint flocs and normal condition.
 First, distinct patterns of SVI and MLSS are identified for the abnormal and normal conditions
respectively.
 Correlation between ln(TL/TA) and TL/MLSS was found for 4 conditions.
 TA/Vol and TL/Vol were sketched separately for the four conditions.
 Damaged and viable bacteria are identified and differentiated on the basis of gram- and gram+
bacteria using fluorescence microscopy.

16
Image Analysis(Contd.)

No Authors Tasks done


7 Amaral & Ferreira,  There had always been filamentous bulking throughout the experiments; the relation might not
2005 valid for other modes of the plant.
 Morphological parameters considered: Total aggregate number (not cut off by image boundaries),
aggregates’ mean area, total aggregates area, extent (area ratio of object and bounding box),
eccentricity, convexity (Perimeter ratio of object and convex), roundedness, compactness, solidity,
mean filamentous bacteria length to aggregate mean area ratio, total filamentous bacteria length to
aggregate total area ratio, total filament length to total suspended solid ratio.
 All above parameters are summed up to few parameters: TL/TA, L/A, TA, solidity, eccentricity and
Convexity
 Linear relation observed as:
SVI~TL/TSS, TSS~TA

17
Image Analysis

• Limitations:

 Image segmentation was done without explaining and


assessing the segmentation.

 Image analysis parameters were analyzed without


subjective authentication and validation of abnormal
conditions and disturbances across diverse plants and
conditions.

 Sample size has not been mentioned for normalization.

 Image analysis parameters have been used with


normalization by physico-chemical parameters,
extending the time of assessment of the plant. 18
Problem Statement
Q1. How physico-chemical and Image analysis(IA)
parameters of flocs and filaments characterize state
of activated sludge of wastewater treatment plant.

Q2. How and which physico-chemical parameters


and IA parameters are affected by variations of
state of activated sludge WWTP.

Q3. How abnormal conditions can be identified,


distinguished and predicted based on statistical
analysis of IA data.
19
Hypothesis
H1. The states of activated sludge WWTP can be
identified by physico-chemical and IA parameters.

H2. The state variations of activated sludge WWTP


are reflected in the variations of physico-chemical
and IA parameters.

H3. IA parameters will be enough to identify and


predict state of activated sludge WWTP
distinctively.

20
Research Objectives

• Investigation of parameters related to the abnormal


conditions in activated sludge.

• Investigation of appropriate image segmentation and image


analysis techniques.

• Development of an algorithm for monitoring abnormal


conditions in WWTPs.

21
Research Methodology
• Water treatment plants and activated sludge process
monitoring parameters

• Identification of abnormal conditions in activated


Sludge process

• Image acquisition, segmentation and analysis

• Morphological analysis of flocs and filaments

• Detection and monitoring of the state of the plant

22
Design of Experiment Flow Chart Image segmentation and analysis

Image Acquisition
• Sample collection/preparation
• Trinocular microscope with CCD camera
• Bright field + Phase contrast microscopy
• Image acquisition software
Image Preprocessing
•Background subtraction
•Z-stacking
•Virtual slide

Image Segmentation Validation using


•Comprehensive algorithm Ground truth and
•Accuracy assessment particle analyzer

Morphological Parameter
Extraction

23
Design of Experiment Flow Chart Selection of physico-
chemical parameters
of activated sludge
WWTP

No
Useful for abnormal Image Analysis Parameters
condition
detection?
1.Characterization of abnormal
condition with image analysis
Yes parameters directly (OR)
2.Characterization using correlation
with physico-chemical parameters
(OR)
3.Combination of both image
analysis and physico-chemical
parameters

No
Useful for abnormal
condition detection?
Identification and prediction of
abnormal condition using selected
combination of parameters Yes
distinctively
24
Preliminary Work
Segmentation

Quantification result using particle analyzer


Normal

Pin Floc
25
Preliminary Work
Some other segmentation algorithms

 Otsu Thresholding
• A threshold value dividing the intensity values into clusters/classes (2 for
binary thresholding) that produce the maximum “between-class variance” is
searched for among all the available intensity values.
 K-means Segmentation
• In k-means clustering, the objective is to partition the data (intensity values)
into k clusters that minimizes the within-cluster sum of squares of Euclidean
point-to-centroid distance for all the clusters.
• After convergence, the binary threshold value is to be taken from the border
intensity value of the cluster(s).
 Fuzzy C-means Segmentation

• The fuzzy c-means clustering assumes that every pixel belong to each
cluster to some extent specified by membership function.
• The clustering is done iteratively to minimize sum of square of point-to-
centroid distance scaled by membership function, summed over all clusters
26
Preliminary Work
Segmentation Assessment

• Initial version of our database which comprised of total 60 images: 26 at 4x,


15 at 10x, 14 at 20x and 5 at 40x magnification.

• The current set of images is selected for database from larger collection of
images to include
 diversity in the properties of floc
 irregular illumination conditions.

Global Consistency Error

• In order to assess the segmentations, Global Consistency Error (GCE) has


been used because of its robustness for boundary errors.
• If all segmentation are refinement of each other, GCE should have some
minimum value.
• If segmentation does not appear to be refinement of the other, GCE should
have higher value obviating that that the segmentations are inconsistent.

27
Preliminary Work
Ground Truth and performance comparison of segmentation techniques
Mag Original Image Ground Truth Fuzzy c-means K-means Otsu Thresholding
segmentation segmentation
4x GCE=0.0544 GCE=0.0542 GCE=0.0394

GCE=0.0712 GCE=0.0592 GCE=0.0825

10x GCE=0.0455 GCE=0.0455 GCE=0.0356

GCE=0.0771 GCE=0.0772 GCE=0.0764

28
black=true positive, green=false positive, magenta=false negative
Preliminary Work
Ground Truth and performance comparison of segmentation techniques
Mag. Original Image Ground Truth Fuzzy c-means K-means Otsu Thresholding
segmentation segmentation
20x GCE=0.1615 GCE=0.1524 GCE=0.1256

GCE=0.1763 GCE=0.1715 GCE=0.1727

40x GCE=0.3176 GCE=0.3173 GCE=0.1382

GCE=0.1248 GCE=0.1228 GCE=0.0847

29
black=true positive, green=false positive, magenta=false negative
Preliminary Work
Ground Truth and performance comparison of segmentation techniques

Mean GCE

Min. GCE

Max. GCE

30
Work Schedule

31
Work Schedule
Task Name Duration Start Finish Milestones Status
Review of WWTPs
• Overview of WWTPs
• Study of parameters of
4 months 30 Sep '13 31 Jan '14 Review Paper Complete
activated sludge WWTP
• Review of Image
processing and analysis
Selection of parameters for
identification of abnormal 1 month 1 Feb '14 28 Feb '14 purchase list Complete
conditions
Protocol
Protocol Design 1.5 months 01 Mar '14 15 Apr '14 1st draft complete
documents
Experiments 9 months 01 Feb '14 31 Oct '14 Raw Data TBD
Algorithms development
• Image acquisition and
Proposed
preprocessing 6.5 months 16 Apr '14 31 Oct '14 TBD
Methods
• Image processing
• Image analysis
Statistical analysis &
abnormal condition 3 months 01 Nov '14 31 Jan '15 Results TBD
identification
Further
Alterations of algorithms 3 months 01 Feb '15 30 Apr '15 improvement in TBD
Results
Paper writing 3 months 01 May '15 30 Jul '15 Publications TBD
Thesis 2 months 01 Aug '15 30 Sep '15 Thesis Draft TBD 32
Publications
• Khan, M.B., Nisar, H., Ng, C.A. & Krishnan, K.C., 2014.
Segmentation and Detection of Activated Sludge Flocs in
microscopic images. International Symposium on Green &
Sustainable Technology (ISGST2014), Kampar,
Malaysia.(accepted)

• Khan, M.B., Lee, X.Y., Nisar, H., Ng, C.A., Yeap, K.H. &
Malik, A.S., 2014. Digital Image Processing and Analysis
for Activated Sludge Wastewater Treatment. Signal and
Image Analysis for Biomedical and Life Sciences.(accepted)
33
References
• Amaral, A.L., 2003. Image analysis in biotechnological processes: application to wastewater treatment. PhD
Thesis, Universidade do Minho, Braga, Portugal.
• Amaral, A.L. & Ferreira, E.C., 2005. Activated sludge monitoring of a wastewater treatment plant using image
analysis and partial least squares regression. Analytica Chimica Acta, pp.246-53.
• Amaral, A.L., Mesquita, D.P. & Ferreira, E.C., 2013. Automatic identification of activated sludge disturbances and
assessment of operational parameters. Chemosphere, pp.705-10.
• Bitton, G., 2005. Wastewater Microbiology. John Wiley & Sons, Inc., Hoboken, New Jersey.
• Bizukojc, E.L., 2005. Application of image analysis techniques in activated sludge wastewater treatment processes.
Biotechnology Letters, pp.1427-33.
• Chu, C.P., Lee, D.J. & Tay, J.H., 2004. Bilevel thresholding of floc images. Journal of Colloid and Interface
Science, pp.483-49.
• Fowler, P.A. et al., 1990. Cycling changes in composition and volume of breast during the menstrual cycle,
measured by magnetic resonance imaging. British Journal of Obstetrics and Gynecology, pp.562-602.
• Heine, W. et al., 2001. Early warning system for operation failures in biological stages of WWTPs by online image
analysis. In IWA Conference. Berlin, 2001.
• Horgan, G.W., Creasey, A.M. & Fenton, B., 1992. Superimposing two-dimensional gels to study genetic variation in
malaria parasites. Electrophoresis, pp.871-75.
• Jenkins, D., Richard, M.G. & Daigger, G.T., 2004. Manual on the Causes and Control of Activated. Pretoria, South
Africa: Water Research Commission.
34
References
• Jenné, R., Banadda, E.N., Philips, N. & Impe, V.J.F., 2003. Image analysis as a monitoring tool for activated sludge
properties in lab-scale installations. J Environ Sci Health A Tox Hazard Subst Environ Eng., pp.2009-2018.
• Jenné, R., Cenens, C., Geeraerd, A.H. & Impe, J.F., 2002. Towards on-line quantification of flocs and filaments by
image analysis. Biotechnology Letters, pp.931-935.
• Jina, B., Wiléna, B.-M. & Lant, , 2004. Impacts of Marphological, physical and chemical properties of sludge flocs
on dewattera-bility of activated sludge. Chemical Engineering Journal, pp.115-26.
• Kumaran, P., Shivaraman, N., 1988. Biological Treatment of Toxic Industrial Waster. Biotreatment Systems, CRC
Press, Boca Raton, 227-283.
• Maltin, C.A. et al., 1989. The Action of the β-agonist clenbuterol on protein metabolism in invertated and
denervetated phasic muscles. Biotechnology, pp.965-71.
• Martin, N.J. & Fallowfield, H.J., 1989. Computer Modeling of Algal Waste Treatment Systems. Water Science and
Technology, pp.277-87.
• Ma, B. et al., 2007. Use of autostitch for automatic stitching of microscope images. Micron., pp.492-99.
• Mesquita, D.P., Amaral, A.L. & Fareira, E.C., 2011. Identifying different types of bulking in an activated sludge
system through quantitative image analysis. Chemoshpere, pp.643-52.
• Mesquita, D.P., Amaral, A.L. & Ferreira, E.C., 2013. Activated sludge characterization through microscopy: A
review on quantitative image analysis and chemometric techniques. Analytica Chimica Acta, pp.14-28.
• Mesquita, D.P. et al., 2010. Dilution and Magnification Effects on Image Analysis Applications in Activated Sludge
Characterization. Microscopy and Microanalysis, pp.561-68.
• Perez, Y.G., Leite, S.G.F. & Coelho, M.A.Z., 2006. Activated sludge morphology characterisation through an image
analysis procedure. Brazilian Journal of Chemical Engineering, pp.319 - 330.

35
References
• Sikora, M. & Smolka, B., 2001. Feature analysis of activated sludge based on microscopic images. In Canadian
conference on Electrical and Computer Engineering., 2001.
• Simm, G., 1992. Selection for lean meat production in sheep. Recent Advances in Sheep and Goat Research, A.W.
Speedy (Eds.), pp.193-215.
• Yu , R.F., Chen, H.W., Cheng, W.P. & Ling, M., 2009. Simultaneously monitoring the particle size distribution,
morphology and suspended solids concentration in wastewater applying digital image analysis (DIA). Environ
Monit Assess, pp.19-26.

36
Questions?

37

Anda mungkin juga menyukai