Method for acquiring region of interest of hyperspectral image of tipping paper for cigarettes and detecting content of neotame

By employing deep feature fusion and region clustering segmentation methods, the problem of spectral interference from printed patterns on cigarette tipping paper surfaces was solved, enabling efficient and accurate detection of neotame content and supporting non-destructive, online quality monitoring of tipping paper production lines.

CN121883801APending Publication Date: 2026-04-17ZHENGZHOU TOBACCO RES INST OF CNTC
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHENGZHOU TOBACCO RES INST OF CNTC
Filing Date
2025-12-16
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing technologies cannot effectively remove spectral interference from printed patterns on the surface of cigarette tipping paper, resulting in inaccurate neotame content detection results and making it impossible to achieve non-destructive, online quality monitoring.

Method used

By employing deep feature fusion, regional clustering and segmentation, and intelligent post-processing, the spectral interference of printed patterns is accurately removed through spatial-spectral feature fusion, homogeneous region clustering and segmentation, and regional-level spectral intelligent discrimination, outputting pure tipping paper substrate and true spectral information of neotame.

Benefits of technology

It significantly improves the accuracy and reliability of neotame content detection, enables non-destructive online quality monitoring of cigarette tipping paper, and ensures the purity of model training data and the stability of detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121883801A_ABST
    Figure CN121883801A_ABST
Patent Text Reader

Abstract

The invention provides a method for acquiring a region of interest of a hyperspectral image of tipping paper for cigarettes, which comprises the following steps of: acquiring the hyperspectral image of the tipping paper for cigarettes and performing background removal processing to generate an initial region of interest; extracting spatial features and spectral features of the initial region of interest, performing clustering segmentation on the initial region of interest by using a spatial-spectral feature fusion method, and dividing the initial region of interest into a plurality of homogeneous sub-regions; and according to the average hyperspectral curve of each sub-region, identifying an abnormal region and cleaning the abnormal region, and reconstructing the cleaned sub-regions to form a final region of interest. The invention also provides a method for detecting the content of neotame in the tipping paper for cigarettes on the basis of the method for acquiring the region of interest of the hyperspectral image of the tipping paper for cigarettes. According to the method, a stable and reliable region of interest of a pure base material is output through triple technical guarantee of deep feature fusion, region clustering segmentation and intelligent post-processing, and reliable technical support is provided for high-precision and high-efficiency online quality detection of tipping paper for cigarettes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of hyperspectral technology, and more specifically, to a method for obtaining the region of interest in a hyperspectral image of cigarette tipping paper and a method for detecting its neotame content. Background Technology

[0002] In the tobacco industry, tipping paper, as a crucial component of cigarettes, directly impacts the sensory quality and consumer experience due to the content of its functional additives. Neotame, a highly effective sweetener, is directly coated onto tipping paper, allowing it to come into contact with the consumer's mouth without combustion, providing a unique sweet sensation. However, current industry monitoring of neotame content primarily relies on offline sampling and testing methods (such as high-performance liquid chromatography). These methods are not only cumbersome and time-consuming but also destructive, failing to provide continuous and non-destructive monitoring of the production process, thus hindering the assurance of quality across entire batches of products.

[0003] Hyperspectral imaging technology combines the advantages of imaging and spectroscopy, enabling the simultaneous acquisition of spatial and rich spectral information of the object under test. It is an ideal solution for non-destructive, rapid, and online quality monitoring. Theoretically, this technology is well-suited for integration into tipping paper production lines for real-time analysis and control of neotame content.

[0004] In practical applications, existing technologies such as CN115711952A provide a rapid detection method for sweetener content based on near-infrared spectroscopy. This method achieves rapid analysis by establishing a predictive model between spectral and chemical values. However, this method overlooks a crucial practical issue for tipping paper: the commonly present printed patterns (such as colored logos and anti-counterfeiting watermarks) on the surface of tipping paper. These patterns result in the collected spectrum not being a pure spectrum of the tipping paper substrate and neotame, but rather a mixed spectrum of multiple substances such as the substrate, neotame, ink, and even adhesive.

[0005] Therefore, effectively removing spectral interference from printed patterns and accurately extracting the true spectral information representing the tipping paper substrate and neotame has become the core technical bottleneck that must be overcome to successfully apply hyperspectral technology to the online detection of neotame content in tipping paper.

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

[0007] Based on this, it is necessary to provide a method for obtaining the region of interest in cigarette tipping paper and a method for detecting its neotame content, in order to address the above-mentioned technical problems. Through the triple collaborative technology of deep feature fusion, region clustering and segmentation and intelligent post-processing, the interfering patterns are accurately stripped away, and spectral data and region masks that characterize the true properties of the substrate are output, so as to systematically solve the problem of misjudgment of substrate quality caused by printing pattern interference in the existing technology.

[0008] To achieve the above objectives, a first aspect of the present invention provides a method for obtaining the region of interest (ROI) of a hyperspectral image of cigarette tipping paper, comprising: Acquire hyperspectral images of cigarette tipping paper and perform background removal processing to generate an initial region of interest; Spatial and spectral features of the initial region of interest are extracted, and the spatial-spectral feature fusion method is used to cluster and segment the initial region of interest into multiple homogeneous sub-regions; Abnormal regions are identified and cleaned based on the average hyperspectral curves of each sub-region. The cleaned sub-regions are then reconstructed to generate the final region of interest.

