Microsoft Word - cet-01.docx CHEMICAL ENGINEERING TRANSACTIONS VOL. 46, 2015 A publication of The Italian Association of Chemical Engineering Online at www.aidic.it/cet Guest Editors: Peiyu Ren, Yancang Li, Huiping Song Copyright © 2015, AIDIC Servizi S.r.l., ISBN 978-88-95608-37-2; ISSN 2283-9216 Study on Color Classification Method of Solar Cells Based on Fuzzy Clustering Algorithm Tengfei Zang, Xuesong Suo*, Meng Zhang, Shanshan Li College of Mechanical & Electrical Engineering, Agricultural University of Hebei, Baoding, Hebei province, 071001, China 13903120861@163.com Currently the color classification of the blue solar cell relies on the human eyes, which efficiency is low. This paper proposes the study on color classification method of solar cells based on fuzzy clustering algorithm and designs a set of device which can collect and classify solar cell image data information. At first, the main color of solar cell image data information should be classified and extracted from RGB color space. Then convert it to gray image and improve the gray image contrast by image enhancement. At last, the average gray level of the solar cell blue component gray-scale images should be found. Besides, we should classify solar cell according to the fuzzy pattern recognition of fuzzy clustering and maximum membership. 1. Introduction Different thickness of reflection film lead to different color of solar cells. Due to the person's psychology, vision, light, working environment and a variety of factors such as fatigue if color classification only by eyes, the accuracy and efficiency of classification would be low (Ren and Liao (2009) reported). With the progress of computer image visual technology, there is a further development in computer vision classification technology. The development of computer vision increased the possibility of creating an automatic system like artificial work. The result is more accurate, improves the production efficiency guarantees to get more correct evaluation of the quality of product (Gill et al. (2011) reported, Kurtulmus and Unal (2015) reported, Chen et al. (2010) reported). People do a lot of effort and trying in the researching of color classification (Ai et al. (200 4) reported, Faria et al. (2008) reported, Pitié et al. (2007) reported, Piotr M. Szczypiński et al. (2015) reported, Cristóbal Garrido-Novell et al. (2012) reported). This paper designs a device that can collect and classify solar cell image data information. The CCD camera is mounted on inside and four down irradiate parallel light source are mounted in vasculum. The CCD camera acquire image by exposure of parallel light. The software system is designed, which can process the image data and classify the color of solar cell. Through consult a large number of references (Zou Xiaobo et al. (2007) reported, Hang Zhang and Daoliang Li (2014) reported, Xuanyin Wang et al. (2010) reported, Xu Liming and Zhao Yanchao (2010) reported). This paper adopt for extracting the average of solar battery slice single and dominant color gray image at the first time, then using fuzzy clustering algorithm to grade the color. Color classification method of solar cells based on fuzzy clustering algorithm is produced in this background. Due to the high efficiency application of machine vision is used in production line (Zhong et al. (2004) reported). Solutions of image processing technology and comprehensive application of classification based on fuzzy clustering algorithm provide a reliable guarantee for the color classification of the solar cell production line (Goncalves et al. (2015) reported). The most important purpose of this paper is to study the color classification of solar cell. 2. System introduction 2.1 Color classification of solar cells Color is kind of visible spectrums which can be reflecting by psychological feeling. The response signal interact the retina of the eye and transmit by optic nerve, which makes us identify the color signal. If the inherent nature of an object is no color, the light source changes, the color of the object changes either (Wu and Sun (2013) reported). DOI: 10.3303/CET1546032 Please cite this article as: Zang T.F., Suo X.S., Zhang M., Li S.S., 2015, Study on color classification method of solar cells based on fuzzy clustering algorithm, Chemical Engineering Transactions, 46, 187-192 DOI:10.3303/CET1546032 187 Solar cells are plated on a layer of minus reflection film on the original pure silicon. Due to its role, the light is reflected and reflected mainly blue light under the natural light and ordinary parallel light exposure. The color of the solar cell is blue or light blue or dark blue most of the human eye to see. The colors’ changing is mainly due to the thickness of the reflective film. But it is impossible to make reflection film thickness consistent in the process. Different minus reflection film thickness caused the difference of the solar cell’s color that affects the whole beauty. So we need to put solar cells of same color level to a category. 2.2 The construction of the system hardware The hardware of the whole system set up mainly by image processing and recognition system, vasculum, conveyor belt, intelligent robotic arm and touch control panel. There is a vertical downwards CCD camera and four vertical downward parallel light sources installed in the vasculum. The conveyor belt transports solar cell, which is controlled by PLC. Computer monitor used for real-time image acquisition and real-time image data storage is placed on the conveyor belt lateral independent location. The most important task of computer monitors is image processing and recognition, then the processed results are sent to the hierarchical intelligent robotic arm. Solar cells are classified storage by directing intell igence arm. Design drawings are shown in figure 1: Figure 1: The overall system diagram 2.3 Image processing method and classification algorithm This method firstly extracts blue components from the RGB color space of solar cells by MATLAB, then change them into gray image. Improve the gray image contrast through image enhancement and get the average of the solar cell of gray-scale images at last. The color of the solar cell should be classified fast and exactly according to comparing with preset values by fuzzy algorithm. Classification a solar cell in mathematical classification algorithm and the application of fuzzy clustering method. As a result of the average gray of solar cell is a discrete distribution, we classified processing in maximum membershi p principle. 3. The experimental methods 3.1 Image processing 3.1.1 Extracting the dominant color In this paper, the solar cell sample images are get under the conditions which keeping photographic conditions consistent strictly. As is shown in figure 2. Dealing with the deepest pictures in matlab, pointing out the three primary colors from the image of solar cell and saving the dominant blue color image. So as to analysis dominant colors of blue for the color solar cells conveniently. Figure 2: Original image of cells 3.1.2 Change into gray image In this paper, the blue has a main effect on solar cell color depth. Therefore this paper only analysis blue gray value of blue to correspond color difference of the solar cell. Change single blue image into a gray image, then enhance image and get the average gray level. 3.1.3 Image enhancement In this paper, using the gray histogram transformation that is based on airspace. According to the research, we can change the shape of the histogram to enhance image contrast effects. The method is based on the probability theory. 188 In this paper, the average gray image of the dominant color and the color difference of solar cell is corresponding .We extract the dominant color converted to gray image for the sampling image in turn. When the image contrast is not enhanced, it takes the average gray level. By experiment, five groups of average gray level images are got. The average size and the color difference of solar cell is corresponding, but the average is very similar. It may affect the color of the classification next. The following is improving the gray image contrast by changing the histogram. Obviously the solar cell image enhancement is easier to recognize and has a better contrast, which is better to color classification. Differences of similar color get bigger are better to color classification either. Comparison of image enhancement as is shown in figure 3. Figure 3: Image enhanced comparison 3.2 Fuzzy clustering Extracting certain cell samples randomly and acquiring image under the light intensity of uniform gradient, then determining the good class by fuzzy clustering method. 1. Establish a data matrix Assuming that },,,{ n xxxU 21 (1) ),,,( imiii xxxx 21 ),,2,1( ni  (2) ik x : The average gray level of blue component in the k light conditions. (In this article k=1) We get the average gray level matrix of solar cells is:                nmnn m m xxx xxx xxx B     21 22221 11211 (3) 2. Data standardization Using translation range transformation for the matrix average gray level: )21( }{}{ }{ ' 1 ' 1 ' 1 ' '' minmax min mk xx xx x ik ni ik ni ik ni ik ik ,,,      (4) )2121( ' mkni s xx x k kik ik ,,,;,,,     (5)    n i ikk x n x 1 1 ,    n i kikk xx n s 1 2 )( 1 (6) k x : Sample mean k S : Sample variance The matrix of data standardization is:                '''' 2 '' 1 '' 2 '' 22 '' 21 '' 1 '' 12 '' 11 nmnn m m xxx xxx xxx C     (7) 3. Establish a fuzzy similar matrix ij r : The similar degree of ix and jx 189 When different light intensity is required, we use the included angle cosine method to get 1ij r When the light intensity is constant, we use the maximum minimum method to get ij r Finally we obtain the fuzzy similar matrix is:        m k jk m k ik m k jkik ij xx xx r 1 2'' 1 2'' 1 '''' 1 (8)        m k jkik m k jkik ij xx xx r 1 '''' 1 '''' )( )( (9)              nnnn n n rrr rrr rrr R     21 22221 11211 (10) 4. Determine the optimal threshold  and classify Using direct clustering method to classify. Dynamic clustering is formed by  decreasing. According to actual needs, in the dynamic clustering figure, we need adjust the value of  to obtain the appropriate classification. 3.3 Fuzzy classification Determine the classification standards through fuzzy clustering, and then we need to classify the data of the solar cells in the real-time monitoring through the fuzzy model. 1. Determine the membership function. Through data analysis we found that each piece of solar cell is a discrete distribution. So we need analysis each category and classification to get each membership function.               0 5.0 1 5.0 0 )( 1 ~ n i i x n x xA 2 21 1 xx xxx xx    (11) N: The number of samples in the fuzzy sets 2. Using the principle of maximum membership classify Through the calculation we could obtain several fuzzy subsets of solar cell color classification n AAA ~~~ ,,,  21 . For any average gray level of real-time monitoring of solar cells q x . W e make     q k n k q iq xx AA ~1~    ,  ni q ,,,21 (12) That the solar cells belonging to the qi class. 4. The Experimental Results and Data Analysis Test image is taken all in the same light conditions. Data processing is carried out on the five images in turn, then programmed in matlab. Data are shown in table 1. Table 1: The comparison of average gray level that five groups before and after the gray -scale image enhancement Classes deepest relative deep deep relative shallow most shallow Gray 7.7122 10.1182 10.2052 12.3906 13.7801 Strengt-hen 47.2807 65.1477 75.2056 76.1844 86.4635 190 1. Establish a data matrix The light intensity of test environment is constant. Extract ten samples and compose a data matrix of 10 * 1 order by the ten samples. B= [65.1477 76.1844 86.4635 75.2056 47.2807 49.0134 55.8932 67.1124 70.7894 80.4783] T 2. Data standardization Using translation range transformation for the matrix average gray level to make the data standardized 3587.67 1 x 5077.12 1 s C= [0.4560 0.7377 1 0.7127 0 0.0442 0.2198 0.5061 0.6000 0.8473 ] T 3. Establish a fuzzy similar matrix Because of getting rid of the influence of light intensity, the matrix change into 10*1, so we use the maximum minimum method to get similar matrix                                  17081.05973.02594.00522.008411.08473.08706.05382.0 7081.018435.03663.00737.008419.06000.08133.07600.0 5973.08435.014343.00873.007101.05061.06861.09010.0 2594.03663.04343.012011.003084.02198.02980.04820.0 0522.00737.00873.02011.0100620.00442.00599.00969.0 0000010000 8411.08419.07101.03084.00620.0017127.09661.06398.0 8473.06000.05061.02198.00442.007127.017377.04560.0 8706.08133.06861.02980.00599.009661.07377.016181.0 5382.07600.09010.04820.00969.006398.04560.06181.01 R (13) 4. Determine the optimal threshold  and classify Here we use the clustering method to obtain the threshold  directly, when 9010.0 classification is reasonable and meet the production requirements, according to the request of manufacturers. Classify as: },{ 8111 xx , },{ 4121 xx , }{ 31 x , }{ 51 x , }{ 61 x , }{ 71 x , }{ 91 x , }{ 101 x 5. Determine the membership function and classify Select a gray image of solar cell, The average is 47 m x . The first and the second category boundaries should be given. 1471.48)0134.492807.47( 2 1 a (14) The first kind of membership function is:          0 5.02807.47 5.0 )( 1~ x xA 1471.48 1471.48   x x (15) According to membership function we know when 47 m x : 6405.0)( 1~  m xA (16) 0)()()()()()()( 8~7~6~5~4~3~2~  mmmmmmm xxxxxxx AAAAAAA (17)     6405.0 ~ 8 11~   m kk m xx AA (18) Therefore the solar cells are assigned to the first category which is the darkest. The experimental results show that the method is effective. This method reflects the average gray value and color difference approximate linear relationship of space solar cells. We can see cla ssification effect reached the expected purpose according to fuzzy clustering and fuzzy model identification. The experimental data fully demonstrate the feasibility of the research, the algorithm of this paper have popularization and effectiveness. 5. Conclusions This paper proposes on study of color classification method of solar cells based on fuzzy clustering algorithm in RGB color space. The gray value are enhanced, the approximate image color is amplified. Classify the sample data by fuzzy clustering method and the method of maximum membership. The experimental results show that the method is effective. The algorithm also can be used to other product color classification test. 191 Acknowledgments Program of Study Abroad for Young Teachers by Agricultural University of Hebei; Young Academic Leaders of Hebei Agricultural University; Polytechnic Fund of Agricultural University of Hebei (ZD201402). References Ai J.Y., Liu D., Zhu X.F., 2004, Combination of Wavelet Analysis and Color Applied to Automati c Color Grading of Ceramic Tiles, Pattern Recognition, 2004. ICPR 2004. Proceedings of the 17th International Conference on, 3, 1051-4651, 10.1109/ICPR.2004.1334511. Chen K., Sun X., Qin C., Tang X., 2010, Color grading of beef fat by using computer vision and support vector machine, Computers and Electronics in Agriculture, 70(1), 27-32, 10.1016/j.compag.2009.08.006. Cristóbal G.N., Dolores P.M., Jose M.A., Juan F.N., Jose E.G., Ana G.V., 2012, Grading and color evolution of apples using RGB and hyperspectral imaging vision cameras, Journal of Food Engineering, 113(2), 281 - 288, 10.1016/j.jfoodeng.2012.05.038. Faria J., Martins T., Ferreira M., Santos C., 2008, A Computer Vision System for Color Grading Wood Boards Using Fuzzy Logic. Industrial Electronics, Industrial Electronics, 2008. ISIE 2008. IEEE International Symposium on, 1082 – 1087, 10.1109/ISIE.2008.4677036. Gill G.S., Kumar A., Agarwal R., 2011, Ravinder Agarwal. Monitoring and grading of tea by computer vision -A review, Journal of Food Engineering, 106(1), 13-19, 10.1016/j.jfoodeng.2011.04.013. Gonçalves N., Carvalho V., Belsley M., Vasconcelos R.M., Soares F.O., Machado J., 2015, Yarn features extraction using image processing and computer vision-A study with cotton and polyester yarns, Measurement, 68, 1-15, 10.1016/j.measurement.2015.02.010. Kurtulmus F., Unal H., 2015, Discriminating rapeseed varieties using computer vision and machine Learning, Expert Systems with Applications, 42(4), 1880-1891, 10.1016/j.eswa.2014.10.003. Pitié F., Kokaram A.C., Dahyot R., 2007, Automated colour grading using colour distribution transfer, Computer Vision and Image Understanding, 107(1-2), 123-137, 10.1016/j.cviu.2006.11.011. Ren Z.G., Liao J.R., Cai L.L., 2009, Diamond Color Grading Based on Machine Vision, Computer Vision Workshops (ICCV Workshops), 2009 IEEE 12th International Conference on, 1970-1976, 10.1109/ICCVW .2009.5457523. Szczypiński P.M., Klepaczko A., Zapotoczny P., 2015, Identifying barley varieties by computer vision, Computers and Electronics in Agriculture, 110, 1-8, 10.1016/j.compag.2014.09.016. Wang X.Y., Liang D.T., Deng W .Y., 2010, Surface grading of bamboo strips using multi-scale color texture features in eigenspace, Computers and Electronics in Agriculture, 73(1), 91-98, 10.1016/j.compag.2010.04.008. Wu D., Sun D.W., 2013, Color measurements by computer vision for food quality control-A review, Trends in Food Science & Technology, 29(1), 5-20, 10.1016/j.tifs.2012.08.004. Xu L.M., Zhao Y.C., 2010, Automated strawberry grading system based on image processing, Computers and Electronics in Agriculture, 71, S32-S39, 10.1016/j.compag.2009.09.013. Zhang H., Li D.L., 2014, Applications of computer vision techniques to cotton foreign matter inspection: A review, Computers and Electronics in Agriculture, 109, 59-70, 10.1016/j.compag.2014.09.004. Zhong K.H., Ding M.Y., Zhou C.P., Zhou Y.A., 2004, Color Grading Method Based on Perceptually Uniform Color Space, Journal of Imag e and Graphics, 9(11), 1277-1283, 10.3969/j.issn.1006-8961.2004.11.002. Zou X.B., Zhao J.W., Li Y.X., 2007, Apple color grading based on organization feature parameters, Pattern Recognition Letters, 28(15), 2046-2053, 10.1016/j.patrec.2007.06.001. 192