# Data Research on Tobacco Leaf Image Collection Based on Computer Vision Sensor

Authors: Huadong Su
Journal: Journal of Sensors
 (2021)

---

## Abstract

In the process of tobacco silk making, how to better improve the quality of stem and leaf separation has become an issue of concern. His research mainly discusses the data collected from tobacco leaf images based on computer vision sensors. In LM (Levenberg-Marquarelt) as a training function, the algorithm uses threshing effect samples for training and learning. This paper is aimed at extracting the shape characteristic parameters of tobacco leaves and obtains the shape parameters of the length, width, area, circumference, and roundness of the tobacco leaves. In this paper, boundary tracking is used to obtain the coordinate and direction information of the tobacco leaf boundary pixels in the image, which provides a basis for obtaining the subsequent extraction of tobacco leaf characteristic parameters. In the tobacco leaf grading system, the tobacco leaf feature parameter extraction module displays the geometric characteristics of tobacco leaf, such as length, width, area, aspect ratio, rectangularity, and color characteristic, hueH, saturation S, A channel, and B channel in detail through the computer vision sensor. Finally, the subjective and objective combination weighting method is used to combine and weight the indicators of the threshing effect of the first-level threshing machine, which not only considers the quantity of information provided by the indicators but also takes into account the subjective view of the experts, which increases the weight of the indicators, accuracy, and scientificity. The approximation accuracy of the training samples of the threshing effect prediction model based on the BP neural network LM algorithm is 99.495%, the approximation accuracy of the validation set is 96.535%, and the approximation accuracy of the test set is 98.392%. This research will greatly improve production efficiency and meet the enterprise’s requirements for high efficiency and low cost.


---

## Body

## 1. Introduction

At present, tobacco leaves face many problems in the production of wind separation, such as improving the utilization of tobacco leaves during the process of threshing and retrying tobacco leaves, that is, maximizing the wind separation to produce qualified pieces of tobacco, and the visualization of the stem-leaf separation process is at home and abroad. It is still a research blank. At the same time, domestic and foreign scholars researching tobacco wind fraction numerical simulation technology are all empirical judgments and have not passed relevant theoretical and technical verification.In the tobacco curing process, the change of the color and shape of the tobacco leaves is still the main basis for people to judge the curing. Using a computer to process the digital image of the tobacco leaves cannot only solve the problem of the roasting staff due to the low quality of the tobacco. It can also realize intelligent baking and reduce the production cost of tobacco leaves.The realization of tobacco leaf classification automation technology is very promising. Harjoko believes that in Indonesia, tobacco grading is done by hand, relying on the skills and experience of the tobacco grading staff. Large tobacco plantations require many graders, and workers need to be trained to become skilled graders. Therefore, he proposed a method of grading tobacco leaves based on color and quality using image processing technology. He uses image processing techniques such as image thresholding, morphological operation, spot detection, and tobacco leaf color analysis to determine tobacco leaf grade. Although the method he proposed can detect blade defects, the accuracy of the detection is not clearly stated [1]. Camlica believes that tobacco is important to the agricultural sector in Turkey, and different regions of the country produce high-quality varieties. His research aims to examine the important morphological characteristics and yields of a cultivar and some genotypes of tobacco under the conditions of Bolu Province, Turkey, in 2015 and 2016. Genetic variation parameters such as GCV (%), PCV (%), GA, and heritability are performed to provide the best picture of tobacco variety and genotypes. He also conducted a correlation analysis of these traits of tobacco. Although his research is highly significant and positively correlated, the amount of data in the research is too small [2]. Pereira believes that although tobacco (Nicotiana tabacum) is the experimental host of Trichoderma fastidious, it is an excellent plant model that can be used for biological and functional genomics studies involving the host-pathogen interaction of Trichoderma fastidious. He designed a Standard Area Atlas (SAD) to help visually estimate the percentage of affected areas (percentage of severity) and conducted multilaboratory validation on tobacco. Monitor the inoculated plants over time and record digital images of symptoms. Three different software programs (APS, Asses, ImageJ, and Leaf Doctor) are used to segment the image and calculate the severity percentage. 10 true color images make up 10 image SADs (0.5, 5, 10, 15, 25, 35, 45, 55, 65, and 75%). Although his research methods are comprehensive, there is still a lack of contrast between images [3, 4]. Moeys believes that applications that need to detect small visual contrast require high sensitivity. He presented the results of the 180-nanometer Towerjazz CIS process vision sensor named SDAVIS192. SDAVIS192 improves the previous DAVIS sensor with higher temporal contrast sensitivity. He believes that this goal can be achieved by using a preamplification stage within the pixel. The preamplifier reduces the effective inscene DR of the sensor (70 dB when off and 50 dB when on), but the automatic operating area control allows at least 110 dB DR for offevents. Although he developed a characterization method for measuring DV, the research lacks innovation [5].In this study, the LM algorithm is selected as the training function, and the threshing effect samples are used for training and learning. This paper is aimed at extracting the shape characteristic parameters of tobacco leaves and obtains the shape parameters of the length, width, area, circumference, and roundness of the tobacco leaves. In this paper, boundary tracking is used to obtain the coordinate and direction information of the tobacco leaf boundary pixels in the image, which provides a basis for obtaining the subsequent extraction of tobacco leaf characteristic parameters. In the tobacco leaf grading system, the tobacco leaf feature parameter extraction module displays the geometric characteristics of the tobacco leaf such as length, width, area, and aspect ratio in detail through the computer vision sensor. Finally, the subjective and objective combination weighting method is used to combine and weight the indicators of the threshing effect of the first-level threshing machine, which not only considers the quantity of information provided by the indicators but also takes into account the subjective view of the experts, which improves the accuracy and scientificity of the indicator weights.


## 2. Research Method

### 2.1. Image Preprocessing

Due to the complex factors affecting tobacco leaves during the production process, the tobacco leaves produced by tobacco farmers are often of different quality. Only through grading processing can tobacco leaves with relatively consistent quality be included in the same grade.Image preprocessing is the key link in the extraction of characteristic parameters of tobacco leaves, which directly determines whether the subsequent identification of tobacco leaves is accurate and reliable. Because the acquired tobacco leaf images are often affected by the light and environment, as well as the optical characteristics of the image acquisition equipment and other objective factors, the captured tobacco leaf images are not very clear. The original photo taken by the camera is shown in Figure1.Figure 1
The original photo taken by the camera (author self-photo).The tobacco leaf image collected in the tobacco factory will inevitably have some differences with the actual tobacco leaf, and in severe cases, the image will also be degraded, distorted, or contain noise. Image preprocessing can improve and improve the quality of the tobacco leaf images collected in this experiment, remove some useless information during the shooting process of the image, and restore useful real information, thereby improving the testability of the image, simplifying the image data information, and improving the testability of the image. Obtain characteristic information such as the shape of the tobacco leaf and analyze and recognize the image to prepare. The preprocessing of tobacco leaf images is the first step of tobacco leaf identification, and it is also a key step that must be carried out in this research [6, 7].