[0009] This solution fundamentally solves the problem of spectral interference in printed patterns through an image processing workflow that integrates spatial-spectral feature fusion, homogeneous region clustering and segmentation, regional-level intelligent spectral discrimination, and intelligent cleaning and region reconstruction. It intelligently and accurately extracts interfering signals such as watermarks and inks from mixed spectra, outputting pure spectral information that represents only the true spectral information of the tipping paper substrate and neotame. This ensures that the subsequent neotame content prediction model is trained and predicted based on high-quality, high-fidelity data, eliminating model bias caused by impure data at the source and significantly improving the accuracy and reliability of the detection results.

[0010] This scheme uses innovative spatial-spectral feature fusion to deeply associate the spectral characteristics of pixels with their spatial context during the feature extraction stage. This enables the algorithm to accurately identify complete semantic objects with specific spectral ranges and continuous spatial morphology, as well as a bunch of isolated abnormal pixels, thus laying a solid theoretical foundation for accurately separating interference patterns from the substrate.

[0011] By employing a clustering segmentation strategy, this scheme elevates the basic unit of detection from a massive number of noisy pixels to a limited number of homogeneous blocks with consistent features. A complete watermark pattern is likely to be divided into one or several such sub-regions. This step achieves a fundamental shift in the detection perspective, effectively suppressing pixel-level noise and transforming the objective from finding anomalies to regional management.

[0012] For anomaly detection, instead of calculating anomaly scores for individual pixels, the average hyperspectral curve of each sub-region is calculated. This smooths out random noise and yields a spectral signal that better represents the overall material properties of the region. Then, algorithms such as Isolation Forest are used to calculate an anomaly score for each region's average curve. Finally, the relative gap method is used to automatically and adaptively find the "cliff points" in the anomaly score distribution, thereby accurately locating the most anomalous sub-regions. This completely eliminates the reliance on manually set fixed thresholds and enhances the method's adaptability across different products.

[0013] Finally, the abnormal sub-regions identified in the previous step (such as watermarks) are cleaned. Then, all remaining pure substrate regions are merged and their boundaries smoothed to reconstruct a complete final region of interest containing only pure substrate material. This process is precise targeted removal, not blurring. It outputs a well-defined, spatially continuous binary mask, which can be directly used to extract the spectral data of pure substrate material from the original hyperspectral image for subsequent quantitative modeling.

[0014] In one embodiment of the first aspect, extracting the spatial and spectral features of the initial region of interest includes: extracting the coordinates (X, Y) of effective pixels from the initial region of interest as spatial location features; and extracting the spectral data of the effective pixels in the wavelength range of 970nm-1700nm as spectral features, wherein the wavelength interval is 5nm and there are a total of 147 bands.

[0015] Because hyperspectral images contain hundreds of consecutive bands, the data volume is extremely large. Many algorithms, such as classification and clustering models, become unstable and computationally expensive in such a high-dimensional space. The above-mentioned scheme, through segmented interval extraction, skips a large number of adjacent bands with repetitive information, using fewer bands to reflect the most core and differentiated information of the entire spectral range. This constructs a lower-dimensional, more efficient, more representative, and less noisy dataset. This directly enables subsequent steps such as spatial-spectral feature fusion, clustering segmentation, and anomaly cleaning to be performed on a higher-quality data basis, ultimately separating watermarks and other printed areas from clean substrates more accurately and stably. Furthermore, by reducing the feature dimension by an order of magnitude, computational efficiency is significantly improved, the model is more robust, and it is more conducive to industrial online inspection.

[0016] In one embodiment of the first aspect, identifying and cleaning abnormal regions based on the hyperspectral curves of each sub-region includes: The isolated forest algorithm is used to calculate the outlier score of the average hyperspectral curve of each sub-region after clustering. The average hyperspectral curve with the highest outlier score is found based on the relative difference method, and its corresponding sub-region is cleaned and removed.

[0017] Among them, the method of finding the average hyperspectral curve with the highest anomaly score based on the relative difference method includes: The anomaly scores of the average hyperspectral curves of each sub-region are sorted in descending order. The differences between adjacent scores are calculated, and the difference results are normalized to locate the maximum value in the normalized difference results.

[0018] This solution introduces an automatic decision-making mechanism based on the relative gap method. This mechanism analyzes the distribution patterns of outlier scores and automatically locates the peak values ​​in the normalized difference sequence, thereby intelligently and objectively identifying the most significant outlier groups. This process is entirely data-driven, requiring no manual intervention or empirical parameter settings. It fundamentally solves the problem of poor adaptability of traditional methods to different batches and patterns of products, achieving a very high level of intelligence and stability.

[0019] Traditional hyperspectral anomaly detection methods operate directly at the pixel level, inevitably resulting in noisy and unstable results. This proposed solution, however, calculates the average hyperspectral curve for each region and then applies the isolated forest algorithm. This strategy of regionalized averaging combined with isolated forest effectively overcomes the noise interference and instability caused by traditional pixel-level hyperspectral detection, providing an ideal technical path for the accurate, robust, and rapid removal of interfering patterns from cigarette tipping paper. A detailed analysis follows: First, by calculating the average spectral curve of each region, pixel-level random fluctuations caused by uneven illumination, sensor noise, or microscopic material variations are effectively smoothed. Based on this, the Isolation Forest algorithm no longer processes raw high-dimensional pixel data, but rather smooth and stable spectral feature signals representing different material regions. This method allows the algorithm to focus on systematic spectral deviations caused by substantial interference factors such as watermarks and glue, rather than insignificant local noise, thus significantly enhancing overall anti-interference capabilities.

[0020] Secondly, the detection unit is transformed from a massive number of pixels into a limited number of regions, reducing the data volume by several orders of magnitude. The Isolation Forest algorithm runs extremely fast on this low-dimensional dataset, making it perfectly suited to the real-time requirements of industrial online inspection. Simultaneously, this method directly outputs complete anomalous regions, rather than discrete anomalous pixels, perfectly aligning with the ultimate goal of eliminating the entire watermark or logo pattern as a complete interference object. This avoids the drawbacks of traditional pixel-level detection results being fragmented and requiring complex post-processing.

[0021] Finally, quality inspectors directly face a series of areas marked as abnormal and their corresponding average spectral curves. These curves can be directly compared with the spectrum of pure substrate, providing clear spectral basis for judging abnormal areas and greatly facilitating process traceability and system optimization.

[0022] To achieve the above objectives, a second aspect of the present invention provides a method for detecting the neotame content in cigarette tipping paper, comprising the following steps: A spectral image sample set of cigarette tipping paper is obtained, and each spectral image sample is processed using the hyperspectral image region of interest acquisition method of cigarette tipping paper described in the first aspect to obtain the final region of interest. The average hyperspectral data of the final region of interest is then extracted to obtain a hyperspectral database of cigarette tipping paper. Based on the hyperspectral database of cigarette tipping paper, a predictive model for the neotame content of cigarette tipping paper was constructed. The neotame content of the cigarette tipping paper was detected using a predictive model for neotame content in the cigarette tipping paper.

[0023] This solution utilizes the region of interest (ROI) obtained from the hyperspectral image of cigarette tipping paper described in the first aspect as a sample library, and extracts hyperspectral data to establish a spectral database for predictive model construction. This ensures the purity of the training samples, enabling the model to learn the most essential spectral features of the target, rather than mixed features from watermarks, background, and other interfering information. This fundamentally improves the model's classification accuracy and generalization ability; the model does not need to expend significant computational resources to understand and filter noise and anomalies in the training data, allowing it to focus more efficiently on the extraction and learning of core features. This not only accelerates the model's training convergence process but also makes the final model lighter and more efficient.

[0024] Furthermore, when constructing a prediction model for the neotame content of cigarette tipping paper based on the hyperspectral database of cigarette tipping paper, the hyperspectral data in the hyperspectral database of cigarette tipping paper is preprocessed using the first derivative algorithm, the hyperspectral data is used to select characteristic bands using the genetic algorithm, and the sweetener content prediction model of the cigarette tipping paper is established using the XGBoost algorithm.

[0025] To achieve the above objectives, a third aspect of the present invention provides a device for acquiring a region of interest in a hyperspectral image of cigarette tipping paper, comprising: The initial region of interest acquisition module is used to acquire hyperspectral images of cigarette tipping paper and perform background removal processing to generate the initial region of interest; The clustering and segmentation module is used to extract the spatial and spectral features of the initial region of interest, and to use a spatial-spectral feature fusion method to cluster and segment the initial region of interest into multiple homogeneous sub-regions; The final region of interest reconstruction module is used to identify and clean up abnormal regions based on the hyperspectral curves of each sub-region, and then reconstruct the cleaned sub-regions to generate the final region of interest.

[0026] To achieve the above objectives, a fourth aspect of the present invention provides a device for detecting neotame content in cigarette tipping paper containing a special watermark, comprising: The initial region of interest acquisition module is used to acquire and preprocess the hyperspectral image of cigarette tipping paper to generate the initial region of interest. The clustering and segmentation module is used to extract the spatial and spectral features of the initial region of interest, and to use a spatial-spectral feature fusion method to cluster and segment the initial region of interest into multiple homogeneous sub-regions; The final region of interest reconstruction module is used to identify and clean up abnormal regions based on the hyperspectral curves of each sub-region, and then reconstruct the cleaned sub-regions to generate the final region of interest.

[0027] The spectral database construction module is used to extract the average hyperspectral data of the final region of interest after reconstruction and construct a hyperspectral database for cigarette tipping paper. The prediction model building module is used to build a prediction model for the neotame content of cigarette tipping paper based on the hyperspectral database of cigarette tipping paper. The detection module is used to detect the neotame content of the cigarette tipping paper under test by using a neotame content prediction model based on the hyperspectral image of the tipping paper.

