A method and device for identifying potato varieties using hyperspectral technology

Through image recognition model and meshing technology, the signal attenuation and sampling point limitations caused by bud eyes in hyperspectral technology are solved, and the high accuracy and accuracy of potato variety identification are achieved. The sampling point recognition is automated, and the technical application is enhanced. sex.

CN118566218BActive Publication Date: 2024-12-10INNER MONGOLIA AUTONOMOUS REGION ACAD OF AGRI & ANIMAL HUSBANDRY SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410628391.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-21
Publication Date
2024-12-10
Estimated Expiration
2044-05-21

AI Technical Summary

Technical Problem

In the identification of potato varieties, existing hyperspectral technology affects the accuracy of the identification results due to signal attenuation and noise caused by bud eyes, and the limitations of sampling point selection lead to a decrease in the accuracy of the identification results, which increases manual intervention and time costs.

Method used

The image recognition model recognizes the bud eye area in the potato surface image, adjusts the shooting angle and performs grid division, collects spectral data of multiple angles and multiple points, and uses error coefficient weighting to generate the final identification results to avoid the influence and limitations of bud eye abnormal data. sampling.

Benefits of technology

It improves the accuracy and accuracy of potato variety identification, realizes automatic sampling point recognition, reduces manual intervention, and enhances the applicability of hyperspectral technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118566218B_ABST
    Figure CN118566218B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for identifying potato varieties by using hyperspectral technology, and relates to the technical field of potato variety identification. The present invention can screen out the eye part of the potato sample by gridding and identifying the surface image of the potato sample, so as to avoid using the eye part as a sampling point in the hyperspectral analysis, resulting in abnormal spectral data of the eye part affecting the secondary identification result of the hyperspectral analysis, thereby improving the identification accuracy. At the same time, by collecting spectral data of the potato sample at multiple angles and multiple points, and correcting the final identification result according to the test performance of the potato sample, not only can the limitation of the identification result be avoided, and the identification accuracy can be further improved, but also the automatic identification of the sampling point can be realized, and the trouble of manually setting the sampling point can be avoided, thereby improving the applicability of the hyperspectral analysis technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of potato variety identification, and in particular to a method and a device for identifying potato varieties using hyperspectral technology. Background Art

[0002] Potatoes are the fourth largest food crop in the world, with high yield and rich nutrition. More than half of the countries and regions in the world grow potatoes. With the development of technology, optical methods such as hyperspectral technology or multispectral imaging are used to identify potato varieties. These methods are faster and more accurate than traditional methods.

[0003] However, if the existing hyperspectral technology collects the spectral image of the entire potato, the buds on the surface of the potato will cause signal attenuation and scattering, and will also cause irregular refraction of light during reflection or transmission, causing deformation and noise in the spectral data, affecting the extraction and recognition of spectral features and reducing the accuracy of the identification results. If only the spectral image of potatoes in some areas is collected, it will be difficult to reflect the overall situation of the potatoes, which will easily lead to limitations in the identification results. Therefore, the selection of sampling points will greatly affect the final identification results. Automatic identification will reduce the accuracy of the identification results. If you want to improve the accuracy, you need to manually select the sampling points, which increases the time required for identification. Therefore, this technology has certain limitations.

[0004] 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

[0005] The object of the present invention is to provide a method and device for identifying potato varieties using hyperspectral technology to solve the problems raised in the above background technology.

[0006] To achieve the above object, the present invention provides the following technical solutions:

[0007] A method for identifying potato varieties using hyperspectral technology, the specific steps comprising:

[0008] S1: collecting a surface image of a potato sample, using an image recognition model to detect the edge shape and grayscale value of the potato sample in the surface image, identifying the area where the eye exists in the surface image, generating an abnormality ratio for determining the image quality, and executing different subsequent steps according to the abnormality ratio;

[0009] S2: When the abnormal ratio is greater than a preset ratio threshold, an alarm is issued and the shooting angle of the potato sample is adjusted at a uniform speed to re-collect the surface image; when the abnormal ratio is less than the preset ratio threshold, the area without buds in the surface image is used as the sampling area;

[0010] S3: Performing hyperspectral detection on the actual position of the potato skin corresponding to each sampling area, collecting spectral data contained in the spectral image of each sampling area, and jointly performing variety identification based on the edge shape and grayscale value of the potato sample to generate an identification result and a corresponding result probability;

