CN113838081A - Method and device for distinguishing color uniformity of flue-cured tobacco leaves based on machine vision - Google Patents

Method and device for distinguishing color uniformity of flue-cured tobacco leaves based on machine vision Download PDF

Info

Publication number
CN113838081A
CN113838081A CN202111080529.5A CN202111080529A CN113838081A CN 113838081 A CN113838081 A CN 113838081A CN 202111080529 A CN202111080529 A CN 202111080529A CN 113838081 A CN113838081 A CN 113838081A
Authority
CN
China
Prior art keywords
color
value
uniformity
tobacco
values
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111080529.5A
Other languages
Chinese (zh)
Inventor
张晓兵
朱宏福
刘建国
钟永健
徐志强
俞锞
刘化冰
张勇刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Tobacco Zhejiang Industrial Co Ltd
Original Assignee
China Tobacco Zhejiang Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Tobacco Zhejiang Industrial Co Ltd filed Critical China Tobacco Zhejiang Industrial Co Ltd
Priority to CN202111080529.5A priority Critical patent/CN113838081A/en
Publication of CN113838081A publication Critical patent/CN113838081A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/206Drawing of charts or graphs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20021Dividing image into blocks, subimages or windows

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)
  • Manufacture Of Tobacco Products (AREA)
  • Spectrometry And Color Measurement (AREA)

Abstract

The invention discloses a method and a device for judging the color uniformity of flue-cured tobacco leaves based on machine vision, comprising the following steps: acquiring images of the flue-cured tobacco leaves by adopting a high-resolution camera to obtain RGB images; extracting an R value and a B value in the RGB image to carry out threshold segmentation so as to segment the RGB image into a tobacco leaf color area and a non-tobacco leaf color area; extracting effective image blocks after image blocking is carried out on the tobacco color areas; converting R, G, B values in the effective image blocks into L, A, B values, then calculating the average value of L, A, B values in each effective image block, calculating the color difference of every two effective image blocks according to the average value, and determining the uniformity value of the tobacco leaf color by counting the ratio of the color difference smaller than a threshold value to the total color difference; and determining the uniformity value of the tobacco leaf color by using the established color uniformity comparison relation table to determine the uniformity grade of the tobacco leaf color. The method and the device improve the accuracy of the color uniformity evaluation of the tobacco leaves.

Description