#### 2.1.1. Image Grayscale

Grayscale image is a unique image that keeps the same value ofRcomponent=Gcomponent=Bcomponent. In other words, the change scale of any pixel in the image is only 256 patterns. That is, the central guideline of image graying is R=G=B, and this value is also called gray value. Therefore, in the image processing process, to make the calculation workload of the following image, it is common to convert different types of images into grayscale images in a unified manner. Therefore, under normal circumstances, the computer is used to first realize the gray-scale conversion of the original image and then to remove the noise and other follow-up tasks, which can reduce the workload and strengthen the characteristic information of the fault. The gray value of a certain point corresponds to the temperature value of that point in the infrared image before gray conversion [8]. The gray image uses the difference in brightness to represent different gray values. The gray value is simply the depth of the color in the black and white gray image, the value range is 0-255, where the corresponding value of white is 255 that is the upper limit of the interval, and the corresponding value of black is 0 that is the lower limit of the interval; so, each pixel in the grayscale the image will have a value from 0 to 255 corresponding to it. Figure 2 shows the comparison between average method, weighted average method, and maximum value method. After actual analysis, the grayscale effect of the maximum value method is the best [9].Figure 2
Average method, weighted average method, and maximum value method processing picture comparison.


#### 2.1.2. Image Denoising

The linear filter represented by median filter has also been widely used in the field of image denoising because of its simple algorithm and fast running speed. However, the conventional median filter will cause loss of detail and blurring of edges; so, researchers are improving the median filter.Statistical median filtering first determines a filter window and position (usually containing an odd number of pixels), then sorts the pixel values in the window according to the gray scale, and finally takes the median to replace the pixel value in the center of the original window. In this study, the median filter method was used to denoise the image.


#### 2.1.3. Image Binarization

Binarization can be understood as turning a picture into a picture with only two colors. For example, first define a value. When a certain gray value of the picture is greater than this value, it will be converted to white, and when it is less than this value, it will become black. This method turns the entire picture into an image with only two color patches [10].
(1)fx,y=High,fx,y≤t,Low,fx,y<t,(2)gx,y=Low,gx,y≤t,High,gx,y<t.fx,y and gx,y are points on the image. In the tobacco leaf recognition in this article, the most fundamental purpose of using the image binarization method is to effectively segment the tobacco leaf area and other irrelevant areas in the original image. The automatic threshold rule can overcome the defect that the manual selection method cannot meet the basic requirements of most applications. The maximum gray value tmax and the minimum gray value tmin of the image can be obtained, so that [11]
(3)t0=tmin+tmax/2.According to the thresholdt0, the image is divided into two regions, R1 and R2, and the average gray value of the two regions is calculated using the following formula [12].
(4)β1=∑i=0tiin∑i=0tin,β2=∑i=til−1ini∑i=titini.Use the following formula to find the new thresholdti+1.
(5)ti+1=12β1+β2.


#### 2.1.4. Morphological Operation of Image

In the research, due to the tobacco leaves during the binarization operation, some of the tobacco leaves will be broken and holes, which will greatly affect the subsequent image analysis. For this reason, the closed operation should be used for the tobacco leaf image.


#### 2.1.5. Dot Multiplication Operation

In the work of collecting tobacco leaf images, some small tobacco leaves will be scattered on the white cardboard. If they are not processed, it will greatly affect the feature extraction of subsequent images, resulting in inaccurate results. For this reason, the image should be multiplied by dots to eliminate the image background and only keep the tobacco leaf area within the white cardboard. Binary image processing is shown in Figure3.Figure 3
Binary image processing.From the binary image, it can be seen that there are still holes in the tobacco leaf, which will affect the subsequent analysis, and the tobacco leaf should be filled again.


#### 2.1.6. Image Edge Extraction

This paper is aimed at extracting the shape characteristic parameters of tobacco leaves and obtains the shape parameters of the length, width, area, circumference, and roundness of the tobacco leaves. Therefore, the primary goal is to extract a complete tobacco leaf profile. At present, the commonly used methods of edge extraction include edge detection, contour extraction, and boundary tracking.In this paper, boundary tracking is used to obtain the coordinate and direction information of the tobacco leaf boundary pixels in the image, which provides a basis for obtaining the subsequent extraction of tobacco leaf characteristic parameters.


#### 2.1.7. Extraction of Image Features of Tobacco Leaves

The shape of the tobacco leaf after threshing is an important analysis content of the threshing effect of the threshing machine. The tobacco leaf image can be further extracted after the steps of image graying, smoothing and decrying, and binarization. There is no uniform regulation for the selection of the shape characteristic parameters of tobacco leaves. As long as they can reflect the shape of tobacco leaves conveniently and quickly, they can be used as the shape characteristic parameters of tobacco leaves. In this experiment, five shape characteristic parameters of tobacco leaves after threshing treatment were selected, namely, area, circumference, long diameter, short diameter, and roundness coefficient.Division: tobacco leaves with an area greater than 645.16mm2 are considered large, between 645.16mm2 and 161.29mm2 that are medium ones, between 161.29mm2 and 40.32mm2 that are small ones, and less than 40.32mm2 that are fragments, and roundness 3 is round-like tobacco leaves. The leaf rate in medium is divided into large leaf rate, medium leaf rate, small leaf rate, broken leaf rate, and round leaf rate. The stem leaves are tobacco stems with tobacco leaves, and the stems are the only tobacco stems without tobacco leaves.


### 2.2. Prediction Model of Threshing Effect Based on BP Neural Network

#### 2.2.1. The Learning Steps of BP Algorithm

(1)
Set variables and parameters, including training samples, weight, learning matrix, and learning rate(2)
Initialize and give each weight matrix a small random nonzero vector(3)
Enter a random sample(4)
Forward calculation of the input signal and output signal of each layer of the BP network(5)
Obtain the error from the actual output and the expected output(6)
Determine whether the maximum number of iterations has been reached, if it has been reached, go to step 8; otherwise, calculate the local gradient of each layer of neurons in reverse(7)
Modify the weight of each matrix according to the local gradient(8)
Judge whether all samples have been learned, if they have been learned, then end; otherwise, go to step 3. The first consideration in this research is to set the number of neurons in the hidden layer to construct the network


#### 2.2.2. Network Training Function

