Method for identifying and calculating stretching rate of tobacco leaves after loosening and moisture regaining
Through industrial cameras, the light-transmitting images of tobacco leaves are collected and combined with grayscale conversion, binarization processing, Robert operator edge detection and morphological filtering technology, the problems of background interference and edge detection distortion in traditional detection methods are solved, and high-precision tobacco leaves stretch rate detection is achieved, which improves detection efficiency and stability.
Patent Information
- Application Number
- CN202510453295.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-11
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2045-04-11
AI Technical Summary
The traditional tobacco leaf stretch rate detection method has problems such as complex background interference, edge detection distortion, small-area noise interference and threshold setting dependence, resulting in low detection efficiency, strong subjectivity and large errors.
The light-transmitting images of tobacco leaves are collected by industrial cameras. Through grayscale conversion, binarization processing, Robert operator edge detection, morphological corrosion and on-operation and other technologies, background interference is removed and the edges of tobacco leaves are extracted. Combined with the adaptive threshold segmentation algorithm, the area ratio of the dark and light-colored areas of the tobacco leaves is calculated to represent the stretching rate.
The image segmentation accuracy is achieved by reaching more than 95%, the edge detection integrity is improved by 30%, and tobacco leaves with different moisture content and varieties are significantly improved. The detection stability and efficiency are eliminated, and the repetitive error of the detection result is less than 2%.
Smart Images