Method and device for distinguishing color uniformity of flue-cured tobacco leaves based on machine vision
Technical Field
The invention belongs to the technical field of tobacco leaf quality evaluation in the tobacco agricultural field, and particularly relates to a method and a device for judging the color uniformity of flue-cured tobacco leaves based on machine vision.
Background
The color of the flue-cured tobacco leaves refers to the state of the related color, color saturation and color value of the same type of tobacco leaves after modulation. The color of the flue-cured tobacco is an important appearance quality factor of the tobacco and is one of important grouping factors of the flue-cured tobacco grading standard. In the production and modulation process of the tobacco leaves, the proportion of various pigments in the tobacco leaves is changed continuously, so that the tobacco leaves are in different colors, and the uniformity of the color of the tobacco leaves is an important factor influencing the appearance quality evaluation of the tobacco leaves. In actual production, evaluation of the color uniformity of the tobacco leaves depends on qualitative analysis of experts, and the method has defects in objectivity and scientificity and cannot reflect the uniformity characteristics of the colors of the whole tobacco leaves through data.
The patent application with publication number CN102749140A discloses a method for judging the uniformity of the surface color of flue-cured tobacco leaves, which is characterized in that on the basis of calculating the mean value and the variation coefficient of three characteristic parameters of the color lightness (L), the redness (a) and the yellowness (b), the established tobacco leaf color uniformity comparison relation table is used for realizing the judgment of the color lightness, the redness and the yellowness uniformity of the tobacco leaves, and the method is too simple and inaccurate in judgment.
The patent application with the publication number of CN101762583A discloses a method for characterizing the appearance color of characteristic tobacco leaves in a producing area, which comprises the steps of calculating fractal dimensions corresponding to different threshold parameters of each component (red, green, blue and brightness) of the tobacco leaf color, using the fractal dimensions as indexes for quantitatively describing the surface distribution state of the tobacco leaf color, and drawing a fractal dimension change curve of each color component, wherein the fractal dimension change curve can comprehensively reflect the surface distribution state of the tobacco leaf color; the fractal dimension change curve can well represent the appearance color of the characteristic tobacco leaves in the producing area. The method is also too simple and inaccurate in discrimination.
Disclosure of Invention
Aiming at the problem that the evaluation is not accurate due to the fact that the color uniformity of the tobacco leaves is not enough in objectivity and scientificity by means of qualitative analysis of experts, the invention provides a method and a device for judging the color uniformity of the flue-cured tobacco leaves based on machine vision.
In order to achieve the above object, an embodiment provides a method for discriminating color uniformity of flue-cured tobacco leaves based on machine vision, comprising the following steps:
acquiring images of the flue-cured tobacco leaves by adopting a high-resolution camera to obtain RGB images;
extracting an R value and a B value in the RGB image to carry out threshold segmentation so as to segment the RGB image into a tobacco leaf color area and a non-tobacco leaf color area;
after the tobacco color area is subjected to image blocking, effective image blocks are extracted, and the method comprises the following steps: if the R, G, B value corresponding to each pixel in each image block is 0, deleting the image block; if R, G, B values corresponding to some pixels in each image block are all 0, assigning pixels with R, G, B values all 0 to null values, and the rest image blocks are effective image blocks;
converting R, G, B values in the effective image blocks into L, A, B values, then calculating the average value of L, A, B values in each effective image block, calculating the color difference of every two effective image blocks according to the average value, and determining the uniformity value of the tobacco leaf color by counting the ratio of the color difference smaller than a threshold value to the total color difference;
and determining the uniformity value of the tobacco leaf color by using the established color uniformity comparison relation table to determine the uniformity grade of the tobacco leaf color.
In one embodiment, when the RGB image of the flue-cured tobacco leaf is collected, the tobacco leaf is spread on white oilpaper on the bottom plate of the desktop, the high-resolution camera is fixed at a position 110-130c away from the desktop, and then the RGB image of the flue-cured tobacco leaf is collected by the high-resolution camera.
In one embodiment, extracting R and B values in an RGB image for threshold segmentation includes:
respectively drawing frequency distribution histograms of the R value and the B value, extracting a frequency distribution histogram related to colors in the frequency distribution histogram corresponding to the R value, and determining a minimum threshold value of the R value of the tobacco color; extracting a frequency distribution histogram related to colors in a frequency distribution histogram corresponding to the B value to determine the maximum threshold value of the B value of the tobacco color;
and assigning a value of 0 to the minimum threshold value smaller than the R value of the tobacco color or the maximum threshold value larger than the B value of the tobacco color through a double-loop statement, wherein the area with the R and B values of 0 is a non-tobacco color area, and the area with the R and B values of not 0 is a tobacco color area after the treatment.
In one embodiment, when the tobacco color region is image-blocked according to the size of 100 × 100 pixels, the size of the image block is (80-120) × (80-120) pixels.
In one embodiment, the color difference Δ E for each two valid image blocks is calculated using the following formula,
Figure BDA0003263825610000031
wherein li、ai、biRespectively representing the average value, l, of L, A, B values within the ith valid image blockj、aj、bjRespectively, represent the average of L, A, B values within the jth valid image block.
In one embodiment, the proportion of the color difference smaller than the threshold value in the total color difference is counted by adopting the following formula to determine the uniformity value X of the tobacco color;
Figure BDA0003263825610000032
wherein m is the number of chromatic aberrations smaller than the threshold value, and n is the number of total chromatic aberrations.
In one embodiment, the color uniformity ratio table is established as:
grade of uniformity Uniformity Is uniform and even Medium and high grade Slight unevenness Unevenness of the coating
X(%) 70≦X 65≦X<70 60≦X<65 55≦X<60 X<55
To achieve the above object, an embodiment of the present invention provides an apparatus for determining color uniformity of flue-cured tobacco leaves based on machine vision, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the following steps:
acquiring an RGB image obtained by acquiring an image of flue-cured tobacco leaves by using a high-resolution camera;
extracting an R value and a B value in the RGB image to carry out threshold segmentation so as to segment the RGB image into a tobacco leaf color area and a non-tobacco leaf color area;
after the tobacco color area is subjected to image blocking, effective image blocks are extracted, and the method comprises the following steps: if the R, G, B value corresponding to each pixel in each image block is 0, deleting the image block; if R, G, B values corresponding to some pixels in each image block are all 0, assigning pixels with R, G, B values all 0 to null values, and the rest image blocks are effective image blocks;
converting R, G, B values in the effective image blocks into L, A, B values, then calculating the average value of L, A, B values in each effective image block, calculating the color difference of every two effective image blocks according to the average value, and determining the uniformity value of the tobacco leaf color by counting the ratio of the color difference smaller than a threshold value to the total color difference;
and determining the uniformity value of the tobacco leaf color by using the established color uniformity comparison relation table to determine the uniformity grade of the tobacco leaf color.
The technical scheme provided by the embodiment has the beneficial effects that at least:
(1) the information of the color of the whole tobacco leaf can be obtained through the collected image, the proportion representation uniformity value with the color aberration delta E smaller than the set threshold value is counted, the uniformity is obtained through the color uniformity comparison relation table, the uniformity of the color of the flue-cured tobacco leaf can be objectively and accurately judged, the experience of technical personnel is not relied on, the scientificity and the accuracy are higher, the scientific basis is provided for the evaluation of the appearance quality of the tobacco leaf in China, and the technical support is provided for intelligent sorting.
(2) The influence of main branches, disease spots and climate spots of the tobacco leaves on the color of the tobacco leaves is better eliminated by utilizing a threshold segmentation method, and the uniformity value is obtained to better reflect the uniformity of the color of the tobacco leaves.
(3) The method is simple to operate, convenient and fast, and can be widely used for quantitative analysis of tobacco color.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flowchart of a method for determining color uniformity of flue-cured tobacco leaves based on machine vision according to an embodiment;
FIG. 2 is an example of a raw RGB image of a cured tobacco leaf provided;
FIG. 3 is a histogram of the frequency distribution of R values in an image according to an embodiment, wherein a straight line represents a minimum threshold line of R values of tobacco color;
FIG. 4 is a histogram of the frequency distribution of B values in an image according to an embodiment, wherein a straight line represents a maximum threshold line of the B value of the color of the tobacco leaf;
FIG. 5 is an embodiment of a thresholded flue-cured tobacco leaf image;
FIG. 6 is a diagram of image segmentation provided by an embodiment;
FIG. 7 is a first set of five uniformity gradient tobacco images provided in accordance with one embodiment;
FIG. 8 is a second set of five uniformity gradient tobacco images provided in accordance with one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the detailed description and specific examples, while indicating the scope of the invention, are intended for purposes of illustration only and are not intended to limit the scope of the invention.
In the embodiment, the tobacco color uniformity of 3 tobacco samples of the upper tobacco, the middle tobacco and the lower tobacco of the Yunnan jig-saw variety Yunyan 87 is judged and compared with the judgment of technicians. 10 representative tobacco leaves are selected from each part of the flue-cured tobacco sample, and the uniformity of the tobacco leaf color is judged according to the method for judging the color uniformity of the flue-cured tobacco leaves based on machine vision as shown in figure 1.
As shown in fig. 1, the method for discriminating color uniformity of flue-cured tobacco leaves based on machine vision provided by the embodiment comprises the following steps:
step 1, carrying out image acquisition on the flue-cured tobacco leaves by adopting a high-resolution camera to obtain RGB images.
Under standard tobacco leaf grading laboratory conditions, tobacco leaves are spread on a white oilpaper table top base plate, a high-resolution camera is fixed at a position 120cm away from the platform top, image acquisition is performed by the high-resolution camera, the digital image resolution is 3840 × 5120, each resolution corresponds to three values, namely R, G and B, and the acquired original image is shown in fig. 2.
And 2, extracting R values and B values in the RGB images and carrying out threshold segmentation to segment the RGB images into tobacco leaf color areas and non-tobacco leaf color areas.
In the embodiment, frequency distribution histograms are drawn for R and B values of the acquired original images, the group is set to 3, and the minimum threshold value of the R value and the maximum threshold value of the B value of the color of the tobacco leaf are determined according to the second group of the R value frequency distribution histogram and the first group of the B value frequency distribution histogram (the second group of the R value frequency distribution histogram and the first group of the B value frequency distribution histogram are numerical frequency distribution histograms of the color of the tobacco leaf), as shown in fig. 3 and 4. Assigning a value of 0 to the minimum threshold value smaller than the color R value of the tobacco leaves or the maximum threshold value larger than the color B value of the tobacco leaves through a double-loop statement; the image was segmented into 2 regions (tobacco color region and non-tobacco color region) by threshold segmentation as shown in fig. 5.
And 3, extracting effective image blocks after image blocking is carried out on the tobacco color areas.
In an embodiment, the tobacco color area is divided into 38 × 51 square tiles (each tile having a resolution of 100 × 100), as shown in fig. 6. Deleting the image block when all RGB values in the image block area are 0 values at the same time; the RGB in the image block area is 0 value at the same time, and the RGB in the image block is 0 value at the same time and is given a null value; and the image blocks remaining after processing are effective image blocks.
And 4, converting the R, G, B value in the effective image block into a L, A, B value, and determining the uniformity value of the tobacco leaf color according to the L, A, B value.
In one embodiment, the R, G, B values in the valid image blocks are converted to L, A, B values, and then the average of the L, A, B values in each valid image block is calculated, i.e., each valid image block corresponds to a set of data of li、ai、biAnd calculating the color difference of every two effective image blocks according to the average value, and determining the uniformity value of the tobacco leaf color by counting the ratio of the color difference smaller than a threshold value to the total color difference, wherein the value range of the threshold value is 4-10, and preferably 6.
In an embodiment, the color difference Δ E of every two effective image blocks is calculated by using the following formula (1),
Figure BDA0003263825610000071
wherein li、ai、biRespectively representing the average value, l, of L, A, B values within the ith valid image blockj、aj、bjRespectively, represent the average of L, A, B values within the jth valid image block.
Counting the ratio of the color difference smaller than the threshold value to the total color difference by adopting the following formula (2) to determine the uniformity value X of the tobacco color;
Figure BDA0003263825610000072
wherein m is the number of chromatic aberrations smaller than the threshold value, and n is the number of total chromatic aberrations.
And 5, determining the uniformity value of the tobacco leaf color by using the established color uniformity comparison relation table to determine the uniformity grade of the tobacco leaf color.
In the examples, the color uniformity comparison relationship is set up as table 1:
TABLE 1
Grade of uniformity Uniformity Is uniform and even Medium and high grade Slight unevenness Unevenness of the coating
X(%) 70≦X 65≦X<70 60≦X<65 55≦X<60 X<55
The uniformity values of 30 tobacco leaf samples of 3 parts of flue-cured tobacco of Yunnan Qujing obtained through the steps are shown in a table 2:
TABLE 2 tobacco leaf color uniformity judging table
Figure BDA0003263825610000081
Figure BDA0003263825610000091
In order to verify the difference between the present invention and the skilled person, one tobacco leaf is randomly selected from the tobacco leaves with different uniformity gradients to form a group, which is a first group of five tobacco leaves with uniformity gradients, as shown in fig. 7; repeating the above operations to form a group, which is a second group of five tobacco leaves with uniformity gradient, as shown in fig. 8. The tobacco leaves in each group are randomly numbered, the corresponding table of the numbers and the tobacco leaf serial numbers is shown in table 3, seven industry professionals are invited to respectively judge the color uniformity of the two groups of tobacco leaves, the obtained results are subjected to Friedman inspection, and the inspection results are shown in table 4.
TABLE 3 Table of correspondence between tobacco leaf number and sample number
Figure BDA0003263825610000092
TABLE 4 tobacco leaf color uniformity rank table
Figure BDA0003263825610000093
Figure BDA0003263825610000101
Calculating the test statistic F of the stiffness of the tobacco leaves according to a formula (3) in the Friedman test methodtestThe first group test statistic and the second group test statistic are respectively 26.51 and 24.80, the corresponding critical value is 11.97 when the alpha is 0.01, the j is 7 and the p is 5, and the first group test statistic and the second group test statistic are respectively larger than 11.97, so that when the significance level is 0.01, 5 samples in each group have extremely significant difference in color evenness, and the tobacco color evenness determined by the method can be objectively and accurately distinguished, and the repetition can be realized.
Figure BDA0003263825610000102
An embodiment further provides an apparatus for determining color uniformity of flue-cured tobacco leaves based on machine vision, which is characterized by comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
step 1, acquiring an RGB image obtained by carrying out image acquisition on flue-cured tobacco leaves by using a high-resolution camera;
step 2, extracting R values and B values in the RGB images to perform threshold segmentation so as to segment the RGB images into tobacco leaf color areas and non-tobacco leaf color areas;
step 3, extracting effective image blocks after image blocking is carried out on the color areas of the tobacco leaves;
step 4, converting the R, G, B value in the effective image block into a L, A, B value, and determining the uniformity value of the tobacco leaf color according to the L, A, B value;
and 5, determining the uniformity value of the tobacco leaf color by using the established color uniformity comparison relation table to determine the uniformity grade of the tobacco leaf color.
The embodiment provides a method and a device for judging color uniformity of flue-cured tobacco leaves based on machine vision, which can acquire color information of the whole tobacco leaves through acquired images, count the proportion representation uniformity value of which the color difference delta E is smaller than a set threshold value, obtain uniformity through a color uniformity comparison relation table, objectively and accurately judge the color uniformity of the flue-cured tobacco leaves, do not depend on the experience of technical personnel, have higher scientificity and accuracy, provide scientific basis for appearance quality evaluation of tobacco leaves in China, and provide technical support for intelligent sorting. The influence of main branches, disease spots and climate spots of the tobacco leaves on the color of the tobacco leaves is better eliminated by utilizing a threshold segmentation method, and the uniformity value is obtained to better reflect the uniformity of the color of the tobacco leaves. The method and the device are simple to operate, convenient and fast, and can be widely used for quantitative analysis of the tobacco color.
The above-mentioned embodiments are intended to illustrate the technical solutions and advantages of the present invention, and it should be understood that the above-mentioned embodiments are only the most preferred embodiments of the present invention, and are not intended to limit the present invention, and any modifications, additions, equivalents, etc. made within the scope of the principles of the present invention should be included in the scope of the present invention.