In the LM algorithm, the full name is Levenberg-Marquard algorithm, it can be used to solve the problem of nonlinear least squares, and it is mostly used for curve fitting and other fields. The LM algorithm needs to find the partial derivative of each parameter to be estimated.The LM algorithm is a fast algorithm that can be used to solve nonlinear least squares problems. It is an improvement on the basis of the Gauss-Newton algorithm, combining the Gauss-Newton method with the gradient descent method, which has the local characteristics of the Gauss-Newton method. Because the LM algorithm uses the second-order derivative information and adds aβ parameter correction algorithm based on the LM-BP, the convergence speed is much faster than the traditional BP network using the gradient descent method and the algorithm is stable. Therefore, the LM algorithm is selected as the training function, and the threshing effect samples are used for training and learning. After the output of t0 times, the total error data is obtained [13].
(6)Ei=e1,⋯,ei−t0+1T.It can be seen that as long as it is necessary to use human vision to judge the quality of agricultural products, most of the machine vision has its place. Even in some aspects, such as the internal quality inspection of agricultural products, and the judgment of small differences, machine vision has surpassed human vision. Therefore, it can be concluded [14].
(7)ei=Jiθ+χi,(8)Ji=ξi,⋯,ξi‐t0+1.Then,β is obtained by the Gauss-Newton method [15].
(9)β=Ji+ei.According to the improved method, the LM algorithm of the Gauss-Newton method, replacingJiJiT with JiJiT+μi,μi>0, the learning algorithm becomes [16].
(10)β=β‐JiJiT+μiJiei−δβ.After the network training is completed, when recognizing the tobacco leaf image, only the forward propagation process of the information is needed, and the back propagation process is not needed. This is also the BP neural network in tobacco leaf image recognition that is much faster than the template matching method. Main reason: the range of learning rate is usually chosen between 0.01 and 0.5 based on experience [17].


### 2.3. Flue-Cured Tobacco Leaf Classification System

In this paper, a flue-cured tobacco leaf grading system is established based on MATLAB software. According to the realized functions, it can be divided into the following modules: tobacco leaf image opening and display module, tobacco leaf image preprocessing module (image filtering, image binarization, image segmentation), tobacco leaf characteristics parameter extraction module (divided into two parts: geometric feature extraction and color feature extraction), and tobacco leaf grade fuzzy mode reading module and tobacco leaf grading module (display the final tobacco leaf grade). The software interface of the tobacco leaf automatic grading system is shown in Figure4.The advantages of digital image processing and analysis technology are high processing accuracy, rich processing content, complex nonlinear processing, and flexible flexibility. Generally speaking, the processing content can be changed as long as the software is changed.Figure 4
The software interface of the tobacco leaf automatic grading system.The characteristic of the tobacco grading system is to improve the flexibility and automation of production. In some dangerous working environments that are not suitable for manual operations or occasions where artificial vision is difficult to meet the requirements, machine vision is often used to replace artificial vision; at the same time, in the mass industrial production process, manual visual inspection of product quality is inefficient and inaccurate. The use of machine vision inspection methods can greatly improve production efficiency and production automation.Image opening and display module: It is mainly realized by the MATLAB functions imread() and imshow(). This module allows the software operator to clearly see which tobacco leaf is being graded.Image preprocessing module: it mainly consists of three parts: image filtering, image binarization, and image segmentation, and each step of preprocessing is completed; the corresponding preprocessing results will be displayed on the interface. This makes it easy for the operator to observe the effect of image preprocessing good or bad.Tobacco leaf feature parameter extraction module: this module is divided into geometric feature extraction and color feature extraction. The geometric features of tobacco leaf such as length, width, area, aspect ratio, rectangularity, color feature hueH, and saturation are displayed in detail through the computer vision sensor S, A channel, and B channel.Tobacco leaf grade fuzzy mode reading module: it can realize the fuzzy mode reading of the tobacco leaf automatic grading model, and it can be supplemented and adjusted according to the tobacco leaf sample collection.Tobacco leaf grading module: taking 22 levels of tobacco leaf samples as the domain of discussion, 5 geometric features, 4 color features, and a total of 9 appearance features, the average of the appearance feature vector of each level is the fuzzy mode, the realization based on fuzzy pattern recognition tobacco leaves are automatically graded, and the final grading result is displayed on the interface [18].


### 2.4. User Interface Design

The user interface is mainly composed of 4 parts: the image acquisition display interface, the pattern recognition system method selection interface, the tobacco leaf characteristic parameter interface, and the result display interface.(1)
Acquisition image display interface: this interface allows users to observe the acquired images in real time and determines the integrity of the scanned images, the reasonableness of the illumination, etc., to determine whether the acquired images are suitable for further processing. If there is a problem with the acquisition system, the hardware system can be maintained and improved in time(2)
Pattern recognition system method selection interface: interface can be used to select the method of each module of the pattern recognition system. Among them, image denoising includes: median filtering, wavelet denoising, and contour let transform; image segmentation includes iterative method and OTSU threshold method; image edge extraction includes Roberts edge operator and Prewitt edge operator, and Canny edge operator classifier includes BP neural network, extreme learning machine, and regular extreme learning machine. If you need to add other image processing methods, you only need to add the program of the method directly in the corresponding place of each module(3)
Tobacco leaf characteristic parameter interface: this interface has the main characteristic values of fresh tobacco leaves, including 3 characteristic values of color characteristic and 5 characteristic values of texture characteristic. Users can determine whether the characteristics of tobacco leaves obtained by pattern recognition are reasonable based on experience and provide an important reference for tobacco leaf classification(4)
The result display interface: interface is the tobacco leaf grade identified by each characteristic parameter. The tobacco grower can judge whether the grade is correct based on experience, and it also provides a basis for the correct sorting of the subsequent implementing agencies


### 2.5. Evaluation Index of Threshing Effect

Each module of the system simulates the thinking intelligence, perception intelligence, and behavior intelligence of graded experts. It has multiple thinking functions such as learning and memory, judgment and fuzzy reasoning, and graded decision-making, as well as coordination and control functions such as automatic image collection and communication between upper and lower computers.When experts think that a certain index is important, they often fail to get ideal evaluation results. Therefore, this article decides to use the subjective and objective combination weighting method to combine and weight the indicators of the threshing effect of the first-level threshing machine. It not only considers the amount of information provided by each indicator but also takes into account the subjective views of experts, which improves the accuracy and scientificity of the indicator weights. Supposew=w1,w2,..,wn is the index weight after the combination of AHP-entropy weighting method, WJ is [19]
(11)WJ=βwi+1−βwj,0≤β≤1.When using the subjective and objective combination weighting method, there are usually the following two combination models, namely [20],
(12)Wi=wiwj∑i=1nwiwj,(13)Wj=βwi+1−βwj,0≤β≤1.Subjective weight is determined by theWi analytic hierarchy process; objective weight is determined by Wj entropy weight method. Construct the objective function, take the minimum sum of squares of “the difference between the subjective weight and the combined weight” and the “the difference between the objective weight and the combined weight” as the goal, and obtain the proportion of the subjective weight and the objective weight in the combined weight proportion [21].
(14)minb=∑WJ−Wi2+WJ−wj2.You can getWj as [22]
(15)Wj=0.5wi+0.5wj.


## 2.1. Image Preprocessing

