A method for color separation of positive group tobacco leaves
By creating "standard" color samples of tobacco leaves, extracting color difference features, drawing scatter plots, and calculating color difference intervals, the problem of insufficient interpretation and accuracy of deep learning networks in tobacco leaf color differentiation is solved, and accurate and automated differentiation of tobacco leaf colors is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- YUNNAN TOBACCO QUALITY SUPERVISION MONITORING STATION
- Filing Date
- 2021-10-20
- Publication Date
- 2026-04-21
AI Technical Summary
In existing technologies, deep learning networks cannot effectively interpret the differentiation results when distinguishing tobacco leaf colors, and the differentiation accuracy is affected by the training dataset, resulting in insufficient application of automated grading of digital tobacco leaf images.
By creating "standard" color samples of the main group of tobacco leaves, extracting color difference features, drawing scatter plots, determining color difference ranges, defining a method for distinguishing the colors of the main group of tobacco leaves using a single index, calculating the color difference of tobacco leaves using a color difference formula, and establishing a describable method for distinguishing the colors of tobacco leaves.
It enables accurate differentiation of the color of the tobacco leaves in the correct group, reduces human subjective bias, and improves the differentiation accuracy and reliability of automated grading.
Smart Images

Figure CN114170329B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for color differentiation of tobacco leaves, and relates to the field of tobacco leaf grading technology. Background Technology
[0002] Tobacco leaves are the raw material for tobacco product manufacturing, and their quality has a direct and significant impact on the quality of finished cigarettes. In order to strengthen the control of tobacco leaf quality and promote the development of the entire tobacco industry, my country has formulated national standards for tobacco leaf grading. For a long time, tobacco leaf grading has been carried out by tobacco leaf graders based on national standards for flue-cured tobacco grading, the actual conditions of tobacco-producing areas, and their personal grading experience. This process is highly subjective and involves a large amount of human and financial resources. Furthermore, the standards are not uniform and there are significant regional differences.
[0003] The color of flue-cured tobacco refers to the state of the relevant hue, saturation, and color value of the same type of tobacco leaves after processing. Differences in tobacco leaf color largely reflect the different proportions of various pigments present in the leaves, and are closely related to the appearance and internal quality of the tobacco. Therefore, tobacco leaf color characteristics are one of the important grouping factors in flue-cured tobacco grading standards. Typically, tobacco leaf color characteristics are grouped based on the depth of yellow as perceived by experts. The positive group of tobacco leaves is divided into lemon yellow, orange yellow, and reddish brown. Specifically, lemon yellow tobacco leaves are composed of 100% yellow, orange yellow tobacco leaves are composed of 70% yellow and 30% red, and reddish brown tobacco leaves are composed of 70% red and 30% yellow. However, due to individual differences in visual perception, different evaluators may have certain biases in distinguishing tobacco leaf color characteristics. With the development of artificial intelligence, people can use deep learning networks to learn features from input tobacco leaf images and make very accurate distinctions of tobacco leaf colors. However, there are also corresponding technical problems: the obtained distinction results cannot be effectively interpreted, and the distinction accuracy is affected by the training dataset. There are still shortcomings in the application of digital tobacco leaf images and the entire automated tobacco leaf grading process.
[0004] In summary, although existing deep learning networks can distinguish the color of tobacco leaves, their interpretation of the distinction results and the accuracy of the distinction cannot yet meet the requirements of digital tobacco leaf images and automated grading of the entire tobacco leaf. Summary of the Invention
[0005] The purpose of this invention is to provide a method for distinguishing the colors of standard group tobacco leaves. By extracting the color features of the prepared standard group tobacco leaf "standard" color sample, analyzing the extracted color features to define the color difference range of the standard group tobacco leaves, establishing a describable method for distinguishing tobacco leaf colors, and using a single index to complete the distinction of the colors of standard group tobacco leaves.
[0006] To achieve the above-mentioned technical objectives and effects, the present invention is implemented through the following technical solution:
[0007] A method for distinguishing the colors of tobacco leaves includes the following steps:
[0008] S1: Create a standard color sample of the positive group tobacco leaves for color grading;
[0009] S2: Obtain a frontal image of the "standard" color sample of the positive group tobacco leaves, using color difference as the color indicator;
[0010] S3: Sample and calculate the color difference of pixels in the tobacco leaf area of the image at intervals according to the pixel coordinate rules, and take the average value of the sampled pixel color difference as the tobacco leaf color difference;
[0011] S4: Based on the distribution of color difference in tobacco leaves, draw a scatter plot of the sample with respect to color difference to determine the cross-domain range of color difference samples of graded three-color tobacco leaves.
[0012] S5: Calculate the threshold for interval division using cross-domain sample points, and define the color difference intervals for the three grades of positive group tobacco leaves: lemon yellow, orange yellow, and reddish brown. Each interval represents a different color of positive group tobacco leaves.
[0013] Furthermore, the "standard" color samples of the positive group tobacco leaves are selected by tobacco grading experts, and the color of the positive group tobacco leaves changes from light to dark using Arabic numerals from small to large. The frontal image of the "standard" color samples of the positive group tobacco leaves is obtained by an industrial camera. The image is binarized and segmented to determine the tobacco leaf region in the image. The color difference of the tobacco leaf is obtained by sampling the pixels of the tobacco leaf region in the image. The color difference values of the three colors of the positive group tobacco leaves in the scatter plot of the sample with respect to the color difference have obvious interval distribution. The intersection of each consecutive interval is used as the intersection range of the tobacco leaf color difference interval. The threshold for interval division is calculated by the sample points of the intersection region, and the color difference intervals of the three colors of positive group tobacco leaves (lemon yellow, orange yellow, and reddish brown) are defined. Each interval represents a different color of positive group tobacco leaves.
[0014] Furthermore, the color label of the tobacco leaf in the "standard" color sample of the positive group of tobacco leaves is C, where: C∈{1,2,3....N}, and N is a positive integer; when C=1, it means that the tobacco leaf is the lightest in color among all the tobacco leaves in the positive group of the sample, and the larger C is, the darker the color of the tobacco leaf;
[0015] Furthermore, the image undergoes binarization segmentation. The tobacco sample image is converted from an RGB image to an HSV image. The HSV image is then sliced to obtain the color channel H image. The H channel image is filtered, and the filtered image is then subjected to binarization thresholding segmentation using the maximum inter-class variance method. The extracted pixel values of the H channel image show a clear bimodal distribution. After binarization segmentation, the tobacco leaf region for color difference calculation is obtained. The tobacco leaf region in the image is:
[0016]
[0017] Where: (x i y j () represents the pixel coordinates in the binarized image. This is the pixel value at that coordinate.
[0018] Furthermore, the color difference calculation for the tobacco leaf region involves converting the original image pixel values from RGB to Lab values, extracting the coordinates of the tobacco leaf region in the binarized image, and obtaining the color corresponding to the Lab value of the pixel at those coordinates, denoted as . (x i y j )∈R tobacco The color of the selected anchor point in the lab space is denoted as color. anchor in:
[0019] The color difference is calculated using the CIEDE2000 color difference formula, where pixel (x) i y j The color difference between the color of the selected anchor point and the color of the selected anchor point is denoted as Δe. ij ;
[0020] The color difference of the tobacco leaves is determined by the color difference Δe between pixels in the tobacco leaf region. ij The average is obtained using the following formula:
[0021]
[0022] Where n represents the number of pixels used for color difference calculation, and n cannot exceed the total number of pixels in the tobacco leaf area.
[0023] Furthermore, the color difference calculation of the tobacco leaf region is performed in the tobacco leaf region R of the image. tobacco Take x i |P,y j Points P are used as sampling pixels, where p is a multiple of 5, P = 5, 10, 15…50, that is, the sampling area is:
[0024]
[0025] Randomly select a tobacco leaf image and calculate the color difference of the tobacco leaf according to different values of P, for a total of 10 groups. Calculate the average value of the color difference of the 10 groups, select the group with the smallest difference between the color difference and the average color difference, and take the P value of the group as the P value used for selecting sampling points for calculation.
[0026] Furthermore, the scatter plot of the samples with respect to color difference was generated by extracting color differences from the positive group tobacco leaves labeled with numerical tags indicating variations in color intensity. The color differences of all positive group tobacco leaves were statistically analyzed to obtain a scatter plot of the sample distribution with respect to color difference. The samples were sorted from largest to smallest according to the numerical tags.
[0027] The scatter plot of the sample with respect to color difference shows that the color difference values of the three-color tobacco leaves in the positive group have obvious interval distributions. The intersection of each consecutive interval is taken as the intersection range of the color difference interval of the tobacco leaves.
[0028] Furthermore, the intersection range of the tobacco leaf color difference intervals is set as follows: lemon yellow tobacco leaf color difference is... The color difference of orange-yellow tobacco leaves is The color difference of reddish-brown tobacco leaves is Where C is a numerical label representing the color intensity of the tobacco leaf, C∈{1,2,3....N};
[0029] The scatter plot of color difference of the samples is shown, with the horizontal axis representing the samples (sorted by numerical labels from smallest to largest) and the vertical axis representing the color difference of the tobacco leaves. If, starting from the first lemon-yellow tobacco leaf sample point (5 points), there are other orange-yellow tobacco leaf sample points besides the adjacent ones, then the color difference of that sample point is defined. The lower limit of the intersection region between lemon yellow and orange yellow is defined as the sample point. If the sample point meets the condition, then starting from that sample point and moving forward, the sample point with the largest color difference value among the lemon yellow tobacco leaf samples is selected. As the upper limit of the intersection area of lemon yellow and orange, starting from the first orange tobacco leaf sample point with a color difference value greater than that of the intersection area of lemon yellow and orange, proceed along the horizontal axis until the first reddish-brown sample point is encountered. Use the same method to determine the lower and upper limits of the color difference value of the intersection area of orange and reddish-brown.
[0030] Furthermore, the mean of the color difference of all tobacco leaf sample points within the cross-domain is used as the threshold for distinguishing between the two colors of tobacco leaves:
[0031] The color difference intersection area refers to the intersection area of lemon yellow and orange yellow, and the intersection area of orange yellow and reddish brown. Therefore, the color difference threshold (color difference value) for lemon yellow and orange yellow is the average color difference of all tobacco leaf sample points in the lemon yellow and orange yellow difference intersection area, and the color difference threshold (color difference value) for orange yellow and reddish brown is the average color difference of all tobacco leaf sample points in the orange yellow and reddish brown difference intersection area.
[0032] The beneficial effects of this invention are:
[0033] The color differentiation method for the main group of tobacco leaves of this invention involves selecting "standard" color samples of the main group of tobacco leaves by tobacco grading experts, and marking the color changes from light to dark using Arabic numerals from small to large. Then, an industrial camera captures a frontal image of the "standard" color sample of the main group of tobacco leaves. The image is binarized and segmented to determine the tobacco leaf region. The color difference of the tobacco leaves is obtained by sampling the pixels of the tobacco leaf region. The color difference values of the three colors of the main group of tobacco leaves in the scatter plot of the color difference of the samples have a clear interval distribution. The intersection of consecutive intervals is used as the intersection range of the color difference intervals. The threshold for interval division is calculated using the sample points of the intersection region, defining the color difference intervals of the three colors of the main group of tobacco leaves: lemon yellow, orange yellow, and reddish brown. Each interval represents a different color of the main group of tobacco leaves.
[0034] The color differentiation method for the main group of tobacco leaves of the present invention extracts color features from the prepared "standard" color sample of the main group of tobacco leaves, analyzes the extracted color features to define the color difference range of the main group of tobacco leaves, establishes a describable method for differentiating tobacco leaf colors, and uses a single index to complete the differentiation of the colors of the main group of tobacco leaves.
[0035] Of course, any product implementing this invention does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description
[0036] Figure 1 This is a flowchart of the color differentiation method for the positive group of tobacco leaves according to an embodiment of the present invention;
[0037] Figure 2 A scatter plot of the color difference distribution between lemon yellow and orange yellow tobacco leaves provided for an example of the present invention;
[0038] Figure 3 This is an image of a tobacco leaf from a tobacco leaf sample taken in an embodiment of the present invention;
[0039] Figure 4 for Figure 3 Binarized segmented image of tobacco leaves;
[0040] Figure 5 for Figure 3 Sampling pixels for color difference calculation of tobacco leaves; Detailed Implementation
[0041] To more clearly illustrate the technical solutions of the embodiments of the present invention, the present invention will be described in detail below with reference to the accompanying drawings.
[0042] Example 1
[0043] like Figure 1 As shown
[0044] A method for distinguishing the colors of tobacco leaves includes the following steps:
[0045] S1: Create a standard color sample of the positive group tobacco leaves for color grading;
[0046] The tobacco leaf samples were carefully selected from the main group of tobacco leaves by tobacco leaf grading experts. The samples included lemon yellow, orange yellow and reddish brown tobacco leaves, and basically included all the color distributions of the three colors. The selected tobacco leaf samples can reflect the continuity of tobacco leaf color changes in human vision. The color depth of the main group of tobacco leaves is marked with numbers.
[0047] S2: Obtain a frontal image of the "standard" color sample of the positive group tobacco leaves, using color difference as the color indicator;
[0048] The tobacco leaf image is a frontal image of a tobacco leaf taken with an industrial camera under a standard D56 light source. The tobacco leaf region in the image is obtained by binarizing and segmenting the tobacco leaf image.
[0049] S3: Sample and calculate the color difference of pixels in the tobacco leaf area of the image at intervals according to the pixel coordinate rules, and take the average value of the sampled pixel color difference as the tobacco leaf color difference;
[0050] S4: Based on the distribution of color difference in tobacco leaves, draw a scatter plot of the sample with respect to color difference to determine the cross-domain range of color difference samples of graded three-color tobacco leaves.
[0051] The scatter plot of the samples regarding color difference shows that the color difference values of the three-color tobacco leaves in the positive group have a clear interval distribution. The intersection of consecutive intervals is taken as the intersection range of the color difference intervals of tobacco leaves.
[0052] S5: Calculate the threshold for interval division using cross-domain sample points, and define the color difference intervals for the three grades of positive group tobacco leaves: lemon yellow, orange yellow, and reddish brown. Each interval represents a different color of positive group tobacco leaves.
[0053] Example 2
[0054] The color differentiation method for the main group of tobacco leaves based on Example 1:
[0055] The "standard" color samples for the main group of tobacco leaves used in color grading require tobacco grading experts to select from a large number of tobacco leaf samples. They choose the main group tobacco leaves that best represent the color distribution of tobacco leaves and assign them labels. The main group tobacco leaves are carefully selected, and in addition to the group and color labels, additional numerical labels are added to describe the color change of the tobacco leaves from light to dark. The color change of the tobacco leaves from light to dark refers to the continuous color change process of the three colors of main group lemon yellow, orange yellow, and reddish brown tobacco leaves from light yellow to dark yellow and then to reddish. The numerical labels, from small to large, record the depth of the tobacco leaf color.
[0056] The main group of tobacco leaves includes lemon yellow, orange yellow, and reddish brown leaves. Visually, the intensity of red in these three colors increases sequentially. Each specific type of tobacco leaf, such as lemon yellow, also includes variations ranging from pale yellow to almost orange yellow. The numerical labels, from smallest to largest, describe the changes in color from light to dark.
[0057] Specifically, let the numerical label be C, where C∈{1,2,3....N}, and N is a positive integer. When C=1, it means that the tobacco leaf is the lightest in color among all the positive tobacco leaves in the sample. The larger C is, the darker the color of the tobacco leaf.
[0058] There are various indicators that can represent the color characteristics of tobacco leaves. The RGB values of an image or the pixel values of any one of the three channels can represent the color characteristics of tobacco leaves. The HSV values of an image, including the brightness, chroma, and saturation of the image, can also be used to describe the color characteristics of tobacco leaves. Other color spaces also reflect certain color characteristics of tobacco leaves in their pixel values.
[0059] Specifically, in the embodiments of the invention, color difference is used as a color index for tobacco leaves to describe the color of tobacco leaves. Color difference describes the color characteristics of tobacco leaves more intuitively. Color difference is expressed numerically and reflects the difference between two colors. A simple definition of color difference is the distance between two colors in the color space.
[0060] It should be noted that, in this embodiment of the invention, the color difference of tobacco leaves refers to the average value of the Lab value of the tobacco leaf image area and the color difference of the selected anchor point (L=0, A=0, B=127) in the Lab space. The color difference is calculated by the CIEDE2000 standard color difference formula.
[0061] It should also be noted that the Lab color space has a more uniform distribution and is more consistent with the human eye's perception of color. All the color differences mentioned above were calculated using Lab values.
[0062] For image binarization segmentation, the tobacco leaf sample image is first converted from an RGB image to an HSV image. The tobacco leaf image used refers to the front view image of the tobacco leaf taken with an industrial camera under a standard D56 light source after the sample was made (e.g., Figure 3 In both national standards and actual manual grading, the color of tobacco leaves is determined based on the color of the front of the tobacco leaf. The tobacco leaf sample image is converted from an RGB image to an HSV image. The HSV image is then sliced to obtain the H channel (chromaticity) image. Since the background of the captured image and the tobacco leaf placed on it have a large color difference, the chromaticity of the tobacco leaf and the background area are significantly different. Therefore, the H channel image is selected for binarization segmentation.
[0063] Specifically, the H-channel image undergoes image preprocessing, using Gaussian filtering to remove image noise. The Gaussian filter is set with a 3x3 kernel and a standard deviation of 1.5. The filtered image is then subjected to binarization thresholding using the Otsu's method. Otsu's method is suitable for images with a bimodal distribution of pixel values, and the extracted H-channel image pixel values exhibit a clear bimodal distribution.
[0064] After binarization and segmentation, the tobacco leaf region is obtained for color difference calculation. The tobacco leaf region in the image is:
[0065]
[0066] Where: (x i y j () represents the pixel coordinates in the binarized image. This is the pixel value at that coordinate.
[0067] For calculating the color difference of tobacco leaves in the tobacco leaf area, the pixel values of the original image are converted from RGB values to Lab values. The coordinates of the tobacco leaf area in the binarized image are extracted, and the color corresponding to the Lab value of the pixel at the coordinates is obtained, denoted as . (x i y j )∈R tobacco The color of the selected anchor point in the lab space is denoted as color. anchor in:
[0068] The color difference is calculated using the CIEDE2000 color difference formula, where pixel (x) i y j The color difference between the color of the selected anchor point and the color of the selected anchor point is denoted as Δe. ij ;
[0069] The color difference of the tobacco leaves is determined by the color difference Δe between pixels in the tobacco leaf region. ij The average is obtained using the following formula:
[0070]
[0071] Where n represents the number of pixels used for color difference calculation, and n cannot exceed the total number of pixels in the tobacco leaf area;
[0072] Meanwhile, for the color difference calculation of tobacco leaf areas, in order to save the time of tobacco leaf color difference extraction, color difference calculation is not performed on all pixels in the tobacco leaf area. Instead, the color difference is calculated by interval sampling for the pixels in the tobacco leaf area. The color difference calculated by interval sampling is not much different from the color difference calculated from all pixels in the tobacco leaf area. This is the premise for adopting the method described above.
[0073] Specifically, the color difference can be calculated for all pixels in the tobacco leaf area of the image, and the average value can be taken to represent the color difference of the tobacco leaf. Considering that this method is too slow and that some pixels belong to the tobacco leaf veins and petioles, which are darker in color and irrelevant to the determination of the tobacco leaf color, a regular interval sampling method is adopted to select the pixels for color difference calculation.
[0074] In the tobacco leaf region R of the image tobacco Take x i |P,y j Points P are used as sampling pixels, where p is a multiple of 5, P = 5, 10, 15…50, that is, the sampling area is:
[0075]
[0076] Randomly select an image of a tobacco leaf and calculate the color difference of the tobacco leaf according to different values of P, for a total of 10 groups. Calculate the average color difference of the 10 groups, and select the group with the smallest difference between its color difference and the average color difference. Take the P value of this group as the P value used for selecting sampling points for calculation (e.g., ...). Figure 4 For the example Figure 3 The binarized segmented image, Figure 5 for Figure 3 The sampling pixels for color difference calculation of tobacco leaves, where P=30, and all sampling pixels form regular interlaced lines;
[0077] Color difference was extracted from the positive group of tobacco leaves labeled with numerical tags indicating variations in color intensity. The distribution of color difference for each color of tobacco leaf was statistically analyzed, and a scatter plot of the samples with respect to color difference was plotted. The samples were sorted from largest to smallest according to the numerical tags.
[0078] The marked color changes of the tobacco leaves in the standard group were selected by tobacco grading experts and covered all colors of the standard group tobacco leaves. The continuous color change process was recorded and marked with Arabic numerals from large to small. Color difference was extracted from the standard group tobacco leaf samples, and the color difference of all standard group tobacco leaves was statistically analyzed to obtain its color difference distribution. The color difference distribution can be used to determine the color of standard group lemon yellow, orange yellow, and reddish brown tobacco leaves. The boundaries between each interval are the thresholds for distinguishing the color of standard group tobacco leaves.
[0079] Specifically, the color difference of all positive group tobacco leaves was statistically analyzed to obtain a scatter plot of the color difference distribution of the samples. Due to the continuity of the color change of the samples, the statistical color difference distribution also has a certain continuity and a relatively obvious interval distribution. Among them, lemon yellow tobacco leaves have a smaller overall color difference, orange yellow tobacco leaves have a larger overall color difference, and red brown tobacco leaves have the largest overall color difference.
[0080] Specifically, in the statistical scatter plot of color difference of tobacco leaf samples, a threshold is selected at the intersection of the distribution intervals of the three-colored tobacco leaves to divide the color difference intervals of the three-colored tobacco leaves:
[0081] The color variation of natural tobacco leaves is continuous and lacks clear boundaries. Tobacco leaves located at the boundary between lemon yellow and orange can be classified as either lemon yellow or orange. Similarly, tobacco leaves located at the boundary between orange and reddish-brown can be classified as either orange or reddish-brown. As shown in the scatter plot, although the different colored tobacco leaves exhibit relatively clear intervals, there are no clear boundaries and overlapping areas. The color difference interval division threshold is determined at the intersection of the distribution intervals.
[0082] For the overlapping range of tobacco leaf color difference intervals, the color difference of lemon yellow tobacco leaves is set as follows: The color difference of orange-yellow tobacco leaves is The color difference of reddish-brown tobacco leaves is Where C is a numerical label representing the color intensity of the tobacco leaf, C∈{1,2,3….N};
[0083] The scatter plot of color difference of the samples is shown, with the horizontal axis representing the samples (sorted by numerical labels from smallest to largest) and the vertical axis representing the color difference of the tobacco leaves. If, starting from the first lemon-yellow tobacco leaf sample point (5 points), there are other orange-yellow tobacco leaf sample points besides the adjacent ones, then the color difference of that sample point is defined. The lower limit of the intersection region between lemon yellow and orange yellow is defined as the sample point. If the sample point meets the condition, then starting from that sample point and moving forward, the sample point with the largest color difference value among the lemon yellow tobacco leaf samples is selected. As the upper limit of the intersection area of lemon yellow and orange, starting from the first orange tobacco leaf sample point with a color difference value greater than that of the intersection area of lemon yellow and orange, proceed along the horizontal axis until the first reddish-brown sample point is encountered. Use the same method to determine the lower and upper limits of the color difference value of the intersection area of orange and reddish-brown.
[0084] Figure 2 A scatter plot showing the color difference distribution between lemon yellow and orange tobacco leaves provided in an example embodiment of the present invention, such as... Figure 2 As shown, circular dots represent lemon yellow tobacco leaves and triangular dots represent orange tobacco leaves. In the scatter plot, overall, the color difference between lemon yellow and orange tobacco leaves gradually increases according to the size of the numerical labels. Lemon yellow and orange tobacco leaves have obvious interval distributions. Due to the continuity of their colors, there are certain color difference intersection areas. Within the color difference range of the intersection area, both lemon yellow and orange tobacco leaves exist.
[0085] In order to determine the color difference distribution range of each color, a threshold needs to be selected from the color difference intersection area.
[0086] Specifically, the mean color difference of all tobacco leaf sample points within the cross-region is selected as the threshold for distinguishing between the two colors of tobacco leaves. The color difference cross-region refers to the cross-region of lemon yellow and orange-yellow differences, and the cross-region of orange-yellow and reddish-brown differences. Therefore, the threshold for distinguishing lemon yellow and orange-yellow differences (color difference value) is the mean color difference of all tobacco leaf sample points within the cross-region of lemon yellow and orange-yellow differences, and the threshold for distinguishing orange-yellow and reddish-brown differences (color difference value) is the mean color difference of all tobacco leaf sample points within the cross-region of orange-yellow and reddish-brown differences.
[0087] Specifically, after determining the color difference distribution range of lemon yellow, orange yellow, and reddish brown tobacco leaves, an industrial area scan camera is used on the same equipment to take images of the main batch of tobacco leaves on the conveyor belt, extract their color differences, and determine which color difference range the color difference value belongs to, thus determining the color of the main batch of tobacco leaves.
[0088] Example 3
[0089] The color differentiation method for positive group tobacco leaves provided by this invention is adopted. After establishing the color difference range using the "standard" color sample, experiments are conducted using tobacco leaf samples that have been graded by tobacco leaf grading experts.
[0090] In this embodiment, the sample contains 400 leaves of the standard group, each leaf marked with a grade label including leaf color information. According to national standards, lemon yellow leaves of the standard group are marked as L, orange leaves as F, and reddish-brown leaves as R. In the experimental tobacco leaf sample, there are 153 lemon yellow leaves, 237 orange leaves, and 10 reddish-brown leaves. Since reddish-brown leaves are naturally rare and large-sample collection is difficult, this experiment aims to demonstrate the beneficial effects of the method of the present invention. Therefore, this experiment is based on the actual quantity distribution of the three colors of the standard group tobacco leaves under natural conditions, and establishes an experimental sample based on practical application (under natural conditions, orange leaves are the most common, followed by lemon yellow leaves, and reddish-brown leaves are very rare).
[0091] The experimental samples were acquired under the same experimental conditions as the "standard" color samples, with images of the front of tobacco leaves collected. Color differences were extracted, and color intervals were defined based on the established color difference index for the three-color tobacco leaves. The extracted color difference was used as a single index to determine the color of the tobacco leaves. The results showed that out of 153 lemon-yellow tobacco leaves, 134 were correctly identified as lemon-yellow (87.5% accuracy), and the remaining 19 were identified as orange-yellow. Out of 237 orange-yellow tobacco leaves, 204 were identified as orange-yellow, 23 as lemon-yellow, and 3 as reddish-brown (86.0% accuracy). Out of 10 reddish-brown tobacco leaves, 9 were identified as reddish-brown and 1 as orange-yellow (88.1% accuracy). The experiment also showed that all misclassified lemon-yellow and orange-yellow tobacco leaves had color difference values within the cross-domain of lemon-yellow and orange-yellow color differences. Similarly, all misclassified orange-yellow and reddish-brown tobacco leaves also had color differences within the cross-domain of orange-yellow and reddish-brown tobacco leaf color differences. As can be clearly seen from the present invention, tobacco leaves with color difference values within the cross-domain of color differences have very similar colors, and their color judgment results are entirely influenced by subjective personal experience. Different appraisers may present two different results. The experimental results indicate that the grading method for positive group tobacco leaves of the present invention can accurately simulate the color of positive group tobacco leaves and provides a more objective method for distinguishing tobacco leaves that are difficult to differentiate.
[0092] In the description of this specification, references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0093] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention. The invention is limited only by the claims and their full scope and equivalents.
Claims
1. A method of color sorting of positive group tobacco leaves, characterized in that, Includes the following steps: S1: Create "standard" color samples of the positive group tobacco leaves for color grading; S2: Obtain a frontal image of the "standard" color sample of the positive group tobacco leaves, using color difference as the color indicator; S3: Sample and calculate the color difference of pixels in the tobacco leaf area of the image at intervals according to the pixel coordinate rules, and take the average value of the sampled pixel color difference as the tobacco leaf color difference; S4: Based on the distribution of color difference in tobacco leaves, draw a scatter plot of the sample with respect to color difference to determine the cross-domain range of color difference samples of graded three-color tobacco leaves. S5: Calculate the threshold for interval division using cross-domain sample points, and define the color difference intervals for the three grades of positive group tobacco leaves: lemon yellow, orange yellow, and reddish brown. Each interval represents a different color of positive group tobacco leaves.
2. The method of color classification of positive tobacco leaf according to claim 1, characterized in that: The "standard" color samples of the positive group tobacco leaves were selected by tobacco grading experts, and the color of the positive group tobacco leaves was marked by Arabic numerals from small to large, indicating the change from light to dark. The frontal image of the "standard" color samples of the positive group tobacco leaves was obtained by an industrial camera. The image was binarized and segmented to determine the tobacco leaf region. The color difference of the tobacco leaf was obtained by sampling the pixels of the tobacco leaf region. The color difference values of the three colors of the positive group tobacco leaves in the scatter plot of the samples with respect to the color difference showed obvious interval distribution. The intersection of each consecutive interval was used as the intersection range of the tobacco leaf color difference interval. The threshold for interval division was calculated by the sample points of the intersection region, and the color difference intervals of the three colors of the positive group tobacco leaves, namely lemon yellow, orange yellow, and reddish brown, were defined. Each interval represents a different color of the positive group tobacco leaves.
3. The method of color classification of positive tobacco leaf according to claim 2, characterized in that: The tobacco leaf color mark of the positive group tobacco leaf "standard" color sample, the color mark of which is C, wherein: N is a positive integer; when C=1, it indicates that the tobacco leaf is the lightest one among all the positive group tobacco leaves in the sample, and the larger C is, the darker the tobacco leaf color is.
4. The method of color classification of positive tobacco leaf according to claim 3, characterized in that: The image undergoes binarization segmentation, converting the tobacco sample image from RGB to HSV. The HSV image is then sliced to obtain the chroma channel H image. The H channel image is filtered, and the filtered image is then subjected to binarization thresholding using the maximum inter-class variance method. The extracted pixel values of the H channel image exhibit a clear bimodal distribution. After binarization segmentation, the tobacco leaf region for color difference calculation is obtained. The tobacco leaf region in the image is: wherein: is a pixel point coordinate in the binarized image, is a pixel value of the coordinate.
5. The method of color classification of positive tobacco leaf according to claim 4, characterized in that: The color difference calculation for the tobacco leaf region involves converting the pixel values of the original image from RGB to Lab values, extracting the coordinates of the tobacco leaf region in the binarized image, and obtaining the color corresponding to the Lab value of the pixel at those coordinates, denoted as . , The color of the selected anchor point in the lab space is denoted as in: The color difference is calculated using the CIEDE2000 color difference formula, and the color difference between the color of the pixel point and the color of the selected anchor point is denoted as ; The tobacco color difference tobacco leaf is obtained by taking the color difference of the tobacco leaf region pixel points The average is obtained, and the formula is: Where n represents the number of pixels used for color difference calculation, and n cannot exceed the total number of pixels in the tobacco leaf area.
6. The method of color classification of positive tobacco leaf according to claim 4, wherein: The tobacco color difference of the tobacco region is calculated in the image tobacco region , take , as the sampling pixel point, wherein is a multiple of 5, P=5, 10, 15…50, that is, the sampling region is: Randomly select a tobacco leaf image and calculate the color difference of the tobacco leaf according to different values of P, for a total of 10 groups. Calculate the average value of the color difference of the 10 groups, select the group with the smallest difference between the color difference and the average color difference, and take the P value of the group as the P value used for selecting sampling points for calculation.
7. The method of color classification of positive tobacco leaf according to claim 2, wherein: The scatter plot of the samples with respect to color difference was plotted by extracting color differences from the positive group of tobacco leaves labeled with numerical tags indicating variations in color intensity, statistically analyzing the color differences of all positive group tobacco leaves, and obtaining a scatter plot of the sample distribution with respect to color difference. The samples were sorted from largest to smallest according to the numerical tags: The scatter plot of the sample with respect to color difference shows that the color difference values of the three-color tobacco leaves in the positive group have obvious interval distributions. The intersection of each consecutive interval is taken as the intersection range of the color difference interval of the tobacco leaves.
8. The method of color classification of positive tobacco leaf according to claim 7, characterized in that: The cross-domain range of the tobacco leaf color difference interval is set as follows: the lemon yellow tobacco leaf color difference is C = 1 , the orange tobacco leaf color difference is C = 2 , and the red brown tobacco leaf color difference is C = 3 , wherein C is a digital label representing the depth of color of the tobacco leaf, and C ∈ {1, 2, 3, …, N}. The scatter plot of color difference of the samples is shown, with the horizontal axis representing the samples (sorted by numerical labels from smallest to largest) and the vertical axis representing the color difference of the tobacco leaves. If, starting from the first lemon yellow tobacco leaf sample point (5 points), there are other orange yellow tobacco leaf sample points besides the adjacent ones, then the color difference of that sample point is defined. The lower limit of the intersection region between lemon yellow and orange yellow is defined as the sample point. If the sample point meets the condition, then starting from that sample point and moving forward, the sample point with the largest color difference value among the lemon yellow tobacco leaf samples is selected. As the upper limit of the intersection area of lemon yellow and orange, starting from the first orange tobacco leaf sample point with a color difference value greater than that of the intersection area of lemon yellow and orange, proceed along the horizontal axis until the first reddish-brown sample point is encountered. Use the same method to determine the lower and upper limits of the color difference value of the intersection area of orange and reddish-brown.
9. The method of color classification of positive tobacco leaf according to claim 8, characterized in that: The mean of the color difference of all tobacco leaf sample points within the cross-domain is used as the threshold to distinguish between the two colors of tobacco leaves: The color difference cross region refers to a lemon yellow, orange yellow color difference cross region and an orange yellow, red brown color difference cross region. Therefore, a lemon yellow, orange yellow color difference threshold is a mean value of color differences of all tobacco sample points in the lemon yellow, orange yellow color difference cross region, and an orange yellow, red brown color difference threshold is a mean value of color differences of all tobacco sample points in the orange yellow, red brown color difference cross region.
Citation Information
Patent Citations
Color difference analysis / detection method and system for fair-faced concrete
CN111681289A
Skin color identification method, skin color identification apparatus and storage medium
US20200210682A1