A method for detecting the porosity of cigarettes inside a finished cigarette carton

By using CT tomography and image segmentation technology, the problems of low efficiency and destructiveness in existing cigarette porosity detection have been solved, achieving non-destructive and rapid porosity detection, improving detection accuracy and efficiency, and making it suitable for quality control of finished cigarette cartons.

CN122289459APending Publication Date: 2026-06-26ZHENGZHOU 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-26

Smart Images

  • Figure CN122289459A_ABST
    Figure CN122289459A_ABST
Patent Text Reader

Abstract

This invention provides a method for detecting the porosity of cigarettes inside a finished cigarette carton, comprising: acquiring CT tomographic images of cigarettes inside the finished cigarette carton and performing three-dimensional reconstruction; performing image segmentation processing on the three-dimensional reconstructed image to obtain an image of the tobacco particle portion of a single cigarette; extracting multiple cross-sections from the tobacco particle portion image along the main axis of the tobacco filling section, and statistically analyzing the total number of pixels and the number of pixels occupied by non-tobacco parts in each cross-section based on grayscale value differences, calculating the porosity of a certain cross-section of a single cigarette based on the total number of pixels and the number of pixels occupied by non-tobacco parts; calculating the porosity of a single cigarette based on the porosity of multiple cross-sections of a single cigarette; and calculating the average porosity and standard deviation of the porosity of the cigarettes inside the finished cigarette carton based on the porosity of the single cigarette.
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 porosity of cigarettes inside a finished cigarette carton. Background Technology

[0002] In the tobacco industry, cigarette quality control is a key factor in ensuring product consistency and consumer satisfaction. Cigarette porosity is an important parameter affecting its combustion characteristics, smoke composition, and sensory experience. Porosity not only affects the cigarette's air permeability but also directly relates to the burning rate, smoke temperature, and the release of harmful substances. Therefore, accurately measuring cigarette porosity is crucial for optimizing cigarette design and improving product quality.

[0003] Currently, methods for detecting the porosity of cigarettes are mainly divided into two categories: single-cigarette testing and whole-carton (pack) testing. Single-cigarette testing methods typically employ techniques such as gas permeation, optical imaging, or X-ray tomography. These methods can provide high-precision porosity data, but their testing efficiency is low, making it difficult to meet the needs of large-scale production. Furthermore, single-cigarette testing methods cannot comprehensively reflect the porosity distribution of the entire carton (pack), potentially leading to deviations in quality control.

[0004] There are relatively few methods for testing the porosity of whole cartons (packs) of cigarettes, and existing methods often suffer from low accuracy, complex operation, and high equipment costs. For example, some methods rely on sampling inspection and cannot achieve full inspection; others require destructive testing of the cigarettes, affecting the integrity of the product. Therefore, developing an efficient, accurate, and non-destructive method for testing the porosity of whole cartons (packs) of cigarettes has become a pressing technical challenge for the tobacco industry.

[0005] Chinese patent (CN116593373A) discloses a method and system for detecting the porosity and pore distribution of cigarettes. The method involves balancing a cigarette sample under relative humidity W and temperature T; segmenting the balanced cigarette sample according to a preset method; performing nuclear magnetic resonance (NMR) scanning to obtain NMR images; determining a segmentation threshold based on the grayscale image of the NMR image; and performing binarization processing on the image to separate the foreground and background, resulting in a binary image that distinguishes air pores from the moist cigarette tobacco; obtaining the pore distribution of the cigarette from the binary image and calculating the cigarette porosity. This method enables the analysis and evaluation of the cigarette porosity distribution, improving the accuracy of porosity measurement.

[0006] Chinese patent (CN113702258A) discloses a method for detecting the axial porosity distribution of cigarettes. This patent involves performing tomographic scanning on a cigarette sample and reconstructing a three-dimensional model. It then calculates the porosity segment by segment and determines the number of segments N that stabilizes the porosity variance. Using N as a standard, it calculates the variance and variation of the porosity distribution along the axial direction of the cigarette sample, allowing for analysis and evaluation of the axial porosity distribution. However, this patent also only detects a single cigarette, resulting in low detection efficiency; furthermore, the detection index of this patent is the variance and variation of the porosity distribution along the axial direction of the cigarette sample.