Due to the complex factors affecting tobacco leaves during the production process, the tobacco leaves produced by tobacco farmers are often of different quality. Only through grading processing can tobacco leaves with relatively consistent quality be included in the same grade.Image preprocessing is the key link in the extraction of characteristic parameters of tobacco leaves, which directly determines whether the subsequent identification of tobacco leaves is accurate and reliable. Because the acquired tobacco leaf images are often affected by the light and environment, as well as the optical characteristics of the image acquisition equipment and other objective factors, the captured tobacco leaf images are not very clear. The original photo taken by the camera is shown in Figure1.Figure 1
The original photo taken by the camera (author self-photo).The tobacco leaf image collected in the tobacco factory will inevitably have some differences with the actual tobacco leaf, and in severe cases, the image will also be degraded, distorted, or contain noise. Image preprocessing can improve and improve the quality of the tobacco leaf images collected in this experiment, remove some useless information during the shooting process of the image, and restore useful real information, thereby improving the testability of the image, simplifying the image data information, and improving the testability of the image. Obtain characteristic information such as the shape of the tobacco leaf and analyze and recognize the image to prepare. The preprocessing of tobacco leaf images is the first step of tobacco leaf identification, and it is also a key step that must be carried out in this research [6, 7].


### 2.1.1. Image Grayscale

Grayscale image is a unique image that keeps the same value ofRcomponent=Gcomponent=Bcomponent. In other words, the change scale of any pixel in the image is only 256 patterns. That is, the central guideline of image graying is R=G=B, and this value is also called gray value. Therefore, in the image processing process, to make the calculation workload of the following image, it is common to convert different types of images into grayscale images in a unified manner. Therefore, under normal circumstances, the computer is used to first realize the gray-scale conversion of the original image and then to remove the noise and other follow-up tasks, which can reduce the workload and strengthen the characteristic information of the fault. The gray value of a certain point corresponds to the temperature value of that point in the infrared image before gray conversion [8]. The gray image uses the difference in brightness to represent different gray values. The gray value is simply the depth of the color in the black and white gray image, the value range is 0-255, where the corresponding value of white is 255 that is the upper limit of the interval, and the corresponding value of black is 0 that is the lower limit of the interval; so, each pixel in the grayscale the image will have a value from 0 to 255 corresponding to it. Figure 2 shows the comparison between average method, weighted average method, and maximum value method. After actual analysis, the grayscale effect of the maximum value method is the best [9].Figure 2
Average method, weighted average method, and maximum value method processing picture comparison.


### 2.1.2. Image Denoising

The linear filter represented by median filter has also been widely used in the field of image denoising because of its simple algorithm and fast running speed. However, the conventional median filter will cause loss of detail and blurring of edges; so, researchers are improving the median filter.Statistical median filtering first determines a filter window and position (usually containing an odd number of pixels), then sorts the pixel values in the window according to the gray scale, and finally takes the median to replace the pixel value in the center of the original window. In this study, the median filter method was used to denoise the image.


### 2.1.3. Image Binarization

Binarization can be understood as turning a picture into a picture with only two colors. For example, first define a value. When a certain gray value of the picture is greater than this value, it will be converted to white, and when it is less than this value, it will become black. This method turns the entire picture into an image with only two color patches [10].
(1)fx,y=High,fx,y≤t,Low,fx,y<t,(2)gx,y=Low,gx,y≤t,High,gx,y<t.fx,y and gx,y are points on the image. In the tobacco leaf recognition in this article, the most fundamental purpose of using the image binarization method is to effectively segment the tobacco leaf area and other irrelevant areas in the original image. The automatic threshold rule can overcome the defect that the manual selection method cannot meet the basic requirements of most applications. The maximum gray value tmax and the minimum gray value tmin of the image can be obtained, so that [11]
(3)t0=tmin+tmax/2.According to the thresholdt0, the image is divided into two regions, R1 and R2, and the average gray value of the two regions is calculated using the following formula [12].
(4)β1=∑i=0tiin∑i=0tin,β2=∑i=til−1ini∑i=titini.Use the following formula to find the new thresholdti+1.
(5)ti+1=12β1+β2.


### 2.1.4. Morphological Operation of Image

In the research, due to the tobacco leaves during the binarization operation, some of the tobacco leaves will be broken and holes, which will greatly affect the subsequent image analysis. For this reason, the closed operation should be used for the tobacco leaf image.


### 2.1.5. Dot Multiplication Operation

In the work of collecting tobacco leaf images, some small tobacco leaves will be scattered on the white cardboard. If they are not processed, it will greatly affect the feature extraction of subsequent images, resulting in inaccurate results. For this reason, the image should be multiplied by dots to eliminate the image background and only keep the tobacco leaf area within the white cardboard. Binary image processing is shown in Figure3.Figure 3
Binary image processing.From the binary image, it can be seen that there are still holes in the tobacco leaf, which will affect the subsequent analysis, and the tobacco leaf should be filled again.


### 2.1.6. Image Edge Extraction

This paper is aimed at extracting the shape characteristic parameters of tobacco leaves and obtains the shape parameters of the length, width, area, circumference, and roundness of the tobacco leaves. Therefore, the primary goal is to extract a complete tobacco leaf profile. At present, the commonly used methods of edge extraction include edge detection, contour extraction, and boundary tracking.In this paper, boundary tracking is used to obtain the coordinate and direction information of the tobacco leaf boundary pixels in the image, which provides a basis for obtaining the subsequent extraction of tobacco leaf characteristic parameters.


### 2.1.7. Extraction of Image Features of Tobacco Leaves

The shape of the tobacco leaf after threshing is an important analysis content of the threshing effect of the threshing machine. The tobacco leaf image can be further extracted after the steps of image graying, smoothing and decrying, and binarization. There is no uniform regulation for the selection of the shape characteristic parameters of tobacco leaves. As long as they can reflect the shape of tobacco leaves conveniently and quickly, they can be used as the shape characteristic parameters of tobacco leaves. In this experiment, five shape characteristic parameters of tobacco leaves after threshing treatment were selected, namely, area, circumference, long diameter, short diameter, and roundness coefficient.Division: tobacco leaves with an area greater than 645.16mm2 are considered large, between 645.16mm2 and 161.29mm2 that are medium ones, between 161.29mm2 and 40.32mm2 that are small ones, and less than 40.32mm2 that are fragments, and roundness 3 is round-like tobacco leaves. The leaf rate in medium is divided into large leaf rate, medium leaf rate, small leaf rate, broken leaf rate, and round leaf rate. The stem leaves are tobacco stems with tobacco leaves, and the stems are the only tobacco stems without tobacco leaves.


## 2.1.1. Image Grayscale