[0011] S4: Repeat steps S1 to S3 for a total of K times, count the number of alarms, generate K groups of error coefficients for the first identification results of the potato sample based on the number of alarms and the abnormality ratio, use the error coefficient to weight the first identification result, generate a second identification result and a second result probability, and finally generate a final identification result based on the second identification result, the second result probability, the edge shape and the gray value.

[0012] Preferably, the step S1 further comprises:

[0013] S101: collecting several groups of potato images, constructing an image recognition model based on deep learning, using a gradient algorithm to calculate the edge strength of each pixel in the image, obtaining multiple groups of strong edge points to jointly constitute the edge shape of the potato, and collecting the grayscale value of each pixel inside the edge, then dividing the potato images into a training set and a validation set and training the image recognition model so that it can identify the area with buds in the potato image;

[0014] S102: taking the potato to be identified as a potato sample, collecting a surface image of the potato sample, preprocessing the surface image of the potato sample, and gridding the processed surface image;

[0015] S103: Use the image recognition model to perform image analysis on several groups of grids in the surface image in turn, identify the buds in the surface images of different grids, mark the grids with buds as abnormal grids, and the rest as normal grids, count the abnormal proportion of abnormal grids in the total grids, and compare the abnormal proportion with a preset proportion threshold, and execute different steps according to the comparison results.

[0016] Preferably, the image preprocessing includes brightness adjustment and size unification. When performing grid division, the image is evenly divided into m*n grids in both horizontal and vertical directions, so that each grid contains a surface image of a part of the potato sample.

[0017] Preferably, the image recognition model for performing image analysis on the grid includes a convolutional neural network model, a YOLOv5 model, and a gradient edge detection model.

[0018] Preferably, the number of abnormal grids is calibrated as p, and the abnormal proportion is The subscript i represents the number of repeated shots, i = 1, 2, 3, ..., K. When t=t+1, represents the ratio threshold, and t represents the number of alarms.

[0019] Preferably, the spectral data includes light reflectance data and light absorbance data, and the spectral data is calibrated as A(x,y) i , in Represents light reflectance data, represents the light absorption rate data, (,y) represents the horizontal and vertical coordinates of the sampling area, and the superscript j represents the light source number of different wavelengths.

[0020] Preferably, the identification result of each sampling area is calibrated as the area identification result B(x,y) i The regional identification results correspond to the spectral data of each sampling area one by one. In the formula Indicates the subcategory in the regional identification result, the superscript q indicates the subcategory number, and the sub-probability corresponding to each subcategory in the regional identification result is marked as The sub-categories correspond to the sub-probabilities one by one, and the set of regional identification results of all sampling areas under the same number of shots is calibrated as one identification result. Then, according to the sub-probability corresponding to the sub-category in the regional identification result, the sub-probability corresponding to the sub-category in the primary identification result is calculated. The calculation formula is:

[0021]

[0022] Divide the sub-probabilities corresponding to the sub-categories in all the primary identification results into a set, and mark the set as the primary result probability

[0023] Preferably, the logic for generating the final identification result is:

[0024] Generate an error coefficient μ corresponding to the identification result based on the number of alarms and the abnormality ratio i , calculated as:

[0025]

[0026] Then, the sub-probabilities in the probability of a result are weighted according to the error coefficient to generate several groups of weighted sub-probabilities. And several groups of weighted sub-probabilities are combined into quadratic outcome probabilities Weighted sub-probability The calculation formula is:

[0027]

[0028] Secondary outcome probability

[0029] The aspect ratio γ is calculated according to the edge shape of the potato sample in the surface image of the potato sample, and then the average gray value of the entire area is calculated according to the gray value of each pixel point inside the edge. When the following conditions are met:

[0030] Secondary outcome probability The secondary identification result corresponding to the maximum value is Zhongshu No. 3, and its aspect ratio γ≤γ y , and the average gray value At this time, the final identification result is considered to be Zhongshu No. 3;

[0031] Secondary outcome probability The secondary identification result corresponding to the maximum value is the Atlantic Ocean, and its aspect ratio γ>γ Y , and the average gray value At this time, it is believed that its final identification result is the Atlantic Ocean;

[0032] Secondary outcome probability The secondary identification result corresponding to the maximum value is Faureta, and its aspect ratio γ>γ y , and the average gray value At this time, the final identification result is considered to be Favorita;

[0033] Where HD1 and HD2 are the preset grayscale thresholds, γ y is the preset aspect ratio threshold.