[0028] This solution fundamentally solves the problem of spectral interference in printed patterns through an image processing workflow that integrates spatial-spectral feature fusion, homogeneous region clustering and segmentation, regional-level intelligent spectral discrimination, and intelligent cleaning and region reconstruction. It intelligently and accurately extracts interfering signals such as watermarks and inks from mixed spectra, outputting pure spectral information that represents only the true spectral information of the tipping paper substrate and neotame. This ensures that the subsequent neotame content prediction model is trained and predicted based on high-quality, high-fidelity data, eliminating model bias caused by impure data at the source and significantly improving the accuracy and reliability of the detection results.

[0029] To achieve the above objectives, a fifth 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. Memory, used to store computer programs; When a processor executes a program stored in memory, it implements the steps of the method described in the first aspect, or the steps of the method described in the second aspect.

[0030] To achieve the above objectives, a sixth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that, when the computer program is executed by a processor, it implements the steps of the method described in the first aspect, or implements the steps of the method described in the second aspect.

[0031] To achieve the above objectives, a seventh aspect of the present invention provides a computer program product comprising a computer program, characterized in that, when executed by a processor, the computer program implements the steps of the method described in the first aspect, or implements the steps of the method described in the second aspect.

[0032] The beneficial effects of this invention are as follows: This invention employs an innovative spatial-spectral feature fusion method to integrate the spectral characteristics of pixels with their spatial characteristics during feature extraction. This enables the detection of complete objects with specific spectral ranges and continuous spatial morphologies, laying a solid foundation for the accurate separation of interfering patterns from the substrate. Through a clustering segmentation strategy, pixels with similar characteristics are grouped into sub-regions, and anomaly region identification and cleaning are performed on this basis. This region-level perspective effectively suppresses spectral fluctuations and noise interference from individual pixels, and is highly sensitive to targets such as watermarks that exhibit collective spectral anomalies in local areas. The detected anomaly regions have clear boundaries and are complete. Finally, intelligent cleaning is performed on the detected anomaly regions to obtain the precise region of interest for the target.

[0033] This invention integrates hyperspectral imaging technology and machine learning algorithms to achieve efficient, accurate, batch, and non-destructive testing of neotame content in cigarette tipping paper, providing technical support for online batch non-destructive testing of neotame content in cigarette tipping paper. Attached Figure Description

[0034] Figure 1 This is a schematic diagram of the process for extracting hyperspectral data from hyperspectral images according to the present invention.

[0035] Figure 2 This is a hyperspectral image of cigarette tipping paper at a wavelength of 1100 nm, as shown in an embodiment of the present invention.

[0036] Figure 3 This is the initial region of interest in the hyperspectral image of the cigarette tipping paper in an embodiment of the present invention.

[0037] Figure 4 These are the sub-regions after the initial region of interest is clustered and segmented in an embodiment of the present invention.

[0038] Figure 5 This is the average spectral map of each sub-region after the initial region of interest is clustered and segmented in an embodiment of the present invention.

[0039] Figure 6 These are the sub-regions after the abnormal regions of the initial region of interest have been cleaned in the embodiments of the present invention.

[0040] Figure 7This is the average spectral map of each sub-region after the abnormal region of the initial region of interest has been cleaned in an embodiment of the present invention.

[0041] Figure 8 The region of interest in the hyperspectral image of the cigarette tipping paper in an embodiment of the present invention is shown.

[0042] Figure 9 This is a schematic flowchart illustrating the method for detecting neotame content in cigarette tipping paper according to an embodiment of the present invention.

[0043] Figure 10 This is the average spectral diagram of the final region of interest for the cigarette tipping paper in an embodiment of the present invention.

[0044] Figure 11 The image shows the spectra of all samples of cigarette tipping paper in an embodiment of the present invention.

[0045] Figure 12 The images shown are spectra of all samples of cigarette tipping paper after D1 pretreatment in an embodiment of the present invention.

[0046] Figure 13 This is a schematic diagram of the GA iteration process in an embodiment of the present invention.

[0047] Figure 14 This is a schematic diagram of the GA characteristic band selection results in an embodiment of the present invention.

[0048] Figure 15 This is a prediction result diagram of the prediction model training set in an embodiment of the present invention.

[0049] Figure 16 This is a graph showing the prediction performance of the prediction model on the test set in an embodiment of the present invention. Detailed Implementation

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

[0051] Example 1 This invention provides a method for obtaining the region of interest in a hyperspectral image of cigarette tipping paper, such as... Figure 1 As shown, it includes: The hyperspectral image of the cigarette tipping paper is acquired and the background is removed to generate the initial region of interest.

[0052] In one embodiment, acquiring a hyperspectral image of cigarette tipping paper includes: equilibrating the cigarette tipping paper sample in an environment with a temperature of (22±2)℃ and a humidity of (60+5)% for 24 hours; then passing the cigarette tipping paper sample through a hyperspectral imaging system at a speed of ≤1.5 m / s and acquiring a hyperspectral image of the cigarette tipping paper. The hyperspectral image of the cigarette tipping paper at a wavelength of 1100 nm is shown below. Figure 2 As shown.

[0053] It can be understood that the hyperspectral camera wavelength of the hyperspectral imaging system is 970nm-1700nm.