Grayscale image is a unique image that keeps the same value ofRcomponent=Gcomponent=Bcomponent. In other words, the change scale of any pixel in the image is only 256 patterns. That is, the central guideline of image graying is R=G=B, and this value is also called gray value. Therefore, in the image processing process, to make the calculation workload of the following image, it is common to convert different types of images into grayscale images in a unified manner. Therefore, under normal circumstances, the computer is used to first realize the gray-scale conversion of the original image and then to remove the noise and other follow-up tasks, which can reduce the workload and strengthen the characteristic information of the fault. The gray value of a certain point corresponds to the temperature value of that point in the infrared image before gray conversion [8]. The gray image uses the difference in brightness to represent different gray values. The gray value is simply the depth of the color in the black and white gray image, the value range is 0-255, where the corresponding value of white is 255 that is the upper limit of the interval, and the corresponding value of black is 0 that is the lower limit of the interval; so, each pixel in the grayscale the image will have a value from 0 to 255 corresponding to it. Figure 2 shows the comparison between average method, weighted average method, and maximum value method. After actual analysis, the grayscale effect of the maximum value method is the best [9].Figure 2
Average method, weighted average method, and maximum value method processing picture comparison.


## 2.1.2. Image Denoising

The linear filter represented by median filter has also been widely used in the field of image denoising because of its simple algorithm and fast running speed. However, the conventional median filter will cause loss of detail and blurring of edges; so, researchers are improving the median filter.Statistical median filtering first determines a filter window and position (usually containing an odd number of pixels), then sorts the pixel values in the window according to the gray scale, and finally takes the median to replace the pixel value in the center of the original window. In this study, the median filter method was used to denoise the image.


## 2.1.3. Image Binarization

Binarization can be understood as turning a picture into a picture with only two colors. For example, first define a value. When a certain gray value of the picture is greater than this value, it will be converted to white, and when it is less than this value, it will become black. This method turns the entire picture into an image with only two color patches [10].
(1)fx,y=High,fx,y≤t,Low,fx,y<t,(2)gx,y=Low,gx,y≤t,High,gx,y<t.fx,y and gx,y are points on the image. In the tobacco leaf recognition in this article, the most fundamental purpose of using the image binarization method is to effectively segment the tobacco leaf area and other irrelevant areas in the original image. The automatic threshold rule can overcome the defect that the manual selection method cannot meet the basic requirements of most applications. The maximum gray value tmax and the minimum gray value tmin of the image can be obtained, so that [11]
(3)t0=tmin+tmax/2.According to the thresholdt0, the image is divided into two regions, R1 and R2, and the average gray value of the two regions is calculated using the following formula [12].
(4)β1=∑i=0tiin∑i=0tin,β2=∑i=til−1ini∑i=titini.Use the following formula to find the new thresholdti+1.
(5)ti+1=12β1+β2.


## 2.1.4. Morphological Operation of Image

In the research, due to the tobacco leaves during the binarization operation, some of the tobacco leaves will be broken and holes, which will greatly affect the subsequent image analysis. For this reason, the closed operation should be used for the tobacco leaf image.


## 2.1.5. Dot Multiplication Operation

In the work of collecting tobacco leaf images, some small tobacco leaves will be scattered on the white cardboard. If they are not processed, it will greatly affect the feature extraction of subsequent images, resulting in inaccurate results. For this reason, the image should be multiplied by dots to eliminate the image background and only keep the tobacco leaf area within the white cardboard. Binary image processing is shown in Figure3.Figure 3
Binary image processing.From the binary image, it can be seen that there are still holes in the tobacco leaf, which will affect the subsequent analysis, and the tobacco leaf should be filled again.


## 2.1.6. Image Edge Extraction

This paper is aimed at extracting the shape characteristic parameters of tobacco leaves and obtains the shape parameters of the length, width, area, circumference, and roundness of the tobacco leaves. Therefore, the primary goal is to extract a complete tobacco leaf profile. At present, the commonly used methods of edge extraction include edge detection, contour extraction, and boundary tracking.In this paper, boundary tracking is used to obtain the coordinate and direction information of the tobacco leaf boundary pixels in the image, which provides a basis for obtaining the subsequent extraction of tobacco leaf characteristic parameters.


## 2.1.7. Extraction of Image Features of Tobacco Leaves

The shape of the tobacco leaf after threshing is an important analysis content of the threshing effect of the threshing machine. The tobacco leaf image can be further extracted after the steps of image graying, smoothing and decrying, and binarization. There is no uniform regulation for the selection of the shape characteristic parameters of tobacco leaves. As long as they can reflect the shape of tobacco leaves conveniently and quickly, they can be used as the shape characteristic parameters of tobacco leaves. In this experiment, five shape characteristic parameters of tobacco leaves after threshing treatment were selected, namely, area, circumference, long diameter, short diameter, and roundness coefficient.Division: tobacco leaves with an area greater than 645.16mm2 are considered large, between 645.16mm2 and 161.29mm2 that are medium ones, between 161.29mm2 and 40.32mm2 that are small ones, and less than 40.32mm2 that are fragments, and roundness 3 is round-like tobacco leaves. The leaf rate in medium is divided into large leaf rate, medium leaf rate, small leaf rate, broken leaf rate, and round leaf rate. The stem leaves are tobacco stems with tobacco leaves, and the stems are the only tobacco stems without tobacco leaves.


## 2.2. Prediction Model of Threshing Effect Based on BP Neural Network

### 2.2.1. The Learning Steps of BP Algorithm

(1)
Set variables and parameters, including training samples, weight, learning matrix, and learning rate(2)
Initialize and give each weight matrix a small random nonzero vector(3)
Enter a random sample(4)
Forward calculation of the input signal and output signal of each layer of the BP network(5)
Obtain the error from the actual output and the expected output(6)
Determine whether the maximum number of iterations has been reached, if it has been reached, go to step 8; otherwise, calculate the local gradient of each layer of neurons in reverse(7)
Modify the weight of each matrix according to the local gradient(8)
Judge whether all samples have been learned, if they have been learned, then end; otherwise, go to step 3. The first consideration in this research is to set the number of neurons in the hidden layer to construct the network


### 2.2.2. Network Training Function

In the LM algorithm, the full name is Levenberg-Marquard algorithm, it can be used to solve the problem of nonlinear least squares, and it is mostly used for curve fitting and other fields. The LM algorithm needs to find the partial derivative of each parameter to be estimated.The LM algorithm is a fast algorithm that can be used to solve nonlinear least squares problems. It is an improvement on the basis of the Gauss-Newton algorithm, combining the Gauss-Newton method with the gradient descent method, which has the local characteristics of the Gauss-Newton method. Because the LM algorithm uses the second-order derivative information and adds aβ parameter correction algorithm based on the LM-BP, the convergence speed is much faster than the traditional BP network using the gradient descent method and the algorithm is stable. Therefore, the LM algorithm is selected as the training function, and the threshing effect samples are used for training and learning. After the output of t0 times, the total error data is obtained [13].
(6)Ei=e1,⋯,ei−t0+1T.It can be seen that as long as it is necessary to use human vision to judge the quality of agricultural products, most of the machine vision has its place. Even in some aspects, such as the internal quality inspection of agricultural products, and the judgment of small differences, machine vision has surpassed human vision. Therefore, it can be concluded [14].
(7)ei=Jiθ+χi,(8)Ji=ξi,⋯,ξi‐t0+1.Then,β is obtained by the Gauss-Newton method [15].
(9)β=Ji+ei.According to the improved method, the LM algorithm of the Gauss-Newton method, replacingJiJiT with JiJiT+μi,μi>0, the learning algorithm becomes [16].
(10)β=β‐JiJiT+μiJiei−δβ.After the network training is completed, when recognizing the tobacco leaf image, only the forward propagation process of the information is needed, and the back propagation process is not needed. This is also the BP neural network in tobacco leaf image recognition that is much faster than the template matching method. Main reason: the range of learning rate is usually chosen between 0.01 and 0.5 based on experience [17].