[0034] A device for identifying potato varieties using hyperspectral technology, the identification device adopts the above identification method, including:

[0035] An image acquisition module, wherein the image acquisition module is used to acquire a surface image and a spectral image of a potato sample;

[0036] An image processing module, wherein the image processing module is used to perform image preprocessing on the surface image of the potato sample;

[0037] An image analysis module, the image analysis module is used to perform grid division and recognition on the surface image of the potato sample, and issue an alarm signal according to the recognition result;

[0038] A data processing module, the data processing module is used to collect spectral data in the spectral image of the potato sample, and generate a secondary identification result of the potato sample and a corresponding secondary result probability according to the spectral data;

[0039] An alarm module is used to receive an alarm signal and issue an alarm.

[0040] Compared with the prior art, the present invention has the following beneficial effects:

[0041] The present invention can screen out the eye part of the potato sample by gridding and identifying the surface image of the potato sample, avoid using the eye part as a sampling point in the hyperspectral analysis, and cause abnormal spectral data of the eye part to affect the secondary identification result of the hyperspectral analysis, thereby improving the identification accuracy. At the same time, by collecting spectral data of the potato sample at multiple angles and multiple points, and correcting the final identification result according to the test performance of the potato sample, not only can the limitations of the identification result be avoided, and the identification accuracy can be further improved, but also the automatic identification of the sampling points can be realized, eliminating the trouble of manually setting the sampling points, and improving the applicability of the hyperspectral analysis technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a schematic diagram of the overall method flow of the present invention;

[0043] Figure 2 Schematic diagram of the process of step S1 of the present invention;

[0044] Figure 3 It is a schematic diagram of the module structure of the present invention. DETAILED DESCRIPTION

[0045] 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.

[0046] 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.

[0047] Example:

[0048] See also Figure 1-2 , the present invention provides a technical solution:

[0049] A method for identifying potato varieties using hyperspectral technology, the specific steps comprising:

[0050] S1: Collect several groups of potato images, build an image recognition model based on deep learning, divide the potato images into training set and validation set and train the image recognition model, use the gradient algorithm to calculate the edge strength of each pixel in the image, obtain multiple groups of strong edge points to jointly constitute the edge shape of the potato, and collect the grayscale value of each pixel inside the edge at the same time, so that it can identify the area with buds in the potato image.

[0051] S2: The potato to be identified is used as a potato sample, and the surface image of the potato sample is collected. The surface image of the potato sample is preprocessed. The image preprocessing includes brightness adjustment and size unification. The processed surface image is grid-divided. When the grid is divided, it is evenly divided into m*n grids in the horizontal and vertical directions, so that each grid contains a part of the surface image of the potato sample. When collecting the surface image of the potato sample, the focal length of the lens is adjusted to fill the entire image with the potato sample as much as possible, which can reduce the processing time of subsequent image preprocessing. When dividing the grid, the size of m and n can be determined according to actual needs. For example, when the potato sample is relatively slender, there will be more blank spaces on the upper and lower sides of the surface image taken when it is placed flat. At this time, the value of the horizontal grid m can be increased, and the value of the vertical grid n can be reduced. In this way, the divided grid becomes a vertically long rectangle, ensuring that each grid contains a part of the surface image of the potato sample, which can avoid the occurrence of blank grids affecting subsequent judgments;

[0052] S3: using an image recognition model to sequentially perform image analysis on several groups of grids in the surface image. The image recognition models for performing image analysis on the grids include a convolutional neural network model, a YOLOv5 model, and a gradient edge detection model. These models can detect whether there is a part with a large background difference in the surface image of the potato sample, thereby identifying the buds in the surface images of different grids, marking the grids with buds as abnormal grids, and the rest as normal grids, counting the abnormal proportion of the abnormal grids in the total grids, and comparing the abnormal proportion with a preset proportion threshold, and executing different steps according to the comparison result;

[0053] S4: When the abnormal ratio is greater than the preset ratio threshold, it means that the potato sample has more buds in the surface image taken at this angle, and the accuracy of its spectral image collected at this angle is poor. An alarm is issued and the shooting angle of the potato sample is adjusted at a uniform speed. The number of abnormal grids is calibrated as p, and the abnormal ratio is The subscript i represents the number of repeated shots, i = 1, 2, 3, ..., K. When t=t+1, represents the ratio threshold, t represents the number of alarms, that is, assuming that the preset steering angle is 60°, then the maximum number of repeated shots is K=6. The smaller the steering angle is set, the more repeated shots are taken, the more accurate the identification result is, but the longer the identification time is, so it can be set according to the actual situation;