[0054] In one embodiment, background removal processing is performed on the hyperspectral image of cigarette tipping paper, including: By using a thresholding method to filter out invalid regions such as the background in the hyperspectral image of cigarette tipping paper, only valid pixels with reflectance higher than the threshold are retained, thus obtaining the initial region of interest.

[0055] It is understandable that the threshold method can be adjusted according to the characteristics of different cigarette tipping papers. In one embodiment, the reflectance threshold at 1100nm is set to be >0.1. At this time, the initial region of interest in the hyperspectral image of the cigarette tipping paper is obtained as follows: Figure 3 As shown.

[0056] Spatial and spectral features of the initial region of interest are extracted, and the spatial-spectral feature fusion method is used to cluster and segment the initial region of interest into multiple homogeneous sub-regions.

[0057] In one embodiment, extracting the spatial and spectral features of the initial region of interest includes: extracting the coordinates (X, Y) of effective pixels from the initial region of interest as spatial location features; and extracting the spectral data of effective pixels in the wavelength range of 970nm-1700nm as spectral features, wherein the wavelength interval is 5nm and there are a total of 147 bands.

[0058] Because hyperspectral images contain hundreds of consecutive bands, the data volume is extremely large. Many algorithms, such as classification and clustering models, become unstable and computationally expensive in such a high-dimensional space. The above-mentioned scheme, through segmented interval extraction, skips a large number of adjacent bands with repetitive information, using fewer bands to reflect the most core and differentiated information of the entire spectral range. This constructs a lower-dimensional, more efficient, more representative, and less noisy dataset. This directly enables subsequent steps such as spatial-spectral feature fusion, region clustering, and anomaly cleaning to be performed on a higher-quality data basis. Ultimately, it more accurately and stably separates watermarked and other printed areas from clean substrates, perfectly solving the core problem of misjudgment due to different printing on homogeneous substrates. Furthermore, by reducing the feature dimension by an order of magnitude, computational efficiency is significantly improved, the model is more robust, and it is more conducive to industrial online inspection.

[0059] Anomaly regions are identified and cleaned based on the average hyperspectral curves of each sub-region. The cleaned sub-regions are then reconstructed, resulting in the final region of interest in the hyperspectral image, as shown below. Figure 8 As shown.

[0060] This embodiment fundamentally solves the problem of spectral interference in printed patterns through an image processing workflow that integrates spatial-spectral feature fusion, homogeneous region clustering and segmentation, regional-level intelligent spectral discrimination, and intelligent cleaning and region reconstruction. It intelligently and accurately extracts interfering signals such as watermarks and inks from mixed spectra, outputting pure spectral information representing only the true spectral information of the tipping paper substrate and neotame. This ensures that the subsequent neotame content prediction model is trained and predicted based on high-quality, high-fidelity data, eliminating model bias caused by impure data at the source and significantly improving the accuracy and reliability of the detection results. This process ensures that the output pure substrate region of interest has extremely high accuracy and usability, and can be directly and seamlessly applied to subsequent quality monitoring.

[0061] Example 2 The difference between this embodiment and Embodiment 1 is that it provides a specific set of steps for clustering and segmenting the initial region of interest using a spatial-spectral feature fusion method, including: The spatial location features and spectral features are standardized separately to eliminate the influence of dimensions; The standardized spatial and spectral features are weighted and combined to obtain the fused features; Based on the fusion features, the initial region of interest is divided into n optimal regions by K-means clustering. Specifically, under the condition that the sum of spatial weights and spectral weights is always 1, all weight combinations from (0.1, 0.9) to (0.9, 0.1) are traversed with a step size of 0.1. K-means clustering analysis is performed on each weight combination. The clustering effect is quantified by the silhouette coefficient. The weight combination with the highest score is selected to perform a weighted combination of the standardized spatial features and spectral features.

[0062] Specifically, the process of generating fused features is as follows: F = (X a *Y a )∥( X b *Y b ); In the formula, F: unified eigenvector; X a Normalized spatial coordinate matrix (shape such as [n×d) s ], where n is the number of samples, d s (for spatial dimensions); X b : Normalized spectral feature matrix (shape such as [n×d) c ], d c (for spectral dimensions); X b and Y b : Scalar weights; ∥ represents horizontal concatenation along the feature dimension (np.hstack), and the final shape of F is [n×(d s +dc )).

[0063] In one embodiment, X b =0.75, Y b =0.25, the silhouette coefficient is the largest, at 0.2390. At this point, the sub-regions after the initial region of interest clustering are as follows: Figure 4 As shown.

[0064] Specifically, the steps to determine the value of n are as follows: using the elbow rule, the inflection point is taken as the optimal number of regions n by the change in inertia value after K-means clustering, where 5≤n≤10.

[0065] Example 3 The difference between this embodiment and Embodiment 1 or Embodiment 2 is that it provides a specific step for identifying and cleaning abnormal regions based on the hyperspectral curves of each sub-region, including: The isolated forest algorithm is used to calculate the outlier score of the average hyperspectral curve of each sub-region after clustering. The average hyperspectral curve with the highest outlier score is found based on the relative difference method, and its corresponding sub-region is cleaned and removed.