[0007] It can be seen that most existing methods for detecting cigarette porosity are still limited to the analysis of single, disassembled cigarettes in a laboratory setting. While these methods can reveal the fine internal structure of cigarettes in principle, they have fundamental limitations when applied to industrial production and quality control.

[0008] Specifically, existing technologies typically require the complete removal of cigarettes from their cartons or individual packs, and may even necessitate destructive pretreatment such as cutting or disassembling them to facilitate measurement by equipment like MRI and microfocus X-rays. This method is inherently offline and destructive; the detection process is time-consuming, cannot be performed in batches, and is incapable of non-destructive, online inspection of entire packs or cartons of cigarettes still in sealed packaging. This makes it difficult to meet the rigid requirement of production lines to conduct 100% rapid and non-destructive quality screening of all finished products.

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

[0010] Therefore, it is necessary to provide a method for detecting the porosity of cigarettes inside the finished cigarette carton in order to address the above-mentioned technical problems. This method achieves accurate detection of the porosity of cigarettes inside the finished cigarette carton by performing CT tomography on the cigarettes inside the finished cigarette carton, acquiring multi-dimensional image data and performing quantitative analysis.

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

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

[0013] Image segmentation processing is performed on the 3D reconstructed image to obtain an image of the tobacco particles in a single cigarette.

[0014] Multiple cross sections are extracted from the tobacco particle image along the main axis of the tobacco filling section. Based on the difference in gray values, the total number of pixels in each cross section and the number of pixels occupied by the non-tobacco part are counted. The porosity of a certain cross section of a single cigarette is calculated based on the total number of pixels and the number of pixels occupied by the non-tobacco part.

[0015] The porosity of a single cigarette is calculated based on the porosity of multiple cross-sections of a single cigarette.

[0016] The average porosity and standard deviation of the porosity of the cigarettes inside the finished cigarette carton were calculated based on the porosity of a single cigarette.

[0017] 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 and obtain the complete three-dimensional density distribution of the internal cigarettes. By segmenting the reconstructed three-dimensional image, an image of the tobacco particles in a single cigarette is obtained. Then, based on the differences in grayscale values, the total number of pixels in the tobacco particle image and the number of pixels in the non-tobacco portion are statistically analyzed to obtain the porosity of a single cigarette, as well as the average porosity and standard deviation of all cigarettes within the finished cigarette carton. This fundamentally solves the problem of non-destructive testing of porosity and meets the rigid requirement of production lines to perform 100% rapid and non-destructive quality screening of all finished products.

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

[0019] The acquisition module is configured to acquire CT tomographic images of the cigarettes inside the finished cigarette carton and perform three-dimensional reconstruction.

[0020] The image segmentation module is configured to perform image segmentation processing on the 3D reconstructed image to obtain an image of the tobacco particles of a single cigarette.

[0021] The cigarette porosity calculation module is configured to extract multiple cross-sections from the tobacco particle image along the main axis of the tobacco filling section, and based on the grayscale value differences, count the total number of pixels and the number of pixels occupied by non-tobacco parts in each cross-section. Based on the total number of pixels and the number of pixels occupied by non-tobacco parts, the module calculates the porosity of a certain cross-section of a single cigarette; calculates the porosity of a single cigarette based on the porosity of multiple cross-sections of a single cigarette; and calculates the average porosity and standard deviation of the porosity of the cigarettes in the finished cigarette carton based on the porosity of a single cigarette.

[0022] 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.

[0023] Memory, used to store computer programs;

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

[0025] 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 a method for detecting the porosity of cigarettes inside a finished cigarette carton as described in the first aspect.

[0026] 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 a method for detecting the porosity of cigarettes inside a finished cigarette carton as described in the first aspect.

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

[0028] This invention utilizes tomographic scanning of the cigarettes inside a finished cigarette carton to acquire three-dimensional image data, and then calculates the porosity of individual cigarettes and performs statistical analysis of the porosity of the cigarettes inside the finished cigarette carton. Compared to traditional measurement techniques, this method employs non-destructive testing, preserving the integrity of the sample without damage. Furthermore, this method reduces human intervention, improving the accuracy and reliability of individual cigarette porosity detection, and providing a novel technical means for the quality control of cigarette products. Attached Figure Description

[0029] Figure 1 This is a schematic flowchart of the porosity detection method described in this invention;

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

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

[0032] Figure 4 Image of the cross-section of the cigarettes inside the finished cigarette carton;

[0033] Figure 5 This is a 3D reconstruction model of the cigarettes inside the finished cigarette carton.

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