[0054] When the abnormal proportion is less than the preset proportion threshold, it means that the potato sample has fewer buds in the surface image taken at this angle, and the accuracy of its spectral image collected at this angle is better. The normal grid is used as the sampling area, and the spectral data contained in the spectral image of each sampling area is collected and the hyperspectral technology is used for variety identification. The spectral data includes light reflectance data and light absorption rate data. The spectral data of the potato sample is analyzed by hyperspectral technology, and the features in the spectral data can be identified and compared with the preset feature library, so as to realize the variety identification of the potato sample and generate an identification result and the corresponding result probability. The identification result and the result probability reflect the possible potato variety type when the potato sample is analyzed as a whole at a certain shooting angle.

[0055] S5: Repeat steps S2 to S4 for K times in total, count the number of alarms, generate K groups of error coefficients for the first identification results of the potato sample according to the number of alarms and the abnormality ratio, use the error coefficients to perform weighted processing on the first identification results, and generate the second identification results and the probability of the second results.

[0056] Calibrate the spectral data as A(x,y) i , in Represents light reflectance data, represents the light absorption rate data, (,y) represents the horizontal and vertical coordinates of the sampling area, and the superscript j represents the light source number of different wavelengths.

[0057] The identification result of each sampling area is calibrated as the regional identification result B(x,y) i The regional identification results correspond to the spectral data of each sampling area one by one. In the formula Indicates the subcategory in the regional identification result, the superscript q indicates the subcategory number, and the sub-probability corresponding to each subcategory in the regional identification result is marked as And the sub-categories correspond one to one with the sub-probabilities.

[0058] For example, after identifying a sampling area of ​​a potato sample, the identification results are: 56% probability of Zhongshu No. 3, 23% probability of Atlantic Ocean, 21% probability of Favorita, then the regional identification results of this area are: Zhongshu No. 3, Atlantic Ocean, Favorita. Zhongshu No. 3, Atlantic Ocean, Favorita are all subcategories in the regional identification results, and the sub-probabilities corresponding to each subcategory are: 56%, 23%, 21% respectively. Therefore, the regional identification results reflect the possible potato variety types when a potato sample is analyzed in a certain sampling area at a certain shooting angle.

[0059] The set of regional identification results of all sampling areas under the same number of shooting times is calibrated as one identification result Then, according to the sub-probability corresponding to the sub-category in the regional identification result, the sub-probability corresponding to the sub-category in the primary identification result is calculated. The calculation formula is:

[0060]

[0061] Divide the sub-probabilities corresponding to the sub-categories in all the primary identification results into a set, and mark the set as the primary result probability

[0062] For example, the potato sample has only two sampling areas. After identifying the other sampling area of ​​the potato sample, the identification results are: 80% probability of Zhongshu No. 3 and 20% probability of Atlantic Ocean. The regional identification results of this area are Zhongshu No. 3 and Atlantic Ocean, and the corresponding sub-probabilities are: 80% and 20%, respectively. Therefore, the regional identification results of the two sampling areas are combined, and the first identification results obtained are: Zhongshu No. 3, Atlantic Ocean, and Favorita. The first probability results corresponding to the first identification results are: 68%, 21.5%, and 10.5%. Therefore, the first identification result and the probability of the first result reflect the possible potato variety type when the potato sample is analyzed as a whole at a certain shooting angle.

[0063] The logic for generating secondary identification results and secondary result probabilities is:

[0064] Generate an error coefficient μ corresponding to the identification result based on the number of alarms and the abnormality ratio i , calculated as:

[0065]

[0066] The error coefficient consists of two parts. The first part, t / k, reflects the overall test performance of the potato sample. The higher its value, the more times the potato sample fails in the shooting, and the less suitable the potato sample is as a sample. The second part, t / k, reflects the overall test performance of the potato sample. The higher its value, the more times the potato sample fails in the shooting, and the less suitable the potato sample is as a sample. It reflects the test performance of potato samples at a certain shooting angle. The higher its value is, the more abnormal grids the potato sample has at this angle, and the less suitable the shooting angle is. Therefore, the overall error coefficient judges the reliability of an identification result in two directions: the overall value and a certain angle. The larger the error coefficient is, the more likely it is that the identification result of this group will be inaccurate, and therefore the smaller its weight is.

