Управління технологічними процесами © Hu Yucai 159 Hu Yucai Master of Engineering. orcid.org/0000-0002-3029-9168 School of Mechanical and Electric Engineering, Yancheng Polytechnic College, Jiangsu Yancheng 224005, P.R. China RESEARCH AND DESIGN OF RAW SILK EVENNESS DETECTOR BASED ON CCD IMAGE SENSOR Abstract. In this paper, a dynamic measurement system of raw silk evenness based on machine vision is introduced. When the raw silk is moving at a certain speed by a drive device, the raw silk images are continuously captured by image acquisition system including a Charge Coupled Device (CCD) line sensor, a telecentric lens, a light source. To extract the main body of the raw silk accurately, the raw silk images are processed sequentially with threshold segmentation, morphological opening operation. And then the raw silk evenness is characterized by calculating the coefficient of variation (CV value) of diameter. Different image processing methods are discussed. When compared with the existing measurement and assessment of raw silk evenness, such as blackboard manual eye inspection and capacitance-detecting technology, the measurement method using machine vision has following characteristics. Firstly, because the image capture equipment is linear CCD with high resolution, the dynamical measurement of raw silk evenness can be realized with high speed. Secondly, the telecentric lens is adopted in the designed raw silk evenness measurement, which can eliminate the influence of the jitter of raw silk along the optical axis when image capturing. Finally, the high quality raw silk image can provide the information about raw silk after image threshold segmentation and morphology operation. Keywords: Raw silk evenness, machine vision, dynamic measurement, image processing Introduction Evenness is one of essential performance parameters for assessing raw silk quality, which reflects changes in the thickness of raw silk along the raw silk length. It is often evaluated by two different traditional approaches [1]. The first approach is called blackboard human eye inspection. In this approach, a certain length of raw silk is wound equidistantly around a blackboard under special illumination. And then, it is compared to the standard samples by observation of human eye. The second approach is based on capacitance-detecting technology. When a certain length of raw silk goes through the parallel capacitive sensors, the variance of medium (mass) is detected, and changes in the thickness of raw silk are obtained. There is a certain similarity between raw silk and yarn evenness measurement. So, the current researches about evenness measurement mainly focus on yarn. For example, Carvalho and Monteiro introduced mass parameterization system, an automatic system for determination of mass characteristics of textile yarn; it was based on 1 mm parallel capacitive sensors, which allowed direct measurement of yarn mass in the 1 mm range [2]. To reduce the subjectivity in blackboard human eye inspection method, Cheng, Zhao, Chen, and Zhou used the seriplane image of cotton yarn obtained by CCD area sensor to calculate the average diameter of yarn cotton and established a relevant method to analyze the seriplane image [3]. Liu, Zhou, and Chen proposed a new design scheme that aimed to realize real time, on line raw silk diameter measurement based on linear CCD and Field Programmable Gate Array (FPGA), linear CCD's dark background imaging was chosen to avoid bright background image easily saturation, by processing the signal collected with linear CCD, the diameter of raw silk was obtained [4]. Sparavigna, Broglia, and Lugli evaluated the yarn evenness with an optical measurement, the system was constituted of a CCD camera recording the yarn shadow, and a photoreceiver recording the light diffused from the yarn [5]. However, the methods based on blackboard inspection cannot be able to perform dynamic measurement, and the accuracy of the test result obtained by capacitance-detecting technology is easily affected by the laboratory environment. In addition, some researchers used CCD area sensors to capture the image of the raw silk, which cannot realize the high-speed, continuous and dynamic measurement as CCD line sensors. And some studies adopted the CCD line sensor to evaluate the yarn quality, but they processed the signal collected by sensor rather than processing image acquired by sensor [6]. Namely, they did not obtain the intuitive information about the appearance. The information obtained by image processing is considered to be more intuitive than the information obtained by signal processing. Dynamic development of machine vision techniques broadens the range of their applications [7], So, this paper proposed the dynamic measurement of raw Управління розвитком складних систем (36 – 2018) ISSN 2219-5300 160 silk evenness based on machine vision. The design combined a CCD line sensor and a telecentric lens is adopted in measurement system. The images of raw silk are captured continuously by the system, and then images are processed sequentially with threshold segmentation, morphological opening operation. The main body of the raw silk is extracted, the CV value of diameter is finally used to characterize the evenness. Principle of the measurement system The framework of the raw silk evenness measurement system is depicted in Figure 1. It is consisted of image acquisition system and computer processing system. The components of image acquisition system are CCD line sensor (6), telecentric lens (7), light source (3) and image capture card. The computer processing system includes computer image processing module and result output. As shown in Figure 1, a single raw silk (1) pulled by two rollers (4, 5) is moving down at a certain speed. The images of the moving raw silk are captured by image acquisition system. Back light illustration is adopted. So the light source (3) is placed on one side of the raw silk, the other devices of the image acquisition system are placed on the other side. Then the raw silk images are sent to computer image processing module to be analyzed. Finally, the CV value of diameter is calculated to characterize the evenness, and the result is exported. Figure 1 – Raw silk evenness measuring system schematic: 1 –raw silk; 2 – Guide bar; 3 – light source; 4, 5 – drive roller; 6 – telecentric lens; 7 – linear scan CCD sensor Image acquisition system A. Image sensor The CCD line sensor is composed of a linear of light-sensitive photodetectors, where the optical signal can be converted into the digital video signal. A CCD line sensor creates an image, which is only one pixel high. The object that is to be imaged has to move with respect to the CCD line sensor, so many lines can be assembled into a 2D image [8]. The CCD line sensor with simple structure not only has small size of the data needed to be process, but also can realize high-speed image output when comparing with the area scan sensor. Dasla industrial CCD line sensor (S2-1y-05H40) is selected. The main performance parameters are as follows: resolution is 512, maximum line frequency is 65kHz, pixel size is 14μm×14μm. The image captured card model matching the selected linear scan sensor is Xcelera-cl LX1. B. Light resource Compared to fluorescent lamps and Xenon lamps, Light-Emitting Diode (LED) has a series of advantages such as good brightness stability, low cost, long service life, and fast response. LEDs are currently the ideal light sources used in machine vision applications. This paper adopts the OPT Standard linear light source (OPT-LS82- W) emitting white light, The output power is 9.3W. C. Telecentric lens The jitter of raw silk is inevitably occurred as the raw silk is moving. The jitters affect the detection accuracy, especially the jitter along the optical axis, which means the change of object distance could be seriously, In order to overcome the effect of the jitter, the object-side telecentric lens is adopted. Figure 2 shows the principle of a telecentric optical path. Aperture is located on the image focal plane, and the light parallel to the optical axis. Assuming that the object B1B2 is located in position A1, the object is imaged clearly at the photosensitive units of image sensor locating on the image plane (the position ’ 1A ), and the object image height is M1M2. Then the object B1B2 moves from A1 to A2. Figure 2 – The principle of a telecentric optical path The image plane moves from ’ 1A to ’ 2A correspondingly, while the object is still imaged in position ’ 1A , and the circles of confusion are formed at the edge of the image. However, the centers of the circles of confusion are still in the position M1 and M2, the object image height remains to be M1M2. In other words, even if the image distance changes with the object distance, Управління технологічними процесами 161 the image height remains the same as before. Although the jitter of moving raw silk along the optical axis occurs, the measured diameter size of the raw silk is not changed with the telecentric optical path system. Utron telecentric lens (MGTL60C) with 6X magnification is used based on the field of vision in this system. D. Image acquisition By calculation, theoretical detection accuracy of the measuring system is 0.0023mm, which indicates that the change of raw silk diameter exceeded 0.0023mm can be detected. The raw silk (20/22 denier) diameter size occupies about 29 pixels in the image, which can meet requirements of evenness measurement. In Figure 3, Image processing method used in the system is introduced. Figure 3 is one of original raw silk images, the size of which is 512×480 in dimension, captured by acquisition system. The raw silk is moving at speed of 5 m/min, and the CCD linear frequency is set to 65000Hz. Image processing As shown in Figure 3, image quality is a little affected by noise, and there are some defects attached to the edge of the main body of raw silk. In order to separate raw silk and background, and extract the main body, this system takes the image processing method including threshold segmentation, morphological opening operation. Figure 3 – Original raw silk image Assuming that an input image consists of two regions (object and background) which have different gray levels, a threshold can be used to determine whether a pixel belongs to object or background [9]. Gaussian histogram algorithm is introduced to realize automatic segmentation based the difference between object and background gray level in this paper. With the procedure of Gaussian histogram algorithm, the steps used to automatic determine the thresholds are follows: First, the relative histogram of the gray values is determined. Then, relevant minima are extracted from the histogram, which are used as parameters for a threshold operation. In order to reduce the number of minima, the histogram is smoothed with a Gaussian, The mask size is enlarged until there is only one minimum T in the smoothed histogram. Figure 4 displays the effect image after threshold segmentation with Gaussian histogram algorithm. The separation result is obvious. But in the image, the protrusion and the loop fiber are still remained surrounding the main body of raw silk, which serious impact on the evaluation of evenness. Hence, further processing is needed to eliminate these defects. B. Morphology opening processing Mathematical morphology is a powerful technology to extract objects. Morphology operations are defined between the object and the structuring element [10]. Morphology opening operation, one of Morphological operations, can smooth object contour and remove completely regions that cannot contain the structuring element. Figure 4 – The effect image after threshold segmentation with Gaussian histogram algorithm Assuming that A is the input image and B is the structuring element, the morphology opening of A by B, denoted A oB, which defined as: BB-ABA += )(o (1) − Morphology opening of A by B is simply erosion of A by B, followed by dilation of the result by B. − Some of the common structuring element includes circle, hexagon and square. According to the size of the protrusion and the loop fiber in this image, circle structuring element of radius 6, square structuring element of side length 6 and hexagon structuring element of side length 6 are chosen. Figure 5 shows the effect image of difference structuring element with morphology opening. As showed in Figure 5, the protrusion and the loop fiber have been effectively removed with morphology opening operation, and the main body of raw silk is Управління розвитком складних систем (36 – 2018) ISSN 2219-5300 162 obtained obviously. However, circle structuring element and hexagon structuring element both greatly affect the extracted region on the top and bottom of images, and the main body of raw silk remains relatively intact with square structuring element. So square structuring element is adopted in this system. Figure 6 describes the effect image of different size of square structuring element. It can be seen that the boundary of the extracted region is becoming smoother with the increase of the size of square structuring element. Figure 5 – The effect images of difference structuring element with morphology opening: a – the effect image with circle structuring element; b – the top enlarge image with circle structuring element; c – the bottom enlarge image with circle structuring element; d –the effect image with square structuring element; e – the top enlarge image with square structuring element; f – the bottom enlarge image with square structuring element; g – the effect image with hexagon structuring element; h – the top enlarge image with hexagon structuring element; i – the bottom enlarge image with hexagon structuring element Figure 6 – The effect image of different size of square structuring element with morphology opening: a – 6×6; b – 8×8; c – 12×12; d – 16×16; d – 20×20 Calculation scheme As assessment the evenness of raw silk by image processing in this paper, measuring diameter of raw silk is the prerequisite and foundation to evaluate the evenness. The coefficient of variation (CV value) is the best indicator that can reflect the evenness. So the CV value of diameter is selected to characterize the raw silk evenness in this system. Since the result is a relative value, the diameter value can be defined as the number of pixels occupied by the diameter. A diameter value can be obtained in each row correspondingly. Diameters are extracted as follows: 1. Scan the region extracted in first image from left to right, start from the first row. 2. Record the column ordinal D1 of the first pixel and the column ordinal D2 of the last pixel. 3. Calculate the diameter value X: 1D-DX 21 += . (2) 4. Repeat the steps 2 through 3 row by row until all diameters are obtained in the image. 5. Repeat all steps above in all images acquired and record every X obtained. The CV value of diameter is calculated as follows: ( ) n 2 i i 1 1 1 X X 100%, nX CV = = − × (3) where X is the average diameter value; iX is the diameter value obtained in different row; n is the total number of obtained diameters. Result and discussion The CV value obtained by USTER ME100 tester is used as the reference standard in this paper. The continuous images of 100 meter raw silk (20/22 denier) are acquired. Here, with the image processing method mentioned above, the test results are shown in Table 1. The Deviation is calculated as follows: 1 0 0 | CV - CV | 100 CV Deviation %,= × (4) where CV0 is the CV value obtained by USTER ME100 tester, the CV0 value of the raw silk is 7.66 after testing 100 meter raw silk. CV1 is the CV value obtained by the method proposed in this paper. Table – Test results and comparison of raw silk CV value with different size of square structuring element square structuring element size CV (%) Deviation (%) 6×6 7.73 0.91 8×8 7.74 1.04 12×12 7.55 1.44 16×16 6.83 10.83 20×20 4.51 41.12 In Table, the CV values are calculated with Gaussian histogram algorithm and different size of square structuring element. It can be seen from Table 1 Управління технологічними процесами 163 that the CV value increases at first and then decreases with the increase of the size of the square structuring. This may be due to the reason that small size of square structuring element can remove the non-main body region well; the big size of square structuring element not only can remove the non-main body region, but also smooth the boundary of extracted region too much. Based on the Devastation, the square structuring element with size 6×6 is adopted in morphology opening processing step. Although CV value obtained by the method proposed in this paper is similar to the CV value obtained by USTER ME100 tester, which the minimum Devastating is 0.9. The difference between them is also reflected the difference between two test methods. The former is the CV value of diameter, which reflects the external change in size, and the latter is the CV value of mass, which reflects the change in mass. Conclusions In this paper, a dynamic measurement system for raw silk evenness using machine vision is proposed. When compared with the existing measurement and assessment of raw silk evenness, such as blackboard manual eye inspection and capacitance-detecting technology, the measurement method using machine vision has following characteristics. Firstly, because the image capture equipment is linear CCD with high resolution, the dynamical measurement of raw silk evenness can be realized with high speed. Secondly, the telecentric lens is adopted in the designed raw silk evenness measurement, which can eliminate the influence of the jitter of raw silk along the optical axis when image capturing. Finally, the high quality raw silk image can provide the information about raw silk after image threshold segmentation and morphology operation. In experiment, the CV value of diameter is used to characterized the raw silk evenness. Compared with the test results of different morphology opening processing methods, the effective image processing method is that Gaussian histogram algorithm is adopted in threshold segmentation and the square structuring element with size 6×6 is selected in morphology opening processing. The experimental result shows that the evenness measurement proposed in this paper is feasible. Acklowledgment We are gratefully acknowledged the support of the First Phase of Jiangsu Universities' Distinctive Discipline Development Program for Textile Science and Engineering of Soochow University, and National Engineering Laboratory for Modern Silk. ______________________________________________________________________________________________________ References 1. Zhou, Y. (2009). Research and prospection on electric measurement on raw silk. Silk Monthly, 9, 43-51. 2. Carvalho, V, Monteiro, J.L. (2008). Yarn evenness parameters evaluation: a new approach. Textile Research Journal, 78 (2), 119–127. 3. Cheng, L, Zhao, L, Chen, L, Zhou, X. (2010). Digital image processing of cotton yarn seriplane. International Conference on Computer and Information Application (ICCIA), December 2010, Tianjin, China, 274-277. 4. Liu, F, Zhou, W, Chen, G. (2012). Research of dynamic detecting the raw silk fineness on line by a linear CCD and FPGA. In Society of Photo-Optical Instrumentation Engineers (SPIE) Conference. November 2012, Beijin, China, 85630W- 85630W. 5. Junjuan, Li, Chen, Wang, Wenxiao, Tu, Baoqi, Zuo. (2015). A direct measurement method of yarn evenness based on machine vision, The Journal of Engineered Fibers and Fabrics, 10(4), 95-102. 6. Fabijańska, A, Jackowska-Strumiłło, L. (2012). Image processing and analysis algorithms for yarn hairiness determination. Machine Vision and Applications, 23(3), 527-540. 7. Luo, Y, Wu, C M, Zhang, Y. (2013). Facial expression recognition based on fusion feature of PCA and LBP with SVM. Optik, 3(124), 2767-2770. 8. Demeyere, M, Rurimunzu, D, Eugène, C. (2007). Diameter measurement of spherical objects by laser triangulation in an ambulatory context. IEEE Transactions on Instrumentation and Measurement, 56(3), 867-872. 9. ElMasry, G, Cubero, S, Moltó, Blasco, J. (2012). In-line sorting of irregular potatoes by using automated computer- based machine vision system. Journal of Food Engineering, 112(1), 60-68. 10. Carvalho, V, Oliveira, F, Vasconcelos, R, Belsley, M. (2008). A comparative study between yarn diameter and yarn mass variation measurement systems using capacitive and optical sensor. Indian Journal of Fiber& Textile Research, 33, 119-125. Стаття надійшла до редколегії 03.10.2018 Рецензент: д-р техн. наук, проф. В.Д. Гогунський, завідувач кафедри управління системами безпеки життєдіяльності Одеського національного політехнічного університету, Одеса. Управління розвитком складних систем (36 – 2018) ISSN 2219-5300 164 Ху Цзянь Юй Магістр інженерії, дослідження: Механічна та електрична інтеграція, orcid.org/0000-0002-3029-9168 Школа механіки та електротехніки, Янченский політехнічний коледж, Цзянсу Яньчэн 224005, П.Р. Китай ДОСЛІДЖЕННЯ ТА ДИЗАЙН ОСНОВНИХ ДЕТЕКТОРІВ РИНКОВИХ СТИЛІВ ON ПРИСТРОЇ ДЛЯ ПЗЗУ Анотація. У даній роботі представлена динамічна система вимірювання рівноваги сировини шовку з точки зору машини. Коли сировина шовку рухається з певною швидкістю привідним пристроєм, сирі шовкові зображення постійно фіксуються системою зйомки зображень, включаючи датчик лінії із зарядним зв'язком пристрою (ПЗЗ), телецентричні лінзи, джереа світла. Щоб точно витягнути основну частину сирого шовку, сирі шовкові зображення обробляються послідовно з пороговою сегментацією, функцією морфологічного відкриття. І тоді рівноважність сирого шовку характеризується розрахунком коефіцієнта варіації (значення CV) діаметра. Розглянто різні методи обробки зображень. У порівнянні з існуючими вимірюваннями та оцінкою рівноваги сировини шовку, такими як контроль обличчя та технологія виявлення ємності на дошці, метод вимірювання з використанням машинного зору має наступні характеристики. По-перше, оскільки пристрій для зйомки зображень є лінійним ПЗЗ з високим дозволом, динамічне вимірювання рівноваги сирого шовку може бути реалізоване з високою швидкістю. По-друге, телецентричні лінзи адаптовані в запланованому вимірі рівномірності сировини шовку, що дозволяє усунути вплив джитера сирого шовку вздовж оптичної осі при зйомці зображення. Нарешті, високоякісний сирний шовковий малюнок може надати інформацію про сировину шовку після сегментації порогу зображення та експлуатації морфології. Ключові слова: рівноважність сировини шовку; машинний вигляд; динамічне вимірювання; обробка зображень ______________________________________________________________________________________________________ Link to publication APA Hu, Yucai. (2018). Research and design of raw silk evenness detector based on ccd image sensor. Management of Development of Complex Systems, 36, 175 – 181. ДСТУ Ху Цзянь Юй. Дослідження та дизайн основних детекторів ринкових стилів ON пристрої для ПЗЗУ [Текст] / Ху Цзянь Юй // Управління розвитком складних систем. – 2018. – № 36. – С. 159 – 164.