A method for detecting a plug in a cigarette inside a finished cigarette carton

By using CT tomography and image segmentation technology to perform non-destructive testing on the cigarettes inside finished cigarette cartons, the problem of traditional methods being unable to penetrate the packaging layer has been solved. This enables efficient and accurate identification and quantitative evaluation of cigarette stems and labels, thereby improving production efficiency and product quality.

CN122244232APending Publication Date: 2026-06-19ZHENGZHOU TOBACCO RES INST OF CNTC

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHENGZHOU TOBACCO RES INST OF CNTC
Filing Date
2026-04-01
Publication Date
2026-06-19

Smart Images

  • Figure CN122244232A_ABST
    Figure CN122244232A_ABST
Patent Text Reader

Abstract

This invention provides a method for detecting stems and twigs inside cigarettes in a finished cigarette carton, comprising: acquiring CT tomographic images of the cigarettes inside the finished cigarette carton and performing three-dimensional reconstruction; performing image segmentation processing on the three-dimensional reconstructed image to obtain a three-dimensional image of the tobacco filling section of a single cigarette; performing image segmentation of the stems and twigs in the three-dimensional image of the tobacco filling section of a single cigarette based on a density threshold, and performing statistical analysis on the number of stems to obtain the stem content of a single cigarette; and calculating the total stem content and standard deviation of the stem content in the cigarettes inside the finished cigarette carton based on the stem content of all single cigarettes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cigarette product testing technology, and more specifically, to a method for detecting the stem tags of cigarettes inside a finished cigarette carton. Background Technology

[0002] The uniformity of tobacco blending refers to the even distribution of tobacco shreds within a cigarette carton. Specifically, it means ensuring that the tobacco shreds are evenly distributed throughout the cigarette, avoiding areas with too much or too little tobacco, and guaranteeing a consistent smoking experience. A uniform tobacco blend ensures a consistent amount of tobacco inhaled with each puff and a consistent smoking experience. Uneven distribution may result in an overly strong or weak flavor, negatively impacting the consumer experience. A uniformly blended tobacco blend also leads to more stable combustion, preventing localized overheating or incomplete combustion, ensuring smooth burning and reducing the release of harmful substances in the smoke. Furthermore, a uniform tobacco blend reduces waste in production, increases efficiency, and decreases the scrap rate caused by uneven blending.

[0003] Currently, the main methods for detecting the uniformity of tobacco blending in finished cigarette cartons are as follows: 1) Gravimetric method: This method assesses uniformity by weighing the tobacco from different parts of the cigarette. While simple, it only reflects the overall distribution trend and cannot detect minute inconsistencies. 2) Laser particle size analyzer method: This method scans the tobacco in the cigarette using a laser particle size analyzer to obtain a particle size distribution map, thereby analyzing its uniformity. However, tobacco is not uniformly sized, and particle size alone cannot distinguish between different types of tobacco. This method only detects the uniformity of the tobacco's external dimensions and cannot detect the uniformity of blending within the cigarette. Many current detection methods cannot achieve real-time monitoring during production, thus failing to detect uneven blending in a timely manner, leading to substandard products. For detection methods with small sample sizes (such as manual weighing), the uniformity of the entire batch may not be representative, requiring large-scale sample collection and analysis, increasing the difficulty and uncertainty of the detection.

[0004] Chinese patent (CN118348003A) discloses a device for detecting the uniformity of tobacco blending. This patent involves placing the mixed tobacco into a distribution box, spreading it out inside, and then using a lifting assembly to move a support plate downwards. The lower end of the support plate falls onto a conveyor belt, where it is transported to the bottom of a camera under friction. The camera captures tobacco image data on the surface of the distribution box. By utilizing the characteristic pixel that different tobacco fibers have different colors, the color difference is converted into a grayscale value difference, enabling accurate and objective detection of the tobacco blending uniformity.