[0035] To address the aforementioned issues, this invention proposes a method for detecting the porosity of cigarettes inside a finished cigarette carton. This method involves performing tomographic scanning on the cigarettes inside the finished cigarette carton to acquire multi-dimensional image data and conduct quantitative analysis, thereby achieving accurate detection of the porosity in the cigarettes within the finished cigarette carton.

[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 porosity 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, the detection structure of the CT equipment is 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 platform slot 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 the X-ray source tube voltage to 150kV, X-ray source tube current to 90μA, scanning thickness to 0.004mm, scanning interval to 0.004mm, CT scanning mode to cone-beam scanning, and CT scanning mode to Normal scanning. Move the platform 2 on the stage to center the sample under test within the X-ray scanning range. Control the rotation of the platform 2 to ensure that the cigarette sample within a 360° range is within the X-ray scanning position.

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

[0045] S15, place the sample holder 4 on the platform 2, 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, and transmit the digital signal received by the platform detector 5 to the computer for storage.

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

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

[0048] 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:

[0049]

[0050] 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.

[0051] 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:

[0052]

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

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

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

[0056]

[0057] 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β.

[0058] 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:

[0059] 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:

[0060]

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

[0062]

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

[0064] 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.

[0065] S2. Perform image segmentation processing on the 3D reconstructed image to obtain an image of the tobacco particles in a single cigarette. Specifically, this includes:

[0066] S21. Based on the physical density difference between the outer packaging material and the inner cigarettes in the finished cigarette carton, a threshold segmentation model is established by analyzing the grayscale distribution characteristics of the 3D reconstructed image. An adaptive thresholding algorithm is used to accurately segment the outer packaging material (typically exhibiting lower grayscale values) and the inner cigarettes (exhibiting higher grayscale values), thereby extracting the cigarette region as a new region of interest (ROI). This process effectively eliminates the interference of the outer packaging on subsequent analysis and improves the accuracy of detection.

[0067] Based on the obtained ROI of the cigarettes, and considering the spatial distribution characteristics of the cigarettes, S22 proposes a cigarette separation algorithm based on three-dimensional spatial location information. By calculating the centroid coordinates and spatial distance matrix of each cigarette and combining it with morphological processing methods, accurate segmentation of n cigarette samples can be achieved.

[0068] It is understandable that this method fully considers the random orientation characteristics of different cigarettes in three-dimensional space, ensuring that each cigarette can be independently identified as a complete detection object, laying the foundation for subsequent quantitative analysis.

[0069] S23 involves segmenting the cigarette paper and filter tip from a single cigarette's 3D image. Specifically, this includes:

[0070] S231. Due to the significant density difference between the filter and tobacco portions of a cigarette, the grayscale values ​​of these portions differ considerably in the tomographic images obtained after CT scanning. By setting a specific grayscale threshold, the grayscale value of each three-dimensional pixel in the 3D image of a single cigarette is compared with the threshold. Based on the comparison result, the filter and tobacco portions of the cigarette are segmented to obtain a 3D image of the tobacco portion of a single cigarette.

[0071] S232, for processing the cross-sectional image of a cigarette, its structure can be decomposed into two parts: the outer layer of cigarette paper and the inner layer of tobacco.

[0072] Cigarette paper exhibits typical circular features in tomographic images, comprising an outer contour (outer edge of the paper layer) and an inner contour (inner edge of the paper layer), while tobacco shreds appear as irregular granular contours. Through contour analysis, the target is first screened using area thresholds and hierarchical relationships: the outer contour of the cigarette paper, as the largest closed curve, completely encloses the inner structure; its inner contour, as a secondary closed curve, coexists with the tobacco shred contour within the outer contour. Therefore, the outer contour of the cigarette paper can be identified first based on area size and hierarchical relationships.

[0073] Based on the morphological differences between the inner contour of cigarette paper and the contour of tobacco particles, a precise distinction can be made from the perspective of geometric features: the inner contour of cigarette paper has geometric characteristics close to an ideal circle, that is, the roundness is close to 1, its contour area is large and its boundary is smooth and continuous; while the contour of tobacco particles shows significant irregularity, that is, the roundness is low, the area is relatively small and the edges have obvious concavity and convexity.

[0074] By setting a roundness threshold (e.g., >0.85) and a minimum area threshold for dual screening, the inner contour of cigarette paper that meets the standards can be effectively identified.

[0075] Based on the identified inner contour of the cigarette paper, the image of the tobacco part after removing the cigarette filter is processed, and the image part outside the inner contour of the cigarette is removed, thereby obtaining the image of the tobacco particles after removing the cigarette filter and cigarette paper.

[0076] S3. Calculate the porosity of a single cigarette. This includes:

[0077] S31, extract multiple cross sections from the tobacco particle portion image along the main axis direction of the tobacco filling section.

[0078] S32, based on the difference in grayscale values, the total number of pixels N and the number of pixels M in the non-tobacco portion of each cross section are statistically analyzed. The porosity of a certain cross section of a single cigarette is calculated based on the total number of pixels N and the number of pixels M in the non-tobacco portion. The calculation formula is as follows:

[0079] .

[0080] S33, calculate the porosity of a single cigarette based on the porosity of multiple cross-sections of a single cigarette.

[0081] Specifically, the porosity of a single cigarette is calculated by statistically processing n CT tomographic images of the cigarette, using the following formula:

[0082] .

[0083] S4. Calculate the average porosity and standard deviation of the porosity of the cigarettes inside the finished cigarette carton based on the porosity of a single cigarette. This specifically includes:

[0084] S41, based on the single cigarette porosity φ calculated in S3, denoted as Z, the number of cigarettes inside the finished cigarette carton. Calculate the average porosity of the finished cigarette carton. The calculation formula is as follows:

[0085]

[0086] In the formula, φ is the average porosity; Z is the number of cigarettes in the finished cigarette carton; φ j Let be the porosity of the j-th branch.

[0087] S42, calculate the standard deviation of the porosity of a single cigarette in the finished cigarette carton. The formula is as follows:

[0088] .

[0089] Where, σ z It can characterize the uniformity of the porosity of individual cigarettes contained in a finished cigarette carton. If σ z If the amount of tobacco filling is too large, it indicates that the amount of tobacco filling in the pack (carton) of cigarettes is uneven; conversely, if the amount of tobacco filling is too small, it indicates that the amount of tobacco filling in the finished cigarette carton is even.

[0090] This invention utilizes industrial CT technology to precisely scan samples, enabling efficient acquisition of three-dimensional point cloud data images of finished cigarette cartons and detection of the internal porosity of the cigarettes. Compared to traditional measurement techniques, this method employs non-destructive testing, preserving the integrity of the sample without damage.

[0091] Furthermore, this invention employs a whole-pack scanning method on finished cigarette cartons to ensure the representativeness of the test results, and can simultaneously acquire multiple quality indicators such as the uniformity of pore distribution.

[0092] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0093] Example 2

