The article information
- Cao Jun-Li,Li Ju-Feng,Lu Teng-Da
- Roundness measurement of cigarette based on visual information
- Advances in Manufacturing, 2017, 5(2): 177-181.
- http://dx.doi.org/10.1007/s40436-017-0176-7
-
Article history
- Received: 19 May, 2016
- Accepted: 24 April, 2017
- Published online: 22 May, 2017
In China, the tobacco industry has always played a very important role as a main source of government tax revenue. Due to our large population and many smokers, the tobacco industry has held eight world records. However, as a large cigarette-manufacturing country, there is a little weak in cigarette detection in China. Most tobacco companies in China still prefer to introduce foreign equipment and improve domestic equipment at the same time [1].
The technological process of cigarette manufacturing in most cigarette factories in China is divided into two parts including the roll-up system and connection. The roll-up system is composed of adding tobacco, delivering the cigarette paper, rolling it up, and cutting the cigarette. In the rolling-up process, the roundness of the cigarette may be changed because of pressure from the roll-up system. In this situation, it is necessary to detect the roundness of the cigarette to ensure production quality. Because of the high speed of the rolling-up process, it is difficult to obtain real-time cigarette parameters, such as roundness. Most tobacco companies choose a detection system with a charge-coupled device (CCD) sensor to solve this problem [2, 3]. Figure 1 shows the working principle of this system.
![]() |
|
In this system, the longest length in two vertical directions can be tested by calculating the shadow length on the CCD sensors. One edge of the cigarette paper is coated with glue when it is rolled up to form a cylinder. Then, the cigarette needs a high-temperature ironing and soft pressure by the mechanical head. Because of the pressure, the cross section of a cigarette on the production line is not a standard circle, but a curve that approximates a circle, as shown in Fig. 2, and there are two different diameter values called D and d.
![]() |
|
In the CCD-sensor-based measurement system, the prerequisite for calculating the roundness is the curve shown in Fig. 2b, consisting of a semi-circle and a semiellipse. Thus, the roundness P is determined as
![]() |
(1) |
However, the real curve of a cigarette's cross section is not the same as the curve above. There could be a big difference between those two curves to a certain extent. That is to say that the roundness measurement calculated by the system based on CCD sensors is not accurate.
Therefore, this study mainly improves the cigaretteroundness measurement system based on CCD sensors used in the Changde Cigarette Factory, Hunan Province, and introduces a new measurement system based on visual information.
2 Cigarette-roundness measurement based on visual informationImage-processing technology has a very wide range of applications in modern industry [4]. In the visual system introduced in this paper, the line-structure light shines on the cigarette in the longitudinal section, forming a crescentshaped spot. Then, the industrial camera captures the spot and analyzes it using image-processing techniques. Compared with the above CCD-sensor measurement system, the visual system involves calculating more points, and its computing environment is closer to the real environment of the data [5, 6]. During the shooting, because of the highspeed movement of the cigarette and external shocks, inevitable errors occur when fitting points. In this situation, if only the OpenCV cvFitEllipse2 library function is used for ellipse fitting, the number of the error points is large and the fitting result cannot meet the detection requirements [7]. Therefore, a grayscale conversion, image smoothing, and wave filtering are required before the ellipse fitting [8]. Figure 3 shows the roundness measurement of the cigarette, based on visual information.
In Fig. 3, the fixed angle of the line-structure light is 50°. The image processing process is shown in Fig. 4.
![]() |
|
![]() |
|
The software platform for this improved system is Microsoft Visual Studio 2013 with OpenCV 2.4.8. cvFitEllipse2 (const cvArr* points) which can provide ellipse-fitting functionality and the fitting procedure is the least squares method. For more information on the least squares method, it could be consulted in Refs. [9–12] and it will not be discussed in detail in this paper.
In Fig. 4, we can see two contour curves after the image pre-processing. If the two curves directly fit, there will be two ellipses with nearly the same minor axis and a different major axis. To obtain more accurate fitting results, it is necessary to extract the center curve of the two contour curves before ellipse fitting [13].
The OpenCV cvFindContours library function can retrieve all the image contours and go through all the points on the contours. The point coordinates on the two contour curves in the pixel coordinate system can be obtained by cvFindContours. We assume that the coordinates are M1(x1, y1) and M2 (x2, y1). Then, the coordinate of the point between M1 and M2 on the center curve is M0(x0, y1), where
![]() |
(2) |
Then, we fit the ellipse based on the points set Mi (i = 0, 1, 2, ..., N), and the fitting result is shown in Fig. 5.
![]() |
|
The center curve is extracted in two-dimensional (2D) mode, which is a simplified three-dimensional (3D) mode. The error will be compensated in the following data processing [6].
Minor axis b and major axis a of the fitting ellipse can be obtained using the cvFitEllipse2 function. During the image-processing, a and b must have a fixed error because of the coordinate-system transformation from 3D to 2D. After several tests on standard cigarettes using the ellipsefitting method, the error compensation coefficient k can be obtained. Then, the minor axis of the ellipse is kb and the major axis is ka.
The roundness calculation method is shown in Fig. 6.
![]() |
|
The roundness P is determined according to the following roundness formula
![]() |
(3) |
![]() |
(4) |
The cigarette is qualified if the mean value of P in a test period is within the permitted scope, and vice versa.
4 Application of the cigarette-roundness measurement based on visual informationThis project is in cooperation with the Changde Cigarette Factory, Hunan Province, aiming at testing the roundness of the Furongwang series. The blue Furongwang series is taken as an example. The cigarette's diameter is 8 mm, its length 84 mm, and its roundness 0.2 mm. The device parameters are as follows: the industrial camera model is WY3500; the camera pixels are 2 952 9 1 944; the camera exposure is 10 times per second; and the line velocity is 7.8 m/s. In the detection process, the camera focus is fixed. Assuming that there is no distortion of the image captured by the camera, there is a fixed proportional relation between the pixel size and the actual size of the cigarette [8]. The ratio K could be calculated as
![]() |
(5) |
After several tests, K = 23.10.
The experimental prototype of this visual detection system is shown in Fig. 7.
![]() |
|
Table 1 contains 6 000 sets of roundness data tested over 10 min. For statistical convenience, we classify the average value for each 400 data sets as one new data set. Table 1 shows the 15 sets of data.
We compare the above roundness with the results from the CCD sensor system. Figure 8 shows the experimental equipment for the CCD sensor.
![]() |
|
In the CCD system, the level signal is converted to a pulse signal; the pulse width is the longest length and is called D and d. Table 2 shows the roundness of the same cigarette measured over 10 min. It contains 3 600 sets of roundness data tested over 10 min. We classify the average value for each 240 data sets as one new data set. Following are the 15 sets of data.
If we analyze these data, there are five bold data values from the allowable roundness values in Table 1, and three bold data values from the allowable roundness values in Table 2, which indicate that the roundness of the cigarette does not qualify in the tested period. This means that the factory should check the production state and find the reason.
The cigarette was the same for both systems. However, we can see that the roundness in Table 1 is more accurate than that in Table 2.
After several on-site commissions, the system can effectively detect the roundness of the cigarette. However, the visual information is especially sensitive to optical noise and external shock, so the system places high demands on the external environment. The actual test result shows that the accuracy of the visual-system-based cigarette-roundness measurement is 19% better than the former measurement method, such as double-CCD sensor detecting, when the ambient light noise and external shock are small and stable.
5 ConclusionsEllipse-fitting algorithms are widely used in image processing, and are also the most important functions in image-processing technology. The proposed visual system in an industrial setting can determine whether the product's shape, size, location, quality, and category are qualified. The visual system has the advantages of non-contact, full field measurement, and high precision, which are ideal for detecting objects in a production line.
In view of the above characteristics, this article introduced a new cigarette-roundness measurement based on visual information. The actual test results showed that the accuracy of this system was 19% better than the former measurement method with double-CCD sensor detection. This new system was also a direction for our country's own cigarette-testing equipment.
Acknowledgements This project was supported by the Changde Cigarette Factory, Hunan Province. The authors express their sincere appreciation to the anonymous referees for their helpful comments to improve the quality of the paper.1. | Wang JN (2011) Research on reform and development of tobacco industry in China. Dissertation, University of Jilin |
2. | Fen H, Li JF, Zhao JQ (2015) The measurement system of the cigarette surface quality. Dissertation, Shanghai University |
3. | Han JD, Yang HJ, Lu NG(2011)Automated ellipse detection and location method on 3D visual inspection.Comput Eng Appl 47(17), 169-171 |
4. | Zhang YJ (1999) Image processing and analysis. Tsinghua University Press, Beijing |
5. | Yan B, Wang B, Li Y(2008)Optimal ellipse fitting method based on least square. J Beijing Univ Aeronaut Astronaut 34(3), 295-298 |
6. | Zhang WG, Han J, Zhou X(2013)Data registration method for multi resolution measurement system with line structured light.Chin J Sci Instrum 7, 2-8 |
7. | Bradski GR, Kaehler A (2008) Learning OpenCV: computer vision with the OpenCV library. O'Reilly Media, California |
8. | Li L, He MY, Li N(2010)Camera calibration based on the circular pattern and ellipse fitting.J Xidian Univ 6, 1148-1154 |
9. | Zou YM, Wang B(2006)Fragmental ellipse fitting based on least square algorithm.Chin J Sci Instrum 27(7), 808-812 |
10. | Kanatani K, Sugaya Y, Kanazawa Y (2016) Ellipse fitting for computer vision: implementation and applications. Morgan & Claypool, Williston |
11. | Fitzgibbon A, Pilu M, Fisher RB(1999)Direct least square fitting of ellipses.IEEE Trans Pattern Anal Mach Intell 21(5), 476-480 doi:10.1109/34.765658 |
12. | Xia J (2007) Research on ellipse fitting method. Dissertation, Jinan University |
13. | Xu JZ (2012) Research on methods and evaluation of stripe center extraction in structured light 3D measurement. Dissertation, Nanjing University |