Claims (9)

1. A method for judging color uniformity of flue-cured tobacco leaves based on machine vision is characterized by comprising the following steps:
acquiring images of the flue-cured tobacco leaves by adopting a high-resolution camera to obtain RGB images;
extracting an R value and a B value in the RGB image to carry out threshold segmentation so as to segment the RGB image into a tobacco leaf color area and a non-tobacco leaf color area;
after the tobacco color area is subjected to image blocking, effective image blocks are extracted, and the method comprises the following steps: if the R, G, B value corresponding to each pixel in each image block is 0, deleting the image block; if R, G, B values corresponding to some pixels in each image block are all 0, assigning pixels with R, G, B values all 0 to null values, and the rest image blocks are effective image blocks;
converting R, G, B values in the effective image blocks into L, A, B values, then calculating the average value of L, A, B values in each effective image block, calculating the color difference of every two effective image blocks according to the average value, and determining the uniformity value of the tobacco leaf color by counting the ratio of the color difference smaller than a threshold value to the total color difference;
and determining the uniformity value of the tobacco leaf color by using the established color uniformity comparison relation table to determine the uniformity grade of the tobacco leaf color.
2. The method for distinguishing the color uniformity of flue-cured tobacco leaves based on machine vision as claimed in claim 1, wherein when the RGB images of the flue-cured tobacco leaves are collected, the tobacco leaves are spread on white oilpaper on a bottom plate of a desktop, a high-resolution camera is fixed at a position 110 and 130c away from the desktop, and then the RGB images of the flue-cured tobacco leaves are collected by the high-resolution camera.
3. The method for distinguishing the color uniformity of flue-cured tobacco leaves based on machine vision according to claim 1, wherein the extracting of the R value and the B value in the RGB image for threshold segmentation comprises:
respectively drawing frequency distribution histograms of the R value and the B value, extracting a frequency distribution histogram related to colors in the frequency distribution histogram corresponding to the R value, and determining a minimum threshold value of the R value of the tobacco color; extracting a frequency distribution histogram related to colors in a frequency distribution histogram corresponding to the B value to determine the maximum threshold value of the B value of the tobacco color;
and assigning a value of 0 to the minimum threshold value smaller than the R value of the tobacco color or the maximum threshold value larger than the B value of the tobacco color through a double-loop statement, wherein the area with the R and B values of 0 is a non-tobacco color area, and the area with the R and B values of not 0 is a tobacco color area after the treatment.
4. The method for judging the color uniformity of cured tobacco leaves based on machine vision according to claim 1, characterized in that when the tobacco leaf color area is subjected to image blocking according to the size of 100 x 100 pixels, the size of the image block is (80-120) x (80-120) pixels.
5. The method for machine vision-based discrimination of color uniformity of flue-cured tobacco leaves according to claim 1, characterized in that the color difference Δ E of every two effective image blocks is calculated by the following formula,
Figure FDA0003263825600000021
wherein li、ai、biRespectively representing the average value, l, of L, A, B values within the ith valid image blockj、aj、bjRespectively, represent the average of L, A, B values within the jth valid image block.
6. The method for distinguishing the color uniformity of cured tobacco leaves based on machine vision according to claim 1, wherein the uniformity value X of the tobacco leaves color is determined by counting the ratio of the color difference smaller than a threshold value to the total color difference by adopting the following formula;
Figure FDA0003263825600000022
wherein m is the number of chromatic aberrations smaller than the threshold value, and n is the number of total chromatic aberrations.
7. The method for distinguishing the color uniformity of cured tobacco leaves based on machine vision according to claim 1, wherein the established color uniformity comparison relation table is as follows:
grade of uniformity Uniformity Is uniform and even Medium and high grade Slight unevenness Unevenness of the coating X(%) 70≦X 65≦X<70 60≦X<65 55≦X<60 X<55
8. An apparatus for determining color uniformity of flue-cured tobacco leaf based on machine vision, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
acquiring an RGB image obtained by acquiring an image of flue-cured tobacco leaves by using a high-resolution camera;
extracting an R value and a B value in the RGB image to carry out threshold segmentation so as to segment the RGB image into a tobacco leaf color area and a non-tobacco leaf color area;
after the tobacco color area is subjected to image blocking, effective image blocks are extracted, and the method comprises the following steps: if the R, G, B value corresponding to each pixel in each image block is 0, deleting the image block; if R, G, B values corresponding to some pixels in each image block are all 0, assigning pixels with R, G, B values all 0 to null values, and the rest image blocks are effective image blocks;
converting R, G, B values in the effective image blocks into L, A, B values, then calculating the average value of L, A, B values in each effective image block, calculating the color difference of every two effective image blocks according to the average value, and determining the uniformity value of the tobacco leaf color by counting the ratio of the color difference smaller than a threshold value to the total color difference;
and determining the uniformity value of the tobacco leaf color by using the established color uniformity comparison relation table to determine the uniformity grade of the tobacco leaf color.
9. The device of claim 8, wherein extracting R and B values from RGB images for threshold segmentation comprises:
respectively drawing frequency distribution histograms of the R value and the B value, extracting a frequency distribution histogram related to colors in the frequency distribution histogram corresponding to the R value, and determining a minimum threshold value of the R value of the tobacco color; extracting a frequency distribution histogram related to colors in a frequency distribution histogram corresponding to the B value to determine the maximum threshold value of the B value of the tobacco color;
and assigning a value of 0 to the minimum threshold value smaller than the R value of the tobacco color or the maximum threshold value larger than the B value of the tobacco color through a double-loop statement, wherein the area with the R and B values of 0 is a non-tobacco color area, and the area with the R and B values of not 0 is a tobacco color area after the treatment.
CN202111080529.5A 2021-09-15 2021-09-15 Method and device for distinguishing color uniformity of flue-cured tobacco leaves based on machine vision Pending CN113838081A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111080529.5A CN113838081A (en) 2021-09-15 2021-09-15 Method and device for distinguishing color uniformity of flue-cured tobacco leaves based on machine vision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111080529.5A CN113838081A (en) 2021-09-15 2021-09-15 Method and device for distinguishing color uniformity of flue-cured tobacco leaves based on machine vision

