A method for representing a structure distribution of tobacco sheets based on image recognition
By employing an image recognition-based method, deep network models, and grayscale segmentation algorithms, a multi-level quantitative analysis of the structure of loosened tobacco leaves was achieved. This solved the problems of low efficiency and strong subjectivity in traditional detection methods, and improved detection accuracy and efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA TOBACCO ANHUI IND CO LTD
- Filing Date
- 2026-04-09
- Publication Date
- 2026-06-05
AI Technical Summary
Existing technologies lack methods for multi-level, quantitative, and automated analysis of the expanded structure of loosened tobacco leaves, resulting in low detection efficiency, high subjectivity, and large errors.
An image recognition-based method is adopted to accurately identify tobacco leaf regions through a deep network model. Combined with grayscale segmentation and sample structure proportion algorithms, the method realizes quantitative differentiation of tobacco leaf overlapping layers and calculation of total spread area. Image segmentation and binarization are performed using grayscale value ranges to calculate tobacco leaf outline area and sample structure proportion.
It enables multi-level, quantitative, and automated analysis of tobacco leaf structure, improving detection accuracy and efficiency, reducing subjective human interference, and is highly adaptable to the detection of tobacco leaves of different varieties and conditions.
Smart Images

Figure CN122156290A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of tobacco leaf unfolding structure recognition technology, and particularly to a calculation method for recognizing the unfolding structure of loosened and rehydrated tobacco leaves. Background Technology
[0002] In tobacco processing, the loosening and rehydration process is a crucial step in tobacco re-drying. Its main purpose is to regulate the moisture and temperature of the tobacco leaves, allowing them to unfurl and reach a suitable processing state. The leaf unfurling rate, as an important indicator of the effectiveness of loosening and rehydration, directly affects the processing quality of subsequent processes such as shredding and drying. Traditional testing methods mainly rely on manual observation and experience, which suffers from low efficiency, strong subjectivity, and large errors.
[0003] Although similar characterization methods have been disclosed in the prior art, such as a characterization method for airflow drying processing intensity (publication number CN111358031B); a characterization method for thin plate drying processing intensity (publication number CN111238994B); a quantitative characterization method for tobacco processing line processing intensity (publication number CN110301664B); a characterization method for tobacco leaf and shred breakage during cigarette processing (publication number CN114609006B); a method for characterizing shred length characteristic values by coupling shred skeleton length and shred distribution (publication number CN118518823A); and a method for characterizing the dryness sensation of cigarette smoking (publication number CN118032854A), none of these are used in the loosening and rehydration process.
[0004] In the existing technology, machine vision-based methods for detecting the unfolding rate of tobacco leaves are gradually being applied. For example, there is an adaptive evaluation method for loosening and rehydration processing parameters published in CN114839105B. However, there is still a lack of a characterization method that can perform multi-level, quantitative, and automatic analysis of the unfolding structure of loosened tobacco leaves. Summary of the Invention
[0005] The present invention aims to address the shortcomings of the existing technology by providing a characterization method for the distribution of tobacco leaf structure based on image recognition. This method aims to achieve multi-level and quantitative automatic analysis of the structure of loosened tobacco leaves, thereby providing a reliable basis for intelligent control of the tobacco processing process.
[0006] To achieve the above-mentioned objectives, the present invention adopts the following technical solution: The present invention provides a method for characterizing the structural distribution of tobacco leaves based on image recognition, characterized by comprising: Step 1: Obtain an image of loosened tobacco leaves, and process the image using a loosened tobacco leaf recognition algorithm to obtain an enhanced grayscale image of the tobacco leaves; Step 2: The outline of the tobacco leaf in the enhanced tobacco leaf grayscale image is segmented in different grayscale value ranges using a grayscale segmentation algorithm, and the area of the tobacco leaf outline in different grayscale value ranges is obtained accordingly, thereby obtaining the total spread area S of the tobacco leaf in the enhanced tobacco leaf grayscale image. Step 3: Following the process of Steps 1-2, obtain the total spread area {S1, S2, ..., S} of the tobacco leaves in m enhanced grayscale images. j S m}; where S j represents the total spread area of the tobacco leaf in the j-th enhanced grayscale image; m represents the total number of grayscale images of tobacco leaves; Step 4: Based on {S1, S2, ..., S... j S m The sample structure proportion is obtained within the target area using the sample structure proportion algorithm.
[0007] The characteristic of the image recognition-based tobacco leaf structure distribution characterization method of the present invention is that step 1 includes: Step 1.1: Based on the preset deep network model, determine the tobacco leaf recognition box and its coordinate information in the tobacco leaf image; Step 1.2: Based on the coordinate information of the tobacco leaf recognition box, obtain the tobacco leaf recognition box in the tobacco leaf image through masking. Step 1.3: Perform grayscale processing on the image within the tobacco leaf recognition frame to obtain a grayscale tobacco leaf image; Step 1.4: Perform quality enhancement processing on the grayscale tobacco leaf image to obtain an enhanced grayscale tobacco leaf image.
[0008] Furthermore, step 2 includes: Step 2.1: Select the highest grayscale value from the enhanced tobacco leaf grayscale image as the standard grayscale value X; Step 2.2: Based on the different gray values corresponding to tobacco leaves with different numbers of folds, set n gray value intervals {Q1, Q2, ..., Q...} i Q n}; where Q1 represents the range of highest grayscale values, Q i Q represents the i-th grayscale value range. n This represents the lowest grayscale value range, and n represents the total number of grayscale value ranges. Step 2.3: Segment the enhanced tobacco leaf grayscale image using n grayscale value intervals to obtain n grayscale image regions {P1, P2, ..., P...} i ... P n}; where P1 is the grayscale image region corresponding to a single layer of tobacco leaves, Pi P represents the grayscale image region corresponding to the i-th layer of overlapping tobacco leaves; n This represents the grayscale image region corresponding to n layers of overlapping tobacco leaves; Step 2.4: Binarize the n grayscale image regions to obtain n binarized images, and extract the contours to obtain n tobacco leaf contour images; Step 2.5: Calculate the area {R1, R2, ..., R} of the tobacco leaf contours in the n tobacco leaf contour images. i ..., R n Thus, the total spread area of the tobacco leaf in the enhanced tobacco grayscale image is obtained as S = R1×1 + R2×2…R n ×n, where R i Let be the area of the tobacco leaf contour in the i-th tobacco leaf contour image.
[0009] Furthermore, step 4 includes: Step 4.1: Based on the standard grayscale value of each enhanced tobacco leaf grayscale image, set the corresponding tobacco leaf spreading coefficients {W1, W2, ..., W...} j ... W m}, where W j This represents the tobacco leaf spread coefficient of the j-th enhanced grayscale image of the tobacco leaf; Step 4.2, according to {S1, S2, ..., S... j S m}, select all tobacco leaf grayscale images from m enhanced tobacco leaf grayscale images whose total spread area falls within the set target area range; Step 4.3: Sum the total unfolded areas of all the selected tobacco leaf grayscale images to obtain the area accumulation value. ; Step 4.4: Use equation (1) to obtain the sample structure proportion T corresponding to the target area range: (1).
[0010] The present invention provides an electronic device, including a memory and a processor, characterized in that the memory is used to store a program supporting the processor in performing the method described therein, and the processor is configured to execute the program stored in the memory.
[0011] The present invention discloses a computer-readable storage medium storing a computer program, characterized in that the computer program is executed by a processor to perform the steps of the method described thereon.
[0012] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention accurately identifies tobacco leaf regions through a deep network model and combines grayscale segmentation to achieve quantitative differentiation of overlapping layers of tobacco leaves, solving the problem that traditional technologies cannot detect the number of overlapping layers; 2. This invention uses layer weighting to calculate the total spread area, and the characterization results are more consistent with the actual state of tobacco leaves, greatly improving the characterization accuracy; 3. This invention achieves automated batch testing, objectively evaluates the structural distribution of tobacco leaves by the proportion of sample structure, eliminates subjective human interference, and features high testing efficiency and strong standardization. 4. The method of the present invention is highly adaptable, and the gray range and sample quantity can be adaptively adjusted, making it suitable for the detection of tobacco leaves of different varieties and in different conditions. Attached Figure Description
[0013] Figure 1 This is a flowchart of the method. Figure 2 Original image of tobacco leaves; Figure 3 A grayscale image of tobacco leaves; Figure 4 A binary image of tobacco leaves; Figure 5 This is a schematic diagram of a grayscale image; Figure 6 This is a schematic diagram of the area of a grayscale image; Figure 7 This is a schematic diagram of the tobacco leaf spread coefficient in a grayscale image; Figure 8 This is a grayscale image showing the tobacco leaf spread coefficient. Detailed Implementation
[0014] In this embodiment, a method for characterizing the distribution of tobacco leaf structure based on image recognition is described, such as... Figure 1 As shown, it includes: Step 1: Use an industrial camera to capture images of the tobacco leaves under transmitted light, and use these images as images of the loosened tobacco leaves. Figure 2 As shown, the tobacco leaf image is processed using a loosened tobacco leaf recognition algorithm to obtain an enhanced grayscale image of the tobacco leaf, as shown. Figure 3 As shown; Step 1.1: Detect tobacco leaf targets using a pre-trained deep network model, and determine the tobacco leaf identification box and its coordinate information in the tobacco leaf image; in this embodiment, the tobacco leaf region identification and extraction uses a pre-trained Faster R-CNN model.
[0015] Step 1.2: Based on the coordinate information of the tobacco leaf recognition box, obtain the tobacco leaf recognition box in the tobacco leaf image through masking. Step 1.3: Perform grayscale processing on the image within the tobacco leaf recognition frame to obtain a grayscale tobacco leaf image; Step 1.4: Histogram equalization is used to enhance the quality of the grayscale tobacco leaf image, resulting in an enhanced grayscale image of the tobacco leaf, thereby improving the grayscale contrast.
[0016] Step 2: The outline of the tobacco leaf in the enhanced tobacco leaf grayscale image is segmented in different grayscale value ranges using a grayscale segmentation algorithm. The area of the tobacco leaf outline in different grayscale value ranges is obtained accordingly, thereby obtaining the total spread area S of the tobacco leaf in the enhanced tobacco leaf grayscale image. Step 2.1: Select the highest grayscale value from the enhanced tobacco leaf grayscale image as the standard grayscale value X; Step 2.2: Based on the different gray values corresponding to tobacco leaves with different numbers of folds, set n gray value intervals {Q1, Q2, ..., Q...} i Q n}; where Q1 represents the range of highest grayscale values, Q i Q represents the i-th grayscale value range. n This represents the lowest grayscale value range, and n represents the total number of grayscale value ranges.
[0017] Step 2.3: Segment the enhanced tobacco leaf grayscale image using n grayscale value intervals to obtain n grayscale image regions {P1, P2, ..., P...} i ... P n}; where P1 is the grayscale image region corresponding to a single layer of tobacco leaves, P i P represents the grayscale image region corresponding to the i-th layer of overlapping tobacco leaves; n This represents the grayscale image region corresponding to n layers of overlapping tobacco leaves.
[0018] Step 2.4: Binarize the n grayscale image regions to obtain n binary images, such as... Figure 3 As shown, contour extraction is performed on n binarized images to obtain n tobacco leaf contour images.
[0019] Step 2.5: Calculate the area {R1, R2, ..., R} of the tobacco leaf contours in the n tobacco leaf contour images. i ..., R n Thus, the total spread area of the tobacco leaf in the enhanced tobacco grayscale image is obtained as S = R1×1 + R2×2…R n ×n, where R i Let be the area of the tobacco leaf contour in the i-th tobacco leaf contour image.
[0020] Step 3: Following the process of Steps 1-2, obtain the total spread area {S1, S2, ..., S} of the tobacco leaves in m enhanced grayscale images. j S m}; where Sj The total spread area of the tobacco leaf in the j-th enhanced grayscale image of the tobacco leaf is represented by m; m represents the total number of grayscale images of the tobacco leaf. In this embodiment, under uniform lighting conditions, an industrial camera is used to vertically photograph loosely spread tobacco leaf samples, and m=5 color images are collected, all with a resolution of 2048×1536 pixels, and saved in JPG format.
[0021] Step 4: Based on {S1, S2, ..., S... j S m The sample structure proportion is obtained within the target area using the sample structure proportion algorithm.
[0022] Step 4.1: Based on the standard grayscale value of each enhanced tobacco leaf grayscale image, set the corresponding tobacco leaf spreading coefficients {W1, W2, ..., W...} j ... W m}, where W j This represents the tobacco leaf spread coefficient of the j-th enhanced grayscale image of the tobacco leaf; Step 4.2, according to {S1, S2, ..., S... j S m From m enhanced tobacco leaf grayscale images, select all tobacco leaf grayscale images whose total spread area falls within the set target area range.
[0023] Step 4.3: Sum the total unfolded areas of all the selected tobacco leaf grayscale images to obtain the area accumulation value. ; Step 4.4: Use equation (1) to obtain the sample structure proportion T corresponding to the target area range, which is used to comprehensively evaluate the degree of tobacco leaf unfolding: (1).
[0024] In this embodiment, an electronic device includes a memory and a processor. The memory stores a program that supports the processor in executing the methods described above, and the processor is configured to execute the program stored in the memory.
[0025] In this embodiment, a computer-readable storage medium stores a computer program, which is executed by a processor to perform the steps of the above method.
[0026] Example: For the first tobacco leaf image, such as Figure 5As shown, the grayscale values of the grayscale image are measured, and the highest grayscale value is X1, which is used as the standard grayscale value. Three grayscale intervals are set: Q1: A1~A2 (single-layer extended region), Q2: A2~A3 (two-layer overlapping region), Q3: A3~A4 (three-layer overlapping region). Sub-images P1, P2, and P3 are obtained according to each interval, and Otsu binarization and contour extraction are performed respectively.
[0027] like Figure 6 As shown, calculate the areas of P1, P2, and P3 as R1, R2, and R3, respectively.
[0028] Then calculate the total extended area S1 = R1×1 + R2×2 + R3×3; Based on the above calculation method, the same calculation is performed on the subsequent 4 images to obtain the total unfolded area of each image: S2, S3, S4, S5.
[0029] like Figure 7 , Figure 8 As shown, the stretching coefficients are set according to the gray values: W1, W2, W3, W4, W5. Now, the structural values of samples with areas between B1 and B2 are needed. Let the samples between B1 and B2 be P1, P2, P3, and P5. Then, the structural value T of the sample is calculated using equation (2): (2) As can be seen from the above, the structure value of the tobacco leaf in the sample image with an area between B1 and B2 is T.
[0030] The above specific embodiments are merely several optional embodiments of the present invention. Based on the technical solutions of the present invention and the relevant teachings of the above embodiments, those skilled in the art can make various alternative improvements and combinations to the above specific embodiments.
Claims
1. A method for characterizing the structural distribution of tobacco leaves based on image recognition, characterized in that, include: Step 1: Obtain an image of loosened tobacco leaves, and process the image using a loosened tobacco leaf recognition algorithm to obtain an enhanced grayscale image of the tobacco leaves; Step 2: The outline of the tobacco leaf in the enhanced tobacco leaf grayscale image is segmented in different grayscale value ranges using a grayscale segmentation algorithm, and the area of the tobacco leaf outline in different grayscale value ranges is obtained accordingly, thereby obtaining the total spread area S of the tobacco leaf in the enhanced tobacco leaf grayscale image. Step 3: Following the process of Steps 1-2, obtain the total spread area {S1, S2, ..., S} of the tobacco leaves in m enhanced grayscale images. j S m }; where S j represents the total spread area of the tobacco leaf in the j-th enhanced grayscale image; m represents the total number of grayscale images of tobacco leaves; Step 4: Based on {S1, S2, ..., S... j S m The sample structure proportion is obtained within the target area using the sample structure proportion algorithm.
2. The method for characterizing tobacco leaf structure distribution based on image recognition according to claim 1, characterized in that, Step 1 includes: Step 1.1: Based on the preset deep network model, determine the tobacco leaf recognition box and its coordinate information in the tobacco leaf image; Step 1.2: Based on the coordinate information of the tobacco leaf recognition box, obtain the tobacco leaf recognition box in the tobacco leaf image through masking. Step 1.3: Perform grayscale processing on the image within the tobacco leaf recognition frame to obtain a grayscale tobacco leaf image; Step 1.4: Perform quality enhancement processing on the grayscale tobacco leaf image to obtain an enhanced grayscale tobacco leaf image.
3. The method for characterizing tobacco leaf structure distribution based on image recognition according to claim 1, characterized in that, Step 2 includes: Step 2.1: Select the highest grayscale value from the enhanced tobacco leaf grayscale image as the standard grayscale value X; Step 2.2: Based on the different gray values corresponding to tobacco leaves with different numbers of folds, set n gray value intervals {Q1, Q2, ..., Q...} i Q n }; where Q1 represents the range of highest grayscale values, Q i Q represents the i-th grayscale value range. n This represents the lowest grayscale value range, and n represents the total number of grayscale value ranges. Step 2.3: Segment the enhanced tobacco leaf grayscale image using n grayscale value intervals to obtain n grayscale image regions {P1, P2, ..., P...} i ... P n }; where P1 is the grayscale image region corresponding to a single layer of tobacco leaves, P i P represents the grayscale image region corresponding to the i-th layer of overlapping tobacco leaves; n This represents the grayscale image region corresponding to n layers of overlapping tobacco leaves; Step 2.4: Binarize the n grayscale image regions to obtain n binarized images, and extract the contours to obtain n tobacco leaf contour images; Step 2.5: Calculate the area {R1, R2, ..., R} of the tobacco leaf contours in the n tobacco leaf contour images. i ..., R n Thus, the total spread area of the tobacco leaf in the enhanced tobacco grayscale image is obtained as S = R1×1 + R2×2…R n ×n, where R i Let be the area of the tobacco leaf contour in the i-th tobacco leaf contour image.
4. The method for characterizing tobacco leaf structure distribution based on image recognition according to claim 1, characterized in that, Step 4 includes: Step 4.1: Based on the standard grayscale value of each enhanced tobacco leaf grayscale image, set the corresponding tobacco leaf spreading coefficients {W1, W2, ..., W...}. j ..., W m }, where W j This represents the tobacco leaf spread coefficient of the j-th enhanced grayscale image of the tobacco leaf; Step 4.2, according to {S1, S2, ..., S... j S m }, select all tobacco leaf grayscale images from m enhanced tobacco leaf grayscale images whose total spread area falls within the set target area range; Step 4.3: Sum the total unfolded areas of all the selected tobacco leaf grayscale images to obtain the area accumulation value. ; Step 4.4: Use equation (1) to obtain the sample structure proportion T corresponding to the target area range: (1)。 5. An electronic device, comprising a memory and a processor, characterized in that, The memory is used to store a program that supports a processor in executing the method of any one of claims 1-4, the processor being configured to execute the program stored in the memory.
6. A computer-readable storage medium storing a computer program thereon, characterized in that, The computer program is executed by the processor to perform the steps of the method according to any one of claims 1-4.