Fruit grading method and device for machine vision of taro harvesting equipment
Through machine vision and near-infrared spectroscopy, the appearance and internal quality of taro are comprehensively evaluated, and the problems of low grading efficiency and poor accuracy in the existing technology are solved, efficient and accurate taro grading are achieved, and market competitiveness is enhanced.
Patent Information
- Application Number
- CN202410919267.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-07-10
AI Technical Summary
The existing technology is difficult to comprehensively and objectively evaluate the appearance and internal quality of taro, resulting in inefficient efficiency, poor accuracy and large subjective errors in the grading results, which cannot meet the modern market's demand for efficiency and accuracy.
Machine vision technology combined with near-infrared spectral analysis is used to collect the appearance image and spectral data of taro, extract the appearance feature information and internal quality information, and generate the appearance feature index, internal quality index and comprehensive quality index through analysis and calculation to achieve a comprehensive and automated evaluation of the quality of taro.
It significantly improves the efficiency and accuracy of the taro grading process, avoids subjective errors in manual grading, ensures the consistency and reliability of grading results, can better meet consumers' demand for high-quality taro, and enhances the market competitiveness of taro.
Smart Images

Figure CN118883544B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of taro fruit grading, and in particular to a machine vision fruit grading method and device for taro harvesting equipment. Background Art
[0002] With the advancement of agricultural technology, quality control and grading of agricultural products have become key factors in improving product market competitiveness. As an important root and tuber agricultural product, the appearance and internal quality of taro fruit directly affect consumers' purchasing decisions and eating experience. The traditional taro grading method mainly relies on manual visual inspection and simple physical measurement. This method is not only inefficient, but also easily affected by the subjective judgment of the operator, making it difficult to ensure the consistency and accuracy of the grading results. As consumers' requirements for food safety and quality increase, the traditional manual grading method can no longer meet the needs of the modern market. Therefore, the market urgently needs a grading technology that can comprehensively and objectively evaluate the quality of taro.
[0003] The prior art has the following deficiencies:
[0004] Although there are some automated grading technologies on the market, most of them are limited to the evaluation of appearance characteristics, such as color and size, and lack effective means to evaluate the internal quality of taro, such as moisture and sugar content. These internal quality factors have an important impact on the taste and nutritional value of taro. Existing technologies have obvious deficiencies in comprehensively evaluating the quality of taro. In addition, traditional manual grading methods can no longer meet the requirements of the modern market for efficiency and accuracy. Especially in large-scale production, the cost and time consumption of manual grading become a constraint. Therefore, the development of an automated grading technology that can simultaneously evaluate the appearance and internal quality of taro is of great significance to enhancing the overall competitiveness of the taro industry.
[0005] The above information disclosed in this Background section is only for enhancement of understanding of the background of the present disclosure and therefore it may contain information that does not constitute the prior art that is already known to one of ordinary skill in the art. Summary of the invention
[0006] The object of the present invention is to provide a machine vision fruit grading method and device for taro harvesting equipment to solve the problems raised in the above background technology.
[0007] To achieve the above object, the present invention provides a machine vision fruit grading method and device for taro harvesting equipment, and the specific steps include:
[0008] Step 1: collecting appearance images and near infrared spectrum data of taro to be classified, and extracting appearance feature information of taro from the appearance image, and extracting internal quality information of taro from the spectrum data, wherein the appearance feature information data includes color information, size information and surface defect information of taro, and the internal quality information includes moisture content data and sugar content data of taro;
[0009] Step 2: Analyze the collected taro appearance feature information, analyze the color information, size information and surface defect information data of the taro to be graded, classify the color information, size information and surface defect information of the taro and determine the grade score, and generate the appearance feature index of the taro to be graded according to the grade score of the appearance feature information;
[0010] Step 3: Analyze the collected taro internal quality information, analyze the moisture content data and sugar content data of the taro to be graded, divide the moisture content data and sugar content data of the taro to be graded into grades and determine the grade scores, and generate the internal quality index of the taro to be graded according to the grade scores of the internal quality information;
[0011] Step 4: construct an analysis model based on the appearance characteristic index and internal quality index of the taro to be graded, and generate a comprehensive quality index of the taro to be graded, which is used to reflect the overall fruit quality of the taro to be graded;
[0012] Step 5: Analyze the comprehensive quality index of the taro to be graded, compare it with the preset fruit comprehensive quality index grade range, and divide the taro to be graded into different grades.
[0013] Furthermore, the specific logic for extracting the appearance feature information of taro from the appearance image is as follows:
[0014] The collected appearance image of the taro to be classified is converted into a grayscale image, and the grayscale value of each pixel of the taro appearance image is obtained, and the taro area and the background area are segmented in the grayscale image by a set grayscale threshold; the grayscale value of each pixel is compared with the grayscale threshold, if the grayscale value of the pixel is greater than or equal to the grayscale threshold, it is judged that the position of the pixel is in the taro area, if the grayscale value of the pixel is less than the grayscale threshold, it is judged that the position of the pixel is in the background area;
[0015] The specific logic for obtaining the color information of taro is:
[0016]
[0017] in, is the mean grayscale value of each pixel in the taro area, is the total number of pixels in the taro area, It is the first in the taro area. The gray value of each pixel;
[0018]
[0019] in, is the standard deviation of the grayscale values of each pixel in the taro area, and the standard deviation is set as color information;
[0020] The specific logic for obtaining the size information of taro is to determine the proportion of taro area pixels in the total pixel points of the image. , and the proportion Set as size information;
[0021] The specific logic for obtaining the surface defect information of taro is to determine the number of pixels whose grayscale values of pixels in the taro area are greater than the average grayscale value of the pixels, and set the number of pixels as the surface defect information.
[0022] Furthermore, the specific logic for extracting the internal quality information of taro from the spectral data is as follows:
[0023] The specific logic for obtaining the moisture content of taro is to determine the near infrared spectrum data of taro between 1400-1900 and 2200-2500 The number of characteristic absorption peaks within a wavelength range, and the moisture content of taro is judged by the number of characteristic absorption peaks within the wavelength range;
[0024] The specific logic for obtaining the sugar content of taro is to determine the near infrared spectrum data of taro. and The number of characteristic absorption peaks within the wavelength range is counted, and the sugar content of taro is judged by the number of characteristic absorption peaks within the wavelength range.
[0025] Furthermore, the specific logic for classifying the color information, size information and surface defect information of taro and determining the grade scores is as follows:
[0026] The standard deviation of the grayscale value of pixels in the taro area Compared with the standard deviation threshold, if , judge the color grade of taro to be within the normal range, and set the grade score of the normal range as ,like , judge the grade of taro color as slightly abnormal, and set the grade score of slightly abnormal as ,like , judge the grade of taro color as obviously abnormal, and set the grade score of obvious abnormality as ,in represents the standard deviation threshold;
[0027] Determine the proportion of the number of pixels in the taro area to the total number of pixels in the image ,like , judge the taro size as large size, and set the grade score of large size as ,like , judge the size of the taro to be medium, and set the grade score of medium size to ,like , judge the size of taro as small, and set the grade score of small size as ;
[0028] Determine that the gray value of the pixel in the taro area is higher than the gray mean The number of pixels, if , judge the level of taro surface defects as no defects, and set the level score of no defects as ,like , the grade of the taro surface defect is judged as a minor defect, and the grade score of the minor defect is set as ,like , judge the grade of taro surface defects as obvious defects, and set the grade score of obvious defects as ,in Indicates the number of pixels in the taro area whose grayscale value is higher than the grayscale mean.
[0029] Furthermore, the specific logic for classifying the moisture content and sugar content of the taro to be graded and determining the grade scores is as follows:
[0030] The near infrared spectrum data of taro is judged to be 1400 1900 and 2200 2500 The number of characteristic absorption peaks within the wavelength range of , judge the moisture content of taro as high moisture content, and set the grade score of high moisture content as ,like , judge the moisture content of taro as medium moisture content, and set the grade score of medium moisture content as ,like , judge the moisture content of taro as low moisture content, and set the grade score of low moisture content as, where Indicates 1400-1900 and 2200-2500 The number of characteristic absorption peaks within the wavelength range;
[0031] Determine the near infrared spectrum data of taro and The number of characteristic absorption peaks within the wavelength range of , judge the moisture content of taro as high moisture content, and set the grade score of high moisture content as ,like , judge the moisture content of taro as medium moisture content, and set the grade score of medium moisture content as ,like , judge the moisture content of taro as low moisture content, and set the grade score of low moisture content as ,in Indicates 1100-1200 and 1400-1500 The number of characteristic absorption peaks in the wavelength range.
[0032] Furthermore, the specific logic for obtaining the appearance characteristic index of the taro to be graded is:
[0033]
[0034] in, is the appearance characteristic index of the taro to be graded, Indicates the grade score of taro color information, , Indicates the taro size information grade score, , Indicates the grade score of taro surface defect information, .
[0035] Furthermore, the specific logic for obtaining the internal quality index of the taro to be graded is:
[0036]
[0037] in, is the internal quality index of the taro to be graded, Indicates the moisture content information grade score of taro, , Indicates the sugar content of taro. .
[0038] Furthermore, the specific logic for obtaining the comprehensive quality index of the taro to be graded is:
[0039]
[0040] in, is the comprehensive quality index of the taro to be graded, is the first weight coefficient, is the second weight coefficient, and .
[0041] Furthermore, the specific logic for classifying the taro to be graded into different grades is as follows:
[0042] The comprehensive quality index of taro to be graded Compared with the quality threshold, if the taro comprehensive quality index , belongs to the high-quality level range, and the taro is judged to be a high-quality fruit. If the comprehensive quality index of the taro , which belongs to the normal level range, the taro is judged to be a normal quality fruit. If the comprehensive quality index of the taro , which belongs to the slight defect level range, the taro is judged to be defective quality fruit. If the comprehensive quality index of the taro , belongs to the defective level range, then the taro is judged to be a defective quality fruit.
[0043] The present invention further provides a machine vision fruit grading device for taro harvesting equipment, wherein the fruit grading device is used to implement the above-mentioned fruit grading method, comprising:
[0044] A fruit information collection module collects appearance images and near infrared spectrum data of taro to be graded, and extracts appearance feature information of taro from the appearance image, and extracts internal quality information of taro from the spectrum data, wherein the appearance feature information data includes color information, size information and surface defect information of taro, and the internal quality information includes water content data and sugar content data of taro;
[0045] An appearance feature analysis module analyzes the collected taro appearance feature information, analyzes the color information, size information and surface defect information data of the taro to be graded, divides the color information, size information and surface defect information of the taro into grades and determines the grade scores, and generates an appearance feature index of the taro to be graded according to the grade scores of the appearance feature information;
[0046] The internal quality analysis module analyzes the collected internal quality information of the taro, analyzes the moisture content data and sugar content data of the taro to be graded, divides the moisture content data and sugar content data of the taro to be graded into grades and determines the grade scores, and generates the internal quality index of the taro to be graded according to the grade scores of the internal quality information;
[0047] A comprehensive quality assessment module, which constructs an analysis model based on the appearance characteristic index and internal quality index of the taro to be graded, and generates a comprehensive quality index of the taro to be graded, which is used to reflect the overall fruit quality of the taro to be graded;
[0048] The fruit grading decision module analyzes the comprehensive quality index of the taro to be graded, compares it with the preset fruit comprehensive quality index grade range, and divides the taro to be graded into different grades.
[0049] Compared with the prior art, the present invention has the following beneficial effects:
[0050] The taro fruit grading method of the present invention realizes a comprehensive and automated evaluation of the appearance and internal quality of taro by integrating advanced image processing technology and near-infrared spectroscopy analysis technology. The method not only significantly improves the efficiency and accuracy of the grading process, but also effectively avoids subjective errors in manual grading through objective data analysis, ensuring the consistency and reliability of the grading results. In addition, by accurately evaluating the internal quality indicators of moisture and sugar content of taro, the method can better meet consumers' demand for high-quality taro and enhance the market competitiveness of taro. In general, the method of the present invention not only improves the technical level of taro grading, but also provides strong technical support for the development of the taro industry. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 It is a schematic diagram of the overall method flow of the present invention.
[0052] Figure 2 It is a schematic diagram of the system structure of the present invention. DETAILED DESCRIPTION
[0053] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments.
[0054] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0055] Example:
[0056] See also Figure 1 The present invention provides a machine vision fruit grading method for taro harvesting equipment, and the specific steps include:
[0057] Step 1: collecting appearance images and near infrared spectrum data of taro to be classified, and extracting appearance feature information of taro from the appearance image, and extracting internal quality information of taro from the spectrum data, wherein the appearance feature information data includes color information, size information and surface defect information of taro, and the internal quality information includes moisture content data and sugar content data of taro;
[0058] In this embodiment, the appearance image of the collected taro to be classified is converted into a grayscale image, and the grayscale value of each pixel of the grayscale image of the taro to be classified is calculated. The formula for calculating the grayscale value of each pixel is:
[0059]
[0060] in, is the gray value of the pixel, They are the intensity values of the red, green, and blue components respectively. Grayscale images only contain brightness information but not color information, so the data volume is smaller than that of color images and they are more efficient to process. Grayscale images provide a unified brightness standard, which makes it easy to compare the color information, size information, and surface defect information between different taro, highlight these features more clearly, and help improve the accuracy of image analysis.
[0061] The taro region and the background region are segmented in the grayscale image by a set grayscale threshold, and the grayscale value of each pixel is compared with the grayscale threshold. If the grayscale value of the pixel is greater than or equal to the grayscale threshold, it is judged that the position of the pixel is in the taro region; if the grayscale value of the pixel is less than the grayscale threshold, it is judged that the position of the pixel is in the background region;
[0062] There is usually a brightness difference between taro and the background. The taro area may be darker than the background area. By setting the grayscale threshold, the pixels in the image can be divided into the taro area and the background area. When the grayscale value of the pixel increases, if it exceeds the grayscale threshold, it is classified as part of the taro area. On the contrary, if the grayscale value of the pixel decreases and is lower than the threshold, the pixel will be classified as part of the background area.
[0063] The specific logic for obtaining the color information of taro is:
[0064]
[0065] in, is the mean grayscale value of each pixel in the taro area, is the total number of pixels in the taro area, It is the first in the taro area. The gray value of each pixel;
[0066]
[0067] in, is the standard deviation of the grayscale values of each pixel in the taro area, and the standard deviation is set as color information;
[0068] The standard deviation is a statistic that measures the degree of dispersion of data distribution. It can be used to evaluate the degree of change in the grayscale value of pixels in an image, thereby indirectly reflecting color uniformity. In the taro image, the grayscale value of each pixel can be regarded as a simplified representation of color information. By calculating the standard deviation of the grayscale value of the pixel, we can obtain a quantitative indicator of the color uniformity of the taro. If the grayscale values of most pixels in the taro image are close to the average grayscale value, the standard deviation is small, indicating that the color of the taro is relatively uniform; conversely, if the grayscale value distribution of the taro pixels is relatively dispersed, the standard deviation is large, indicating that the color distribution of the taro is uneven.
[0069] The specific logic for obtaining the size information of taro is to determine the proportion of taro area pixels in the total pixel points of the image. , and the proportion Set as size information;
[0070] When the grayscale values of the pixels in the taro area and the grayscale values of the pixels in the background area are at different thresholds, the larger the taro, the more pixels in the taro area, and the larger the proportion of the pixels in the whole image. On the contrary, the smaller the taro, the fewer pixels in the taro area, and the smaller the proportion of the pixels in the whole image. Therefore, the size of the taro can be judged by the proportion of the pixels in the taro area in the whole image.
[0071] The specific logic for obtaining the surface defect information of taro is to determine the number of pixels whose grayscale values of pixels in the taro area are greater than the grayscale mean of the pixels, and set the number of pixels as the surface defect information;
[0072] Defects on the taro surface usually cause the grayscale value of the local area to be different from the overall average grayscale value. By counting the number of pixels with a grayscale value higher than the average grayscale value, the degree of defects on the taro surface can be quickly evaluated.
[0073] In this embodiment, the specific logic for extracting the internal quality information of taro from the spectral data is as follows:
[0074] The specific logic for obtaining the moisture content of taro is to determine the near infrared spectrum data of taro between 1400-1900 and 2200-2500 The number of characteristic absorption peaks within a wavelength range, and the moisture content of taro is judged by the number of characteristic absorption peaks within the wavelength range;
[0075] Select 1400-1900 and 2200-2500 The wavelength range is because the absorption peaks in these regions have a good correlation with the moisture content, and the spectral data in these wavelength ranges are relatively easy to obtain and analyze. In addition, the spectral data in these wavelength ranges are less interfered by other components (such as starch, protein, etc.), so this wavelength range is more suitable for moisture content detection. When near-infrared light is irradiated on taro, water molecules absorb light of specific wavelengths, causing the light intensity of these wavelengths to weaken and form absorption peaks. The higher the moisture content in taro, the more absorption peaks its near-infrared spectrum usually has in these wavelength ranges. Therefore, by counting the number of absorption peaks in these wavelength ranges, the moisture content in taro can be indirectly estimated.
[0076] The specific logic for obtaining the sugar content of taro is to determine the near infrared spectrum data of taro between 1100-1200 and 1400-1500 The number of characteristic absorption peaks within a wavelength range, and the sugar content of taro is judged by the number of characteristic absorption peaks within the wavelength range;
[0077] Select 1100-1200 and 1400-1500 The wavelength range is because the absorption peaks in these regions have a good correlation with the sugar content. The strong absorption bands of sugar molecules in the near-infrared spectrum are mainly concentrated in 1100-1200 and 1400-1500 These absorption bands are due to and When near-infrared light is irradiated on taro, sugar molecules absorb light of specific wavelengths, causing the intensity of light at these wavelengths to weaken and form absorption peaks. The higher the sugar content in taro, the more absorption peaks its near-infrared spectrum has in these wavelength ranges. If the sugar content in taro is lower, the corresponding near-infrared spectrum has fewer absorption peaks in these wavelength ranges.
[0078] Step 2: Analyze the collected taro appearance feature information, analyze the color information, size information and surface defect information data of the taro to be graded, classify the color information, size information and surface defect information of the taro and determine the grade score, and generate the appearance feature index of the taro to be graded according to the grade score of the appearance feature information;
[0079] In this embodiment, the specific logic for classifying the color information, size information, and surface defect information of taro and determining the grade scores is as follows:
[0080] The standard deviation of the grayscale value of pixels in the taro area Compared with the standard deviation threshold, if , judge the color grade of taro to be within the normal range, and set the grade score of the normal range as ,like , judge the grade of taro color as slightly abnormal, and set the grade score of slightly abnormal as ,like , judge the grade of taro color as obviously abnormal, and set the grade score of obvious abnormality as ,in represents the standard deviation threshold;
[0081] The color of taro is usually closely related to its maturity, nutritional status and health status. Taro with uniform color and meeting the standards is often of better quality, while abnormal color may indicate that the taro has disease, malnutrition or other problems. Color consistency and brightness are important visual indicators for consumers when choosing taro, so color information is one of the important bases for evaluating taro grade.
[0082] Determine the proportion of the number of pixels in the taro area to the total number of pixels in the image ,like , judge the taro size as large size, and set the grade score of large size as ,like , judge the size of the taro to be medium, and set the grade score of medium size to ,like , judge the size of taro as small, and set the grade score of small size as ;
[0083] The size information of taro is not only directly related to the yield and use value of taro, but also affects consumers' purchasing decisions and the packaging and transportation efficiency of the product. Large-sized taro is generally considered to be of better quality and suitable for display and high-end markets; medium-sized taro meets the needs of most consumers and is the mainstream product on the market; small-sized taro may be popular in certain specific uses or niche markets, but its overall market value is relatively low. The grayscale value of the pixel point in the taro area and the grayscale value of the pixel point in the background area are at different thresholds. Therefore, the size of the taro can be judged by judging the ratio of the number of pixels in the taro area to the total number of pixels in the image.
[0084] Determine that the gray value of the pixel in the taro area is higher than the gray mean The number of pixels, if , judge the level of taro surface defects as no defects, and set the level score of no defects as ,like , the grade of the taro surface defect is judged as a minor defect, and the grade score of the minor defect is set as ,like , judge the grade of taro surface defects as obvious defects, and set the grade score of obvious defects as ,in Indicates the number of pixels in the taro area whose grayscale value is higher than the grayscale mean;
[0085] The surface defect information of taro is selected as the basis for grading because the surface condition is directly related to the appearance, food safety and market acceptance of taro. The surface of defect-free taro is smooth, which not only enhances the visual appeal of the product, but also ensures its good preservation and taste, and is a sign of high-quality products. Although taro with slight defects has slight flaws in appearance, it usually does not affect its edible value and overall quality, and can still meet the needs of most consumers. Taro with obvious defects may affect its shelf life and taste due to severe surface damage, reducing its market value. Usually, the grayscale value of the pixel in the defective area is larger, so the degree of defect on the taro surface is judged by judging the number of pixel grayscale values greater than the image grayscale mean.
[0086] In this embodiment, the formula for obtaining the appearance characteristic index of the taro to be graded is:
[0087]
[0088] in, is the appearance characteristic index of the taro to be graded, Indicates the grade score of taro color information, , Indicates the taro size information grade score, , Indicates the grade score of taro surface defect information, ;
[0089] This formula reflects the relationship between the appearance characteristic index and the color information grade score, size information grade score and surface defect information grade score of taro. The color, size and surface defects of taro are often important visual indicators for consumers to buy. The more uniform the color of the taro surface, the higher the color grade score. The higher the value, the corresponding appearance feature index If the color of the taro surface is uneven, with spots or obvious color abnormalities, the color grade score The lower the corresponding appearance feature index The larger the taro, the smaller the size grade. The higher the value, the corresponding appearance feature index If the taro is smaller, the size grade score The lower the corresponding appearance feature index If the surface defects of taro are few or even absent, the surface defect grade score is The lower the corresponding appearance feature index The larger the surface defects of the taro, the higher the surface defect grade score. The higher the value, the corresponding appearance feature index In addition, different weight coefficients correspond to different appearance features to better reflect the impact of different features on taro grading.
[0090] Step 3: Analyze the collected internal quality information of taro, analyze the moisture content data and sugar content data of the taro to be graded, divide the moisture content data and sugar content data of the taro to be graded into grades and determine the grade scores, and generate the internal quality index of the taro to be graded according to the grade scores of the internal quality information;
[0091] In the present embodiment, the specific logic for dividing the grades of the moisture content and sugar content of the taro to be classified and determining the grade scores is as follows:
[0092] The near infrared spectrum data of taro is judged to be 1400 1900 and 2200 2500 The number of characteristic absorption peaks within the wavelength range of , judge the moisture content of taro as high moisture content, and set the grade score of high moisture content as ,like , judge the moisture content of taro as medium moisture content, and set the grade score of medium moisture content as ,like , judge the moisture content of taro as low moisture content, and set the grade score of low moisture content as, where Indicates 1400-1900 and 2200-2500 The number of characteristic absorption peaks within the wavelength range;
[0093] The near infrared spectrum data of taro is judged to be between 1100 and 1200 and 1400-1500 The number of characteristic absorption peaks within the wavelength range of , judge the moisture content of taro as high moisture content, and set the grade score of high moisture content as ,like , judge the moisture content of taro as medium moisture content, and set the grade score of medium moisture content as ,like , judge the moisture content of taro as low moisture content, and set the grade score of low moisture content as ,in Indicates 1100-1200 and 1400-1500 The number of characteristic absorption peaks within the wavelength range;
[0094] The moisture content of taro directly affects its taste and shelf life. Taro with moderate moisture content tastes better and is less likely to deteriorate in quality during storage. The sugar content of taro is an important indicator for measuring the flavor and sweetness of taro. Taro with high sugar content is usually more popular with consumers because they have better taste and flavor. Therefore, the moisture content and sugar content of taro are key indicators for internal quality assessment of taro.
[0095] In this embodiment, the formula for obtaining the internal quality index of the taro to be graded is:
[0096]
[0097] in, is the internal quality index of the taro to be graded, Indicates the moisture content information grade score of taro, , Indicates the sugar content of taro. .
[0098] The internal quality index is constructed by combining the two internal quality information of taro, namely, the moisture content and sugar content. The higher the moisture content of taro, the higher the moisture content grade score. The larger the value, the corresponding internal quality index The higher the moisture content of the taro, the lower the moisture content. The smaller the corresponding internal quality index If the sugar content of taro is higher, the sugar content grade score The larger the value, the corresponding internal quality index The higher the sugar content of taro, the lower the sugar content. The smaller the corresponding internal quality index The lower.
[0099] Step 4: construct an analysis model based on the appearance characteristic index and internal quality index of the taro to be graded, and generate a comprehensive quality index of the taro to be graded, which is used to reflect the overall fruit quality of the taro to be graded;
[0100] In this embodiment, the specific logic for obtaining the comprehensive quality index of the taro to be graded is:
[0101]
[0102] in, is the comprehensive quality index of the taro to be graded, is the first weight coefficient, is the second weight coefficient, and .
[0103] Appearance feature index reflects the visual quality of taro, while the internal quality index It reflects the taste and nutritional value of taro. and Comprehensive Quality Index There is a positive proportional relationship, and The higher the value, the better the appearance and internal quality of the taro. The higher the quality of taro, the better. This formula combines the appearance and internal quality characteristics of taro through weighted summation, which can fully reflect the quality of taro and help to make more accurate grading. The choice of weight coefficient also reflects the importance of internal quality relative to appearance quality, and is also based on the specific needs of the market or consumers for taro quality.
[0104] Step 5: Analyze the comprehensive quality index of the taro to be graded, compare it with the preset fruit comprehensive quality index grade interval, and divide the taro to be graded into different grades;
[0105] In the present embodiment, the specific logic that taro to be classified is divided into different grades is as follows:
[0106] The comprehensive quality index of taro to be graded Compared with the quality threshold, if the taro comprehensive quality index , belongs to the high-quality level range, and the taro is judged to be a high-quality fruit. If the comprehensive quality index of the taro , which belongs to the normal level range, the taro is judged to be a normal quality fruit. If the comprehensive quality index of the taro , which belongs to the slight defect level range, the taro is judged to be defective quality fruit. If the comprehensive quality index of the taro , belongs to the defective level interval, then the taro is judged to be a defective quality fruit, among which Indicates the quality threshold.
[0107] See also Figure 2 The present invention further provides a machine vision fruit grading device for taro harvesting equipment, wherein the fruit grading device is used to implement the above-mentioned fruit grading method, comprising:
[0108] A fruit information collection module collects appearance images and near infrared spectrum data of taro to be graded, and extracts appearance feature information of taro from the appearance image, and extracts internal quality information of taro from the spectrum data, wherein the appearance feature information data includes color information, size information and surface defect information of taro, and the internal quality information includes water content data and sugar content data of taro;
[0109] An appearance feature analysis module analyzes the collected taro appearance feature information, analyzes the color information, size information and surface defect information data of the taro to be graded, divides the color information, size information and surface defect information of the taro into grades and determines the grade scores, and generates an appearance feature index of the taro to be graded according to the grade scores of the appearance feature information;
[0110] The internal quality analysis module analyzes the collected internal quality information of the taro, analyzes the moisture content data and sugar content data of the taro to be graded, divides the moisture content data and sugar content data of the taro to be graded into grades and determines the grade scores, and generates the internal quality index of the taro to be graded according to the grade scores of the internal quality information;
[0111] A comprehensive quality assessment module, which constructs an analysis model based on the appearance characteristic index and internal quality index of the taro to be graded, and generates a comprehensive quality index of the taro to be graded, which is used to reflect the overall fruit quality of the taro to be graded;
[0112] The fruit grading decision module analyzes the comprehensive quality index of the taro to be graded, compares it with the preset fruit comprehensive quality index grade range, and divides the taro to be graded into different grades.
[0113] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.
[0114] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented by software, the above embodiments may be implemented in whole or in part in the form of a computer program product. Those skilled in the art may appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein may be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed by hardware or software methods depends on the specific application and design constraints of the technical solution.
[0115] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0116] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. A machine vision fruit grading method for taro harvesting equipment, characterized in that, The specific steps include: Step 1: collecting appearance images and near infrared spectrum data of taro to be classified, and extracting appearance feature information of taro from the appearance image, and extracting internal quality information of taro from the spectrum data, wherein the appearance feature information data includes color information, size information and surface defect information of taro, and the internal quality information includes moisture content data and sugar content data of taro; Step 2: Analyze the collected taro appearance feature information, analyze the color information, size information and surface defect information data of the taro to be graded, classify the color information, size information and surface defect information of the taro and determine the grade score, and generate the appearance feature index of the taro to be graded according to the grade score of the appearance feature information; Step 3: Analyze the collected taro internal quality information, analyze the moisture content data and sugar content data of the taro to be graded, divide the moisture content data and sugar content data of the taro to be graded into grades and determine the grade scores, and generate the internal quality index of the taro to be graded according to the grade scores of the internal quality information; Step 4: construct an analysis model based on the appearance characteristic index and internal quality index of the taro to be graded, and generate a comprehensive quality index of the taro to be graded, which is used to reflect the overall fruit quality of the taro to be graded; Step 5: Analyze the comprehensive quality index of the taro to be graded, compare it with the preset fruit comprehensive quality index grade interval, and divide the taro to be graded into different grades; The specific logic for obtaining the appearance characteristic index of the taro to be graded is: in, is the appearance characteristic index of the taro to be graded, Indicates the grade score of taro color information, , Indicates the taro size information grade score, , Indicates the grade score of taro surface defect information, , are the weight coefficients of their respective items; The specific logic for obtaining the internal quality index of taro to be graded is: in, is the internal quality index of the taro to be graded, Indicates the moisture content information grade score of taro, , Indicates the sugar content information grade score of taro. ; The specific logic for obtaining the comprehensive quality index of taro to be graded is: in, is the comprehensive quality index of the taro to be graded, is the first weight coefficient, is the second weight coefficient, and .
2. The machine vision fruit grading method for taro harvesting equipment according to claim 1, characterized in that: The specific logic for extracting the appearance feature information of taro from the appearance image is as follows: The collected appearance image of the taro to be classified is converted into a grayscale image, and the grayscale value of each pixel of the taro appearance image is obtained, and the taro area and the background area are segmented in the grayscale image by a set grayscale threshold; the grayscale value of each pixel is compared with the grayscale threshold, if the grayscale value of the pixel is greater than or equal to the grayscale threshold, it is judged that the position of the pixel is in the taro area, if the grayscale value of the pixel is less than the grayscale threshold, it is judged that the position of the pixel is in the background area; The specific logic for obtaining the color information of taro is: in, is the mean grayscale value of each pixel in the taro area, is the total number of pixels in the taro area, It is the first in the taro area. The gray value of each pixel; in, is the standard deviation of the grayscale values of each pixel in the taro area, and the standard deviation is set as color information; The specific logic for obtaining the size information of taro is to determine the proportion of the number of pixels in the taro area to the total number of pixels in the image. , and the proportion Set as size information; The specific logic for obtaining the surface defect information of taro is to determine the number of pixels whose grayscale values of pixels in the taro area are greater than the average grayscale value of the pixels, and set the number of pixels as the surface defect information.
3. The machine vision fruit grading method for taro harvesting equipment according to claim 2, characterized in that, The specific logic for extracting the internal quality information of taro from spectral data is as follows: The specific logic for obtaining the moisture content of taro is to determine the near infrared spectrum data of taro between 1400-1900 and 2200-2500 The number of characteristic absorption peaks within a wavelength range, and the moisture content of taro is judged by the number of characteristic absorption peaks within the wavelength range; The specific logic for obtaining the sugar content of taro is to determine the near infrared spectrum data of taro between 1100-1200 and 1400-1500 The number of characteristic absorption peaks within the wavelength range is counted, and the sugar content of taro is judged by the number of characteristic absorption peaks within the wavelength range.
4. The machine vision fruit grading method for taro harvesting equipment according to claim 3, characterized in that: The specific logic for grading the color information, size information and surface defect information of taro and determining the grade scores is as follows: The standard deviation of the grayscale value of pixels in the taro area Compared with the standard deviation threshold, if , judge that the color level of taro is within the normal range, and set the grade score of the normal range as ,like , judge the grade of taro color as slightly abnormal, and set the grade score of slightly abnormal as ,like , judge the grade of taro color as obviously abnormal, and set the grade score of obvious abnormality as ,in represents the standard deviation threshold; Determine the proportion of the number of pixels in the taro area to the total number of pixels in the image ,like , judge the taro size as large, and set the large size grade score as ,like , judge the size of the taro to be medium, and set the grade score of medium size to ,like , judge the size of taro as small, and set the grade score of small size as ; Determine that the gray value of the pixel in the taro area is higher than the gray mean The number of pixels, if , judge the level of taro surface defects as no defects, and set the level score of no defects as ,like , the grade of the taro surface defect is judged as a minor defect, and the grade score of the minor defect is set as ,like , judge the grade of taro surface defects as obvious defects, and set the grade score of obvious defects as ,in Indicates the number of pixels in the taro area whose grayscale value is higher than the grayscale mean.
5. The machine vision fruit grading method for taro harvesting equipment according to claim 4, characterized in that, The specific logic for classifying the moisture content and sugar content of the taro to be graded and determining the grade scores is as follows: The near infrared spectrum data of taro is judged to be 1400 1900 and 2200 2500 The number of characteristic absorption peaks within the wavelength range of , judge the moisture content of taro as high moisture content, and set the grade score of high moisture content as ,like , judge the moisture content of taro as medium moisture content, and set the grade score of medium moisture content as ,like , judge the moisture content of taro as low moisture content, and set the grade score of low moisture content as ,in Indicates 1400-1900 and 2200-2500 The number of characteristic absorption peaks within the wavelength range; Determine the near infrared spectrum data of taro and The number of characteristic absorption peaks within the wavelength range of , judge the sugar content of taro as high sugar content, and set the grade score of high sugar content as ,like , judge the sugar content of taro as medium sugar content, and set the grade score of medium sugar content as ,like , judge the sugar content of taro as low sugar content, and set the grade score of low sugar content as ,in Indicates 1100-1200 and 1400-1500 The number of characteristic absorption peaks in the wavelength range.
6. The machine vision fruit grading method for taro harvesting equipment according to claim 1, characterized in that: The specific logic for classifying the taro to be graded into different grades is as follows: The comprehensive quality index of taro to be graded Compared with the quality threshold, if the taro comprehensive quality index , belongs to the high-quality level range, and the taro is judged to be a high-quality fruit. If the comprehensive quality index of the taro , which belongs to the normal level range, the taro is judged to be a normal quality fruit. If the comprehensive quality index of the taro , which belongs to the slight defect level range, the taro is judged to be defective quality fruit. If the comprehensive quality index of the taro , belongs to the defective level range, then the taro is judged to be a defective quality fruit.
7. A machine vision fruit grading device for taro harvesting equipment, characterized in that: The fruit grading device is used to implement the fruit grading method according to any one of claims 1 to 6, comprising: A fruit information collection module collects appearance images and near infrared spectrum data of taro to be graded, and extracts appearance feature information of taro from the appearance image, and extracts internal quality information of taro from the spectrum data, wherein the appearance feature information data includes color information, size information and surface defect information of taro, and the internal quality information includes water content data and sugar content data of taro; An appearance feature analysis module analyzes the collected taro appearance feature information, analyzes the color information, size information and surface defect information data of the taro to be graded, divides the color information, size information and surface defect information of the taro into grades and determines the grade scores, and generates an appearance feature index of the taro to be graded according to the grade scores of the appearance feature information; The internal quality analysis module analyzes the collected internal quality information of the taro, analyzes the moisture content data and sugar content data of the taro to be graded, divides the moisture content data and sugar content data of the taro to be graded into grades and determines the grade scores, and generates the internal quality index of the taro to be graded according to the grade scores of the internal quality information; A comprehensive quality assessment module, which constructs an analysis model based on the appearance characteristic index and internal quality index of the taro to be graded, and generates a comprehensive quality index of the taro to be graded, which is used to reflect the overall fruit quality of the taro to be graded; The fruit grading decision module analyzes the comprehensive quality index of the taro to be graded, compares it with the preset fruit comprehensive quality index grade range, and divides the taro to be graded into different grades.
Citation Information
Patent Citations
Online nondestructive testing (NDT) method and device for comprehensive internal / external qualities of fruits
CN101949686A
Hyperspectral detection method of dried scallop moisture content
CN104949927A
Potato browning detection method based on machine vision
CN112734688A