## 2.2.1. The Learning Steps of BP Algorithm

(1)
Set variables and parameters, including training samples, weight, learning matrix, and learning rate(2)
Initialize and give each weight matrix a small random nonzero vector(3)
Enter a random sample(4)
Forward calculation of the input signal and output signal of each layer of the BP network(5)
Obtain the error from the actual output and the expected output(6)
Determine whether the maximum number of iterations has been reached, if it has been reached, go to step 8; otherwise, calculate the local gradient of each layer of neurons in reverse(7)
Modify the weight of each matrix according to the local gradient(8)
Judge whether all samples have been learned, if they have been learned, then end; otherwise, go to step 3. The first consideration in this research is to set the number of neurons in the hidden layer to construct the network


## 2.2.2. Network Training Function

In the LM algorithm, the full name is Levenberg-Marquard algorithm, it can be used to solve the problem of nonlinear least squares, and it is mostly used for curve fitting and other fields. The LM algorithm needs to find the partial derivative of each parameter to be estimated.The LM algorithm is a fast algorithm that can be used to solve nonlinear least squares problems. It is an improvement on the basis of the Gauss-Newton algorithm, combining the Gauss-Newton method with the gradient descent method, which has the local characteristics of the Gauss-Newton method. Because the LM algorithm uses the second-order derivative information and adds aβ parameter correction algorithm based on the LM-BP, the convergence speed is much faster than the traditional BP network using the gradient descent method and the algorithm is stable. Therefore, the LM algorithm is selected as the training function, and the threshing effect samples are used for training and learning. After the output of t0 times, the total error data is obtained [13].
(6)Ei=e1,⋯,ei−t0+1T.It can be seen that as long as it is necessary to use human vision to judge the quality of agricultural products, most of the machine vision has its place. Even in some aspects, such as the internal quality inspection of agricultural products, and the judgment of small differences, machine vision has surpassed human vision. Therefore, it can be concluded [14].
(7)ei=Jiθ+χi,(8)Ji=ξi,⋯,ξi‐t0+1.Then,β is obtained by the Gauss-Newton method [15].
(9)β=Ji+ei.According to the improved method, the LM algorithm of the Gauss-Newton method, replacingJiJiT with JiJiT+μi,μi>0, the learning algorithm becomes [16].
(10)β=β‐JiJiT+μiJiei−δβ.After the network training is completed, when recognizing the tobacco leaf image, only the forward propagation process of the information is needed, and the back propagation process is not needed. This is also the BP neural network in tobacco leaf image recognition that is much faster than the template matching method. Main reason: the range of learning rate is usually chosen between 0.01 and 0.5 based on experience [17].


## 2.3. Flue-Cured Tobacco Leaf Classification System

In this paper, a flue-cured tobacco leaf grading system is established based on MATLAB software. According to the realized functions, it can be divided into the following modules: tobacco leaf image opening and display module, tobacco leaf image preprocessing module (image filtering, image binarization, image segmentation), tobacco leaf characteristics parameter extraction module (divided into two parts: geometric feature extraction and color feature extraction), and tobacco leaf grade fuzzy mode reading module and tobacco leaf grading module (display the final tobacco leaf grade). The software interface of the tobacco leaf automatic grading system is shown in Figure4.The advantages of digital image processing and analysis technology are high processing accuracy, rich processing content, complex nonlinear processing, and flexible flexibility. Generally speaking, the processing content can be changed as long as the software is changed.Figure 4
The software interface of the tobacco leaf automatic grading system.The characteristic of the tobacco grading system is to improve the flexibility and automation of production. In some dangerous working environments that are not suitable for manual operations or occasions where artificial vision is difficult to meet the requirements, machine vision is often used to replace artificial vision; at the same time, in the mass industrial production process, manual visual inspection of product quality is inefficient and inaccurate. The use of machine vision inspection methods can greatly improve production efficiency and production automation.Image opening and display module: It is mainly realized by the MATLAB functions imread() and imshow(). This module allows the software operator to clearly see which tobacco leaf is being graded.Image preprocessing module: it mainly consists of three parts: image filtering, image binarization, and image segmentation, and each step of preprocessing is completed; the corresponding preprocessing results will be displayed on the interface. This makes it easy for the operator to observe the effect of image preprocessing good or bad.Tobacco leaf feature parameter extraction module: this module is divided into geometric feature extraction and color feature extraction. The geometric features of tobacco leaf such as length, width, area, aspect ratio, rectangularity, color feature hueH, and saturation are displayed in detail through the computer vision sensor S, A channel, and B channel.Tobacco leaf grade fuzzy mode reading module: it can realize the fuzzy mode reading of the tobacco leaf automatic grading model, and it can be supplemented and adjusted according to the tobacco leaf sample collection.Tobacco leaf grading module: taking 22 levels of tobacco leaf samples as the domain of discussion, 5 geometric features, 4 color features, and a total of 9 appearance features, the average of the appearance feature vector of each level is the fuzzy mode, the realization based on fuzzy pattern recognition tobacco leaves are automatically graded, and the final grading result is displayed on the interface [18].


## 2.4. User Interface Design

The user interface is mainly composed of 4 parts: the image acquisition display interface, the pattern recognition system method selection interface, the tobacco leaf characteristic parameter interface, and the result display interface.(1)
Acquisition image display interface: this interface allows users to observe the acquired images in real time and determines the integrity of the scanned images, the reasonableness of the illumination, etc., to determine whether the acquired images are suitable for further processing. If there is a problem with the acquisition system, the hardware system can be maintained and improved in time(2)
Pattern recognition system method selection interface: interface can be used to select the method of each module of the pattern recognition system. Among them, image denoising includes: median filtering, wavelet denoising, and contour let transform; image segmentation includes iterative method and OTSU threshold method; image edge extraction includes Roberts edge operator and Prewitt edge operator, and Canny edge operator classifier includes BP neural network, extreme learning machine, and regular extreme learning machine. If you need to add other image processing methods, you only need to add the program of the method directly in the corresponding place of each module(3)
Tobacco leaf characteristic parameter interface: this interface has the main characteristic values of fresh tobacco leaves, including 3 characteristic values of color characteristic and 5 characteristic values of texture characteristic. Users can determine whether the characteristics of tobacco leaves obtained by pattern recognition are reasonable based on experience and provide an important reference for tobacco leaf classification(4)
The result display interface: interface is the tobacco leaf grade identified by each characteristic parameter. The tobacco grower can judge whether the grade is correct based on experience, and it also provides a basis for the correct sorting of the subsequent implementing agencies