[0066] Specifically, the steps of the relative difference method are as follows: sort the anomaly scores of the average hyperspectral curves of each sub-region in descending order, calculate the difference between adjacent scores, normalize the difference results, and locate the maximum value in the normalized difference results.

[0067] In practical implementation, the average spectral map of each sub-region after clustering and segmentation is as follows: Figure 5 As shown, the sub-regions after anomaly area cleaning are as follows: Figure 6 As shown, the average spectral diagrams of each sub-region after cleaning of the abnormal region are as follows: Figure 7 As shown.

[0068] In this embodiment, the average hyperspectral curve of each sub-region is first obtained. The regional average spectrum effectively smooths out the random fluctuations of individual pixels, forming a stable spectral feature that better represents the overall material characteristics of the region. Based on this, the isolated forest algorithm is used for detection. Instead of capturing isolated abnormal pixels, it makes overall judgments about abnormal material regions, resulting in more reliable results.

[0069] Since the aforementioned region mask has been clustered into n regions, the amount of data that the isolated forest needs to process is drastically reduced from millions of pixels (N samples × D bands) to the average spectrum of n regions (K samples × D bands). The computational complexity and time cost are reduced by several orders of magnitude, making it very suitable for industrial online inspection.

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

[0071] Example 4 This embodiment provides a method for detecting the neotame content in cigarette tipping paper, such as... Figure 9 As shown, it includes the following steps: A hyperspectral image sample set of cigarette tipping paper is obtained. Each spectral image sample is processed using the hyperspectral image region of interest acquisition method of cigarette tipping paper described in Example 1, 2 or 3 to obtain the final region of interest. The average hyperspectral data of the final region of interest is then extracted to obtain a hyperspectral database of cigarette tipping paper. In one possible embodiment, constructing a hyperspectral database of cigarette tipping paper includes: Multiple hyperspectral image samples of cigarette tipping paper with different gradient neotame contents are processed using the region of interest acquisition method for hyperspectral images of cigarette tipping paper described in Example 1, 2, or 3 to obtain the final region of interest. The average hyperspectral data of the final region of interest is then extracted to form a hyperspectral database of cigarette tipping paper.

[0072] In one embodiment, a hyperspectral image sample of a cigarette tipping paper ultimately represents the region of interest, such as... Figure 8 As shown, the average hyperspectral curve of the final region of interest is as follows: Figure 10 As shown, the hyperspectral curves of all samples of cigarette tipping paper are as follows: Figure 11 As shown.

[0073] Based on the hyperspectral database of cigarette tipping paper, a predictive model for the neotame content of cigarette tipping paper was constructed.

[0074] In one possible embodiment, when constructing a neotame content prediction model for cigarette tipping paper based on a spectral database of cigarette tipping paper, the hyperspectral data in the hyperspectral database of cigarette tipping paper is preprocessed using a first derivative algorithm (D1), the hyperspectral data is used to select characteristic bands using a genetic algorithm (GA), and the neotame content prediction model for cigarette tipping paper is established using an XGBoost algorithm.

[0075] Furthermore, the hyperspectral data is preprocessed using the first derivative algorithm (D1), including: The instantaneous rate of change is calculated by the difference between adjacent data points, highlighting the peaks, inflection points, and other areas of change in the signal.

[0076] The hyperspectral curves of all samples of cigarette tipping paper after preprocessing using the first derivative algorithm (D1) are as follows: Figure 12 As shown.

[0077] Furthermore, the hyperspectral data is subjected to feature band selection using a genetic algorithm (GA), including: The population size was set to 20. Five-fold cross-validation was used to model based on PLS, and the fitness of individuals was evaluated by MSE through iteration. The crossover probability and mutation probability were required to be 0.2, so as to select key feature bands.

[0078] An early stopping mechanism is established in the characteristic band selection process. The maximum number of GA iterations is set to 100 to facilitate the early stopping mechanism. The iteration process is required to stop when the MSE does not change after 10 consecutive iterations.

[0079] The iterative process of a genetic algorithm (GA) is as follows: Figure 13 As shown, the characteristic band selection results of the genetic algorithm (GA) are as follows: Figure 14 As shown.

[0080] Furthermore, the modeling process for establishing the neotame content prediction model for the cigarette tipping paper using the eXtreme Gradient Boosting (XGBoost) algorithm includes: Step 1: Initialize the predicted values, which are usually the average of the target variable; Step 2: Calculate the residual between the actual value and the predicted value; Step 3: Train a new tree to fit these residuals; Step 4: After scaling the learning rate, the prediction results of the new tree are added to the total prediction; Repeat steps 2-4 until the preset number of trees is reached or the early stopping condition is met.

[0081] Then, 5-fold cross-validation was used to optimize the hyperparameters of the eXtreme Gradient Boosting (XGBoost) algorithm.

[0082] The prediction performance of the D1-GA-XGBoost model on the training set is shown in the figure below. Figure 15 As shown in the diagram, the prediction results on the test set are as follows: Figure 16 As shown.

[0083] Finally, the neotame content of the cigarette tipping paper was detected using a neotame content prediction model.