Publications (1)

Publication Number Publication Date
CN113838081A true CN113838081A (en) 2021-12-24

Family

ID=78959500

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111080529.5A Pending CN113838081A (en) 2021-09-15 2021-09-15 Method and device for distinguishing color uniformity of flue-cured tobacco leaves based on machine vision

Country Status (1)

Country Link
CN (1) CN113838081A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114304699A (en) * 2021-12-27 2022-04-12 上海创和亿电子科技发展有限公司 Method for extracting green and yellow ratio of primary flue-cured tobacco leaves
CN114677384A (en) * 2022-03-13 2022-06-28 江苏神州新能源电力有限公司 Solar cell coating defect detection method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102749140A (en) * 2012-07-10 2012-10-24 中国烟草总公司郑州烟草研究院 Tobacco leaf surface color uniformity judging method of flue-cured tobacco
CN107341807A (en) * 2017-06-07 2017-11-10 北京科技大学 A kind of method for extracting tobacco leaf color digital expression characteristic value
CN108268895A (en) * 2018-01-12 2018-07-10 上海烟草集团有限责任公司 The recognition methods of tobacco leaf position, electronic equipment and storage medium based on machine vision
CN108510474A (en) * 2018-03-09 2018-09-07 上海烟草集团有限责任公司 Evaluation method, system, memory and the electronic equipment of tobacco leaf image quality
CN111681289A (en) * 2020-06-10 2020-09-18 青岛理工大学 Fair-faced concrete color difference analysis/detection method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102749140A (en) * 2012-07-10 2012-10-24 中国烟草总公司郑州烟草研究院 Tobacco leaf surface color uniformity judging method of flue-cured tobacco
CN107341807A (en) * 2017-06-07 2017-11-10 北京科技大学 A kind of method for extracting tobacco leaf color digital expression characteristic value
CN108268895A (en) * 2018-01-12 2018-07-10 上海烟草集团有限责任公司 The recognition methods of tobacco leaf position, electronic equipment and storage medium based on machine vision
CN108510474A (en) * 2018-03-09 2018-09-07 上海烟草集团有限责任公司 Evaluation method, system, memory and the electronic equipment of tobacco leaf image quality
CN111681289A (en) * 2020-06-10 2020-09-18 青岛理工大学 Fair-faced concrete color difference analysis/detection method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李达辉: "数字图像处理核心技术及应用", 31 March 2019, 电子科技大学出版社, pages: 122 - 123 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114304699A (en) * 2021-12-27 2022-04-12 上海创和亿电子科技发展有限公司 Method for extracting green and yellow ratio of primary flue-cured tobacco leaves
CN114677384A (en) * 2022-03-13 2022-06-28 江苏神州新能源电力有限公司 Solar cell coating defect detection method
CN114677384B (en) * 2022-03-13 2022-12-02 江苏神州新能源电力有限公司 Solar cell coating defect detection method