[0094] Based on the same inventive concept, this application also provides a porosity detection device for the cigarettes inside a finished cigarette carton, used to implement the aforementioned method for detecting the porosity of cigarettes inside a finished cigarette carton. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more embodiments of the porosity detection device for cigarettes inside a finished cigarette carton provided below can be found in the limitations of the porosity detection method for cigarettes inside a finished cigarette carton described above, and will not be repeated here.

[0095] The device for detecting the porosity of cigarettes inside a finished cigarette carton includes:

[0096] The acquisition module is configured to acquire CT tomographic images of the cigarettes inside the finished cigarette carton and perform three-dimensional reconstruction.

[0097] The image segmentation module is configured to perform image segmentation processing on the 3D reconstructed image to obtain an image of the tobacco particles of a single cigarette.

[0098] The cigarette porosity calculation module is configured to extract multiple cross-sections from the tobacco particle image along the main axis of the tobacco filling section, and based on the grayscale value differences, count the total number of pixels and the number of pixels occupied by non-tobacco parts in each cross-section. Based on the total number of pixels and the number of pixels occupied by non-tobacco parts, the module calculates the porosity of a certain cross-section of a single cigarette; calculates the porosity of a single cigarette based on the porosity of multiple cross-sections of a single cigarette; and calculates the average porosity and standard deviation of the porosity of the cigarettes in the finished cigarette carton based on the porosity of a single cigarette.

[0099] Example 3

[0100] 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;

[0101] Memory, used to store computer programs;

[0102] When the processor executes the program stored in the memory, it implements a method for detecting the porosity of cigarettes inside a finished cigarette carton as described in Example 1.

[0103] Example 4