[0084] In an optional embodiment of the present invention, the neotame content of the cigarette tipping paper to be tested is detected using a constructed neotame content prediction model, including: The established prediction model D1-GA-XGBoost was input into the hyperspectral imaging system to determine the neotame content in the tipping paper of the cigarette to be tested.

[0085] It is understood that before determining the neotame content in the cigarette tipping paper to be tested, it is also necessary to process the hyperspectral image of the cigarette tipping paper to be tested using the hyperspectral image region of interest acquisition method described in Example 1, 2 or 3, to obtain the final region of interest, and extract the average hyperspectral data of the final region of interest.

[0086] This embodiment utilizes the region of interest (ROI) obtained by the hyperspectral image acquisition method for cigarette tipping paper described in Embodiments 1, 2, or 3 as a sample library, and extracts hyperspectral data to establish a hyperspectral database for constructing a prediction model. This ensures the purity of the training samples, enabling the model to learn the most essential spectral features of the target, rather than mixed features from watermarks, background, or other interfering information. This fundamentally improves the model's classification accuracy and generalization ability; the model does not need to expend significant computational resources to understand and filter noise and anomalies in the training data, allowing it to focus more efficiently on the extraction and learning of core features. This not only accelerates the model's training convergence process but also makes the final model lighter and more efficient.

[0087] Example 5 Based on the same inventive concept, this application also provides a device for acquiring the region of interest (ROI) of a hyperspectral image of cigarette tipping paper. The solution provided by this device is similar to that described in Embodiment 1, 2, or 3. Therefore, the specific limitations in the embodiments of the device for acquiring the ROI of a hyperspectral image of cigarette tipping paper provided below can be found in Embodiment 1, 2, or 3, and will not be repeated here.

[0088] The device for acquiring the region of interest (ROI) of the hyperspectral image of the cigarette tipping paper includes: The initial region of interest acquisition module is used to acquire hyperspectral images of cigarette tipping paper and perform background removal processing to generate the initial region of interest; The clustering and segmentation module is used to extract the spatial and spectral features of the initial region of interest, and to use a spatial-spectral feature fusion method to cluster and segment the initial region of interest into multiple homogeneous sub-regions; The final region of interest reconstruction module is used to identify and clean up abnormal regions based on the average hyperspectral curve of each sub-region, and then reconstruct the cleaned sub-regions to generate the final region of interest.

[0089] Example 6 This application provides a device for detecting the neotame content in cigarette tipping paper, comprising: The initial region of interest acquisition module is used to acquire the hyperspectral image of cigarette tipping paper and perform background removal processing to generate the initial region of interest; The clustering and segmentation module is used to extract the spatial and spectral features of the initial region of interest, and to use a spatial-spectral feature fusion method to cluster and segment the initial region of interest into multiple homogeneous sub-regions; The final region of interest reconstruction module is used to identify and clean up abnormal regions based on the average hyperspectral curve of each sub-region, and then reconstruct the cleaned sub-regions to generate the final region of interest.

[0090] The hyperspectral database construction module is used to extract the average hyperspectral data of the final region of interest after reconstruction and construct a hyperspectral database for cigarette tipping paper. The prediction model building module is used to build a prediction model for the neotame content of cigarette tipping paper based on the hyperspectral database of cigarette tipping paper. The detection module is used to detect the neotame content of the cigarette tipping paper under test by using a neotame content prediction model based on the hyperspectral image of the tipping paper.

[0091] Example 7 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; Memory, used to store computer programs; When a processor executes a program stored in memory, it implements the steps of the method described in Embodiment 1, 2, or 3, or the steps of the method described in Embodiment 4.

[0092] Example 8 Based on the above embodiments, this embodiment provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the method described in Embodiment 1, 2, or 3, or implements the steps of the method described in Embodiment 4.

[0093] Example 9 Based on the above embodiments, this embodiment provides a computer program product, including a computer program, characterized in that, when the computer program is executed by a processor, it implements the steps of the method described in embodiment 1, 2, or 3, or implements the steps of the method described in embodiment 4.

[0094] 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 obtaining a region of interest from a hyperspectral image of a cigarette tipping paper, characterized in that, include: Acquire hyperspectral images of cigarette tipping paper and perform background removal processing to generate an initial region of interest; Spatial and spectral features of the initial region of interest are extracted, and the spatial-spectral feature fusion method is used to cluster and segment the initial region of interest into multiple homogeneous sub-regions; Abnormal regions are identified and cleaned based on the average hyperspectral curves of each sub-region. The cleaned sub-regions are then reconstructed to generate the final region of interest.

2. The method for obtaining the region of interest in a hyperspectral image of cigarette tipping paper according to claim 1, characterized in that, The spatial and spectral features of the initial region of interest are extracted, including: extracting the coordinates (X, Y) of the effective pixels from the initial region of interest as spatial location features; and extracting the spectral data of the effective pixels in the wavelength range of 970nm-1700nm as spectral features, with a wavelength interval of 5nm and a total of 147 bands.

