Method for Measuring Tobacco Leaf Weight
By processing the tobacco leaf images and calculating the weight of the leaves and veins, the problem of difficulty in accurately determining the weight difference of tobacco leaf in the prior art and the time spent on weighing a single tobacco leaf is solved, and more efficient tobacco leaf weight measurement and product consistency are achieved.
Patent Information
- Application Number
- CN202210529448.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-16
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2042-05-16
AI Technical Summary
In the prior art, it is difficult to accurately determine the weight difference of the same batch of tobacco leaves during the tobacco leaves sorting and graded process, and the weighing of a single tobacco leaves is long and lacks operability.
By collecting images of tobacco leaves, the leaf area and vein area are obtained respectively, and their weight is calculated, and the total weight of the tobacco leaves is obtained. The method includes pre-constructing a light and dark-weight comparison table, obtaining weight coefficients by looking for the light and darkness comparison table, and calculating the weight of the blades and veins.
It achieves a relatively accurate weight estimation of tobacco leaves, improves product consistency, reduces the time-consuming consumption of single tobacco leaves, and is suitable for continuous production environments.
Smart Images

Figure CN114994033B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of tobacco leaf processing, and particularly relates to a method for measuring the weight of tobacco leaves. Background Art
[0002] Tobacco leaf sorting and grading refers to the process of judging the tobacco leaves obtained after baking during the tobacco leaf processing, so as to determine the corresponding grades of tobacco leaves. To achieve better product consistency and product differentiation design, different grades of tobacco leaves can be screened and collected through tobacco leaf sorting and grading, so as to facilitate subsequent production work. During the tobacco leaf sorting and grading process, the identity of the tobacco leaf, or rather the weight of the tobacco leaf, is also an important factor for grading the tobacco leaf.
[0003] In the prior art, for the determination of the identity of tobacco leaves, that is, the process of weighing tobacco leaves is usually realized by using weighing equipment. For example, for the same batch of tobacco leaves, sampling and weighing are carried out, and the weight average value is used as the weight of all tobacco leaves in this batch. However, in the actual implementation process, the inventor found that there will be a certain degree of weight difference in the same batch of tobacco leaves during the planting and harvesting processes, and the above method cannot truly ensure that the tobacco leaves in the same batch have similar identities. And weighing single tobacco leaves is time-consuming during the production process and is not operable. Summary of the Invention
[0004] In view of the above problems existing in the prior art, a method for measuring the weight of tobacco leaves is provided herein.
[0005] The specific technical solution is as follows:
[0006] A method for measuring the weight of tobacco leaves includes:
[0007] Step S1: Collect the tobacco leaf image of the tobacco leaves;
[0008] Step S2: Respectively obtain the leaf area and the vein area from the tobacco leaf image;
[0009] Step S3: Respectively calculate the leaf weight of the leaf area and the vein weight of the vein area, and obtain the weight of the tobacco leaves according to the leaf weight and the vein weight.
[0010] Preferably, in the step S1, the method for collecting the tobacco leaf image includes: placing the tobacco leaves on a transparent bottom plate, uniformly projecting an illumination light onto the tobacco leaves, and collecting the transmitted light image of the tobacco leaves as the tobacco leaf image.
[0011] Preferably, the step S2 includes:
[0012] Step S21: Separate the tobacco leaf area from the background image in the tobacco leaf image;
[0013] Step S22: Split the main vein from the tobacco leaf area to obtain the vein area, and then use the remaining part of the tobacco leaf area as the leaf area.
[0014] Preferably, in the step S3, the method for generating the leaf weight includes:
[0015] Step A31: Extract the brightness and darkness degree of each pixel from the leaf area;
[0016] Step A32: Generate a weight coefficient corresponding to the pixel according to the brightness and darkness degree;
[0017] Step A33: Generate the leaf weight according to the weight coefficients of all the pixels.
[0018] Preferably, before the step S1, a brightness-weight look-up table is pre-constructed;
[0019] Then in the step A32, use the brightness and darkness degree to look up the brightness-weight look-up table to obtain the weight coefficient corresponding to the pixel.
[0020] Preferably, the method for generating the brightness-weight look-up table includes:
[0021] Step A01: Obtain a plurality of sample tobacco leaves with different grades and weights, and collect sample images of the sample tobacco leaves under a uniform light condition;
[0022] Step A02: Extract the brightness and darkness degree of the sample tobacco leaf and the area of the sample tobacco leaf from the sample image, and record the weight of the sample tobacco leaf;
[0023] Step A03: Generate a brightness-degree - weight correspondence relationship corresponding to each pixel according to the brightness and darkness degree, the area and the weight, and record all the brightness-degree - weight correspondence relationships in the brightness-weight look-up table.
[0024] Preferably, in the step S3, the method for generating the vein weight includes:
[0025] Step B31: Obtain the first end point and the second end point of the vein area, and split the outer contour of the vein area into a first contour line and a second contour line according to the first end point and the second end point;
[0026] The first end point and the second end point are the farthest end points of the vein area;
[0027] Step B32: Set multiple pairs of equally - divided points on the first contour line and the second contour line respectively, and connect each pair of the equally - divided points to divide the vein area into multiple sections;
[0028] Step B33: Calculate the weight of each of the sections respectively to obtain the vein weight of the vein area.
[0029] Preferably, the step B33 includes:
[0030] Step B331: Obtain the average section length of the section according to the length of the first contour line, the length of the second contour line and the equally - divided points, and at the same time obtain the first distance and the second distance between the two pairs of the equally - divided points of the section;
[0031] Step B332: Generate the section weight of the section according to the first distance, the second distance, the average section length and a pre - constructed area - weight coefficient;
[0032] Step B333: Generate the vein weight according to all the section weights.
[0033] Preferably, in the step B31, an artificial intelligence model is used to identify the first endpoint and the second endpoint;
[0034] Alternatively, a morphological recognition method is used to obtain the first endpoint and the second endpoint.
[0035] The above - mentioned technical solution has the following advantages or beneficial effects: By collecting the images of tobacco leaves and calculating their leaf weights and vein weights respectively based on the images, a relatively accurate weight estimation of tobacco leaves is realized, and the identity of tobacco leaves is determined more accurately to improve the product consistency; at the same time, in the production process, only image collection and transportation of tobacco leaves are required, avoiding the problem of long time consumption when placing single tobacco leaves on a scale, and being better applicable to a continuous production environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Refer to the attached drawings to more fully describe the embodiments of the present invention. However, the attached drawings are only for illustration and explanation and do not constitute a limitation on the scope of the present invention.
[0037] Figure 1 It is the overall schematic diagram of the embodiment of the present invention;
[0038] Figure 2 It is the schematic diagram of the tobacco leaf image in the embodiment of the present invention;
[0039] Figure 3 It is the schematic diagram of the sub - steps of step S1 in the embodiment of the present invention;
[0040] Figure 4Schematic diagram of the leaf weight generation process in the embodiment of the present invention;
[0041] Figure 5 Schematic diagram of the light-dark weight comparison table generation process in the embodiment of the present invention;
[0042] Figure 6 Schematic diagram of the vein weight generation process in the embodiment of the present invention;
[0043] Figure 7 Schematic diagram of the main vein of the tobacco leaf in the embodiment of the present invention;
[0044] Figure 8 Schematic diagram of the sub-steps of step B33 in the embodiment of the present invention;
[0045] Figure 9 Schematic diagram of the vein interval in the embodiment of the present invention. Detailed implementation manners
[0046] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0047] It should be noted that, without conflict, the embodiments in the present invention and the features in the embodiments may be combined with each other.
[0048] Next, the present invention will be further described in conjunction with the accompanying drawings and specific embodiments, but it is not a limitation of the present invention.
[0049] The present invention includes:
[0050] A method for measuring the weight of tobacco leaves, as Figure 1 shown, includes:
[0051] Step S1: Collect the tobacco leaf image of the tobacco leaf;
[0052] Step S2: Respectively obtain the leaf area and the vein area from the tobacco leaf image;
[0053] Step S3: Respectively calculate the leaf weight of the leaf area and the vein weight of the vein area, and obtain the weight of the tobacco leaf according to the leaf weight and the vein weight.
[0054] Specifically, aiming at the problem in the prior art that it is difficult to weigh and identify a single tobacco leaf, in this embodiment, by collecting a tobacco leaf image and calculating the weight for the leaf area and the vein area respectively from the tobacco leaf image, a more accurate single tobacco leaf image can be obtained. The above collection and judgment processes can be realized during the transportation of the tobacco leaf, and there is no need to set up independent grasping and weighing equipment, so it is relatively simple in the production process and can effectively improve the production efficiency.
[0055] In a preferred embodiment, in step S1, the method for collecting a tobacco leaf image includes: placing the tobacco leaf on a transparent bottom plate, uniformly projecting an irradiation light on the tobacco leaf, and collecting the light-transmitting image of the tobacco leaf as the tobacco leaf image.
[0056] Specifically, to achieve better production efficiency, in this embodiment, by placing the tobacco leaf on the transparent bottom plate, and then uniformly projecting an irradiation light on the tobacco leaf, thus forming a tobacco leaf image as shown in Figure 2 . During the irradiation process, the brightness of the light and the white balance of the image sensor should be controlled so that the light can appropriately penetrate the leaf part to clearly display the vein area A, facilitating subsequent determination of the thickness of the leaf area B based on the brightness and separating the vein area from the tobacco leaf.
[0057] In a preferred embodiment, as shown in Figure 3 , step S2 includes:
[0058] Step S21: Separating the tobacco leaf area from the background image in the tobacco leaf image;
[0059] Step S22: Segmenting the main vein of the tobacco leaf from the tobacco leaf area to obtain the vein area, and then taking the remaining part of the tobacco leaf area as the leaf area.
[0060] Specifically, to achieve a better weight estimation effect for the tobacco leaf, in this embodiment, the collected tobacco leaf image is processed by a semantic recognition model, and the tobacco leaf area is separated from the background image as the foreground, so as to obtain a relatively pure tobacco leaf image. At the same time, since the surface of the tobacco leaf is irradiated with strong light during the collection of the tobacco leaf image, the vein part has a significantly lower brightness compared to the leaf area. Based on this image feature, a vein recognition model can be used to identify the main vein of the tobacco leaf to extract the vein area A, and at the same time obtain the remaining leaf area B. In this process, the tobacco leaf image can also be set as a grayscale image and subjected to binarization processing to obtain the position of the vein area A in the image, and the remaining part is taken as the leaf area B.
[0061] In a preferred embodiment, as shown in Figure 4 , in step S3, the method for generating the leaf weight includes:
[0062] Step A31: Extract the brightness and darkness of each pixel from the leaf area respectively;
[0063] Step A32: Generate a weight coefficient corresponding to the pixel according to the brightness and darkness;
[0064] Step A33: Generate the leaf weight according to the weight coefficients of all pixels.
[0065] Specifically, to achieve a better weight estimation effect for tobacco leaves, in this embodiment, by respectively obtaining each pixel in the leaf area and judging the brightness and darkness of each pixel, it is possible to judge the amount of substances at the tobacco leaf position corresponding to the pixel according to the brightness and darkness, and then obtain the weight coefficient corresponding to the tobacco leaf position. The leaf weight is obtained by summing the weight coefficients of the tobacco leaf positions represented by each pixel.
[0066] In the implementation process, the above-mentioned brightness and darkness refer to the gray value of the pixel, or the color, gray level and saturation of the pixel. For example, in one embodiment, for the same type of tobacco leaf, it can use only the gray value of the pixel to judge the thickness of the tobacco leaf position corresponding to the pixel, and then obtain the corresponding weight coefficient. In another embodiment, for multiple different varieties of tobacco leaves on the production line, by combining the color and saturation of the tobacco leaves for comprehensive judgment, the measurement error caused by the difference in light transmittance due to the color of the tobacco leaves can be avoided, so as to achieve better measurement accuracy.
[0067] In a preferred embodiment, before step S1, a brightness-weight look-up table is pre-constructed;
[0068] Then in step A32, the brightness-weight look-up table is used to find the weight coefficient corresponding to the pixel.
[0069] Specifically, aiming at the problem that it takes a long time to weigh single tobacco leaves separately in the prior art, in this embodiment, by pre-constructing a brightness-weight look-up table to calibrate the weight coefficients for multiple typical brightness and darkness levels, so that in step A32, the weight coefficient corresponding to the current brightness and darkness can be quickly judged according to the brightness-weight look-up table.
[0070] In a preferred embodiment, as Figure 5 shown, the generation method of the brightness-weight look-up table includes:
[0071] Step A01: Obtain sample tobacco leaves of multiple different grades and different weights, and collect sample images of the sample tobacco leaves under a uniform light condition;
[0072] Step A02: Extract the brightness and darkness of the sample tobacco leaves, the area of the sample tobacco leaves from the sample images, and record the weight of the sample tobacco leaves;
[0073] Step A03: Generate a lightness-weight correspondence relationship corresponding to each pixel according to the lightness, area, and weight, and record all the lightness-weight correspondence relationships in the lightness-weight correspondence table.
[0074] In a preferred embodiment, as Figure 6 shown, in step S3, the method for generating the vein weight includes:
[0075] Step B31: Obtain the first endpoint and the second endpoint of the vein region, and split the outer contour of the vein region into a first contour line and a second contour line according to the first endpoint and the second endpoint;
[0076] The first endpoint and the second endpoint are the farthest endpoints of the vein region;
[0077] Step B32: Set multiple pairs of equally divided points on the first contour line and the second contour line respectively, and connect each pair of equally divided points to divide the vein region into multiple sections;
[0078] Step B33: Calculate the weight of each section respectively to obtain the vein weight of the vein region.
[0079] Specifically, to achieve a more accurate estimation of the weight of the vein region of the tobacco leaf, in this embodiment, the vein region is equally divided into multiple sections of equal length according to the length, and the area of the corresponding tobacco leaf part in each section is estimated by combining the area of each section in the image, and then the weight of the vein region is calculated by combining the area with the pre-determined area-weight coefficient, so as to achieve a better measurement effect.
[0080] In a preferred embodiment, in step B31, an artificial intelligence model is used to identify the first endpoint and the second endpoint;
[0081] Or, a morphological recognition method is used to obtain the first endpoint and the second endpoint.
[0082] Specifically, to achieve a better division effect of the vein region, in this embodiment, an artificial intelligence model is pre-trained to train the image features exhibited by the two farthest endpoints p1 and p2 of the main vein, or the morphological method is used to extract the two farthest endpoints. Subsequently, the contour line of the vein region is divided into a first contour line d1 and a second contour line d2 by the first endpoint p1 and the second endpoint p2, thus achieving a better extraction effect of the contour line.
[0083] In a preferred embodiment, as Figure 8 shown, step B33 includes:
[0084] Step B331: Obtain the average length of the section based on the lengths of the first contour line, the second contour line, and the equally divided points. Meanwhile, obtain the first distance and the second distance between two pairs of equally divided points of the section.
[0085] Step B332: Generate the weight of the section according to the first distance, the second distance, the average length of the section, and a pre-constructed area weight coefficient.
[0086] Step B333: Generate the weight of the leaf vein according to the weights of all the sections.
[0087] Specifically, to achieve a relatively accurate estimation of the weight of the leaf vein area of the tobacco leaf, in this embodiment, as Figure 7 and Figure 9 shown, by separately calculating the length d1 of the first contour line and the length d2 of the second contour line, and obtaining the average value of d1 and d2 as the actual length of the main vein of the tobacco leaf, the problem that the first contour line and the second contour line are of unequal length due to the curvature of the main vein of the tobacco leaf itself is avoided. Since each section is a closed area formed by enclosing the connection line between equally divided points with the first contour line and the second contour line, the length d of each section is substantially equal to the average length divided by the number of equal divisions to obtain the average length of the section. At this time, the first distance l1 and the second distance l2 can be obtained by using an image recognition algorithm to calculate the lengths of the corresponding equally divided points. Based on the first distance l1, the second distance l2, the length d, and a pre-constructed area weight coefficient k, the weight of this section can be calculated as l1 * l2 * d * k.
[0088] The beneficial effects of the present invention are as follows: By collecting the image of the tobacco leaf and separately calculating its leaf weight and leaf vein weight based on the image, a relatively accurate weight estimation of the tobacco leaf is achieved, and the identity of the tobacco leaf is determined more accurately to improve the product consistency; meanwhile, during the production process, only image collection and transportation of the tobacco leaf are required, avoiding the problem of long time consumption when placing a single tobacco leaf on the scale, and being better applicable to a continuous production environment.
[0089] The above are only the preferred embodiments of the present invention, and do not limit the implementation manners and protection scope of the present invention accordingly. For those skilled in the art, it should be able to realize that all the equivalent replacements and obvious changes made by using the description and illustration content of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for measuring the weight of tobacco leaves, characterized in that, Including: Step S1: Collect a tobacco leaf image of the tobacco leaf; Step S2: Respectively obtain a leaf area and a vein area from the tobacco leaf image; Step S3: Respectively calculate the leaf weight of the leaf area and the vein weight of the vein area, and obtain the weight of the tobacco leaf according to the leaf weight and the vein weight; In the step S3, the method for generating the leaf weight includes: Step A31: Respectively extract the brightness and darkness degree of each pixel from the leaf area; Step A32: Generate a weight coefficient corresponding to the pixel according to the brightness and darkness degree; Step A33: Generate the leaf weight according to the weight coefficients of all the pixels; The brightness and darkness degree refers to the gray value or color value or saturation value of the pixel.
2. The measurement method according to claim 1, wherein In the step S1, the method for collecting the tobacco leaf image includes: Place the tobacco leaf on a transparent bottom plate, uniformly project an illumination light on the tobacco leaf, and collect the light-transmitting image of the tobacco leaf as the tobacco leaf image.
3. The measurement method according to claim 1, wherein The step S2 includes: Step S21: Separate the tobacco leaf area from the background image in the tobacco leaf image; Step S22: Divide the main vein of the tobacco leaf from the tobacco leaf area to obtain the vein area, and then use the remaining part of the tobacco leaf area as the leaf area.
4. The measurement method according to claim 1, wherein Before the step S1, a brightness-darkness-weight look-up table is pre-constructed; Then in the step A32, use the brightness and darkness degree to look up the brightness-darkness-weight look-up table to obtain the weight coefficient corresponding to the pixel.
5. The measurement method according to claim 4, characterized in that The generation method of the brightness-darkness-weight look-up table includes: Step A01: Obtain sample tobacco leaves of multiple different grades and different weights, and collect sample images of the sample tobacco leaves under a uniform illumination condition; Step A02: Extract the brightness and darkness degree of the sample tobacco leaf, the area of the sample tobacco leaf from the sample image, and record the weight of the sample tobacco leaf; Step A03: Generate a brightness-darkness-degree-weight correspondence relationship corresponding to each pixel according to the brightness and darkness degree, the area and the weight, and record all the brightness-darkness-degree-weight correspondence relationships in the brightness-darkness-weight look-up table.
6. The measurement method according to claim 1, characterized in that, In the step S3, the method for generating the vein weight includes: Step B31: Obtain a first end point and a second end point of the vein area, and split the outer contour of the vein area into a first contour line and a second contour line according to the first end point and the second end point; The first end point and the second end point are the farthest end points of the vein area; Step B32: Respectively set multiple pairs of equally divided points on the first contour line and the second contour line, and connect each pair of the equally divided points to divide the vein area into multiple sections; Step B33: Respectively calculate the weight of each section to obtain the vein weight of the vein area.
7. The measurement method according to claim 6, wherein The step B33 includes: Step B331: Obtain the average section length of the section according to the length of the first contour line, the length of the second contour line and the equally divided points, and at the same time obtain the first distance and the second distance between the two pairs of the equally divided points of the section; Step B332: Generate the sectional weight of the section according to the first distance, the second distance, the average sectional length, and a pre-constructed area-weight coefficient. Step B333: Generate the vein weight according to all the sectional weights.
8. The measuring method according to claim 6, characterized in that In the step B31, an artificial intelligence model is used to identify the first endpoint and the second endpoint. Alternatively, a morphological recognition method is used to obtain the first endpoint and the second endpoint.
Citation Information
Patent Citations
Method for determining area quality of tobacco leaves based on intelligent image processing and model estimation
CN103175835A