[0005] Chinese patent (CN118746555A) discloses a method for detecting the uniformity of tobacco blending. This patent acquires the spectral image of a tobacco sample and inputs it into a trained image generator to produce a reconstructed image. Then, the original and reconstructed images are input into the encoder of a deep learning model to extract sample feature maps, and a discriminator is used to obtain the tobacco blending uniformity detection result. A loss function is calculated based on the detection result, and this loss function is used to train the model.

[0006] However, the above-mentioned method targets the mixed tobacco shreds not yet filled into the cigarette sticks. This is achieved by spreading the tobacco evenly on a conveyor belt, photographing it, and then processing the image to calculate the uniformity of the tobacco blend. To detect the uniformity of tobacco shreds within packaged cigarette sticks, the cigarette sticks need to be broken, the tobacco shreds extracted, and spread evenly. Furthermore, the above method uses visible light and spectral imaging, which has fundamental limitations when applied to finished cigarette cartons: visible light cannot penetrate multiple layers of packaging material and can only detect surface defects; while spectral imaging has some penetration, it is limited by wavelength selectivity, insufficient penetration depth, and the inability to provide three-dimensional structural information. Neither method can effectively detect the tobacco stem tags inside the packaging.

[0007] In order to solve the above problems, people have been seeking an ideal technological solution. Summary of the Invention

[0008] Based on this, it is necessary to provide a method for detecting the stems and tags inside the cigarettes in a finished cigarette carton, which addresses the aforementioned technical problems. By performing CT tomography scans on the cigarettes inside the finished cigarette carton, multi-dimensional image data is obtained and quantitatively analyzed, thus achieving non-destructive detection of the stems and tags inside the cigarettes.

[0009] To achieve the above objectives, the first aspect of the present invention provides a method for detecting the stem tags of cigarettes inside a finished cigarette carton, comprising:

[0010] Obtain CT tomographic images of the cigarettes inside the finished cigarette carton and perform three-dimensional reconstruction;

[0011] Image segmentation processing is performed on the 3D reconstructed image to obtain a 3D image of the tobacco filling segment of a single cigarette;

[0012] Based on the density threshold, the stems and tobacco in the three-dimensional image of the tobacco filling section of a single cigarette are segmented, and the number of stems is counted by cluster analysis to obtain the stem content of a single cigarette.

[0013] The total amount of stems in the cigarettes inside the finished cigarette carton and the standard deviation of the amount of stems were calculated based on the stem content of all individual cigarettes.

[0014] This technical solution employs CT scanning technology, utilizing the strong penetrating power of X-rays to non-destructively penetrate all packaging layers of the cigarette carton, obtaining the complete three-dimensional density distribution of the internal cigarettes. Based on the density difference between the tobacco stems and shredded tobacco, combined with cluster analysis, it achieves accurate identification, three-dimensional positioning, and quantitative evaluation of the stem tags, fundamentally solving the problem of non-destructive testing of internal defects.

[0015] To achieve the above objectives, a second aspect of the present invention provides a device for detecting the stem tags of cigarettes inside a finished cigarette carton, comprising:

[0016] The acquisition module is configured to capture CT tomographic images of cigarettes inside the finished cigarette carton and perform 3D reconstruction.

[0017] The image segmentation module is configured to perform image segmentation processing on the 3D reconstructed image to obtain a 3D image of the tobacco filling segment of a single cigarette.

[0018] The stem identification module is configured to perform image segmentation of stems and tobacco in the 3D image of the tobacco filling section of a single cigarette based on a density threshold, and to perform statistical analysis on the number of stems to obtain the stem content of a single cigarette. Based on the stem content of all single cigarettes, the module calculates the total stem content and standard deviation of the stem content in the cigarettes inside the finished cigarette carton.

[0019] This technical solution employs CT scanning technology, utilizing the strong penetrating power of X-rays to non-destructively penetrate all packaging layers of the cigarette carton, obtaining the complete three-dimensional density distribution of the internal cigarettes. Based on the density difference between the tobacco stems and shredded tobacco, combined with cluster analysis, it achieves accurate identification, three-dimensional positioning, and quantitative evaluation of the stem tags, fundamentally solving the problem of non-destructive testing of internal defects.

[0020] To achieve the above objectives, a third aspect of the present invention provides a computer device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus.

