Cigarette end face looseness detection method and device
By reconstructing the three-dimensional morphology of cigarette end faces through asynchronous dual-camera shooting and stereo matching algorithms, the problem of deteriorated detection effect and data mismatch when the end face filling distribution is uneven, which is a problem of traditional detection methods, is solved. It enables accurate calculation of the hollow depth and proportion, and improves the accuracy of detection and the value of process guidance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-04
- Publication Date
- 2026-03-27
AI Technical Summary
Traditional methods for detecting looseness at the cigarette end face deteriorate when the filling distribution is uneven, and the test data does not match the production process indicators, making it difficult to achieve accurate quality control.
The cigarette end face image was captured asynchronously by dual cameras. The three-dimensional morphology of the cigarette end face was reconstructed by combining stereo matching algorithm and deep learning technology, and the hollow depth and proportion were calculated.
It enables precise defect detection of cigarette end faces, outputting hollow depth and area ratio indicators that directly match the production process, thereby improving the accuracy and applicability of the detection results.
Smart Images

Figure CN121740876A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of cigarette quality detection, in particular to a cigarette end surface loose detection method and device. BACKGROUND
[0002] Traditional cigarette end surface loose detection methods mainly include two technical paths.
[0003] The first one is to detect through a capacitive sensor. The method is to place the cigarette close to the capacitive sensor. When the filling amount of the cigarette end surface changes, a measurable pressure change will be caused at both ends of the capacitive sensor. The system identifies the loose condition according to the change.
[0004] The second one is to use infrared sensing technology. The method is to irradiate infrared light to the end surface of the cigarette and use a sensor to detect the intensity of the scattered light, so as to infer the loose degree.
[0005] When using the above traditional detection methods, the following technical problems exist: The existing methods detect and process signals as a whole for the cigarette end surface. For abnormal working conditions with uneven filling distribution of the end surface, the detection effect will be significantly poor, and it is difficult to accurately identify local defects.
[0006] The data output by the existing detection means is usually a voltage or other physical quantity signal, which cannot be directly matched with the indicators used to evaluate the quality of the cigarette in the actual production process, such as defect area ratio and loose depth, causing a mismatch between the detection data and the process requirements, which is not conducive to the accurate control of production quality and process optimization. SUMMARY
[0007] Therefore, the present application provides a cigarette end surface loose detection method and device, aiming to solve the technical problems of poor detection effect of the traditional detection method when the filling distribution of the end surface is uneven, and the mismatch between the detection data and the key indicators such as defect area ratio and loose depth used in the production process, so as to improve the accuracy of the detection result and the process applicability.
[0008] In order to achieve the above purpose, the present application adopts the following technical solutions: A cigarette end surface loose detection method, comprising the following steps: Taking the first image P1 and the second image P2 by asynchronously shooting the end surface images of the same cigarette through the first camera 2 and the second camera 3; Taking the first image P1 and the second image P2 as a virtual binocular image pair with a fixed equivalent baseline length; Processing the virtual binocular image pair through a stereo matching algorithm to obtain the depth information of the cigarette end surface; Based on the depth information, calculate the loose depth and the loose ratio.
[0009] In a specific implementation, the first camera 2 and the second camera 3 are installed at two drum groove positions.
[0010] In a specific implementation, the fixed equivalent baseline length is derived from the fixed geometric relationship determined by the installation positions of the first and second cameras, the diameter of the detection drum, and the groove position spacing.
[0011] In a specific implementation, when the first camera 2 takes the first image P1, the first group of LED lights is driven for light compensation; when the second camera 3 takes the second image P2, the second group of LED lights is driven for light compensation.
[0012] In a specific implementation, the first group of LED lights includes a first LED light 4 and a second LED light 5, and the second group of LED lights includes a third LED light 6 and a fourth LED light 7.
[0013] A detection device for cigarette end face loose, comprising: A detection drum 8 for carrying cigarettes 1 to be detected; A dual-camera assembly installed at the detection drum 8 for asynchronously taking images of the end face of the cigarette, the dual-camera assembly comprising a first camera 2 and a second camera 3 arranged at intervals; An illumination assembly comprising a plurality of LED lights for light compensation during image taking; A processing unit for executing any of the above methods.
[0014] In a specific implementation, the first camera 2 and the second camera 3 are installed at two drum groove positions along the circumferential direction of the detection drum 8.
[0015] In a specific implementation, the illumination assembly includes a first group of LED lights for light compensation for the first camera 2 and a second group of LED lights for light compensation for the second camera 3.
[0016] In a specific implementation, the first group of LED lights includes a first LED light 4 and a second LED light 5, and the second group of LED lights includes a third LED light 6 and a fourth LED light 7.
[0017] In a specific implementation, the processing unit is further configured to: based on the depth information, extract the tobacco area of the end face of the cigarette, calculate the depth difference between the tobacco surface in the area and the depth reference value of the cigarette paper as the loose depth, and calculate the area ratio of the area with a loose depth exceeding the process threshold as the loose ratio.
[0018] Compared with the prior art, the cigarette end face loose detection method and device can accurately detect the defects of the cigarette ignition end face, realize the reconstruction and quantitative analysis of the three-dimensional morphology of the end face by adopting the asynchronous shooting of the two cameras and combining the binocular distance measuring principle, directly obtain the loose depth and area ratio indexes matched with the process requirements, and effectively improve the accuracy, intuitiveness and process guidance value of the detection result, and has the following beneficial effects: 1、The two cameras of the present application asynchronously acquire two images of the same cigarette end face from different angles, effectively overcoming the parallax problem caused by cigarette movement, providing an accurate image basis for subsequent three-dimensional reconstruction.
[0019] 2、The present application directly obtains the depth information (i.e. depth map) of each point on the cigarette end face through a stereo matching algorithm, converts the detection result from a traditional voltage signal to intuitive spatial depth data, so that the detection output directly corresponds to the loose depth, defect area ratio and other indexes concerned by the production process, solving the problem of mismatch between traditional detection data and process indexes.
[0020] 3、The present application calculates the depth difference between the tobacco surface and the cigarette paper, and counts the area ratio of the area exceeding the process threshold, which can accurately identify the defects of uneven local filling distribution, effectively overcome the problem of local insensitivity of the overall detection method, and improve the reliability and applicability of the detection.
[0021] The present application realizes the technical path change from physical signal detection to three-dimensional space measurement, and the output result can be directly used for process quality evaluation and closed-loop control, providing solid data support for quality monitoring and optimization on the production line. BRIEF DESCRIPTION OF DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are only embodiments of the present application, and those skilled in the art can obtain other drawings according to the provided drawings without creative labor.
[0023] Figure 1 The structure diagram of the cigarette end face loose detection device is shown.
[0024] Figure 2 The first photographing position diagram is shown.
[0025] Figure 3 The second photographing position diagram is shown.
[0026] Figure 4 The binocular distance measuring principle diagram is shown.
[0027] The correspondence between the reference signs and the component names is as follows: 1 is a cigarette to be detected; 2 is a first camera; 3 is a second camera; 4 is a first LED lamp; 5 is a second LED lamp; 6 is a third LED lamp; 7 is a fourth LED lamp; 8 is a detection drum; and 9 is a sensor support. DETAILED DESCRIPTION
[0028] The technical solutions in the embodiments of the present application will be described clearly and completely below. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0029] As shown in Figure 1 , Figure 2 , Figure 3 , the cigarette end face loose detection device comprises a detection drum 8, a double-camera assembly, an illumination assembly, a sensor support 9 and a processing unit (not shown in the figure).
[0030] As shown in Figure 1 , the detection drum 8 is used to carry and position the cigarette to be detected 1 during the production line flow process. A plurality of drum groove positions are designed along the circumferential surface of the detection drum 8 (see Figure 2 , Figure 3 ), the drum groove positions are regularly distributed at equal intervals, the groove positions are concave surfaces and their shapes match the diameter of the cigarette to be detected 1, which are used to accurately position and fix each cigarette to be detected 1 during the rotation of the detection drum 8. One cigarette to be detected 1 is placed in one drum groove position, which ensures that the end face of the cigarette to be detected 1 always faces the double-camera assembly side and maintains a relatively stable position when the detection drum 8 rotates at high speed. The double-camera assembly comprises a first camera 2 and a second camera 3, which are installed along the circumferential direction of the detection drum 8 at an interval of two drum groove positions. When one cigarette to be detected 1 (the cigarette is carried in the drum groove position) rotates with the detection drum 8, it moves from the shooting position of the first camera 2 to the shooting position of the second camera 3, and the detection drum 8 rotates by an angle of two drum groove positions. The purpose of installing at an interval of two drum groove positions is: if the interval is less than two drum groove positions, the cigarette end face image is not near the camera center, which affects the effect of subsequent image processing; if the interval is greater than two drum groove positions, it will result in a too large structure size of the double-camera assembly, which is not conducive to installation. Exemplarily, the imaging planes of the first camera 2 and the second camera 3 are located in the same plane, and the optical axes are parallel; the distance between the centers of the two cameras is about 44.1 mm, and the object distance from the camera lens to the inner cigarette end surface of the drum groove is about 25 mm; since the two cameras are installed with a distance between two drum grooves, when the same cigarette to be detected 1 reaches the two shooting stations in turn, the center of the end surface of the cigarette will have a fixed lateral position offset relative to the camera coordinate system, and the asynchronous shooting system can be equivalent to a virtual standard binocular vision system with a fixed baseline length, and the equivalent baseline length is about 2.5 mm; this geometric model provides a basis for subsequent three-dimensional reconstruction based on stereo vision; the X-axis of the imaging plane of the first camera is perpendicular to the connection line between the drum groove shot by the first camera and the center of the drum, and the second camera is the same; when the first camera and the second camera shoot at the same position according to the phase signal of the drum encoder, the center of the drum groove shot by the first camera is 1.25 mm to the right of the X-axis center of the camera imaging plane, and the center of the drum groove shot by the second camera is 1.25 mm to the left of the X-axis center of the camera imaging plane, so the equivalent baseline length is 2.5 mm; The illumination assembly includes a first group of LED lamps and a second group of LED lamps, wherein the first group of LED lamps includes a first LED lamp 4 and a second LED lamp 5, and provides illumination for the first camera 2; the second group of LED lamps includes a third LED lamp 6 and a fourth LED lamp 7, and provides illumination for the second camera 3; The sensor support 9 is used to install a phase detection device (not shown separately in the figure, hereinafter referred to as a phase sensor), and the phase sensor is used to collect the accurate rotation angle of the detection drum 8 in real time, and the angle signal is defined as the drum phase; the drum phase is a pulse signal strictly synchronized with the rotation position of the drum, and the generation mode belongs to the prior art in the field, and can be flexibly selected according to the specific application scene; for example: In one embodiment, the detection drum is provided with 40 groove positions, and the phase signal is generated by a servo driving system synchronized therewith: for each rotation of the drum, 3200 A pulses (incremental signals) and 1 Z pulse (zero reference signal) are correspondingly output; In another embodiment, the detection drum is provided with 36 groove positions, and the phase signal is generated by an incremental encoder installed at the shaft end of the drum: for each rotation of the drum, 720 A pulses and 1 Z pulse are correspondingly output; The processing unit can continuously and accurately calculate the real-time rotation angle of the detection drum 8 by collecting the above pulse signals in real time; The processing unit is usually an industrial computer or an embedded system, and is electrically connected with the camera and the phase sensor, and is used to execute subsequent image processing and loose tobacco identification algorithms.
[0031] The detection method for the cigarette end surface loose tobacco provided by the application comprises the following steps: First step: first photographing position image acquisition Referring to Figure 2 When the cigarette to be detected 1 reaches the first designated slot while rotating with the detection drum 8, the system drives the first group of LED lamps (i.e., the first LED lamp 4 and the second LED lamp 5) to perform light compensation, and simultaneously takes a photograph of the end face of the cigarette through the first camera 2 to obtain a first image P1. Second step: second photographing position image acquisition Referring to Figure 3 When the same cigarette to be detected 1 continues to rotate with the detection drum 8 to reach the second designated slot, the system drives the second group of LED lamps (i.e., the third LED lamp 6 and the fourth LED lamp 7) to perform light compensation, and simultaneously takes a photograph of the end face of the same cigarette through the second camera 3 to obtain a second image P2. Third step: empty cigarette identification and calculation The first image P1 and the second image P2 are input into a processing unit as a virtual binocular image pair with a fixed equivalent baseline length for subsequent processing. Since the installation positions of the first camera and the second camera, the diameter of the detection drum, and the slot spacing are all fixed values, the system has a determined geometric relationship, and the equivalent baseline length is a fixed parameter (about 2.5 mm).
[0032] Based on a dense matching method, the virtual binocular image pair is processed through a stereo matching algorithm to obtain a disparity map, and then a depth map is obtained through a triangulation formula.
[0033] 1. Pixel matching and calculation of depth information of the end face of the cigarette The first image P1 and the second image P2 are processed as an image pair collected by a virtual standard binocular vision system. The left camera and the right camera of the virtual system are located on the same plane (with parallel optical axes) and have consistent focal lengths. The basic principle is binocular distance measurement, as shown in Figure 4 According to plane geometry and a triangulation formula, the following relationships exist: Wherein: : distance depth of a three-dimensional space point to a camera; : focal length of a camera; : baseline length of a line connecting the centers of two cameras; : horizontal coordinate of a three-dimensional space point at a projection point of a left camera; Three-dimensional space point Horizontal coordinate of the right camera projection point .
[0034] The equivalent baseline length and the camera focal length can be determined in advance by the method of binocular camera calibration, and the theory and method of calibration are as follows: Assume that the pixel coordinates of a point on the image are , and the three-dimensional coordinates of a point in space are , and the coordinate conversion relationship is as follows: The space point is projected onto the imaging plane by the camera and satisfies the following formula: wherein is the camera focal length; From the projection image to the pixel coordinates, the origin of the image coordinate system is at the image center, and the origin of the pixel coordinate system is at the upper left corner, so the origin offset needs to be done. In addition, the unit of the image coordinate system is generally millimeter, while the unit of the pixel coordinate system is pixel, so unit conversion needs to be done. The specific conversion relationship is as follows: wherein, and respectively represent the millimeter length of the unit pixel in the , direction, , respectively represent the origin coordinate offset in the , direction; From the world coordinates to the camera coordinates, the actual three-dimensional space point is located in the world coordinate system, so it needs to be converted to the camera coordinate system by rotation and translation transformation. The specific conversion relationship is as follows: wherein, is a 3x3 rotation matrix, is a 3x1 translation vector.
[0035] The Zhang calibration method is adopted to calibrate the camera to obtain the specific parameters of the above coordinate conversion matrix, and the process is as follows: Make a black and white checkerboard calibration plate; Move the camera to take 20 images of the calibration plate at different poses; Detect the corner points on all images; According to the corner point information, use the closed solution to solve all the internal and external parameters, calculate the accurate internal and external parameters by nonlinear optimization, and finally obtain the camera focal length parameters.
[0036] The virtual binocular image pair is processed by using a stereo matching algorithm. The goal of stereo matching is to find the corresponding relationship of each pixel point from two pictures of the same scene with different perspectives, so as to calculate the disparity of each pixel, and finally obtain a depth map. At present, the stereo matching algorithm is divided into the following four kinds: Local method, based on similarity measurement of local window, matching by comparing color texture information in corresponding windows of left and right images. Representative algorithms include AD-Census and BM.
[0037] Global method, stereo matching is constructed as an energy minimization problem, and an optimal disparity map is solved for the entire image. Representative algorithms include BP.
[0038] Semi-global method, a balance between the energy minimization framework of global matching and the efficiency of local matching, by dynamic programming along multiple one-dimensional paths, and aggregating the cost of all paths, approximate two-dimensional global optimization. Representative algorithms include SGM.
[0039] Deep learning based method, using an end-to-end convolutional neural network to directly predict the disparity map. Representative algorithms include PSMNet and GC-Net.
[0040] The stereo matching algorithm based on deep learning is used to process the virtual binocular image pair, and all pixel points of the first image P1 and the second image P2 are matched one by one, so as to obtain all three-dimensional space points of the cigarette end face The horizontal coordinate of the projection point of the binocular camera is And The algorithm principle is as follows: Feature extraction, based on CNN convolutional neural network, five layers of convolution-normalization-activation based inverted residual module encoder are constructed to extract different feature layers from shallow to deep; three layers of feature pyramid network decoder are constructed to up-sample and fuse different feature layers; and feature maps under different image scales are extracted.
[0041] Calculate the matching cost, for a pixel point of the left feature map, traverse the right feature map to find all pixel points in the disparity range, and calculate the matching cost value by dot product of the two pixel points of the left and right feature maps.
[0042] Cost aggregation, 3D cost aggregation method is adopted to optimize the initial matching cost value by using image space structure and context information.
[0043] Disparity calculation, the matching cost value is normalized to a probability value by soft argmax, and then the actual disparity is calculated by weighting the normalized probability, that is .
[0044] According to the depth calculation formula: Ultimately, depth information of the entire cigarette end face can be obtained.
[0045] 2. Extraction of cigarette tobacco and cigarette paper areas and calculation of cigarette paper depth benchmark value. The image captured by the camera includes the cigarette end face region and a meaningless background region. The cigarette end face includes the inner tobacco shred region and an outer ring of cigarette paper. A local thresholding segmentation method is used to process the RGB image captured by the first camera to extract the two-dimensional coordinates of all pixels within the cigarette paper region Pt. The threshold for each pixel in this segmentation method is the average gray value of the pixels in the surrounding 9×9 area minus the threshold parameter C. The parameter is manually set based on the actual segmentation effect displayed in the image. The RGB image captured by the first camera is converted into an HSV image, and the OTSU adaptive thresholding segmentation algorithm is used to process the HSV image to obtain the two-dimensional coordinates of all pixels within the tobacco shred region Rt.
[0046] Having already obtained the depth data (i.e., depth map) of each pixel in the image captured by the first camera, the depth values of all pixels within the cigarette paper region Pt can be obtained based on the two-dimensional coordinates of the pixels. This allows for the calculation of the average depth within the region, which serves as the baseline value Ds for the cigarette paper depth. In subsequent calculations, this baseline value is used as a reference point to calculate the depth difference between the tobacco surface and this baseline value.
[0047] 3. Calculation of loosening index Hollowness depth calculation: Based on the previously obtained image pixel depth data (i.e., depth map) and the extracted two-dimensional coordinates of all pixels within the tobacco shred region Rt, the depth information (i.e., Z coordinate value) corresponding to each point within the end face region Rt is extracted, and the difference between this value and the cigarette paper depth benchmark value Ds is calculated to obtain the hollowness depth of that point; Hollowness ratio calculation: The number of points within region Rt whose hollowness depth exceeds the national standard value T is counted, and the percentage of this number to the total number of points in region Rt is the hollowness ratio p. It can be understood that since the depth map can reflect the unevenness of each point on the end face, even if the hollowness region is unevenly distributed (such as only located on one side of the end face), this method can still accurately identify and calculate its area ratio, overcoming the limitations of traditional overall detection methods.
[0048] Through the process described in steps one through three above, this invention achieves automated detection of loose and hollow defects on the cigarette end face, from image acquisition to three-dimensional measurement and then to the output of process indicators, effectively improving the accuracy of detection and its alignment with actual production.
[0049] The various embodiments described in this specification are intended to be illustrative of the invention and do not limit the scope of the invention. Although specific embodiments have been described herein, they are not to be taken as the only embodiments of the invention. Various modifications can be made to the embodiments described and other embodiments can be used without departing from the spirit or scope of the invention. Accordingly, the scope of the invention is to be limited only by the claims.
Claims
1. A method for detecting looseness at the end face of cigarettes, characterized in that, Includes the following steps: The first image P1 and the second image P2 are obtained by asynchronously capturing the end face image of the same cigarette using the first camera (2) and the second camera (3); The first image P1 and the second image P2 are used as a pair of virtual binocular images with a fixed equivalent baseline length. The virtual binocular image pairs are processed by a stereo matching algorithm to obtain depth information of the cigarette end face; Based on the depth information, the hollow depth and hollow ratio are calculated.
2. The method for detecting looseness at the end face of a cigarette according to claim 1, characterized in that, The mounting positions of the first camera (2) and the second camera (3) are spaced apart by two drum slots.
3. The method for detecting looseness at the end face of a cigarette according to claim 2, characterized in that, The fixed equivalent baseline length is derived from the fixed geometric relationship determined by the installation positions of the first and second cameras, the diameter of the detection drum, and the slot spacing.
4. The method for detecting looseness at the end face of a cigarette according to claim 1, characterized in that, When the first camera (2) captures the first image P1, the first group of LED lights is driven to provide supplementary lighting; when the second camera (3) captures the second image P2, the second group of LED lights is driven to provide supplementary lighting.
5. The method for detecting looseness at the end face of a cigarette according to claim 4, characterized in that, The first group of LED lights includes a first LED light (4) and a second LED light (5), and the second group of LED lights includes a third LED light (6) and a fourth LED light (7).
6. A device for detecting looseness at the end face of cigarettes, characterized in that, include: The detection drum (8) is used to carry the cigarette (1) to be tested. A dual-camera assembly is installed at the detection drum (8) for asynchronously capturing images of the cigarette end face. The dual-camera assembly includes a first camera (2) and a second camera (3) set at intervals. The lighting assembly includes multiple LED lights for supplemental lighting during shooting; A processing unit for performing the method according to any one of claims 1 to 5.
7. The detection device for loose cigarette end faces according to claim 6, characterized in that, The first camera (2) and the second camera (3) are installed at intervals of two drum slots along the circumferential direction of the detection drum (8).
8. The detection device for loose cigarette end faces according to claim 6, characterized in that, The lighting assembly includes a first set of LEDs for supplementing light to the first camera (2) and a second set of LEDs for supplementing light to the second camera (3).
9. The detection device for loose cigarette end faces according to claim 8, characterized in that, The first group of LED lights includes a first LED light (4) and a second LED light (5), and the second group of LED lights includes a third LED light (6) and a fourth LED light (7).
10. The detection device for loose cigarette end faces according to claim 6, characterized in that, The processing unit is further configured to: extract the tobacco shred area on the cigarette end face based on the depth information, calculate the depth difference between the tobacco shred surface and the cigarette paper depth reference value in the area as the looseness depth, and count the proportion of areas whose looseness depth exceeds the process threshold as the looseness ratio.
Citation Information
Patent Citations
Three-dimensional reconstruction technique based method for detecting loose ends of cigarettes
CN105029691A
Depth estimation method and system for asynchronous binocular camera
CN113822925A
Cigarette loose end visual detection method based on structured light
CN117233165A
Cigarette loose end detection method based on deep learning technology
CN118469909A
Cigarette making machine online monitoring device based on visual imaging
CN214759083U