[0104] 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 porosity detection method for cigarettes inside a finished cigarette carton as described in Embodiment 1.

[0105] Example 5

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

[0107] 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 porosity 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 an image of the tobacco particles in a single cigarette. Multiple cross sections are extracted from the tobacco particle image along the main axis of the tobacco filling section. Based on the difference in gray values, the total number of pixels in each cross section and the number of pixels occupied by the non-tobacco part are counted. The porosity of a certain cross section of a single cigarette is calculated based on the total number of pixels and the number of pixels occupied by the non-tobacco part. The porosity of a single cigarette is calculated based on the porosity of multiple cross-sections of a single cigarette. The average porosity and standard deviation of the porosity of the cigarettes inside the finished cigarette carton were calculated based on the porosity of a single cigarette.

2. The method according to claim 1, wherein, Image segmentation processing is performed on the 3D reconstructed image to obtain a 3D image of the tobacco filling segment of a single cigarette, including: A threshold segmentation model was established, and an adaptive threshold algorithm was used to segment the outer packaging and the inner cigarettes in the 3D reconstructed image, and the cigarette region was extracted as a new region of interest. Set a grayscale threshold, compare the grayscale value of each three-dimensional pixel in the three-dimensional image of a single cigarette with the grayscale threshold, and divide the filter part and tobacco part in the cigarette according to the comparison result to obtain a three-dimensional image of the tobacco part of a single cigarette. Using area thresholds and hierarchical relationships, the outer contour of cigarette paper is screened from the 3D image of the tobacco filling section of a single cigarette: the outer contour of cigarette paper is the largest closed curve, which completely wraps the inner structure; its inner contour is the second closed curve, which coexists with the tobacco contour inside the outer contour. The images inside the outer contour of cigarette paper are dual-filtered based on the roundness threshold and the minimum area threshold to identify the inner contour of cigarette paper. Based on the inner contour of the cigarette paper, the image outside the inner contour of the cigarette is removed from the 3D image of the tobacco part of a single cigarette, resulting in an image of the tobacco particles removed from the cigarette filter and the cigarette paper.

3. The method according to claim 1 or 2, wherein the method is characterized in that, The formula for calculating the porosity of a single cigarette at a certain cross-section is: The calculation formula of the pore size is: , In the formula, φ i is the porosity of the i-th CT tomographic image, Mi is the number of pixel points occupied by the non-cut tobacco part in the image, and N is the total number of pixel points in the image based on the difference in gray value; The formula for calculating average porosity is: φ is the average porosity; Z is the number of cigarettes in the finished cigarette carton; φ j Let be the porosity of the j-th branch; The formula for calculating the standard deviation is: 。 4. The method according to claim 1, wherein the method is characterized by, 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 of claim 4, wherein the method further comprises: determining the porosity of the interior of the cigarette pack based on the detected porosity of the interior of the cigarette pack. 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 of claim 5, wherein the method further comprises: determining the porosity of the interior of the cigarette pack based on the detected porosity of the interior of the cigarette pack. 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 porosity of cigarettes inside a finished cigarette carton, characterized in that, include: The acquisition module is configured to acquire CT tomographic images of the cigarettes inside the finished cigarette carton and perform three-dimensional reconstruction. The image segmentation module is configured to perform image segmentation processing on the 3D reconstructed image to obtain an image of the tobacco particles of a single cigarette. The cigarette porosity calculation module is configured to extract multiple cross-sections from the tobacco particle image along the main axis of the tobacco filling section, and based on the grayscale value differences, count the total number of pixels and the number of pixels occupied by non-tobacco parts in each cross-section. Based on the total number of pixels and the number of pixels occupied by non-tobacco parts, the module calculates the porosity of a certain cross-section of a single cigarette; calculates the porosity of a single cigarette based on the porosity of multiple cross-sections of a single cigarette; and calculates the average porosity and standard deviation of the porosity of the cigarettes in the finished cigarette carton based on the porosity of a single cigarette.

8. A computer device, comprising: 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; A processor, when executing a program stored in a memory, implements a method for detecting the porosity of cigarettes inside a finished cigarette carton as described in any one of claims 1 to 6.

9. A computer readable storage medium having stored thereon a computer program, characterized in that, When the computer program is executed by the processor, it implements the porosity detection method for the 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 a method for detecting the porosity of cigarettes inside a finished cigarette carton as described in any one of claims 1 to 6.