## 2.5. Evaluation Index of Threshing Effect

Each module of the system simulates the thinking intelligence, perception intelligence, and behavior intelligence of graded experts. It has multiple thinking functions such as learning and memory, judgment and fuzzy reasoning, and graded decision-making, as well as coordination and control functions such as automatic image collection and communication between upper and lower computers.When experts think that a certain index is important, they often fail to get ideal evaluation results. Therefore, this article decides to use the subjective and objective combination weighting method to combine and weight the indicators of the threshing effect of the first-level threshing machine. It not only considers the amount of information provided by each indicator but also takes into account the subjective views of experts, which improves the accuracy and scientificity of the indicator weights. Supposew=w1,w2,..,wn is the index weight after the combination of AHP-entropy weighting method, WJ is [19]
(11)WJ=βwi+1−βwj,0≤β≤1.When using the subjective and objective combination weighting method, there are usually the following two combination models, namely [20],
(12)Wi=wiwj∑i=1nwiwj,(13)Wj=βwi+1−βwj,0≤β≤1.Subjective weight is determined by theWi analytic hierarchy process; objective weight is determined by Wj entropy weight method. Construct the objective function, take the minimum sum of squares of “the difference between the subjective weight and the combined weight” and the “the difference between the objective weight and the combined weight” as the goal, and obtain the proportion of the subjective weight and the objective weight in the combined weight proportion [21].
(14)minb=∑WJ−Wi2+WJ−wj2.You can getWj as [22]
(15)Wj=0.5wi+0.5wj.


## 3. Results

In addition, with the promotion of threshing and retrying, the tobacco leaves purchased and used by cigarette factories will gradually become slivers, and the difficulty of grading slabs will increase, because many characteristics of tobacco leaves such as size, leaf shape, and veins are in the slabs of leaves. No longer exists in the computer vision, and when the computer vision recognizes the tobacco leaf, it is more dependent on the color and surface characteristics of the tobacco leaf to detect the leaf. Determine the final closeness of each index, and some data are shown in Table1. It can be seen from Table 1 that the comprehensive score obtained by subjective and objective combination weighting of various indicators and the TOPSIS method of gray correlation degree can evaluate the pros and cons of threshing effect. In this test, the test program of the 9th group has the highest score of closeness, which is 0.622777; that is, under the process parameters of the feed amount of 10000, the speed of the beater is 47, the opening of the frame is 3.2, and the beater of the threshing machine leaf effect is the best. Under the technological conditions with a feed rate of 10000 kg/hr, a frame opening of 2.8, and a batting speed of 47 hz, when only changing the batting speed to 50hz, the closeness increased from 0.493842 to 0549903, an increase of 11.2%. Under the technological conditions that the feed rate is 1000 kg/hr and the frame opening is 2.8, increasing the speed of the beater will increase the threshing effect. In the same way, under the process conditions of a feed rate of 12,500 kg/hr, a frame opening of 2.8, and a batting speed of 47hz, when only the batting speed is changed to 50 hz, the closeness drops from 0.504675 to 0.425982, which is 15.6% decrease. Which shows that under the technological conditions of the feed rate of 12500 kg/hr and the frame opening of 2.8, increasing the speed of the beater will cause the effect of threshing to decrease. It can be seen that through the comprehensive evaluation system of the threshing effect, the threshing effect under the threshing process parameters can be evaluated and analyzed. However, the influence of the process parameters of the threshing machine on the threshing effect is complicated, and the comprehensive evaluation method can only the evaluation and analysis of the test plan cannot deeply understand the influence of process parameters on the effect of threshing.Table 1
Partial data.
TestFeed amountRotating speedFrame openingClosenessRankTI10000472.80.49384214T210000482.80.5354659T30000492.80.52088910T410000502.80.5490036T5100004730.5601463T6100004830.542148T7100004930.5549415T8100005030.52087811T910000473.20.6227771T2112500472.80.50467512T2212 500482.80.37031140T2312500492.80.43226419T2412500502.80.42598222Artificial neural network classification technology fully absorbs the characteristics of human understanding of things. In addition to using the spectral characteristics of the image itself, it can also apply features such as the geometric space of the image. More importantly, it utilizes the accumulation of people in the past when recognizing images. Experience, under the guidance of the information of the classified image, through self-learning (i.e., training), modifies its own structure and recognition method, thereby improving the classification accuracy and classification speed of the image to obtain satisfactory classification results.Use the trained BP neural network to predict and analyze the threshing effect under the technical parameters of the threshing machine to obtain each index value and then use the subjective and objective combination weight coefficient to weight and integrate the index value. The five indexes of stem rate, stem rate, round leaf rate, and fragment rate are transformed into a total index, namely, leaf threshing rate, which is used to evaluate the effect of threshing, as shown in Table2.Table 2
Partial data of threshing effect.
Feed amountRotating speedFrame opening>161.29 mm blade rateRoundnessStem leaf rateStalk rateBroken leaf rate10000472.80.3412075380.4037994510.3249954350.115241460.00239841310000482.80.3558889780.4284602770.3557742780.0844164140.00310600110000492.80.3215214140.3872923370.3621926490.103360990.002444410000502.80.379391950.4251594170.3714486640.0752013310.002177149100004730.3815325980.419735560.376671620.0580014920.00221401100004830.3360025070.3955691150.399567210.0505845660.003017036100004930.3342210770.376195270.4079725570.059515420.00232296512500472.80.2718016320.3904788930.4119601330.067807560.00391622412500482.80.2884686730.4193669980.3925245250.0644106270.00434341612500492.80.3072283560.4217869140.4081871350.051065960.00353902112500502.80.2743909850.4031123460.4269527480.0500326240.005095157The running process of BP neural network is shown in Figure5. Choose 80% as the training set, 10% as the test set, and 10% as the validation set.Figure 5
BP neural network operation process.The approximation accuracy of the training samples of the threshing effect prediction model based on the BP neural network LM algorithm is 99.495%, the approximation accuracy of the validation set is 96.535%, the approximation accuracy of the test set is 98.392%, which is greater than 95%, and the totalR has also reached 98.864%, which proves that the network model is effective and the accuracy of the approximation is extremely high. The training effect of the model is shown in Figure 6.Figure 6
The training effect of the model.The residual values are mainly distributed within -0.00355 and -0.001553, indicating that the approximation accuracy of the network model is good. It can be seen that the prediction accuracy using neural network is very high. The residual difference between the actual value and the predicted value in the prediction model is shown in Figure7.Figure 7
The residual of the actual value and the predicted value in the prediction model.The influence of single factor effect on threshing rate is shown in Figure8. It can be seen from Figure 8 that within the test range, there is a negative correlation between feed rate, beater speed, frame opening, and threshing rate. The increase in the value of the feed rate, the speed of the beater, and the opening of the frame will reduce the threshing rate.Figure 8
The influence of single factor effect on threshing rate.To express the relationship between the process parameters and the threshing rate, the process parameters: the feed amountx1, the beater speed x2, the frame opening x3, and the threshing rate y are subjected to multiple regression analysis, and the regression equation is established [23].Multiple linear regression equation is as follows:(16)y=35.61−0.000398x1−0.1678x2−0.927x3.The analysis of variance of the multiple linear regression equation is shown in Table3.Table 3
Analysis of variance of multiple linear regression equation.
FactorDegree of freedomSum of squareMean squareF valueP valueModel314.0414.6804850.15<0.001x119 8859.88501105.91<0.001x211.4071.4074915.08<0.001x312.7492.7489529.45<0.001Error363.3600.09333——Total3917.401———R2=0.81, R2adj=0.79.Multiple nonlinear regression equation [24] is as follows.
(17)y=72.2−0.00124x1−1.359x2−2.82x3+0.000056x1x2−0.000587x1x3+0.1752x2x3.The analysis of the multiple nonlinear regression equation is shown in Table4.Table 4
Analysis of multiple nonlinear regression equations.
FactorDegree of freedomSum of squareMean squareF valueP valueModel616.13162. 6885969.87<0.001x119. 85509.88501256.90<0.001x211.40751.4074935.58<0.001x312.74902.7489571.44<0.001x1×x210.24520.245236.37<0.001x1×x311.72201.7220544.75<0.001x2×x310.12280.122833.19<0.001Error331.26980.03848——Total3917.4031———R2=0.91, R2adj=0.91.R is the negative correlation coefficient, which indicates the close degree of the linear regression relationship between each independent variable and the dependent variable in the regression equation. The larger the R, the closer the regression relationship. R2 is the square of the negative correlation coefficient, and R2 is the square of the adjusted negative correlation coefficient. From Tables 3 and 4, the R2 and adjusted R2 of the multiple linear regression equation are 0.81 and 0.79, respectively, and the R2 and adjusted R2 of the multiple nonlinear regression equation are 0.93 and 0.91, respectively, indicating that the fitting effect of the nonlinear regression equation is better than that of the linear regression equation. The effect is better, and the predicted value is highly correlated with the actual value. Therefore, the multiple nonlinear regression equation is selected as the regression model of the threshing effect. This equation expresses the relationship between the threshing rate and the amount of material, the speed of the threshing stick, and the opening of the frame. The P value of the model is 0.001<0.05, indicating that the equation model is extremely significant and statistically significant. In the independent items, the feed amount, the speed of the beater, and the opening of the frame have a very significant influence on the threshing rate; in the interactive item, the interactive effect of the amount of feed and the speed of the beater and the interaction between the feed amount and the opening of the frame is <0.05, Indicating that there is an interaction, the interaction between the speed of the beater and the opening of the frame is >0.05, indicating that the interaction is not significant. The order of the influence of the process parameters on the threshing rate is feedvolume>frameopening>beatingrodspeed [25].


