(Referensi Quantization) Image Segmentation Using K-Means Color Quantization and Density-Based Spatial Clustering of Applications With Noise (DBSCAN) For Hotspot Detection in Photovoltaic Modules
(Referensi Quantization) Image Segmentation Using K-Means Color Quantization and Density-Based Spatial Clustering of Applications With Noise (DBSCAN) For Hotspot Detection in Photovoltaic Modules
Abstract – The increasing demand for the use of solar energy as seen as a great potential in ensuring the quality of the PV
an alternative source of energy to generate electricity has multiplied modules produced.
the need for more photovoltaic (PV) arrays. With the growth of the
PV manufacturing industry, automation for defect detection is seen
as a great potential in ensuring the quality of these PV modules.
Hotspot formation due to defects is detrimental to the performance
of PV devices. Thus this research aims to detect and isolate hotspot
areas in PV modules by applying two machine learning techniques,
namely K-means color quantization for pre-processing, and density-
based spatial clustering of applications with noise (DBSCAN) for
processing, in the images captured by an infrared camera. In the pre-
processing, K-means clustering algorithm produced a quantized
color image represented by the contours while in the processing or
clustering part, DBSCAN resulted in the segmentation of the image,
isolating the hotspot. Further investigation of the PV module Figure 1: Energy Potential of Renewable Energy Resources. [1]
through visual inspection found a crack in one of the solar cell where The green line represents the world energy demand last 2010 while the
the hotspot occurred. gray line represents the foreshadowed world energy demand for 2050.
I. INTRODUCTION
In the recent years, the demand for solar energy as an
alternative energy source has been increasing rapidly. The sun
being the most plentiful energy source, is one of the main reason
why solar energy is a common renewable energy source [1].
Figure 1 shows a comparison of the energy potentials of the
different renewable energy sources, i.e. solar, wind, geothermal,
biomass, hydropower and tidal power. The graph shows that by
2050, solar energy will continue to supply the energy demand of
the world.
In the Philippine setting, the Department of Energy (DoE)
has been awarding projects and grants to foster the development, Figure 2: PV Market Attractiveness Relative to Market Growth
utilization and commercialization of renewable energy [2]. In Expectations. The 10 most attractive emerging PV markets, all which
addition, the IHS Technology Solar Team views Philippines as vary greatly in terms of near-term growth expectations [3].
one of the most attractive emerging PV markets by 2018. Figure
2 plots the top 10 countries to which IHS deemed as an attractive Defects limit the performance if the solar cell. When present,
PV market. the effective surface area of the whole panel is reduced as the
current it can produce is directly proportional to it resulting to
With greater demand and continuing growth of the PV the drop of the maximum current that can be harnessed for the
manufacturing industry, automation for defect identification is intended load. [4] Solar cell defect can be either process induced
978-1-5090-2597-8/16/$31.00 2016
c IEEE 1614
or material induced. Figure 3 presents some types of solar cell
defects.
2016 IEEE Region 10 Conference (TENCON) — Proceedings of the International Conference 1615
A. Capturing of IR Images the number of clusters is set to k = 2, the output image have only
An infrared camera was used to capture images of the PV 2 colors.
modules. The camera used was FLIR C2, a portable infrared
camera with an infrared sensor resolution of 80 x 60. It is
manufactures by FLIR Systems [4].
The images obtained are directly saved to the camera’s
internal memory which can be later transferred to the computer.
The PV module setups are located at the roof of Faura Hall,
Ateneo de Manila University. The setups consist of both mono-
and poly-crystalline solar PV modules.
B. Pre-processing Using K-Means
The captured images are then used as the input data to
undergo K-Means color quantization algorithm to quantize the
image into discreet number of colors. The K-Means algorithm
tries to separate samples in n-color groups of equal variance. A
flow chart for the algorithm is presented in Figure 6.
1616 2016 IEEE Region 10 Conference (TENCON) — Proceedings of the International Conference
then, there are no points that are density reachable, and the
algorithm proceeds to other points of the image. The process is
continued until all the points are processed.
Figure 9 presents a sample image that was segmented using
DBSCAN. In the figure, the individual clusters are regrouped
together forming close to the original image. It can be observed
that the pixels of similar color are clustered together.
Figure 11: Quantized Image (15 colors). The quantized image resulted
into a contour-like appearance simplifying the image.
B. DBSCAN
The quantized image will be the data input for processing.
Before actually applying DBSCAN, the image was converted to
Hue-Saturation-Value (HSV) color model with the saturation
Figure 9: DBSCAN Example Result. [11] coordinate to be extracted as shown in Figure 12.
(a) (b)
Figure 10: (a) Image of PV Module and (b) its Infrared Image In this manner, the image can be converted into a “training
Counterpart. set” by transforming the image into a single line array consisting
of the location in x, y coordinates and the pixel value at that
Presented in Figure 10a is the actual image of a particular location. This new format allows the plotting of the
polycrystalline solar module while Figure 10b shows its IR data as a scatterplot presented in Figure 13.
image counterpart, both captured by the FLIR infrared camera.
The file was saved as JPEG format which was then loaded to the
program.
A. K-Means Color Quantization
The pre-processing includes the K-Means algorithm. In this
algorithm, the number of clusters was set to k = 15. Other values
were also tested but choosing 15 clusters presented the desired
output with the minimal computational time.
The process begins by loading the captured IR image. The
loaded image was then converted to float instead of the default
8-bits integer coding. Simply put, data normalization was done. Figure 13: Scatter Plot Image. The image is represented by plots mapped
in a graph wherein both x-axis and y-axis represent the pixel coordinates
In image processing, data normalization is applied to image of the image.
converting the 0 - 255 pixel values into 0 – 1.0 [12]. The image
is normalized allowing faster convergence for the unsupervised The arrays formed were then combined into a single array
algorithm. Once converted the reloaded image was transformed and DBSCAN was performed. By executing DBSCAN, the
into a 2D array. After which, the K-means function was number of clusters can also be known. For this image, there were
executed. Figure 10 shows the resulting image after applying K- 136 clusters.
Means.
To prevent any additional clusters, which may result to
The quantized image results to an image having contours, miscalculations, the program was set to analyze only the PV
making the color edges sharper. This made it easier for module in the image. Since the colors in the clusters are
DBSCAN to segment the image showing the isolated hotspot quantized, the program can easily identify the color value in the
area. cluster. The color value of a pixel ranges from 0-255 and this
2016 IEEE Region 10 Conference (TENCON) — Proceedings of the International Conference 1617
can refer to the ‘brightness’ of the pixel for that particular To complete the defect automation, a user-interface will be
channel. In this case, if there is a cluster value greater than 200, developed for ease-of-use. The user-interface will be the
the program will consider that as a possible hotspot area. Figure integration of defect detection algorithms programmed not only
14 presents the image for one of the clusters in which hotspot is for IR images but for other imaging techniques as well.
evident.
V. CONCLUSION AND RECOMMENDATION
To identify defects that causes hotspots in solar PV modules,
the infrared image of the module under outdoor conditions was
captured and processed using K-Means color quantization and
DBSCAN. The K-Means clustering produced the quantized
image represented by the contours while DBSCAN resulted to
the segmented image isolating the hotspot area as one of its
clusters. Ultimately, the area of the hotspot can be determined
and, with more data sets, may be correlated to the drop in the
efficiency of the solar PV module.
Figure 14: DBSCAN Result. The hotspot area (in red) has been isolated ACKNOWLEDGMENT
from the rest of the image The proponents would like to express their gratitude to the
Department of Science and Technology – Engineering Research
The end result shows the hotspot area being isolated from the
and Development for Technology for supporting the study.
rest of the images. The PV module was inspected and a crack on
one of the solar cells in that area was found. This crack is the REFERENCES
defect that caused the localized heating in the PV module [4] and
[1] Mori, S. (n.d.). Solar Energy Development - Philippines. Retrieved May
therefore needs attention. 2016, from
http://www.doe.gov.ph/doe_files/pdf/05_Energy_Efficiency/AJEEP/06a
The program was also used to test a mono-crystalline PV _Solar_Energy.pdf
modules. Figure 15 shows the step by step outcome of the image
[2] Pernia, E. M., Generoso, M. M. (n.d.). (DP 2015-08) Solar Power's Rise
processing to determine the localized heating. and Promise | Pernia | UPSE Discussion Papers. Retrieved May, 2016,
from
http://www.econ.upd.edu.ph/dp/index.php/dp/article/view/1478/961
[3] IHS Technology Solar Team. (n.d.). Top Solar Power Industry Trends
for 2015. Retrieved May, 2016 from
https://www.ihs.com/pdf//Top-Solar-Power-Industry-Trends-for-
2015_213963110915583632.pdf
[4] Salazar, A. M., Macabebe, E. Q. B. (2016). Hotspots detection in
photovoltaic modules using infrared thermography, 3rd International
Conference on Manufacturing and Industrial Technologies, ICMIT
2016; proceedings. MATEC Web of Conferences, in press.
[5] Abdelhamid, M., Singh, R., & Omar, M. (2014, January). Review of
Microcrack Detection Techniques for Silicon Solar Cells. IEEE Journal
of Photovoltaics, 4(1), 514-524. doi:10.1109/JPHOTOV.2013.2285622
(a) (b)
[6] Tsanakas, J.A., Botsaris, P.C. 2011. An Infrared Thermographic
Approach as a Hotspot Detection Tool for Photovoltaic Modules Using
Image Histogram and Line Profile Analysis.
doi:10.1784/204764212800028842
[7] What is Infrared Thermography? (n.d.). Retrieved May, 2016, from
http://www.infrared.avio.co.jp/en/products/ir-thermo/what-thermo.html
[8] Yee, S., Chu, T. (n.d.). A Visual Introduction to Machine Learning.
Retrieved May, 2016, from http://www.r2d3.us/visual-intro-to-machine-
learning-part-1/
[9] Pei, J. (2013). Advances in knowledge discovery and data mining: 17th
Pacific Asia Conference, PAKDD 2013, Gold Coast, Australia, April 14
- 17, 2013 ; proceedings. Berlin: Springer. doi:10.1007/978-3-642-
37456-2_14
[10] Basic GPS. (n.d.). Retrieved June, 2016, from
http://nptel.ac.in/courses/105104100/lectureD_28/D_28_4.htm
(c) (d) [11] Bandyopadhyay, S., Paul, T. (n.d.). Segmentation of Brain Tumour
from MRI image – Analysis of K-means and DBSCAN Clustering.
Figure 15: (a) Image of PV Module 2 Retrieved June, 2016, from
(b) Quantized Image of PV Module 2 http://www.academia.edu/10120302/Segmentation_of_Brain_Tumour_f
(c) Scatter Plot Image of Extracted Saturation Coordinate of PV Module 2 rom_MRI_image_Analysis_of_K-means_and_DBSCAN_Clustering
(d) Isolated Hotspot from one of the Segmented Images of PV Module 2 [12] Gonzalez, R. C., & Woods, R. E. (2007). Digital image processing (3rd
ed.). Upper Saddle River, NJ: Prentice Hall.
1618 2016 IEEE Region 10 Conference (TENCON) — Proceedings of the International Conference