Cigarette end face visual inspection system
By designing a cigarette end surface visual detection system, the automatic detection of cigarette end surface is achieved using image processing and deep learning technology, which solves the problem of time-consuming and labor-consuming manual detection and improves detection efficiency and accuracy.
Patent Information
- Application Number
- CN202510783522.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-12
- Publication Date
- 2025-08-01
AI Technical Summary
In the prior art, cigarette production requires manual screening, which is time-consuming and labor-intensive, and subjective judgments, which affects the detection results and easily causes visual fatigue.
A cigarette end face visual detection system is designed, including feed bin, drum, detection device, removal mechanism and discharge bin. The data acquisition device and identification control system are used to perform image acquisition and Fourier transform processing, and defect areas are extracted in combination with filters and morphological methods, and the cigarette end face deep learning model is used for automatic detection.
Automatic detection of cigarette end faces is realized, detection errors and material waste caused by subjective judgments can be avoided, defects such as filters, wires, and damage can be accurately identified at efficient production speed, improving detection efficiency and accuracy.
Smart Images

Figure CN120394390A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cigarette detection, and particularly to a visual detection system for the end face of cigarettes. Background Art
[0002] Currently, for the cigarettes produced by customers, when there are product quality problems, they need to be screened one by one manually, which is time-consuming and laborious, and there is subjective judgment, which affects the detection results and is prone to visual fatigue. Summary of the Invention
[0003] In order to solve the technical problems existing in the above-mentioned prior art, the present invention provides a visual detection system for the end face of cigarettes.
[0004] To achieve the above object, the embodiments of the present invention provide the following technical solutions:
[0005] In a first aspect, in an embodiment provided by the present invention, a visual detection system for the end face of cigarettes is provided. The system includes: a feeding bin assembly, at least one drum assembly, at least one detection device, at least one rejection mechanism, and a discharging bin assembly;
[0006] At least one drum assembly is installed on the discharge of the feeding bin assembly;
[0007] One detection device is provided on one side of each drum assembly; one rejection mechanism is also provided on each drum assembly. The detection device is used to detect the end face of the cigarettes on the drum assembly and control the rejection mechanism to reject the unqualified cigarettes;
[0008] The discharging bin assembly is arranged at the bottom of the drum assembly and is used to discharge the qualified cigarettes;
[0009] The detection device includes a data acquisition device and an identification control system;
[0010] The data acquisition device is used to collect the image of the cigarettes flowing through and send the collected image data to the identification control system;
[0011] The identification control system is used to perform Fourier transform processing on the image data to obtain transformed image data; use a filter to perform filtering processing on the transformed image data to obtain preprocessed image data; restore the preprocessed image data to the spatial domain, and use the image processing method of morphology to extract the area where the defect is located and mark the conforming defects.
[0012] As a further solution of the present invention, the filter can be a Gaussian low-pass filter, a sine band-pass filter, or a Gaussian difference filter.
[0013] As a further solution of the present invention, the data acquisition device can be a high-frame-rate camera.
[0014] As a further solution of the present invention, there are two drum assemblies, which are divided into a left drum and a right drum; there are two rejection mechanisms and two detection devices.
[0015] As a further solution of the present invention, the mounting seat of the detection device adopts a slide rail structure for adjusting the distance between the detection device and the drum assembly.
[0016] As a further solution of the present invention, it further includes a control system, and the feeding bin assembly, the drum assembly, the detection device, the rejection mechanism and the discharging bin assembly are all connected to the control system; the control system controls the rejection mechanism based on the signal of the detection device.
[0017] As a further solution of the present invention, the recognition control system includes a deep learning model for the end face of cigarette sticks.
[0018] As a further solution of the present invention, the training method of the deep learning model for the end face of cigarette sticks includes:
[0019] S1. Create a model and a data set, and preprocess the data set;
[0020] S2. Train the initial deep learning model;
[0021] S3. Evaluate the trained model;
[0022] S4. Conduct actual measurements on the evaluated model.
[0023] As a further solution of the present invention, creating a model and a data set, and preprocessing the data set includes:
[0024] Create an initial deep learning model, which returns a handle DLMmodeHandel containing the parameter information of the model; use the Read_dl_dateset_from_coco operator to determine which pictures to read from the training data set and define the target object for searching the end face of cigarette sticks; at the same time, create a DLDataset data dictionary, which will store the information of the data; use the split_dl_dataset operator to split the end face data of cigarette sticks into different sample sets; use the Get_dl_model_param to obtain the image requirements of the network object for the end face of cigarette sticks, such as circumference, diameter, roundness, and gray scale range value, and then use the Preprocess dl dataset operator to preprocess the data of the end face of cigarette sticks, which is beneficial to accelerating the training speed.
[0025] The technical solution provided by the present invention has the following beneficial effects:
[0026] The present invention realizes the automatic detection of the end face of cigarettes by setting a detection device in cooperation with other components, which can avoid detection errors and material waste caused by subjective judgment. The present invention visually detects whether there are defects such as missing filter tips, missing filaments, breakage, and uneven surfaces of cigarette tobacco by using Gaussian-Fourier transform to extract the feature image in the frequency domain, and then detecting the area where the gray level changes suddenly in the image. The image is transformed into the frequency domain control, enhancing the parts with drastic gray level changes in the image, so that the frequency domain image retains the low-frequency signals while being smoothed, such as the "sudden change parts", and weakening the high-frequency signals, such as noise and texture. In this way, the areas with different changes in the image of the cigarette end face are amplified, and the defects become more obvious, and then the morphological method is used to extract them.
[0027] These aspects or other aspects of the present invention will be more clearly understood in the following description of the embodiments. It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other embodiments can be obtained based on these drawings without creative efforts.
[0029] Figure 1 It is a structural diagram of a visual detection system for the end face of cigarettes according to an embodiment of the present invention.
[0030] Figure 2 It is a detection process flow diagram of a visual detection system for the end face of cigarettes according to an embodiment of the present invention.
[0031] Figure 3 It is a working flow diagram of a visual detection system for the end face of cigarettes according to an embodiment of the present invention.
[0032] In the figure: 1 - feed bin assembly, 2 - drum assembly, 3 - detection device, 4 - rejection mechanism, 5 - discharge bin assembly, 301 - data acquisition device, 302 - identification control system. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0033] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts belong to the scope of protection of the present invention.
[0034] The flowcharts shown in the accompanying drawings are only illustrative examples, and do not necessarily include all contents and operations / steps, nor are they necessarily executed in the described order. For example, some operations / steps can be decomposed, combined or partially merged, so the actual execution order may be changed according to the actual situation.
[0035] It should be understood that the terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include the plural forms.
[0036] Specifically, the embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0037] See Figure 1 As shown, in the embodiment of the present invention, a visual inspection system for the end face of cigarettes is also provided. The system includes a feeding bin assembly 1, at least one drum assembly 2, at least one detection device 3, at least one rejection mechanism 4, and a discharging bin assembly 5.
[0038] At least one drum assembly 2 is installed at the discharge of the feeding bin assembly 1;
[0039] One detection device 3 is provided on one side of each drum assembly 2; one rejection mechanism 4 is also provided on each drum assembly 2. The detection device 3 is used to detect the end face of the cigarettes on the drum assembly 2 and control the rejection mechanism 4 to reject the unqualified cigarettes.
[0040] The discharging bin assembly 5 is arranged at the bottom of the drum assembly 2 and is used to discharge the qualified cigarettes.
[0041] The detection device 3 includes a data acquisition device 301 and an identification control system 302;
[0042] The data acquisition device 301 is used to collect the images of the flowing cigarettes and send the collected image data to the identification control system 302;
[0043] The identification control system 302 is used to perform Fourier transform processing on the image data to obtain transformed image data; use a filter to perform filtering processing on the transformed image data to obtain preprocessed image data; multiply it with the pixels of the Gaussian filter to obtain the Fourier image after convolution.
[0044] The preprocessed image data is restored to the spatial domain; it can be seen that the regions with drastic gray level changes in the figure are enhanced and the defects become obvious.
[0045] Use a morphological image processing method to extract the area where the defect is located and identify the defects that meet the criteria.
[0046] In the embodiments of the present invention, the filter can be a Gaussian low-pass filter, a sine band-pass filter, or a Gaussian difference filter, which can filter the subsequent Fourier image and only retain the required image information.
[0047] The present invention visually detects whether there are defects such as missing filters, missing filaments, breakage, and uneven surfaces of the cut tobacco on the end face of the cigarette rod; uses the Gaussian-Fourier transform to extract the feature image in the frequency domain, and then detects the area where the gray level changes suddenly in the image. The image is converted to the frequency domain control, enhancing the parts with drastic gray level changes in the image, so that the frequency domain image retains the low-frequency signals while being smoothed, such as the "sudden change parts", and at the same time weakening the high-frequency signals, such as noise and texture. In this way, the areas with different changes in the image of the cigarette rod end face are enlarged, and the defects become more obvious, and then the morphological method is used to extract them.
[0048] The data acquisition device 301 can be a high-frame-rate camera. It realizes high-speed data acquisition. The vision camera is based on the principle of geometric optics. The light is refracted and converged by the lens lens group and forms an inverted and reduced real image on the image sensor. Parameters such as the focal length, aperture, and field of view angle of the lens directly affect the imaging range, clarity, and depth of field. The image sensor converts the optical signal into an electrical signal. The former has high sensitivity but slow reading, while the latter has low power consumption and fast reading. During imaging, the pixel unit converts the light intensity into an electrical signal, and then through processes such as amplification, analog-to-digital conversion, noise reduction, white balance correction, and image enhancement, it meets the analysis requirements. During imaging, the pixel unit converts the light intensity into an electrical signal, and then through processes such as amplification, analog-to-digital conversion, noise reduction, white balance correction, and image enhancement, it meets the analysis requirements.
[0049] See Figure 2 and 3 , there are two drum assemblies 2, which are divided into a left drum and a right drum. There are two rejection mechanisms 4. There are two detection devices 3. The rejection mechanism 4 includes a left rejection mechanism and a right rejection mechanism. The detection device 3 includes a left detection device and a right detection device.
[0050] During the detection process of the present invention, the cigarette rods to be detected enter the left and right drums through the feeding bin assembly, and the left and right drums rotate to transfer the cigarette rods to the left and right detection components; the left and right detection components detect the cigarette rods. If they are qualified, they flow into the discharging bin assembly; if they are unqualified, the control system controls the servo motor to accurately position the unqualified cigarette rods on the drum slots to the rejection position for rejection.
[0051] Cigarettes rotate 360° on the left and right drums. A camera, mounted at a 45-degree angle to the cigarette end, uses two lenses to inspect the cigarettes for technical parameters such as hollow ends, irregular shapes, and diameter. A vision controller detects end surface defects and triggers the camera to take a photo. If a cigarette fails inspection, it is precisely removed by the left and right rejection mechanisms. Those that pass inspection are then transported to the cartoning stage.
[0052] The detection device 3 is mounted on the drum assembly 2 in an adjustable position, which facilitates adjustment of the position between the detection device 3 and the drum assembly 2. The detection device 3 can be mounted on the drum assembly 2 via a lifting structure or a slide rail structure.
[0053] The mounting base of the detection device 3 adopts a slide rail design, which can be adjusted forward and backward. There is a scale designed on the slide rail. When changing the drum wheel, you only need to adjust the detection component backward to quickly change it. After the replacement, the detection component only needs to be reset according to the previous scale. This design can greatly reduce the cost waste caused by equipment downtime when changing specifications.
[0054] Left and right rejection mechanisms: These primarily consist of two sets of channels. When the detection assembly detects an unqualified cigarette, a detection signal is generated. The control system controls the servo motor to precisely position the unqualified cigarette in the drum groove to the rejection position. A high-frequency solenoid valve opens and closes the high-pressure air circuit, using high-pressure air to reject individual cigarettes. The air then flows through the left and right channels into the waste bin. Qualified cigarettes proceed to the next stage. This is prior art and will not be detailed here.
[0055] Control and detection principle: When the detection component detects unqualified cigarettes, a detection signal is sent out. The control system controls the servo motor to accurately position the unqualified cigarettes on the drum groove to the rejection position. The high-frequency solenoid valve controls the opening and closing of the high-pressure air circuit, and uses high-pressure blowing to achieve single-cigarette rejection and flow into the waste cigarette bin through the left and right channels.
[0056] This system uses two independent drums to transport cigarettes to be inspected to the inspection assembly for testing. At a speed of 12,000 cigarettes / min, the acquisition rate A (pipette / s) of a single visual camera is calculated as follows:
[0057] .
[0058] The feed bin assembly 1 , the drum assembly 2 , the rejecting mechanism 4 and the discharge bin assembly 5 in the present invention adopt the existing technology and therefore will not be described in detail here.
[0059] The present invention also includes a control system, to which the feed bin assembly 1 , drum assembly 2 , detection device 3 , rejection mechanism 4 and discharge bin assembly 5 are all connected. The control system controls the rejection mechanism 4 based on the signal from the detection device 3 .
[0060] The control system can adopt the Beckhoff PLC control system.
[0061] The recognition control system 302 includes a deep learning model for the end face of cigarette sticks.
[0062] The training method of the deep learning model for the end face of cigarette sticks includes:
[0063] S1. Create a model and a dataset, and preprocess the dataset.
[0064] Specifically, create an initial deep learning model, which returns a handle DLMmodeHandel containing the parameter information of the model. Use the Read_dl_dateset_from_coco operator to determine which pictures to read from the training dataset and define the target object for searching the end face of cigarette sticks. At the same time, create a DLDataset data dictionary, which will store the information of the data. Use the split_dl_dataset operator to split the data of the end face of cigarette sticks into different sample sets. Use Get_dl_model_param to obtain the image requirements of the network object for the end face of cigarette sticks, such as circumference, diameter, roundness, gray scale range value, and then use the Preprocess dl dataset operator to preprocess the data of the end face of cigarette sticks, which is beneficial to accelerating the training speed.
[0065] S2. Train the initial deep learning model. Specifically, set the training parameters in the software algorithm, including hyperparameters. During the training process, the change of the loss function curve of the data of the end face of cigarette sticks can be observed.
[0066] S3. Evaluate the trained model. In order to evaluate the training effect, evaluate the data model of the end face of cigarette sticks and extract the parameters of the evaluation model.
[0067] S4. Conduct actual measurements on the evaluated model. Through the trigger signal, compare the information of each end face of cigarette sticks collected with the model library, and automatically add the defective or special defects that cannot be recognized to the model for continuous training to improve the robustness and stability of the detection model and the recognition accuracy of special defects.
[0068] The present invention can achieve the detection of each cigarette at a production speed of 12,000 cigarettes per minute, and perform high-speed acquisition and rejection. The camera is installed at a fixed position beside the drum (such as point A). When the cigarette passes through point A, the vision system immediately performs detection and outputs a defect signal (the digital signal "1" represents a defect, and "0" represents normal). At the same time, a sensor is installed at the rejection point B. When a cigarette passes by, it will generate a pulse signal to the PLC. When a defect signal is detected at point A, the movement of the drum is converted into "displacement units" (the distance between each cigarette is 1 unit of the feeding bin assembly). By calculating the number of steps the cigarette moves. A shift register is created in the controller with the maximum distance from the detection point A to the rejection point B covered by the number of drum slots. Each register bit corresponds to the position of a cigarette on the drum. When the vision system detects a defective cigarette at point A, a certain bit (such as the first bit) of the shift register is set to "1". The controller triggers a shift instruction through the pulse of the sensor at the rejection point B. For each unit distance moved, all the bits in the shift register move one bit in sequence (such as shifting left). Suppose the distance from the detection point A to the rejection point B corresponds to N shift units. When the defect signal shifts to the Nth bit, the controller triggers the rejection mechanism to act and reject the cigarette at the corresponding position.
[0069] Rejection process summary:
[0070] Initial state: Register = [0, 0, 0,.......,0] (no defect)
[0071] After detecting a defect: Register = [1, 0, 0,......., 0] (the first bit is the defective cigarette)
[0072] After n shifts: Register = [0, 0,......., 1, ] (the defect bit moves to the nth bit)
[0073] When the defect signal shifts to the nth bit, the control system triggers the rejection mechanism to act and reject the cigarette at the corresponding position.
[0074] If the drum speed fluctuates, the speed is monitored in real time by eliminating the pulse signal of the sensor at point B, and the shift frequency is dynamically adjusted (increasing the number of shifts when the speed increases and vice versa) to ensure that the shift steps of the defect signal are consistent with the actual displacement. When multiple defective cigarettes exist simultaneously, the shift register can process multiple "1" signals in parallel, and each signal is shifted independently to avoid missed or false rejection. In addition, visual false detection signals are excluded through software filtering (such as delay debouncing) to ensure that the shift register is only effective for real defects; the rejection algorithm can achieve a false rejection rate of non-conforming products ≤ 1%. Combining with the detection system can solve the problem that manual detection cannot meet the detection requirements at a production speed of 12,000 cigarettes per minute; it can avoid detection errors and material waste caused by subjective judgment.
[0075] It should be understood that, as used herein, unless the context clearly supports the exception, the singular form "a" is also intended to include the plural form. It should also be understood that the "and / or" used herein refers to any and all possible combinations of one or more of the related listed items. The serial numbers of the disclosed embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0076] Those of ordinary skill in the art should understand that: the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the disclosure of the embodiments of the present invention (including the claims) is limited to these examples; under the concept of the embodiments of the present invention, the technical features in the above embodiments or different embodiments can also be combined, and there are many other variations in different aspects of the embodiments of the present invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omission, modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiments of the present invention shall be included in the protection scope of the embodiments of the present invention.
Claims
1. A visual inspection system for the end face of a cigarette, characterized in that, The system includes: a feed bin assembly, at least one drum assembly, at least one detection device, at least one rejection mechanism, and a discharge bin assembly; At least one drum assembly is installed at the discharge of the feed bin assembly; One detection device is arranged on one side of each drum assembly; one rejection mechanism is also arranged on each drum assembly. The detection device is used to detect the end face of the cigarettes on the drum assembly and control the rejection mechanism to reject unqualified cigarettes; The discharge bin assembly is arranged at the bottom of the drum assembly and is used to discharge qualified cigarettes; The detection device includes a data acquisition device and an identification control system; The data acquisition device is used to collect images of the flowing cigarettes and send the collected image data to the identification control system; The identification control system is used to perform Fourier transform processing on the image data to obtain transformed image data; use a filter to perform filtering processing on the transformed image data to obtain preprocessed image data; restore the preprocessed image data to the spatial domain, and use morphological image processing methods to extract the area where the defect is located and identify the conforming defects.
2. The cigarette end face visual inspection system according to claim 1, characterized in that, The filter can be a Gaussian low-pass filter, a sine band-pass filter, or a Gaussian difference filter.
3. The cigarette end face visual inspection system according to claim 1, wherein The data acquisition device is a high-frame-rate camera.
4. The cigarette end face vision detection system according to claim 2, characterized in that, There are two drum assemblies, which are divided into a left drum and a right drum; there are two rejection mechanisms and two detection devices.
5. The cigarette end face visual inspection system according to claim 1, characterized in that, The mounting base of the detection device adopts a slide rail structure for adjusting the distance between the detection device and the drum assembly.
6. The cigarette end face visual inspection system according to claim 1, wherein, It also includes a control system. The feed bin assembly, drum assembly, detection device, rejection mechanism, and discharge bin assembly are all connected to the control system; the control system controls the rejection mechanism based on the signal of the detection device.
7. The cigarette end face visual inspection system according to claim 1, characterized in that, The identification control system includes a deep learning model for the end face of cigarette sticks.
8. The cigarette end face visual inspection system according to claim 7, characterized in that, The training method of the deep learning model for the end face of cigarette sticks includes: S1. Create a model and a dataset, and preprocess the dataset; S2. Train the initial deep learning model; S3. Evaluate the trained model; S4. Conduct actual measurement on the evaluated model.
9. The cigarette end face visual inspection system according to claim 8, wherein, Creating a model and a dataset, and preprocessing the dataset includes: Create an initial deep learning model, which returns a handle DLMmodeHandel containing the parameter information of the model; use the Read_dl_dateset_from_coco operator to determine which pictures to read from the training dataset and define the target object for searching the end face of cigarette sticks; at the same time, create a DLDataset data dictionary, which will store the information of the data; use the split_dl_dataset operator to split the end face data of cigarette sticks into different sample sets; use the Get_dl_model_param to obtain the image requirements of the network object for the end face of cigarette sticks, such as circumference, diameter, roundness, and gray range value, and then use the Preprocess dl dataset operator to preprocess the data of the end face of cigarette sticks, which is beneficial to accelerating the training speed.