## 4. Discussion

At present, the threshing and redrying process is mainly divided into three parts: threshing, wind separation, and redrying. Among them, the air separation process is the most important part of threshing and redrying. Its purpose is to separate the threshing tobacco leaves according to different quality requirements. It is also the most important process to improve the utilization of tobacco leaves. Focus on attention: at the same time, the main purpose of the threshing and redrying process is to separate pure tobacco from the three types of tobacco leaf, pure tobacco, leaves with stalk, and light stalk as much as possible, to achieve the maximum utilization of tobacco leaves, reduce the loss of tobacco production, and improve the quality of tobacco leaf production; this process is also one of the core processes for improving the quality of silk and the sensory quality of tobacco in tobacco production. However, there is currently little research on the air separation process of tobacco leaf threshing and redrying, and the intelligent control of the production line needs to be improved. The setting of the air separation process parameters mostly depends on the judgment of empirical tests. This lack of scientific methods has severely affected the increase in the utilization of tobacco leaves [26, 27].The texture feature of the image is the regular feature that describes the gray value of the image in the local area of the image or as a whole. Combining the color feature and texture feature of the image can analyze the information of the image more comprehensively, especially the texture feature. The advantages of taking into account both the microstructure and the macrostructure of the target object are obvious. In the research on tobacco diseases, pests, and weeds, it was found that when the color space model is used to analyze tobacco leaves with small color differences, it is difficult to obtain an ideal recognition model, but if the texture feature is used for recognition, a good recognition effect can be achieved.. In the early work of image processing, to remove the redundant information of the image, scholars at home and abroad have studied a variety of point-based threshold methods, the maximum variance automatic extraction threshold method, the minimum error segmentation method, the histogram method, and so on. Using the histogram method for image segmentation, the gray value of the foreground image and the background image that need to be segmented has a large difference, it is easily interfered by noise, and the scope of application is small. At present, the method of edge detection of tobacco leaves mainly adopts traditional edge gradient detection and threshold-based segmentation methods. In terms of image detection of tobacco leaves, the color, shape, area, texture, and hue of tobacco leaves have become the research objects of detection. The color and shape of the tobacco can reflect the growth of tobacco, the supply of fertilizer and water, etc., through the use of image processing technology, real-time monitoring of tobacco leaves can be achieved, the growth characteristics of different development stages of tobacco leaves can be grasped, and the growth process of tobacco can be more accurately achieved. Standardized production ensures the quality and yield of tobacco leaves [28].This paper uses computer numerical simulation technology to establish a tobacco leaf transformation mathematical model. Through image recognition technology, combined with the experimental results of pure tobacco leaves with stem and light stem, the proportion of three types of tobacco leaves is determined to increase the wind fraction of tobacco leaves through the combination of experimental data and simulation results. The best working conditions are for the effect. At the same time, this paper combines the experiments of this paper with simulation research, which will be able to provide practical guidance to manufacturers on how to improve the utilization rate of tobacco leaves to a certain extent, to replace the high labor costs and experimental costs [29, 30].


## 5. Conclusion

Tobacco threshing and redrying refers to the first roasting of tobacco leaves after the removal of impurities, and the use of a threshing process divides the tobacco leaves into pure tobacco leaves, leaves with stalks, light stalk, and wind; these three types of tobacco leaves went through a wind separator. Separation and then redry the separated pure tobacco leaves and tobacco leaf fragments produced during the threshing and air separation process to reduce the moisture content until it meets the storage and packaging process. This research uses tobacco leaf images for image processing to obtain data and then uses the acquired data for machine learning and analysis of tobacco leaf data. In this study, the threshing machine’s feed rate, the speed of the threshing rod, and the opening of the frame were optimized to improve the threshing and destemming ability and reduce the shattering rate. This article collected a large number of samples for image data extraction and analysis, but because the collected tobacco leaves of the same variety and region are not universally representative, it is necessary to use the variety, location, and ecological conditions of the tobacco leaves as the curing process. In the index of leaf effect prediction, the prediction model will be more accurate and perfect.



---

*Source: 4920212-2021-10-11.xml*