Quantization method for judging tobacco leaf part
Through geometric feature judgment and unit area gram weight, combined with the BP neural network model, the subjectivity and low efficiency of tobacco leaf part identification are solved, the quantitative judgment of tobacco leaf parts and growth stage classification are realized, and the quality assurance of flue-cured tobacco is improved.
Patent Information
- Application Number
- CN202410644926.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-23
- Publication Date
- 2024-09-10
AI Technical Summary
The identification of tobacco leaf parts in the existing technology mainly relies on artificial sensory judgment and image recognition, which is highly subjective, has low classification efficiency and cannot be intuitively quantified. It lacks a simple and efficient intelligent quantitative identification method, which affects the quality of flue-cured tobacco.
Using geometric feature judgment and unit area gram weight, through light transmission image analysis and BP neural network model, the probability of tobacco leaf parts is calculated, mapped into an intuitive numerical expression, and classified based on the growth stage to achieve quantitative judgment of tobacco leaf parts.
It achieves objective and accurate quantitative identification of tobacco leaf parts, expands the scope of detection basis, and improves the guarantee of flue-cured tobacco quality.
Smart Images

Figure CN118628440A
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of agricultural detection, and in particular relates to a quantitative method for distinguishing tobacco leaf parts. Background Art
[0002] The growth part of tobacco leaves is an important basis for tobacco leaf grouping and grading, and directly affects the appearance quality and chemical composition of flue-cured tobacco leaves. In actual tobacco leaf production, the actual appearance characteristics of special leaves such as upper thin leaves, dry leaves, and forked leaves are inconsistent with the appearance characteristics of tobacco leaf parts specified in the national flue-cured tobacco standards. The judgment of flue-cured tobacco parts based on the personal experience of harvesters is different, resulting in large differences in flue-cured tobacco after harvest.
[0003] At present, the identification of tobacco leaf parts is mostly based on manual sensory judgment and image recognition model recognition. Manual judgment mainly includes hand touch and observation of tobacco leaf appearance characteristics. Its disadvantages are high subjectivity and low classification efficiency. The artificial intelligence method based on image recognition model is a black box modeling method that cannot intuitively quantify the tobacco leaf parts. At present, there is a lack of a simple, efficient and practical intelligent quantitative discrimination method for tobacco leaf parts. Therefore, it is of great significance to establish a digital discrimination method that does not rely on manual discrimination to objectively and accurately discriminate the flue-cured tobacco parts to ensure the quality of flue-cured tobacco. Summary of the invention
[0004] In view of this, the purpose of the present invention is to propose a quantitative method for distinguishing tobacco leaf parts, which uses geometric feature judgment and unit area weight to achieve quantitative judgment of tobacco leaf parts, and maps different parts of tobacco leaves into intuitive numerical expressions. And classify according to part-growth stage to obtain clustered light-transmitting image samples, which are further used to determine the part of the tobacco leaf.
[0005] In order to achieve the above object, the present invention provides the following technical solutions:
[0006] The present invention discloses a quantitative method for distinguishing tobacco leaf parts, comprising the following steps:
[0007] (1) collecting a light transmission image of a tobacco leaf surface, and analyzing the light transmission image to obtain a first type of analysis result;
[0008] (2) collecting weight information of tobacco leaves, and calculating the weight of tobacco leaves per unit area based on the first type of analysis results;
[0009] (3) calculating the probability of the tobacco leaves belonging to different tobacco leaf parts based on the tobacco leaf weight per unit area according to a preset weight probability calculation rule, and using it as the second type of analysis result;
[0010] (4) Determine the part of the tobacco leaf based on the first and second analysis results.
[0011] Preferably, the step (1) of collecting the light-transmitting image of the tobacco leaf surface is: placing the tobacco leaf on a transparent plate whose lower light source is a white LED lamp, and collecting its light-transmitting image through an imaging device above the tobacco leaf.
[0012] Preferably, the method steps of step (1) analyzing the light transmission image to obtain the first type of analysis results are:
[0013] A. After the transparent image is binarized, the binary image is opened to remove the burrs and interference points of the tobacco leaves;
[0014] B. Draw the contour map of the binary image through the Canny operator;
[0015] C. extracting absolute morphological features of tobacco leaves according to the contour map, wherein the absolute morphological features include leaf length, leaf width, leaf area, leaf perimeter and minimum circumscribed rectangle area;
[0016] D. Extracting relative morphological features of tobacco leaves according to the contour map, wherein the relative morphological features include narrow length, rectangularity, circularity, position of maximum leaf width, arc of angle between leaf width axis and centroid, and degree of leaf tip opening;
[0017] E. Integrate the absolute morphological features and the relative morphological features and input them into a preset first-class recognition model, and output the first-class analysis results.
[0018] Preferably, the first type of recognition model is constructed in the following manner: a. obtaining contour map samples of different parts of mature tobacco leaves of as many types as possible, and dividing the contour map samples into training samples and verification samples; b. constructing a BP neural network model, setting the number of input layer nodes according to the number of features in the absolute morphological features and the relative morphological features, setting the number of hidden layers and the number of nodes in each layer, and selecting a sigmoid function; c. setting the number of output layer nodes based on the number of tobacco leaf parts, and using a softmax function to convert the output into a probability distribution; d. initializing network weights and biases, passing the training samples through the BP neural network model and training them; e. using a loss function to evaluate the difference between the predicted output of the model and the true label, calculating the gradient of the loss function with respect to each weight by the chain rule and propagating the gradient back to the network, and using the gradient descent method to update each weight and bias of the network; f. using a verification sample to evaluate the performance of the trained model, and continuously adjusting the network structure and hyperparameters until its performance meets the preset requirements to obtain the first type of recognition model.
[0019] Preferably, step (3) of calculating the probability that tobacco leaves belong to different tobacco leaf parts based on the gram weight per unit area according to a preset weight probability calculation rule comprises: 1) obtaining contour map samples of as many types of upper, middle and lower tobacco leaves as possible, and calculating the corresponding tobacco leaf area for any sample to obtain the sample area, and determining the sample weight of the sample; 2) calculating and determining the gram weight per unit area ratio of the sample based on the sample area and the sample weight; 3) counting the gram weight per unit area ratio of all samples corresponding to any part, and determining the normal distribution value of the gram weight ratio; 4) extracting the numerical range of one standard deviation before and after the normal distribution value of the gram weight ratio as the quantitative expression of the part; 5) calculating and determining the probability that the tobacco leaves belong to each of the three parts based on the gram weight ratio per unit area of the tobacco leaves as the detection target according to the quantitative expression of each part.
[0020] The present invention further discloses a quantitative method for distinguishing the parts of tobacco leaves, which obtains a third type of analysis result by analyzing the light transmission image; and judges the parts of the tobacco leaves based on the first type of analysis result, the second type of analysis result and the third type of analysis result.
[0021] Preferably, the steps for obtaining the third type of analysis results are: (A) obtaining as many types of light transmission images of different parts of tobacco leaves at different growth stages as possible, and classifying them according to part-growth stage to obtain clustered light transmission image samples; (B) for any light transmission image in any type of light transmission image sample, grayscale processing is performed on it to obtain a grayscale image; (C) the grayscale image is identified and the length of the main leaf vein is determined, and an intra-leaf plane coordinate system is established with the intersection between the leaf root and the leaf surface on the main leaf vein as the coordinate origin, the inner leaf direction as the x positive semi-axis, and any direction perpendicular to the main leaf vein as the y positive semi-axis, and the leaf vein length between the intersection and the leaf tip is determined as a standard unit length; (D) grayscale pixels are layered and extracted according to a preset grayscale level for the grayscale image , and obtain multiple layers of grayscale and their corresponding secondary grayscale images; (E) for each secondary grayscale image, two-dimensionally distribute the pixels under the standard unit length in the plane coordinate system within the leaf, and use it as the clustering feature of the secondary grayscale image; (F) determine the clustering features of all grayscales corresponding to any transparent image, and use it as the hidden sample of the transparent image; (G) according to the multiple transparent images corresponding to the transparent image samples and the corresponding hidden samples, the pre-constructed classification neural network is trained; (H) the transparent image corresponding to the target tobacco leaf is processed to obtain the hidden sample, and the hidden sample is input into the classification neural network to determine the classification result of the position-growth stage corresponding to the target tobacco leaf in the probability distribution, and use it as the third type of analysis result.
[0022] The present invention has achieved at least the following beneficial effects:
[0023] 1. The method of the present invention firstly uses geometric feature judgment and unit area weight to realize quantitative judgment of tobacco leaf parts, and maps different parts of tobacco leaves into intuitive numerical expressions for judging the parts of tobacco leaves.
[0024] 2. The method of the present invention further uses the detection and analysis results of the leaf surface parts of tobacco leaves at different growth stages to determine the parts of the tobacco leaves. Compared with the prior art that can only detect mature tobacco leaves, the method of the present invention is more comprehensive in scope for determining the parts of the tobacco leaves. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 This is a flow chart of the present invention for determining the part of a tobacco leaf based on the first type of analysis results and the second type of analysis results. DETAILED DESCRIPTION
[0026] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention and are not used to limit the present invention. Other advantages, objectives and features of the present invention will be described in the subsequent embodiments and will be obvious to those skilled in the art to some extent, or those skilled in the art can be taught from the practice of the present invention.
[0027] The present invention discloses a quantitative method for distinguishing tobacco leaf parts, such as Figure 1 As shown, the following steps are included:
[0028] (1) Collecting a light-transmitting image of the tobacco leaf surface and analyzing the light-transmitting image to obtain a first type of analysis result; (2) Collecting the weight information of the tobacco leaf and calculating the weight of the tobacco leaf per unit area based on the first type of analysis result; (3) Based on the weight of the tobacco leaf per unit area, the probability of the tobacco leaf belonging to different tobacco leaf parts is calculated according to a preset weight probability calculation rule, and used as a second type of analysis result; (4) Determining the part to which the tobacco leaf belongs based on the first type of analysis result and the second type of analysis result.
[0029] The present invention obtains the first type of analysis results by collecting the light-transmitting images of the tobacco leaf surface and analyzing the light-transmitting images; the plane geometric features of the tobacco leaf and the judgment results based on the leaf surface geometry are expressed according to the first type of analysis results, the weight information of the tobacco leaf is collected, and the tobacco leaf gram weight per unit area is calculated based on the first type of analysis results, and then the probability of the tobacco leaf belonging to different tobacco leaf parts is calculated according to the tobacco leaf gram weight per unit area according to the preset weight probability calculation rules, and it is used as the second type of analysis results; finally, the first type of analysis results and the second type of analysis results are combined, and the probability is weighted and summed with the preset judgment weight, and finally the probability judgment result of the part is obtained. The above technical scheme adopts geometric feature judgment and unit area gram weight to realize the quantitative judgment of the tobacco leaf part, and maps the different parts of the tobacco leaf into an intuitive numerical expression.
[0030] Among them, the step (1) of collecting the light-transmitting image of the tobacco leaf surface is as follows: placing the tobacco leaf on a transparent plate whose lower light source is a white LED lamp, and collecting its light-transmitting image through an imaging device above the tobacco leaf. By placing the tobacco leaf on a transparent plate whose lower light source is a white LED lamp, the light-transmitting image of the tobacco leaf can be extracted. In a light-transmitting environment, the boundary contrast of the tobacco leaf is enhanced, the contour features of the tobacco leaf can be extracted more effectively and accurately, and the thickness difference of each part of the tobacco leaf can be highlighted. Compared with ordinary image detection results, the light-transmitting image detection result is more accurate.
[0031] Among them, step (1) analyzes the transparent image to obtain the first type of analysis result. The method steps are as follows: A. After the transparent image is binarized, the binary image is subjected to an opening operation to remove the burrs and interference points of the tobacco leaves; B. The contour map of the binary image is drawn by the Canny operator; C. The absolute morphological features of the tobacco leaves are extracted according to the contour map, wherein the absolute morphological features include leaf length, leaf width, leaf area, leaf circumference and minimum circumscribed rectangle area; D. The relative morphological features of the tobacco leaves are extracted according to the contour map, wherein the relative morphological features include narrow length, rectangularity, circularity, position of maximum leaf width, arc angle between leaf width axis and centroid and degree of leaf tip opening; E. The absolute morphological features and relative morphological features are integrated and input into a preset first type recognition model to output the first type of analysis result. After the light-transmitting image is binarized, the burrs and interference points of the tobacco leaves are removed by opening the binarized image, and the contour map of the binarized image is drawn by the Canny operator; then the absolute morphological features of the tobacco leaves are extracted according to the contour map. After binarization, morphological opening operations and other processes, the image interference factors can be effectively removed, and the tobacco leaf contour is extracted through the maximum connected domain of pixels. The image processing process is not affected by factors such as light, color, noise, and leaf surface wrinkles, which can standardize and unify the tobacco leaf contour extraction process. The process is stable, fast, and has strong generalization, and is applicable to all tobacco leaf contour extraction methods; wherein, the absolute morphological features include leaf length, leaf width, leaf area, leaf circumference, and minimum circumscribed rectangular area; the leaf length is the length of the line between the two points with the largest distance between the upper and lower ends of the leaf contour; the leaf width is the length of the line between the two points on the leaf contour that are perpendicular to the line connecting the two points of the leaf length and the farthest distance. Relative morphological features of tobacco leaves are extracted according to the contour map; wherein the relative morphological features include narrow length, rectangularity, roundness, position of maximum leaf width, arc of angle between leaf width axis and centroid, and degree of leaf tip opening; wherein, narrow length is the ratio of leaf length to leaf width, which is used to describe the circularity of leaves; rectangularity is the ratio of flue-cured tobacco area to the area of its circumscribed rectangle, which reflects the degree to which leaves fill their circumscribed rectangle; roundness is the ratio of the square of the perimeter to the area, which describes the complexity of leaf boundaries; the position of maximum leaf width is the ratio of the distance from the leaf base to the leaf length at the maximum leaf width, which reflects the degree of variation in leaf width; the arc of angle between leaf width axis and centroid is the arc value corresponding to the angle between the two points at the maximum leaf width and the line connecting the centroid, which describes the characteristics of leaf width; finally, the absolute morphological features and relative morphological features are integrated and input into the preset first-class recognition model, and the first-class analysis results are output, which can reflect the judgment results of the position of tobacco leaves under the geometric features corresponding to the tobacco leaf image.
[0032] Among them, the first type of recognition model is constructed in the following way: a. Obtain contour map samples of different parts of mature tobacco leaves of as many types as possible, and divide the contour map samples into training samples and verification samples; b. Construct a BP neural network model, set the number of input layer nodes according to the number of features in the absolute morphological features and relative morphological features, set the number of hidden layers and the number of nodes in each layer, and select the sigmoid function; c. Set the number of output layer nodes based on the number of tobacco leaf parts, and use the softmax function to convert the output into a probability distribution; d. Initialize the network weights and biases, pass the training samples through the BP neural network model and train them; e. Use the loss function to evaluate the difference between the predicted output of the model and the true label, calculate the gradient of the loss function with respect to each weight by the chain rule and propagate the gradient back to the network, and use the gradient descent method to update each weight and bias of the network; f. Use the verification sample to evaluate the performance of the trained model, and continuously adjust the network structure and hyperparameters until its performance meets the preset requirements to obtain the first type of recognition model. In the process of constructing the first type of recognition model, as many types of contour map samples of different parts of mature tobacco leaves as possible are obtained, and the contour map samples are divided into training samples and verification samples, and then the BP neural network model is constructed. The number of input layer nodes is set according to the number of features in the absolute morphological features and relative morphological features, the number of hidden layers and the number of nodes in each layer are set, and the sigmoid function is selected; the number of output layer nodes is set based on the number of tobacco leaf parts, and the output is converted into a probability distribution using the softmax function; the network weights and biases are initialized, and the training samples are passed through the BP neural network model and trained; the loss function is used to evaluate the difference between the predicted output of the model and the true label, and the gradient of the loss function about each weight is calculated by the chain rule and the gradient is propagated back to the network, and each weight and bias of the network is updated using the gradient descent method; the performance of the trained model is evaluated using the verification sample, and the network structure and hyperparameters are continuously adjusted until its performance meets the preset requirements to obtain the first type of recognition model. Thus, a neural network model for identifying and classifying the geometric features of transparent images is constructed.
[0033] Among them, step (3) is the step of calculating and determining the probability that tobacco leaves belong to different tobacco leaf parts based on the gram weight per unit area according to a preset weight probability calculation rule, which includes: 1) obtaining as many types of contour map samples of upper, middle and lower tobacco leaves as possible, and calculating the corresponding tobacco leaf area for any sample to obtain the sample area, and determining the sample weight of the sample; 2) calculating and determining the gram weight per unit area of the sample based on the sample area and the sample weight; 3) counting the gram weight per unit area of all samples corresponding to any part, and determining the normal distribution value of the gram weight ratio; 4) extracting the numerical range of one standard deviation before and after the normal distribution value of the gram weight ratio as the quantitative expression of the part; 5) calculating and determining the probability that the tobacco leaves belong to each of the three parts based on the gram weight ratio per unit area of the tobacco leaves as the detection target according to the quantitative expression of each part. In the process of calculating the probability that tobacco leaves belong to different tobacco leaf parts based on the gram weight of tobacco leaves per unit area according to the preset weight probability calculation rules, a large number of contour map samples of upper, middle and lower tobacco leaves of as many types as possible are obtained in advance, and the corresponding tobacco leaf area of any sample is calculated to obtain the sample area, and the sample weight of the sample is determined by weighing; the gram weight ratio per unit area of the sample is determined based on the sample area and the sample weight; the gram weight ratio per unit area of all samples corresponding to any part is calculated by counting the gram weight ratio per unit area of all samples corresponding to any part, and the gram weight ratio normal distribution value is determined, for example, for the upper tobacco leaves, it corresponds to the gram weight ratio normal distribution value of the upper tobacco leaves; the value range of one standard deviation before and after the gram weight ratio normal distribution value is extracted as the quantitative expression of the part, thereby eliminating rare data and individual data, for example, for the gram weight ratio normal distribution value of the upper tobacco leaves, the percentage of the gram weight ratio that is too large or too small in the total data is eliminated. The fifth data is eliminated. In the actual operation process, because the normal distribution values of the gram weight ratios of the upper, middle and lower tobacco leaves are in a continuous state, the value range can be adjusted according to the actual situation. For example, for the lower tobacco leaves, the gram weight per unit area is relatively large, the gram weight per unit area of the middle tobacco leaves is in the middle, and the gram weight per unit area of the upper tobacco leaves is relatively small. The value range of the lower tobacco leaves can be appropriately adjusted, and the direction with relatively large gram weight in its normal distribution values can be given a larger range so that it falls within its classification range. If there is a gram weight ratio value in the direction with relatively small gram weight in its normal distribution values that is the same as the normal distribution value of the middle tobacco leaves, the critical point of the value in this direction is determined according to the gram weight ratio value, and the range distance of a preset multiple continues to be taken in this direction according to the critical point, so as to make the detection result more accurate; based on the gram weight ratio of the tobacco leaves per unit area of the tobacco leaves as the detection target and the quantitative expression of each part, the probability of the tobacco leaves belonging to each of the three parts is calculated and determined.
[0034] This embodiment further discloses a quantitative method for distinguishing the parts of tobacco leaves, by analyzing the light-transmitting image to obtain the third type of analysis results; the parts of the tobacco leaves are determined based on the first type of analysis results, the second type of analysis results and the third type of analysis results. Among them, the steps for obtaining the third type of analysis results are: (A) obtaining light-transmitting images of different parts of tobacco leaves of as many types as possible at different growth stages, and classifying them according to the part-growth stage to obtain clustered light-transmitting image samples; (B) for any light-transmitting image in any type of light-transmitting image sample, grayscale processing is performed on it to obtain a grayscale image; (C) the grayscale image is identified and the length of the main vein is determined, and the intersection between the leaf root and the leaf surface on the main vein is used as the coordinate origin, the inner leaf direction is used as the positive x-axis, and any direction perpendicular to the main vein is used as the positive y-axis to establish an inner leaf plane coordinate system, and the vein length between the intersection and the leaf tip is determined as a standard unit length; (D) the grayscale image is layered and grayscale pixels are extracted according to the preset grayscale level. , and obtain multiple layers of grayscale and their corresponding secondary grayscale images; (E) for each secondary grayscale image, two-dimensional distribution of pixels under standard unit length in the plane coordinate system of the leaf is performed, and it is used as the clustering feature of the secondary grayscale image; (F) the clustering features under all grayscales corresponding to any transparent image are determined, and it is used as the hidden sample of the transparent image; (G) according to the multiple transparent images corresponding to the transparent image sample and the corresponding hidden samples, the pre-constructed classification neural network is trained; (H) the transparent image corresponding to the target tobacco leaf is processed to obtain the hidden sample, and the hidden sample is input into the classification neural network to determine the classification result of the probability distribution of the position-growth stage corresponding to the target tobacco leaf, and it is used as the third type of analysis result. The third type of analysis result is obtained by analyzing the transparent image, and the part of the tobacco leaf is judged based on the first type of analysis result, the second type of analysis result and the third type of analysis result, so that the detection result is further accurate.In this process, light transmission images of different parts of tobacco leaves at different growth stages are obtained in advance, and clustered light transmission image samples are obtained by classification according to part-growth stage. For example, a light transmission image classification of mature tobacco leaves at the upper tobacco leaves-growth stage (80% to 100%) is obtained, which includes multiple light transmission images of upper tobacco leaves of tobacco plants at the growth stage (80% to 100%); for any light transmission image in any category of light transmission image samples (for example, upper tobacco leaves-growth stage (80% to 100%)), a grayscale image is obtained by graying it; the grayscale image is processed The main vein length is identified and determined, and the intersection between the leaf root and the leaf surface on the main vein is used as the coordinate origin, the inner direction of the leaf is used as the positive x-axis, and any direction perpendicular to the main vein is used as the positive y-axis to establish a plane coordinate system in the leaf. The vein length between the intersection and the leaf tip is determined as a standard unit length. The significance of this standardization is to emphasize the use of the graphic features of the tobacco leaf as the basis for judgment while ignoring the size features of the leaf surface, and thus it is suitable for the identification of the growth stages of different varieties of tobacco leaves; the grayscale image is layered and grayscale pixels are extracted according to the preset grayscale level to obtain multiple layers of grayscale levels and their corresponding secondary grayscale images; For each secondary grayscale image, a two-dimensional distribution of pixel points under a standard unit length in the plane coordinate system within the leaf is performed and used as the clustering feature of the secondary grayscale image; the clustering features at all grayscale levels corresponding to any light-transmitting image are determined and used as implicit samples of the light-transmitting image. The distribution state of tobacco leaf thickness can be reflected through the implicit samples. For young tobacco leaves, in addition to their leaf surface geometric features, their leaf surfaces show a thickness distribution state that gradiently decreases from the main vein vertically to the leaf edge. For semi-mature tobacco leaves, in addition to their leaf surface geometric features, the leaf surface thickness is uniform. For mature tobacco leaves, in addition to their leaf surface geometric features, the leaf surface thickness is uniform. The body is in a mesh distribution (the mesh center is thinner and the two sides of the mesh are thicker, and the mesh is the vein inside the leaf), so that the position of the tobacco leaf at different growth stages can be identified; finally, according to the multiple light-transmitting images corresponding to the light-transmitting image samples and the corresponding hidden samples, the pre-constructed classification neural network is trained; when the target tobacco leaf is detected, the light-transmitting image corresponding to the target tobacco leaf is processed to obtain the hidden sample, and the hidden sample is input into the classification neural network to determine the classification result of the probability distribution of the position-growth stage corresponding to the target tobacco leaf, and it is used as the third type of analysis result. The technical scheme further provides a detection and identification technology for the leaf surface parts of tobacco leaves at different growth stages. Compared with the limitation of the prior art that can only detect mature tobacco leaves, the detection range of this technology is more comprehensive. The method of the present invention further adopts the detection and analysis results of the leaf surface parts of tobacco leaves at different growth stages to determine the part to which the tobacco leaf belongs. Compared with the prior art that can only detect mature tobacco leaves, the method of the present invention is used to determine the basis range of the part to which the tobacco leaf belongs.
[0035] Finally, it should be noted that the above preferred embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail through the above preferred embodiments, those skilled in the art should understand that various changes can be made in form and details without departing from the scope defined by the claims of the present invention.
Claims
1. A quantitative method for identifying tobacco leaf parts. It is characterized in that The steps include: (1) collecting a light transmission image of a tobacco leaf surface, and analyzing the light transmission image to obtain a first type of analysis result; (2) collecting weight information of tobacco leaves, and calculating the weight of tobacco leaves per unit area based on the first type of analysis results; (3) calculating the probability of the tobacco leaves belonging to different tobacco leaf parts based on the tobacco leaf weight per unit area according to a preset weight probability calculation rule, and using it as the second type of analysis result; (4) Determine the part of the tobacco leaf based on the first and second analysis results.
2. The method according to claim 1, It is characterized in that The step (1) of collecting the light-transmitting image of the tobacco leaf surface is as follows: placing the tobacco leaf on a transparent plate whose lower light source is a white LED lamp, and collecting its light-transmitting image through an imaging device above the tobacco leaf.
3. The method according to claim 1, It is characterized in that Step (1) Analyze the light transmission image to obtain the first type of analysis results. A. After the transparent image is binarized, the binary image is opened to remove the burrs and interference points of the tobacco leaves; B. Draw the contour map of the binary image through the Canny operator; C. extracting absolute morphological features of tobacco leaves according to the contour map, wherein the absolute morphological features include leaf length, leaf width, leaf area, leaf perimeter and minimum circumscribed rectangle area; D. Extracting relative morphological features of tobacco leaves according to the contour map, wherein the relative morphological features include narrow length, rectangularity, circularity, position of maximum leaf width, arc of angle between leaf width axis and centroid, and degree of leaf tip opening; E. Integrate the absolute morphological features and the relative morphological features and input them into a preset first-class recognition model, and output the first-class analysis results.
4. The method according to claim 3, It is characterized in that The first type of recognition model is constructed in the following way: a. Obtain contour map samples of different parts of mature tobacco leaves of as many types as possible, and divide the contour map samples into training samples and verification samples; b. Construct a BP neural network model, set the number of input layer nodes according to the number of features in the absolute morphological features and relative morphological features, set the number of hidden layers and the number of nodes in each layer, and select the sigmoid function; c. Set the number of output layer nodes based on the number of tobacco leaf parts, and use the softmax function to convert the output into a probability distribution; d. Initialize the network weights and biases, pass the training samples through the BP neural network model and train them; e. Use the loss function to evaluate the difference between the predicted output of the model and the true label, calculate the gradient of the loss function with respect to each weight by the chain rule and propagate the gradient back to the network, and use the gradient descent method to update each weight and bias of the network; f. Use the verification sample to evaluate the performance of the trained model, and continuously adjust the network structure and hyperparameters until its performance meets the preset requirements to obtain the first type of recognition model.
5. The method according to claim 1, It is characterized in that The step (3) of calculating the probability that tobacco leaves belong to different tobacco leaf parts based on the gram weight per unit area according to a preset weight probability calculation rule comprises: 1) obtaining as many types of contour map samples of upper, middle and lower tobacco leaves as possible, and calculating the corresponding tobacco leaf area for any sample to obtain the sample area, and determining the sample weight of the sample; 2) calculating and determining the gram weight per unit area ratio of the sample based on the sample area and the sample weight; 3) counting the gram weight per unit area ratio of all samples corresponding to any part, and determining the normal distribution value of the gram weight ratio; 4) extracting the numerical range of one standard deviation before and after the normal distribution value of the gram weight ratio as the quantitative expression of the part; 5) calculating and determining the probability that the tobacco leaves belong to each of the three parts based on the gram weight ratio per unit area of the tobacco leaves as the detection target according to the quantitative expression of each part.
6. A quantitative method for identifying tobacco leaf parts. It is characterized in that The third type of analysis result is obtained by analyzing the light transmission image; and the part of the tobacco leaf is determined based on the first type of analysis result, the second type of analysis result and the third type of analysis result.
7. The method according to claim 6, It is characterized in that The steps for obtaining the third type of analysis results are as follows: (A) obtaining as many types of light transmission images of different parts of tobacco leaves at different growth stages as possible, and classifying them according to part-growth stage to obtain clustered light transmission image samples; (B) for any light transmission image in any type of light transmission image sample, grayscale processing is performed on it to obtain a grayscale image; (C) the grayscale image is identified to determine the length of the main leaf vein, and the intersection between the leaf root and the leaf surface on the main leaf vein is used as the coordinate origin, the inner direction of the leaf is used as the positive x-axis, and any direction perpendicular to the main leaf vein is used as the positive y-axis to establish a leaf plane coordinate system, and the leaf vein length between the intersection and the leaf tip is determined as a standard unit length; (D) the grayscale image is layered and extracted according to the preset grayscale level to obtain multiple layers of grayscale levels and their corresponding secondary grayscale images; (E) for each secondary grayscale image, the pixel points under the standard unit length in the leaf plane coordinate system are two-dimensionally distributed, and the distribution is used as the clustering feature of the secondary grayscale image; (F) Determine the clustering features at all gray levels corresponding to any transparent image, and use them as latent samples of the transparent image; (G) Train a pre-constructed classification neural network based on multiple transparent images corresponding to the transparent image samples and their corresponding latent samples; (H) Process the transparent image corresponding to the target tobacco leaf to obtain a latent sample, input the latent sample into the classification neural network, determine the classification result of the part-growth stage corresponding to the target tobacco leaf in a probability distribution, and use it as the third type of analysis result.
Citation Information
Patent Citations
Dual spectrum technology based leaf and stalk separating and cutting quality detection device and detection method
CN107991303A
Tobacco grade identification system and method based on multi-dimensional feature information
CN112539785A
Threshing and redrying online strip winnowing and quality improving method
CN112890266A
Tobacco leaf part distinguishing method and device based on near infrared spectrum and comparative learning
CN114018863A
Flue-cured tobacco part distinguishing method fusing expert priori
CN114862840A