Figure CN119963561A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of tobacco leaf stretch rate identification, and in particular to a method for identifying and calculating the stretch rate of loose and moisturized tobacco leaves. Background Art
[0002] In the tobacco leaf processing, the loosening and moisture recovery process is a key link in tobacco leaf redrying. Its main purpose is to adjust the moisture and temperature of the tobacco leaves so that the tobacco leaves can stretch and reach a suitable processing state. The tobacco leaf stretch rate is an important indicator to measure the loosening and moisture recovery effect, which directly affects the processing quality of subsequent shredding, drying and other processes. Traditional detection methods mainly rely on manual observation and experience judgment, and have problems such as low detection efficiency, strong subjectivity, and large errors. In the prior art, the tobacco leaf stretch rate detection method based on machine vision has gradually been applied. However, the traditional image processing algorithm has the following technical defects: Complex background interference: Tobacco leaves are easily affected by factors such as uneven light source and reflection of lighting board during light transmission detection, which leads to decreased image segmentation accuracy; Edge detection distortion: When using traditional Sobel, Prewitt and other operators for edge detection, they are not adaptable enough to the complex texture of tobacco leaves, and are prone to contour breakage or over-segmentation. Small area noise interference: Small impurities or background noise remaining in the image will affect the accuracy of area calculation; Threshold setting relies on experience: The threshold parameters of existing methods require repeated manual debugging, which makes it difficult to adapt to the differences between different batches of tobacco leaves.
[0003] In summary, we proposed a method for identifying and calculating the stretch rate of loose tobacco leaves after moisture conditioning. Summary of the invention
[0004] The purpose of the present invention is to address the problems existing in the background technology and to propose a method for identifying and calculating the stretch rate of loose tobacco leaves after moisture restoration.
[0005] The technical solution of the present invention is a method for identifying and calculating the stretch rate of loose tobacco leaves after moisture conditioning, comprising: S1: Use an industrial camera to collect the light-transmitting image of loose tobacco leaves after moisture recovery, and adjust the camera focal length, exposure time and light source angle to ensure that the image is clear and free of light spots and shadows; S2: performing leaf segmentation processing on the light-transmitting image, including: S21: converting the original image into a grayscale image, and separating the tobacco leaf area from the background through binarization, wherein the binarization threshold is 0.8; S22: The Robert operator is used to extract the tobacco leaf edge, the edge detection threshold is 0.3, and the background residual interference is removed through filling, corrosion and opening operations; S23: Delete the connected areas with an area less than 1000 pixels and keep the complete tobacco leaf area; S3: Based on the segmented image, the dark area A1 and the light area A2 of the tobacco leaf in the light-transmitting state are calculated, and the grayscale threshold is set to 0.5 to distinguish the dark and light areas; S4: Calculate the stretch ratio K according to the dark area A1 and the light area A2, K=A2 / A1+A2, and the stretch ratio is used to characterize the loose processing quality of tobacco leaves.
[0006] Optionally, in S21, the rgb2gray function is used to perform grayscale conversion, and the im2bw function is used to perform binarization processing.
[0007] Optionally, in S22, edge detection is performed using an edge function in combination with a Robert operator, and an imfill function is used to fill a closed area, and an imerode function is used to erode a background contour line.
[0008] Optionally, in S23, a bwareaopen function is used to perform an opening operation to delete connected regions with an area less than 1000 pixels.
[0009] Optionally, the areas of the dark region and the light region are calculated by using a regionprops function in S3.
[0010] Optionally, the minimum resolution of the industrial camera is greater than 20 million pixels, and the angle of the light source is 30°-60° with the tobacco leaf plane.
[0011] Optionally, the kernel size of the corrosion process is 1 pixel, which is used to eliminate contour lines with a diameter less than 1 pixel in the background.
[0012] Optionally, the stretch rate K ranges from 0 to 1, and a larger K value indicates a higher degree of stretch of the tobacco leaves.
[0013] Compared with the prior art, the present invention has the following beneficial technical effects: Grayscale conversion combined with binarization processing is used to effectively remove the background of the lighting board. Morphological corrosion and opening operations are used to eliminate uneven light sources, reflections and interference from tiny impurities, ensuring that the image segmentation accuracy reaches more than 95%.
[0014] The innovative Robert operator is used to replace the traditional Sobel / Prewitt operator. It targets the texture characteristics of tobacco leaf fibers, reduces edge breakage, and improves contour integrity by 30%, providing a more accurate shape basis for subsequent area calculations.
[0015] Automatic separation of dark / light areas is achieved through the grayscale difference in the translucent area. Compared with the traditional fixed threshold method, it has enhanced adaptability to tobacco leaves with different moisture contents and varieties, and improved detection stability.
[0016] The processing time of a single image is less than 0.3 seconds, and it supports online real-time detection. Compared with manual detection, the efficiency is increased by more than 8 times, and subjective judgment errors are eliminated. The repeatability error of the detection results is less than 2%. A quantitative evaluation index for stretch rate (K=A2 / A1+A2) is established to provide data support for the closed-loop control of loose regain equipment parameters.
[0017] The present invention effectively eliminates background interference and retains the complete leaf contour through grayscale background removal, multi-operator edge detection, and morphological filtering image processing technology; combined with an adaptive threshold segmentation algorithm, accurate identification of the light-transmitting area of the tobacco leaf is achieved, and finally the stretch rate parameter is obtained through area ratio calculation, thus overcoming the shortcomings of traditional detection technology and providing a reliable basis for the intelligent control of the tobacco leaf processing process. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 The original image of the tobacco leaf light transmission image in this embodiment; Figure 2 is a grayscale image of tobacco leaves; Figure 3 for Figure 2 Extracting edge information graph of graphics; Figure 4 for Figure 3 The enclosed area is refilled with the map. DETAILED DESCRIPTION
[0019] The technical scheme of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. The components of the embodiments of the present invention generally described and shown in the accompanying drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention.
[0020] Example
[0021] This embodiment provides a method for identifying and calculating the stretch rate of loose and moisturized tobacco leaves, which is described in detail below.
[0022] 1. Industrial cameras capture translucent images of tobacco leaves S100: Use an industrial camera to collect images of tobacco leaf translucency. This process uses a high-resolution industrial camera to obtain images of tobacco leaf samples, ensuring that the image quality is clear enough to accurately display the translucent area of the tobacco leaf. In this step, ensure that the camera is set correctly, adjust the focus, exposure time, light source angle and other parameters to obtain uniform image quality and avoid interference such as light spots and shadows.
[0023] 2. Leaf segmentation S101: Figure 1-Figure 2 First, the background of the lighting board is removed by grayscale. The collected original image is converted into a grayscale image using the "rgb2gray" function, and then the grayscale image is converted into a binary image using the "im2bw" function, with the threshold parameter set to 0.8. After the binarization process, the tobacco leaf area can be clearly displayed.
[0024] S102: After removing the background area, Figure 3 As shown, the "Robert" operator is used to extract edge information in the image, which is specifically implemented through the "edge" function, and the threshold parameter is set to 0.3. This step helps to remove interference in the background and improve the extraction accuracy of tobacco leaves in the image.
[0025] In order to eliminate unnecessary contour information in the background, the closed area is refilled using the “imfill” function, such as Figure 4 Next, the image is eroded using the “imerode” function to remove the 1-pixel-diameter contour lines in the background, and the remaining background contours will become disconnected pixels.
[0026] The image is further opened using the "bwareaopen" function to delete the connected areas in the image that are smaller than a specified area (e.g. 1000 pixels), thereby eliminating the influence of small particles. After the final processing, only the tobacco leaf information is in the image, and the background influence is completely eliminated.
[0027] 3. Calculation of area in light-transmitting state S103: Calculate the area ratio of the dark area and the light area in the light-transmitting state through the processed image. Use the areas with different gray values in the image to distinguish the dark and light parts. In this step, by selecting a suitable threshold of 0.5, the pixels in the image are divided into dark areas and light areas. Use the "regionprops" function to calculate the areas of these two areas.
[0028] S104: The dark area A1 and the light area A2 of the tobacco leaf in the light-transmitting state calculated by the above method are finally calculated as the ratio K=A2 / A1+A2, which is used as the stretch rate of the batch of tobacco leaf samples. The higher the stretch rate, the better the expansion degree of the tobacco leaf, the better the loosening effect, and the better the processing quality of the tobacco leaf.
[0029] The above specific embodiments are only several optional embodiments of the present invention. Based on the technical solutions of the present invention and the relevant inspirations 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 identifying and calculating the stretch rate of loose tobacco leaves after moisture conditioning, characterized in that: include: S1: Use an industrial camera to collect the light-transmitting image of loose tobacco leaves after moisture recovery, and adjust the camera focal length, exposure time and light source angle; S2: performing leaf segmentation processing on the light-transmitting image, including: S21: converting the original image into a grayscale image, and separating the tobacco leaf area from the background through binarization, wherein the binarization threshold is 0.8; S22: The Robert operator is used to extract the tobacco leaf edge, the edge detection threshold is 0.3, and the background residual interference is removed through filling, corrosion and opening operations; S23: Delete the connected areas with an area less than 1000 pixels and keep the complete tobacco leaf area; S3: Based on the segmented image, the dark area A1 and the light area A2 of the tobacco leaf in the light-transmitting state are calculated, and the grayscale threshold is set to 0.5 to distinguish the dark and light areas; S4: Calculate the stretch ratio K according to the dark area A1 and the light area A2, K=A2 / A1+A2, and the stretch ratio is used to characterize the loose processing quality of tobacco leaves.
2. The method for identifying and calculating the stretch rate of loose tobacco leaves after moisture conditioning according to claim 1, characterized in that: In the S21, the rgb2gray function is used to perform grayscale conversion, and the im2bw function is used to perform binarization processing.
3. The method for identifying and calculating the stretch rate of loose tobacco leaves after moisture conditioning according to claim 1, characterized in that: In S22, the edge function is combined with the Robert operator to perform edge detection, the imfill function is used to fill the closed area, and the imerode function is used to erode the background contour line.
4. The method for identifying and calculating the stretch rate of loose tobacco leaves after moisture conditioning according to claim 1, characterized in that: In S23, the bwareaopen function is used to perform an opening operation to delete connected areas with an area less than 1000 pixels.
5. The method for identifying and calculating the stretch rate of loose tobacco leaves after moisture conditioning according to claim 1, characterized in that: In the S3, the areas of the dark and light regions are calculated by the regionprops function.
6. The method for identifying and calculating the stretch rate of loose tobacco leaves after moisture conditioning according to claim 1, characterized in that: The minimum resolution of the industrial camera is greater than 20 million pixels, and the light source angle is 30°-60° with the tobacco leaf plane.
7. The method for identifying and calculating the stretch rate of loose tobacco leaves after moisture conditioning according to claim 1, characterized in that: The kernel size of the corrosion process is 1 pixel, which is used to eliminate the contour lines with a diameter less than 1 pixel in the background.
8. The method for identifying and calculating the stretch rate of loose tobacco leaves after moisture conditioning according to claim 1, characterized in that: The stretch rate K ranges from 0 to 1.
Citation Information
Patent Citations
Determination method for unfolding degree of tobacco sheet
CN102854135A
Tobacco leaf stretching rate detection method and device
CN111157526A
Method for measuring flatness of cigar tobacco leaf surface
CN115824114A
Method and device for digitalizing appearance quality defective indexes of flue-cured tobacco leaves
CN116152162A
Tobacco leaf flatness measuring device and method based on machine vision
CN119268609A
Cited By
Linkage regulation and control method for processing strength in loosening and moisture regaining process and export tobacco leaf stretching rate
CN120616182A