[0067] Then, the sub-probabilities in the probability of a result are weighted according to the error coefficient to generate several groups of weighted sub-probabilities. And several groups of weighted sub-probabilities are combined into quadratic outcome probabilities Weighted sub-probability The calculation formula is:

[0068]

[0069] Secondary outcome probability The secondary identification results and secondary result probabilities reflect the statistics of the identification results of each sampling area of ​​the potato sample at each shooting angle. By performing multi-point sampling on the potato sample, the limitations of the spectral data of the local sampling points are avoided, which can better reflect the overall identification results of the potato sample and improve the accuracy of hyperspectral technology identification.

[0070] The aspect ratio γ is calculated according to the edge shape of the potato sample in the surface image of the potato sample, and then the average gray value of the entire area is calculated according to the gray value of each pixel point inside the edge. When the following conditions are met:

[0071] Secondary outcome probability The secondary identification result corresponding to the maximum value is Zhongshu No. 3, and its aspect ratio γ≤γ y , and the average gray value At this time, the final identification result is considered to be Zhongshu No. 3;

[0072] Secondary outcome probability The secondary identification result corresponding to the maximum value is the Atlantic Ocean, and its aspect ratio γ>γ y , and the average gray value At this time, it is believed that its final identification result is the Atlantic Ocean;

[0073] Secondary outcome probability The secondary identification result corresponding to the maximum value is Faureta, and its aspect ratio γ>γ y , and the average gray value At this time, the final identification result is considered to be Favorita;

[0074] Where HD1 and HD2 are the preset grayscale thresholds, γ y The specific values ​​of the preset aspect ratio threshold, grayscale threshold and aspect ratio threshold can be determined through a large number of potato images of different types when training the image recognition model, and can be manually corrected according to actual conditions.

[0075] This is because the shape of Zhongshu No. 3 is usually more regular, showing an oval shape, and the skin color is usually yellow or light yellow, so its gray value is in the corresponding color range, and the length-to-width ratio is relatively small, while the shapes of Atlantic and Favorita are both flatter than Zhongshu No. 3, so the length-to-width ratio of the two is relatively larger. At the same time, the skin color of Atlantic is usually light brown or light yellow, which is lighter than Zhongshu No. 3, so the gray value is also smaller, while the skin color of Favorita is generally light yellow or light pink, the lightest color, so the gray value is also the smallest. Potato shape and skin color are used to assist in identification and to determine the final result of the secondary identification result.

[0076] See also Figure 2 The present invention also provides a device for identifying potato varieties using hyperspectral technology, wherein the identification device adopts the above-mentioned identification method and comprises:

[0077] An image acquisition module, wherein the image acquisition module is used to acquire a surface image and a spectral image of a potato sample;

[0078] An image processing module, wherein the image processing module is used to perform image preprocessing on the surface image of the potato sample;

[0079] An image analysis module, the image analysis module is used to perform grid division and recognition on the surface image of the potato sample, and issue an alarm signal according to the recognition result;

[0080] A data processing module, the data processing module is used to collect spectral data in the spectral image of the potato sample, and generate a secondary identification result of the potato sample and a corresponding secondary result probability according to the spectral data;

[0081] An alarm module is used to receive an alarm signal and issue an alarm.

[0082] 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.

[0083] 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.

[0084] 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.

[0085] 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 method for identifying potato varieties using hyperspectral technology, characterized in that: The specific steps include: S1: collecting a surface image of a potato sample, using an image recognition model to detect the edge shape and grayscale value of the potato sample in the surface image, identifying the area where the eye exists in the surface image, generating an abnormality ratio for determining the image quality, and executing different subsequent steps according to the abnormality ratio; The step S1 further comprises: S101: collecting several groups of potato images, constructing an image recognition model based on deep learning, using a gradient algorithm to calculate the edge strength of each pixel in the image, obtaining multiple groups of strong edge points to jointly constitute the edge shape of the potato, and collecting the grayscale value of each pixel inside the edge, then dividing the potato images into a training set and a validation set and training the image recognition model so that it can identify the area with buds in the potato image; S102: taking the potato to be identified as a potato sample, collecting a surface image of the potato sample, preprocessing the surface image of the potato sample, and gridding the processed surface image; The surface image preprocessing includes brightness adjustment and size unification. When performing grid division, the surface image is evenly divided into two parts in the horizontal and vertical directions. grids, so that each grid contains a surface image of a portion of the potato sample; S103: using an image recognition model to sequentially perform image analysis on several groups of grids in the surface image, identifying the eyes of the surface images in different grids, marking the grids with eyes as abnormal grids, and marking the rest as normal grids, counting the abnormal proportion of the abnormal grids in the total grids, and comparing the abnormal proportion with a preset proportion threshold, and executing different steps according to the comparison result; Image recognition models for image analysis of grids include convolutional neural network models, YOLOv5 models, and gradient edge detection models; The number of abnormal grids is calibrated as , abnormal proportion , subscript Indicates the number of repeated shots. ,when hour, , where represents the ratio threshold, Indicates the number of alarms; S2: When the abnormal ratio is greater than a preset ratio threshold, an alarm is issued and the shooting angle of the potato sample is adjusted at a uniform speed to re-collect the surface image; when the abnormal ratio is less than the preset ratio threshold, the area without buds in the surface image is used as the sampling area; S3: Performing hyperspectral detection on the actual position of the potato skin corresponding to each sampling area, collecting spectral data contained in the spectral image of each sampling area, and jointly performing variety identification based on the edge shape and grayscale value of the potato sample to generate an identification result and a corresponding result probability; The identification result of each sampling area is marked as the regional identification result. The regional identification results correspond to the spectral data of each sampling area one by one. , where Indicates the subcategory in the regional identification result, the superscript Indicates the number of the subcategory. In the regional identification result, the sub-probability corresponding to each subcategory is marked as , , and the sub-categories correspond to the sub-probabilities one by one, and the set of regional identification results of all sampling areas under the same number of shooting times is calibrated as one identification result , and then calculate the sub-probability corresponding to the sub-category in the first identification result according to the sub-probability corresponding to the sub-category in the regional identification result , the calculation formula is: Divide the sub-probabilities corresponding to the sub-categories in all the primary identification results into a set, and mark the set as the primary result probability , ; S4: Repeat steps S1 to S3 times, count the number of alarms issued, and generate a The error coefficient of the first identification result of the potato sample is combined, and the first identification result is weighted by using the error coefficient to generate a second identification result and a second result probability, and finally a final identification result is generated according to the second identification result, the second result probability, the edge shape and the gray value; The logic for generating the final identification result is: Generate an error coefficient corresponding to the identification result based on the number of alarms and the abnormal ratio , calculated as: Then, the sub-probabilities in the probability of a result are weighted according to the error coefficient to generate several groups of weighted sub-probabilities. , and combine several groups of weighted sub-probabilities into a secondary outcome probability , weighted sub-probability The calculation formula is: Secondary outcome probability ; Calculate the aspect ratio of the potato sample based on its edge shape in the potato sample surface image , and then calculate the average gray value of the entire area based on the gray value of each pixel inside its edge , when the following conditions are met: Secondary outcome probability The secondary identification result corresponding to the maximum value is Zhongshu No. 3, and its aspect ratio , and the average gray value At this time, the final identification result is considered to be Zhongshu No. 3; Secondary outcome probability The secondary identification result corresponding to the maximum value is the Atlantic Ocean, and its aspect ratio , and the average gray value , at this time, it is believed that the final identification result is the Atlantic Ocean; Secondary outcome probability The secondary identification result corresponding to the maximum value is Favorita, and its aspect ratio , and the average gray value , at this time, the final identification result is considered to be Favorita; In the formula , are all preset grayscale thresholds. is the preset aspect ratio threshold.

2. A device for identifying potato varieties using hyperspectral technology, characterized in that: The device adopts the method for identifying potato varieties using hyperspectral technology as described in claim 1, comprising: An image acquisition module, wherein the image acquisition module is used to acquire a surface image and a spectral image of a potato sample; An image processing module, wherein the image processing module is used to perform image preprocessing on the surface image of the potato sample; An image analysis module, the image analysis module is used to perform grid division and recognition on the surface image of the potato sample, and issue an alarm signal according to the recognition result; A data processing module, the data processing module is used to collect spectral data in the spectral image of the potato sample, and generate a secondary identification result of the potato sample and a corresponding secondary result probability according to the spectral data; An alarm module is used to receive an alarm signal and issue an alarm.

Citation Information

Patent Citations

  • Rapid apple variety identification method based on hyperspectral imaging

    CN106290238A

  • Germinated potato image recognition method based on improved yolov5 model

    CN114120037A