3. The method for obtaining the region of interest in a hyperspectral image of cigarette tipping paper according to claim 1 or 2, characterized in that, The initial region of interest is clustered and segmented using a spatial-spectral feature fusion method, including: The spatial location features and spectral features are standardized separately to eliminate the influence of dimensions; The standardized spatial and spectral features are weighted and combined to obtain the fused features; Based on the fusion features, the initial region of interest is divided into n optimal regions by K-means clustering.

4. The method for obtaining the region of interest in a hyperspectral image of cigarette tipping paper according to claim 3, characterized in that, The standardized spatial and spectral features are weighted and combined to obtain the fused features, including: Under the condition that the sum of spatial weights and spectral weights is always 1, all weight combinations from (0.1, 0.9) to (0.9, 0.1) are traversed with a step size of 0.

1. K-means clustering analysis is performed on each weight combination. The clustering effect is quantified by the silhouette coefficient. The weight combination with the highest score is selected to perform a weighted combination of the standardized spatial features and spectral features.

5. The method for obtaining the region of interest in a hyperspectral image of cigarette tipping paper according to claim 3, characterized in that, K-means clustering is used to divide the initial region of interest into n optimal regions, including: The steps to determine the value of n are as follows: using the elbow rule, the inflection point is taken as the optimal number of regions n by the change of inertia value after K-means clustering, where 5≤n≤10.

6. The method for obtaining the region of interest in a hyperspectral image of cigarette tipping paper according to claim 1, characterized in that, Abnormal regions are identified and cleaned based on the hyperspectral curves of each sub-region, including: The isolated forest algorithm is used to calculate the outlier score of the average hyperspectral curve of each sub-region after clustering. The average hyperspectral curve with the highest outlier score is found based on the relative difference method, and its corresponding sub-region is cleaned and removed.

7. The method for obtaining the region of interest in a hyperspectral image of cigarette tipping paper according to claim 6, characterized in that, The average hyperspectral curve with the highest anomaly score is found based on the relative difference method, including: The anomaly scores of the average hyperspectral curves of each sub-region are sorted in descending order. The differences between adjacent scores are calculated, and the difference results are normalized to locate the maximum value in the normalized difference results.

8. A method for detecting the neotame content in cigarette tipping paper, characterized in that, Includes the following steps: A hyperspectral image sample set of cigarette tipping paper is obtained, and each spectral image sample is processed using the method for obtaining the region of interest of hyperspectral images of cigarette tipping paper according to any one of claims 1-7 to obtain the final region of interest. The average hyperspectral data of the final region of interest is then extracted to obtain a hyperspectral database of cigarette tipping paper. Based on the hyperspectral database of cigarette tipping paper, a predictive model for the neotame content of cigarette tipping paper was constructed. The neotame content of the cigarette tipping paper was detected using a predictive model for neotame content in the cigarette tipping paper.

9. The method for detecting neotame content in cigarette tipping paper according to claim 8, characterized in that, When constructing a prediction model for the neotame content of cigarette tipping paper based on a spectral database, the hyperspectral data in the database is preprocessed using a first-derivative algorithm, the hyperspectral data is selected for feature bands using a genetic algorithm, and the neotame content prediction model is established using the XGBoost algorithm.

10. A device for acquiring the region of interest in a hyperspectral image of cigarette tipping paper, characterized in that, include: The initial region of interest acquisition module is used to acquire and preprocess the hyperspectral image of cigarette tipping paper to generate the initial region of interest. The clustering and segmentation module is used to extract the spatial and spectral features of the initial region of interest, and to use a spatial-spectral feature fusion method to cluster and segment the initial region of interest into multiple homogeneous sub-regions; The final region of interest reconstruction module is used to identify and clean up abnormal regions based on the hyperspectral curves of each sub-region, and then reconstruct the cleaned sub-regions to generate the final region of interest.

11. A device for detecting the neotame content in cigarette tipping paper, characterized in that, include: The initial region of interest acquisition module is used to acquire and preprocess the hyperspectral image of cigarette tipping paper to generate the initial region of interest. The clustering and segmentation module is used to extract the spatial and spectral features of the initial region of interest, and to use a spatial-spectral feature fusion method to cluster and segment the initial region of interest into multiple homogeneous sub-regions; The final region of interest reconstruction module is used to identify and clean up abnormal regions based on the hyperspectral curves of each sub-region, and reconstruct the cleaned sub-regions to generate the final region of interest. The hyperspectral database construction module is used to extract the average hyperspectral data of the final region of interest after reconstruction and construct a hyperspectral database for cigarette tipping paper. The prediction model building module is used to build a prediction model for the neotame content of cigarette tipping paper based on the spectral database of cigarette tipping paper. The detection module is used to detect the neotame content of the cigarette tipping paper under test by using a neotame content prediction model based on the hyperspectral image of the tipping paper.

12. 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; A processor, when executing a program stored in memory, implements the steps of the method as claimed in any one of claims 1 to 7, or implements the steps of the method as claimed in claim 8 or 9.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 7, or the steps of the method as described in claim 8 or 9.

14. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the method as described in any one of claims 1 to 7, or the steps of the method as described in claim 8 or 9.

Citation Information

Patent Citations

  • Method for rapidly detecting content of sweetening agent in tipping paper for cigarettes through near infrared spectrum

    CN115711952A