[0021] Memory, used to store computer programs;

[0022] The processor, when executing a program stored in memory, implements the method for detecting the stem tags of cigarettes inside the finished cigarette carton as described in the first aspect.

[0023] To achieve the above objectives, a fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method for detecting the stem tags of cigarettes inside a finished cigarette carton as described in the first aspect.

[0024] To achieve the above objectives, the fifth aspect of the present invention provides a computer program product, including a computer program that, when executed by a processor, implements the method steps for detecting the stem tags of cigarettes inside a finished cigarette carton as described in the first aspect.

[0025] The beneficial effects of this invention are as follows:

[0026] This invention utilizes CT tomography to obtain three-dimensional image data of the cigarettes inside the finished cigarette carton. Based on the density difference between the stems and shredded tobacco, cluster analysis is used to accurately identify, three-dimensionally locate, and quantitatively evaluate the stems. This method does not require damaging the cigarette pack or cigarettes, preserving the sample intact and avoiding damage caused by destructive testing. It also reduces manual intervention, improves production efficiency, enables real-time monitoring of stem content, ensures consistent product quality, reduces the incidence of defective products, and optimizes the production process, thereby lowering costs and improving both product quality and production efficiency. Attached Figure Description

[0027] Figure 1 This is a flowchart illustrating the stem tag detection method of the present invention;

[0028] Figure 2 This is a schematic diagram of CT scan operation.

[0029] Figure 3 This is a schematic diagram of a CT scan.

[0030] Figure 4 A cross-sectional image of a cigarette pack;

[0031] Figure 5 This is a 3D reconstruction model of a cigarette carton.

[0032] In the figure, 1. X-ray source; 2. Platform; 3. Sample base; 4. Sample holder; 5. Flat panel detector; 6. Virtual detector. Detailed Implementation

[0033] To address the aforementioned issues, this invention proposes a method for identifying the stem tags inside cigarette cartons. CT technology is used to non-destructively scan the inside of the cigarette cartons, avoiding the disassembly process required in traditional detection methods, thus preserving the integrity of the cigarettes and providing high-precision three-dimensional images. By utilizing the different grayscale values ​​of tobacco and stem tags in the three-dimensional images, the method distinguishes between stem tags and tobacco based on these grayscale differences, significantly improving detection accuracy.

[0034] Furthermore, CT scans can perform a comprehensive inspection of cigarette cartons or entire cartons of cigarettes in one go, significantly improving inspection efficiency and adapting to the needs of large-scale production. This enables real-time monitoring of stem content, ensuring product quality consistency and reducing the occurrence of defective products.

[0035] Furthermore, precise stem and tag analysis can optimize production processes, improve the utilization rate of tobacco raw materials, and reduce waste and costs.

[0036] The technical solution of the present invention will be further described in detail below through specific embodiments.

[0037] Example 1

[0038] This embodiment provides a method for detecting the stem tags of cigarettes inside a finished cigarette carton, such as... Figure 1 As shown, it includes the following steps:

[0039] S1. Obtain CT tomographic images of the cigarettes inside the finished cigarette carton and perform three-dimensional reconstruction.

[0040] Specifically, CT tomographic images are acquired by CT equipment, and the detection structures of the CT equipment are as follows: Figure 2 As shown, the specific detection process includes:

[0041] S11, use the sample holder 4 to fix the finished cigarette carton, and adjust the position of the finished cigarette carton to ensure that the finished cigarette carton is perpendicular to the sample base 3.

[0042] S12, turn on the CT equipment, place the sample holder 4 into the slot of the platform 2 inside the CT equipment, and ensure that the sample holder 4 is fixed on the platform 2 to prevent the sample from falling off when the platform 2 rotates.

[0043] S13, set X-ray source tube voltage 150kV, X-ray source tube current 90μA, scanning thickness 0.004mm, scanning interval 0.004mm, CT scanning mode cone beam scanning, CT scanning mode Normal scanning.

[0044] The worktable moves the carrier platform 2 so that the finished cigarette carton is located in the center of the X-ray scanning range; by controlling the rotation of the carrier platform 2, it is ensured that the finished cigarette carton is in the X-ray scanning position within a 360° range.

[0045] S14, remove the sample holder 4 and perform air calibration on the CT equipment. Then, place the central axis calibration rod on the platform 2 and perform central axis calibration.

[0046] S15, place the sample holder 4 onto the platform 2, and start the CT scan to scan the cigarettes inside the finished cigarette carton. The digital signal received by the flat panel detector 5 is transmitted to the computer for storage.

[0047] Specifically, the schematic diagram of a CT scan is as follows: Figure 3 As shown.

[0048] It is understandable that during the scanning process, an image is taken for every certain angle of rotation, resulting in a total of several images of the cigarette sample.

[0049] S16, preprocess the acquired CT tomographic images.

[0050] The two-dimensional projection data acquired at each angle during the aforementioned CT scan are weighted to correct the cone-beam distortion. The formula is as follows:

[0051]

[0052] In the formula, P W (β,a,b) is the weighted two-dimensional projection data; P(β,a,b) is the collected two-dimensional projection data. β is the weighting factor; β is the angle of X-ray emission; a, b are the horizontal and vertical coordinates of the pixel to be reconstructed mapped onto the virtual detector 6.

[0053] S17. The corrected and weighted projection data is then subjected to one-dimensional filtering along the projection of the flat panel detector 5, which is perpendicular to the CT equipment. The formula is as follows:

[0054]

[0055] In the formula, is the filtered data; H(a) is the convolution kernel.

[0056] S18, Reconstruct the image by backprojecting the above data.

[0057] One-dimensional filtered projection data along the X-ray direction The back projection calculation is performed using the following formula:

[0058]

[0059] In the formula, R is the distance from the ray source to the rotation center; U is similar to the weighting factor in the two-dimensional equidistant fan beam projection reconstruction algorithm, and its calculation method is: U(x,y,β)=R+xcosβ+ysinβ.

[0060] In the aforementioned back-projection reconstructed image, due to the large spacing along the Z-axis during sampling, interpolation calculations are required along the Z-axis. Bilinear interpolation is used here, and the specific process is as follows:

[0061] Select the four pixels closest to the pixel P(x,y) to be interpolated, and denote them as Q. 11 (x1,y1),Q 12 (x1,y2),Q 21 (x2,y1),Q 22(x2, y2). First, interpolation is performed in the x-direction, with the following formula:

[0062]

[0063] Next, interpolation is performed in the y-direction, using the following formula:

[0064]

[0065] Thus, the final pixel value of the pixel P to be interpolated is obtained.

[0066] Through the above steps, a three-dimensional reconstruction model of the cigarettes inside the finished cigarette carton can now be constructed, such as... Figure 4 As shown and Figure 5 As shown.

[0067] S2. Perform image segmentation processing on the 3D reconstructed image to obtain a 3D image of the tobacco filling segment of a single cigarette.

[0068] Specifically, it includes:

[0069] S21. Considering the density difference between the outer packaging and the inner cigarettes of the cigarette carton, the grayscale values ​​of the scanned 3D pixel point cloud image also show significant differences. Therefore, a first grayscale threshold is set, and the grayscale value of each 3D pixel is compared with the first grayscale threshold. Based on the comparison result, the outer packaging and the inner cigarettes are separated, and the cigarette area is extracted as a new region of interest.

[0070] S22, further processing is performed on the cigarette region extracted in S21. Since the cigarettes are located in different positions within the packaging, the spatial distribution of the cigarettes is analyzed, and each cigarette is segmented and processed as an independent detection object using existing image recognition methods such as template matching and convolutional neural network segmentation.

[0071] S23. Since there is a large density difference between the filter part and the tobacco part in the cigarette, a second grayscale threshold is set. The grayscale value of each three-dimensional pixel in the three-dimensional image of a single cigarette is compared with the second grayscale threshold. Based on the comparison result, the filter part and the tobacco part in the cigarette are segmented to obtain a three-dimensional image of the tobacco part of a single cigarette.

[0072] S24. For the three-dimensional image of the tobacco shreds extracted and processed in the above steps, a third grayscale threshold is set based on the grayscale difference between the outer cigarette paper and the inner tobacco shred particles. Based on the third grayscale threshold, image segmentation processing is performed on the three-dimensional image of the tobacco shreds of a single cigarette, and the tobacco shred filling part is extracted as a new region of interest.

[0073] S3. Calculate the uniformity of tobacco blending within a single cigarette.

[0074] Image segmentation of stems and tobacco shreds in the 3D image of a single cigarette's tobacco filling section is performed based on a density threshold. Cluster analysis is then used to count the number of stems in the tobacco portion, thus obtaining the stem content of a single cigarette. Specifically, this includes:

[0075] S31. Due to the density difference between the stem and the tobacco, the flat panel detector will collect X-rays of different intensities during CT scanning, which will ultimately be reflected in the three-dimensional image, showing that the tobacco and the stem have different densities.

[0076] S32, calculate the local density of each pixel, the formula is as follows:

[0077]

[0078] In the formula, ρ(x) is the density estimate of pixel x; x i K(x,x) are the neighboring pixels of pixel x. i ) is the kernel function.

[0079] S33, set a certain density threshold ρ, compare the local density of each pixel with the preset density threshold ρ, and divide the three-dimensional image of the tobacco filling section into a high-density stem area and a low-density tobacco area according to the comparison result.

[0080] S34 uses the spatial coordinates (x, y, z) and density features of each pixel in the 3D image of the tobacco filling segment as input features. A feature vector is constructed for each pixel: v i =(x i ,y i ,z i ,d).

[0081] S35, experiment with different K values ​​to select a reasonable number of clusters, minimizing the sum of squared distances from each pixel to its cluster center. The formula is:

[0082]

[0083] In the formula, C k For the k-th cluster; v i c is the feature vector of the i-th pixel; k It is the cluster center of the cluster.

[0084] By continuously updating the cluster centers and minimizing the above formula, the optimal clustering result can be obtained.

[0085] S36. Through cluster analysis, each pixel is assigned to a cluster, with the center of the cluster representing the location of the typical pixel in that cluster. Each cluster contains a group of pixels with similar density and close proximity. The final number of clusters represents the number of stems in the cigarette, denoted as g. i , where represents the number of stems contained in the i-th cigarette.

[0086] S4. Calculate the total amount of stems in the cigarettes inside the finished cigarette carton and the standard deviation of the amount of stems, based on the stem content of all individual cigarettes.

[0087] Specifically, it includes:

[0088] S41, Perform operations S4~S6 on n cigarettes (all cigarettes) inside the finished cigarette carton to obtain the stem content of each cigarette.

[0089] S42. Calculate the standard deviation of the stem content in the cigarettes inside the finished cigarette carton. Specifically:

[0090] The formula for calculating the total stem content of cigarettes inside a finished cigarette carton is as follows:

[0091]

[0092] The formula for calculating the average stem content of cigarettes inside a finished cigarette carton is as follows:

[0093]

[0094] The standard deviation of the stem content per cigarette in the finished cigarette carton is calculated using the following formula:

[0095]

[0096] The obtained G is the total amount of stems contained in the cigarettes inside the finished cigarette carton; σ can characterize the quality stability of the cigarettes inside the finished cigarette carton.

[0097] This invention employs CT scanning technology, utilizing the strong penetrating power of X-rays to non-destructively penetrate all packaging layers of the cigarette carton, obtaining the complete three-dimensional density distribution of the internal cigarettes. Based on the density difference between the tobacco stems and shredded tobacco, combined with cluster analysis, it achieves accurate identification, three-dimensional positioning, and quantitative evaluation of the stem tags, fundamentally solving the problem of non-destructive testing of internal defects. Compared to traditional measurement techniques, this method, through non-destructive testing, preserves the integrity of the sample without damage.

[0098] Furthermore, by testing the cigarettes inside the finished cigarette carton and statistically analyzing the differences in the amount of stems between cigarettes, this invention can, to a certain extent, characterize the quality stability of the cigarettes inside the finished cigarette carton.

[0099] It should be understood that although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indications of the arrows, these steps do not necessarily need to be executed in the order indicated by the arrows. Unless there is a clear description in this article, there is no strict order limit for the execution of these steps, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages. These steps or stages do not necessarily need to be executed and completed at the same moment, but can be executed at different moments. The execution order of these steps or stages does not necessarily need to be sequential, but can be executed alternately or in turns with at least a part of other steps or steps or stages in other steps.

[0100] Embodiment 2

[0101] Based on the same inventive concept, an embodiment of the present application further provides a device for detecting the stem tags of the cigarettes inside a finished cigarette strip box, which is used to implement the method for detecting the stem tags of the cigarettes inside the finished cigarette strip box involved above. The implementation solutions provided by this device to solve problems are similar to those recorded in the above method. Therefore, the specific limitations in one or more embodiments of the device for detecting the stem tags of the cigarettes inside the finished cigarette strip box provided below can refer to the limitations on the method for detecting the stem tags of the cigarettes inside the finished cigarette strip box in the above text, and will not be elaborated here.

[0102] The device for detecting the stem tags of the cigarettes inside the finished cigarette strip box includes:

[0103] An acquisition module, configured to obtain the CT tomographic images of the cigarettes inside the finished cigarette strip box and perform three-dimensional reconstruction;

[0104] An image segmentation module, configured to perform image segmentation processing on the three-dimensional reconstructed image to obtain the three-dimensional image of the tobacco filling section of a single cigarette; [[ID=I7]]

[0105] A stem tag recognition module, configured to perform image segmentation on the stem tags and tobacco in the three-dimensional image of the tobacco filling section of a single cigarette based on a density threshold, and perform quantitative statistics on the stem part through clustering analysis to obtain the stem tag content of a single cigarette; calculate the total stem tag content and the standard deviation of the stem tag content in the cigarettes inside the finished cigarette strip box based on the stem tag content of all single cigarettes.

[0106] Among them, the calculation formula for the total stem tag content is:

[0107] The calculation formula for the standard deviation of the stem tag content is , , g i is the number of stem tags contained in the i-th cigarette.

[0108] Embodiment 3

[0109] This embodiment provides a computer device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0110] Memory, used to store computer programs;

[0111] The processor, when executing a program stored in the memory, implements the method for detecting the stem tags of cigarettes inside the finished cigarette carton as described in Example 1.

[0112] Example 4

[0113] Based on the above embodiments, this embodiment provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method for detecting the stem tags of cigarettes inside the finished cigarette carton as described in Embodiment 1.

[0114] Example 5

[0115] Based on the above embodiments, this embodiment provides a computer program product, including a computer program that, when executed by a processor, implements the method for detecting the stem tags of cigarettes inside the finished cigarette carton as described in Embodiment 1.

[0116] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them; although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications can still be made to the specific implementation of the present invention or equivalent substitutions can be made to some technical features without departing from the spirit of the technical solutions of the present invention, and all such modifications and substitutions should be covered within the scope of the technical solutions claimed in the present invention.

Claims

1. A method for detecting the stem tags of cigarettes inside a finished cigarette carton, characterized in that, include: Obtain CT tomographic images of the cigarettes inside the finished cigarette carton and perform three-dimensional reconstruction; Image segmentation processing is performed on the 3D reconstructed image to obtain a 3D image of the tobacco filling segment of a single cigarette; Based on the density threshold, the stems and tobacco in the three-dimensional image of the tobacco filling section of a single cigarette are segmented, and the number of stems is counted by cluster analysis to obtain the stem content of a single cigarette. The total amount of stems in the cigarettes inside the finished cigarette carton and the standard deviation of the amount of stems were calculated based on the stem content of all individual cigarettes.

2. The method for detecting the stem tags of cigarettes inside a finished cigarette carton according to claim 1, characterized in that, The three-dimensional reconstructed image is subjected to image segmentation processing to obtain a three-dimensional image of the tobacco filling segment of a single cigarette, including: The three-dimensional reconstructed image is segmented based on a first grayscale threshold to obtain a three-dimensional image of a single cigarette. Based on the second grayscale threshold, the three-dimensional image of a single cigarette is segmented to obtain a three-dimensional image of the tobacco part of the single cigarette. Based on the third grayscale threshold, the three-dimensional image of the tobacco part of a single cigarette is segmented to obtain the three-dimensional image of the tobacco filling section of each cigarette sample.

3. A method for detecting the stem tags of cigarettes inside a finished cigarette carton according to claim 1 or 2, characterized in that, Image segmentation of the stems and tobacco shreds in the 3D image of the tobacco filling segment of a single cigarette, including: Calculate the local density of each pixel in the 3D image of the tobacco filling segment of a single cigarette: In the formula, ρ(x) is the density estimate of pixel x; x i K(x,x) are the neighboring pixels of pixel x. i ) is the kernel function; The local density of each pixel is compared with a preset density threshold, and the 3D image of the tobacco filling segment is divided into a high-density stem area and a low-density tobacco area based on the comparison result.

4. The method for detecting the stem tags of cigarettes inside a finished cigarette carton according to claim 3, characterized in that, Obtaining CT tomographic images of the cigarettes inside the finished cigarette carton includes: Use a sample holder to fix the finished cigarette carton, and adjust the position of the finished cigarette carton to ensure that the finished cigarette carton is perpendicular to the sample base; Turn on the CT equipment and place the sample holder into the mounting platform slot inside the CT equipment, ensuring that the sample holder is fixed on the mounting platform; The X-ray source tube voltage is set to 150 kV, the X-ray source tube current to 90 μA, the scanning thickness to 0.004 mm, the scanning interval to 0.004 mm, the CT scanning mode to cone-beam scanning, and the CT scanning mode to Normal scanning. The worktable is moved to center the cigarette carton within the X-ray scanning range; the rotation of the worktable is controlled to ensure that the cigarette carton is within the X-ray scanning position within a 360° range. Remove the sample holder, perform air calibration on the CT equipment, and place the central axis calibration rod on the platform to perform central axis calibration. Place the sample holder on the platform and start the CT scan to scan the cigarettes inside the finished cigarette carton. Collect two-dimensional projection data at different angles according to the rotation interval.

5. The method for detecting the stem tags of cigarettes inside a finished cigarette carton according to claim 4, characterized in that, The steps involved in 3D reconstruction include: The two-dimensional projection data collected at each angle are weighted. The weighted projection data is filtered in one dimension along the projection of the flat panel detector perpendicular to the CT equipment. Back-projection calculations are performed on the one-dimensional filtered projection data along the X-ray direction to obtain a three-dimensional reconstruction model of the cigarettes inside the finished cigarette carton.

6. The method for detecting the stem tags of cigarettes inside a finished cigarette carton according to claim 5, characterized in that, In the back projection calculation process, bilinear interpolation is used to perform interpolation calculations in the Z-axis direction.

7. A device for detecting the stem tags of cigarettes inside a finished cigarette carton, characterized in that, include: The acquisition module is configured to capture CT tomographic images of cigarettes inside the finished cigarette carton and perform 3D reconstruction. The image segmentation module is configured to perform image segmentation processing on the 3D reconstructed image to obtain a 3D image of the tobacco filling segment of a single cigarette. The stem identification module is configured to perform image segmentation of stems and tobacco in the 3D image of the tobacco filling section of a single cigarette based on a density threshold, and to perform statistical analysis on the number of stems to obtain the stem content of a single cigarette. Based on the stem content of all single cigarettes, the module calculates the total stem content and standard deviation of the stem content in the cigarettes inside the finished cigarette carton.

8. A computer device, characterized in that: It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; The processor, when executing a program stored in memory, implements the method for detecting the stem tags of cigarettes inside the finished cigarette carton as described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method for detecting the stem tags of cigarettes inside the finished cigarette carton as described in any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the method for detecting the stem labels of cigarettes inside the finished cigarette carton as described in any one of claims 1 to 6.