Similar Documents

Publication Publication Date Title
CN113989279B (en) Plastic film quality detection method based on artificial intelligence and image processing
CN114549522B (en) Textile quality detection method based on target detection
CN115294113B (en) Quality detection method for wood veneer
CN113838081A (en) Method and device for distinguishing color uniformity of flue-cured tobacco leaves based on machine vision
CN114627125B (en) Stainless steel tablet press surface quality evaluation method based on optical means
CN110853006B (en) Method for evaluating quality of digital pathological image acquired by scanner
CN112215790A (en) KI67 index analysis method based on deep learning
CN114998198A (en) Injection molding surface defect identification method
JP2014513292A (en) Method and related system for preparing a quantitative video microscope
CN115100206B (en) Printing defect identification method for textile with periodic pattern
CN110646354A (en) Color testing device and method for cotton fibers
JP7467205B2 (en) Method for optically detecting biomarkers - Patents.com
JPH08504522A (en) Method and apparatus for identifying objects using a regular sequence of boundary pixel parameters
CN115994907B (en) Intelligent processing system and method for comprehensive information of food detection mechanism
CN105466921A (en) Simultaneous detection method of many samples
CN113109240B (en) Method and system for determining imperfect grains of grains implemented by computer
CN116402742A (en) Visual detection method and system for surface defects of automobile sheet metal part
CN110044485B (en) Image type fabric color measuring method
CN115170570A (en) Fabric fuzzing and pilling detection method based on gray level run-length matrix
CN110009609B (en) Method for rapidly detecting yellow rice
CN117252786A (en) Gene detection data enhancement processing method
WO2020151529A1 (en) Clothing image classification and image classification methods and apparatuses, and device
CN107527365A (en) A kind of method and device of dynamic calculation class circle object morphology diameter
CN107389677B (en) Method and device for detecting quality of flannelette fluff
CN117451580B (en) Method for analyzing extrusion stability of wiredrawing protein

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination