Visual inspection method for seed quality in soybean breeding

Through surface shriveling evaluation and gradual degree analysis, the diseased areas of soybean seeds are identified, which solves the reliability and accuracy of seed quality detection in soybean breeding, and improves the scientificity and accuracy of the detection results.

CN120198900BActive Publication Date: 2025-08-22JILIN ACAD OF AGRI SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510678665.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-26
Publication Date
2025-08-22
Estimated Expiration
2045-05-26

AI Technical Summary

Technical Problem

The reliability and accuracy of seed quality detection results in existing soybean breeding are low, the manual evaluation efficiency is low, and it is easily disturbed by subjective factors, and visual detection technology is prone to misjudging the bean umbilical as a disease or defect.

Method used

By identifying the surface shriveling evaluation and gradient degree of soybean seeds in the target area, using gradient amplitude, neighborhood texture, grayscale value and color value for clustering, the disease scores of suspected feature areas are determined, and the bean umbilical interference is eliminated, and the detection accuracy is improved.

Benefits of technology

The quantitative evaluation of the surface shriveling of soybean seeds is achieved, and the disease characteristics and interference factors are scientifically and reliably distinguished, which improves the reliability and accuracy of seed quality detection and avoids misjudgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120198900B_ABST
    Figure CN120198900B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing technology, and more specifically to a method for visually inspecting seed quality for soybean breeding. The method comprises: identifying target regions from a target image, each target region including a soybean seed; determining a surface shriveling evaluation of the soybean seeds in the target region; clustering all characteristic pixels of the soybean seeds in the target region according to their color values ​​to obtain multiple clusters, with each cluster serving as a suspected characteristic region; determining a degree of gradient in the suspected characteristic region; and determining a disease score for the suspected characteristic region based on the surface shriveling evaluation and the gradient. If the disease score is greater than a first threshold, the suspected characteristic region is determined to be an actual soybean seed disease. Thus, the present invention improves the reliability and accuracy of seed quality inspection results for soybean breeding.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a seed quality visual detection method for soybean breeding. Background Art

[0002] In agricultural production, soybeans are an important food and cash crop. Their yield, stress resistance, and market value depend largely on seed quality. High-quality seeds ensure greater crop adaptability during growth, thereby increasing yields and meeting growing market demand. For this reason, testing soybean seed quality has become a critical step in soybean breeding. Traditional seed quality assessment has relied primarily on manual observation. Breeders rely on visual inspection and experience to assess characteristics such as seed appearance, size, and plumpness. However, this approach has significant drawbacks. Firstly, manual labor requires significant time and effort, resulting in low efficiency. Secondly, manual evaluation is susceptible to subjective factors, and different individuals use varying criteria. This results in inaccurate and inconsistent evaluation results, seriously impacting the quality and efficiency of soybean breeding.

[0003] In some scenarios, the rapid development of computer vision, image processing, and artificial intelligence technologies has led to the emergence of vision-based seed quality inspection technology. This technology uses high-precision cameras to capture high-resolution images of soybean seeds. Advanced image processing algorithms then preprocess, extract features, and classify these images. This allows for accurate seed quality assessment, significantly improving inspection efficiency. However, in practical applications, visual inspection technology also faces challenges. For example, the navel, a natural characteristic of soybean seeds, differs significantly from the rest of the seed in terms of morphology, color, and texture. During visual inspection, these differences can easily be misidentified as disease or defects, leading to errors in seed classification and assessment, and impacting the reliability and accuracy of seed quality inspection results for soybean breeding. Summary of the Invention

[0004] In order to solve the technical problem of low reliability and accuracy of seed quality detection results in soybean breeding, the present invention aims to provide a seed quality visual detection method for soybean breeding. The technical solution adopted is as follows:

[0005] In a first aspect, an embodiment of the present invention provides a seed quality visual inspection method for soybean breeding, comprising: identifying a target area from a target image, each target area including a soybean seed; determining a surface shriveling evaluation of the soybean seeds in the target area based on the gradient amplitude of each pixel point in the target area, the variance of the gradient amplitude of all neighboring pixels in the neighborhood of each pixel point, the maximum value of the angle between the gradient directions of all neighboring pixels in the neighborhood of each pixel point, and the grayscale value of each pixel point in the target area; clustering all characteristic pixel points of the soybean seeds in the target area according to the color values ​​of the characteristic pixel points of the soybean seeds in the target area to obtain multiple clusters, each cluster being a suspected characteristic area; determining a gradient degree of the suspected characteristic area based on the centroid characteristic pixel point of the suspected characteristic area, the gradient amplitude of the first edge pixel point of the suspected characteristic area, and the distance between each first edge pixel point and the centroid characteristic pixel point; determining a disease score of the suspected characteristic area based on the surface shriveling evaluation and the gradient degree, and determining that the suspected characteristic area is an actual disease of the soybean seed when the disease score is greater than a first threshold.

[0006] Optionally, determining the surface shriveling evaluation of soybean seeds in the target area based on the gradient amplitude of each pixel in the target area, the variance of the gradient amplitude of all neighboring pixels in the neighborhood of each pixel, the maximum value of the angle between the gradient directions of all neighboring pixels in the neighborhood of each pixel, and the grayscale value of each pixel in the target area includes: determining the neighborhood texture of each pixel in the target area based on the gradient amplitude of each pixel in the target area, the variance of the gradient amplitude of all neighboring pixels in the neighborhood of each pixel, and the maximum value of the angle between the gradient directions of all neighboring pixels in the neighborhood of each pixel; determining the surface shriveling evaluation of soybean seeds in the target area based on the variance of the grayscale values ​​of all pixels in the target area, the grayscale value of each pixel in the target area, the neighborhood texture, and the first average value of the difference between all two adjacent edge chain codes in the edge chain code sequence of the target area.

[0007] Optionally, determining the neighborhood texture condition of each pixel point in the target area based on the gradient amplitude of each pixel point in the target area, the variance of the gradient amplitude of all neighboring pixel points in the neighborhood of each pixel point, and the maximum value of the angle between the gradient directions of all neighboring pixel points in the neighborhood of each pixel point includes: determining a first ratio between the gradient amplitude of each pixel point in the target area and the variance of the gradient amplitude of all neighboring pixel points in the neighborhood of each pixel point and the sum of a preset anti-zero parameter; and determining a first product between the first ratio and the maximum value of the angle as the neighborhood texture condition of each pixel point.

[0008] Optionally, determining the surface shriveling evaluation of soybean seeds in the target area based on the variance of the grayscale values ​​of all pixels in the target area, the grayscale values ​​of each pixel in the target area, the neighborhood texture, and the first average value of the difference between all two adjacent edge chain codes in the edge chain code sequence of the target area includes: determining a second ratio between the neighborhood texture and the grayscale values ​​of each pixel in the target area, and a second product between the second ratio and the first average value; superimposing each second product to obtain a first superimposed value; and determining a third product between the variance of the grayscale values ​​of all pixels in the target area, the first superimposed value, and the first average value as the surface shriveling evaluation of soybean seeds in the target area.

[0009] Optionally, all characteristic pixel points of the soybean seeds in the target area are clustered according to the color values ​​of the characteristic pixel points of the soybean seeds in the target area to obtain multiple clusters, including: using the Otsu method to convert the target area into a binary image, and performing denoising preprocessing on the binary image to obtain multiple characteristic pixel points; correcting the Euclidean distance between each characteristic pixel point according to the difference between the color values ​​of each characteristic pixel point of the soybean seeds in the target area to obtain a corrected cluster distance; clustering all characteristic pixel points of the soybean seeds in the target area based on the corrected cluster distance to obtain multiple clusters.

[0010] Optionally, determining the degree of gradient of the suspected feature area according to the centroid feature pixel point of the suspected feature area, the gradient amplitude of the first edge pixel point of the suspected feature area, and the distance between each first edge pixel point and the centroid feature pixel point includes: determining the vector pointing from the centroid feature pixel point of the suspected feature area to each first edge pixel point of the suspected feature area as the edge ray segment of each first edge pixel point; when the edge of the suspected feature area coincides with the edge of the soybean seed in the target area, selecting the sum vector of the vectors pointing from all the second edge pixel points of the coincident edge to the centroid feature pixel point as the main direction vector of the suspected feature area; determining the angle between the main direction vector and the edge ray segment as the first weight, and ... The reference weight of the edge ray segment is determined by the first maximum value of the gradient amplitudes of the first edge pixel points corresponding to each edge ray segment of the region; when the edge of the suspected feature region does not coincide with the edge of the soybean seeds in the target region, the distance between the first edge pixel point and the centroid feature pixel point is selected as the second weight, and the reference weight of the edge ray segment is determined according to the second weight and the maximum distance between the first edge pixel point and the centroid feature pixel point corresponding to each edge ray segment; the gradient degree of the suspected feature region is determined by using the reference weight, the second maximum value and the minimum value of the gradient amplitudes of all pixel points on the edge ray segment of the suspected feature region, and the second average value of the gradient amplitudes of all pixel points on the edge ray segment of the suspected feature region.

[0011] Optionally, determining the reference weight of the edge ray segment based on the first weight and the first maximum value of the gradient amplitudes of the first edge pixel points corresponding to each edge ray segment of the suspected feature area includes: calculating a third ratio between the first weight and a predetermined value, and a fourth ratio between the gradient amplitude of the first edge pixel points corresponding to each edge ray segment and the first maximum value; calculating a fourth product between the third ratio and the fourth ratio; and performing inverse proportional normalization on the fourth product to obtain the reference weight.

[0012] Optionally, determining the reference weight of the edge ray segment based on the second weight and the maximum distance between the first edge pixel point corresponding to each edge ray segment and the centroid feature pixel point includes: calculating a fifth ratio between the second weight and the maximum distance; and performing inverse proportional normalization on the fifth ratio to obtain a reference weight.

[0013] Optionally, the degree of gradient of the suspected feature area is determined using the reference weight, the second maximum and minimum amplitudes of the gradient amplitudes of all pixels on the edge ray segment of the suspected feature area, and the second average value of the gradient amplitudes of all pixels on the edge ray segment of the suspected feature area, including: calculating the first difference between the second maximum and minimum amplitudes, and the fifth product between the first difference, the second average value, and the reference weight; and superimposing the fifth products of the suspected feature area to obtain the degree of gradient.

[0014] Optionally, determining the disease score of the suspected characteristic area based on the surface shrinkage evaluation and the gradient degree includes: calculating the sixth product between the surface shrinkage evaluation and the gradient degree; and normalizing the sixth product to obtain the disease score of the suspected characteristic area.

[0015] The present invention has the following beneficial effects: first, a target area is identified from a target image, each target area includes a soybean seed; then, according to the gradient amplitude of each pixel point in the target area, the variance of the gradient amplitude of all neighboring pixel points in the neighborhood of each pixel point, the maximum value of the angle between the gradient directions of all neighboring pixel points in the neighborhood of each pixel point, and the grayscale value of each pixel point in the target area, the surface shriveling evaluation of the soybean seed in the target area is determined; and according to the color value of the characteristic pixel point of the soybean seed in the target area, all the characteristic pixel points of the soybean seed in the target area are clustered to obtain multiple clusters, and each cluster cluster is used as a suspected characteristic area; secondly, according to the centroid characteristic pixel point of the suspected characteristic area, the gradient amplitude of the first edge pixel point of the suspected characteristic area, and the distance between each first edge pixel point and the centroid characteristic pixel point, the gradient degree of the suspected characteristic area is determined; and based on the surface shriveling evaluation and the gradient degree, the disease score of the suspected characteristic area is determined; when the disease score is greater than a first threshold value, the suspected characteristic area is determined to be an actual disease of the soybean seed.

[0016] In this way, the embodiment of the present invention can first quantitatively evaluate the surface shriveling of soybean seeds, thereby providing an objective basis for seed quality screening. It can further optimize the clustering algorithm based on the color values ​​of the characteristic pixel points of the soybean seeds in the target area, obtain all suspected characteristic areas, and then effectively distinguish the degree of gradient between disease characteristics and interference factors. Finally, the disease score of the suspected characteristic area is determined by the surface shriveling evaluation and gradient degree of the soybean seeds, which provides a scientific and reliable basis for the disease degree assessment of the soybean seeds. When the disease score is greater than the first threshold, the suspected characteristic area is determined to be the actual disease of the soybean seeds, rather than the soybean navel characteristic of the soybean seeds. This avoids the problem of errors in seed classification and evaluation, and improves the reliability and accuracy of seed quality detection results in soybean breeding. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1 A flowchart of a seed quality visual inspection method for soybean breeding provided by one embodiment of the present invention;

[0019] Figure 2 A schematic diagram of an image of qualified soybean seeds provided by one embodiment of the present invention;

[0020] Figure 3 A schematic diagram of an image of diseased soybean seeds provided by one embodiment of the present invention;

[0021] Figure 4 A schematic diagram of the structure of a seed quality visual inspection system for soybean breeding provided by one embodiment of the present invention. DETAILED DESCRIPTION

[0022] To further illustrate the technical means and effectiveness of the present invention in achieving its intended objectives, the following, in conjunction with the accompanying drawings and preferred embodiments, describes in detail a method for visually inspecting seed quality for soybean breeding, including its specific implementation, structure, features, and effectiveness. In the following description, references to "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.

[0023] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0024] The specific scheme of the seed quality visual detection method for soybean breeding provided by the present invention is described in detail below with reference to the accompanying drawings.

[0025] Example 1:

[0026] See also Figure 1 , which shows a flow chart of a seed quality visual detection method for soybean breeding provided by one embodiment of the present invention, comprising:

[0027] S101, identifying target areas from a target image, each target area including a soybean seed.

[0028] Specifically, an embodiment of the present invention implements quality inspection of soybean seeds for breeding based on computer vision. First, a sample of soybean seeds to be used for breeding is transferred to the detection platform. The platform is slightly shaken to ensure that the seeds are evenly distributed to avoid one-sided detection caused by stacking. Subsequently, images are collected directly above the detection platform and saved to a designated storage medium. At the same time, relevant detection parameters and conditions are recorded for subsequent data processing, analysis, and result verification to ensure the accuracy and comprehensiveness of the test results. The collected initial image is then preprocessed, denoised, enhanced, and other operations are performed to obtain a target image to reduce noise interference and highlight the detailed features of the soybean seeds.

[0029] Furthermore, the present invention uses a target detection algorithm to process the soybean seed image on the conveyor belt. This algorithm traverses the entire target image to identify and locate each soybean seed object. The recognition process generates target regions of the soybean seeds, each corresponding to a soybean seed. Each target region is marked with a bounding box to clearly define the location and size of each soybean seed object. This labeling method provides an accurate data foundation for subsequent image analysis and counting.

[0030] S102, determining the surface shriveling evaluation of soybean seeds in the target area based on the gradient amplitude of each pixel point in the target area, the variance of the gradient amplitude of all neighboring pixel points in the neighborhood of each pixel point, the maximum value of the angle between the gradient directions of all neighboring pixel points in the neighborhood of each pixel point, and the grayscale value of each pixel point in the target area.

[0031] Specifically, during the growth process, soybean seeds may be attacked by pathogenic microorganisms such as fungi, bacteria, viruses, etc., which may cause soybean seeds to become diseased and damaged. For example, Figure 2 and Figure 3 As shown, Figure 2 This is a schematic diagram of an image of a qualified soybean seed provided by one embodiment of the present invention. Figure 3 This is a schematic diagram of an image of diseased soybean seeds provided by one embodiment of the present invention. Figure 2 and Figure 3 As can be seen, the loss of moisture in diseased soybean seeds causes wrinkles and pits on the surface, and the seeds appear shriveled overall. This results in an irregular, angular outline. Qualified soybean seeds, on the other hand, have relatively rounded outlines, and the shriveled areas often correspond to a shadowed area with minimal grayscale. In the target image, the surface shriveling rating of each soybean seed is determined based on the texture distribution of the soybean seed pixels and the changes in the edge chain code within each target region.

[0032] Further, as an optional embodiment of the present invention, determining the surface shriveling evaluation of soybean seeds in the target area according to the gradient amplitude of each pixel in the target area, the variance of the gradient amplitude of all neighboring pixels in the neighborhood of each pixel, the maximum value of the angle between the gradient directions of all neighboring pixels in the neighborhood of each pixel, and the grayscale value of each pixel in the target area includes: determining the neighborhood texture of each pixel in the target area according to the gradient amplitude of each pixel in the target area, the variance of the gradient amplitude of all neighboring pixels in the neighborhood of each pixel, and the maximum value of the angle between the gradient directions of all neighboring pixels in the neighborhood of each pixel; determining the surface shriveling evaluation of soybean seeds in the target area according to the variance of the grayscale values ​​of all pixels in the target area, the grayscale value of each pixel in the target area, the neighborhood texture, and the first average value of the difference between all two adjacent edge chain codes in the edge chain code sequence of the target area.

[0033] Specifically, the neighborhood of a pixel point can be a 6-neighborhood or an 8-neighborhood, etc., which can be determined according to actual conditions, and the embodiments of the present invention are not limited here. The edge chain code sequence of the target area is a coding method for representing the boundary of the target area, which records the direction from one boundary pixel point to the next adjacent boundary pixel point. Among them, as an optional embodiment of the present invention, according to the gradient amplitude of each pixel point in the target area, the variance of the gradient amplitude of all neighboring pixel points in the neighborhood of each pixel point, and the maximum value of the angle between the gradient directions of all neighboring pixel points in the neighborhood of each pixel point, the neighborhood texture of each pixel point in the target area is determined, including: determining the first ratio between the gradient amplitude of each pixel point in the target area and the variance of the gradient amplitude of all neighboring pixel points in the neighborhood of each pixel point and the sum of the preset anti-zero parameter; determining the first product between the first ratio and the maximum value of the angle as the neighborhood texture of each pixel point. In this embodiment, the preset anti-zero parameter is 0.01. In specific applications, the implementer can set it according to specific circumstances.

[0034] Specifically, the embodiment of the present invention uses the following formula to calculate the neighborhood texture:

[0035]

[0036] In the above formula, Indicates the target area The neighborhood texture of each pixel. Indicates the target area The gradient magnitude of each pixel. Indicates the target area The variance of the gradient amplitude of all neighboring pixels in the neighborhood of a pixel. It is the preset anti-zero parameter. Indicates the target area The maximum value of the angle between the gradient directions of all pixels in the neighborhood of a pixel, where the angle between the gradient directions refers to the angle between the gradient directions of every two pixels in the neighborhood. Indicates the target area The angle between the gradient directions of pixels in the neighborhood of a pixel. This reflects the gradient behavior within a pixel's neighborhood. A larger pixel's gradient amplitude and a smaller gradient variance indicate a richer texture in the pixel's neighborhood. Soybean seed disease manifests as pits on the surface, surrounded by a rich gradient variation. The greater the difference in gradient direction within a pixel's neighborhood, the more pronounced the pixel's texture. A larger variance in the grayscale values ​​of all pixels within a target area indicates a more complex grayscale distribution within the target area, and a greater likelihood of wrinkles caused by dryness.

[0037] Furthermore, as an optional embodiment of the present invention, determining the surface shriveling evaluation of soybean seeds in the target area based on the variance of the grayscale values ​​of all pixels in the target area, the grayscale values ​​of each pixel in the target area, the neighborhood texture conditions, and the first average value of the difference between all two adjacent edge chain codes in the edge chain code sequence of the target area includes: determining a second ratio between the neighborhood texture conditions and the grayscale values ​​of each pixel in the target area, and a second product between the second ratio and the first average value; superimposing each second product to obtain a first superimposed value; and determining the third product between the variance of the grayscale values ​​of all pixels in the target area, the first superimposed value, and the first average value as the surface shriveling evaluation of soybean seeds in the target area.

[0038] Specifically, the embodiment of the present invention uses the following formula to calculate the surface shriveling evaluation of soybean seeds:

[0039]

[0040] In the above formula, Indicates the evaluation of the surface shriveling of soybean seeds. Represents the variance of the grayscale values ​​of all pixels in the target area. Indicates the first The gray value of a pixel. The first average value of the difference between all two adjacent edge chain codes in the edge chain code sequence of the target area. Indicates the target area The neighborhood texture of pixels. n represents the number of pixels in the target area. In order to reflect the surface dryness evaluation of soybean seeds based on the grayscale and neighborhood texture of all pixels, The larger the value, the smaller the grayscale of the pixel and the greater the neighborhood texture, which better reflects the surface shriveling of the soybean seeds. The larger it is, the greater the turning point of the edge of the current target area is, that is, the more irregular the edge is, and the higher the surface shriveling evaluation of the soybean seeds is.

[0041] S103 , clustering all characteristic pixel points of the soybean seeds in the target area according to the color values ​​of the characteristic pixel points of the soybean seeds in the target area to obtain a plurality of clusters, each cluster being a suspected characteristic area.

[0042] Specifically, the color and characteristics of the disease vary depending on the type of pathogen and the degree of infection, often forming dark patches on the surface of soybean seeds. However, in the structure of soybean seeds, the navel is typically located in the depression at the end of the radicle on the ventral surface of the soybean seed, and is a prominent mark on the soybean seed. The navels of some qualified soybean seeds may also exhibit similar dark features, interfering with the accurate identification of disease characteristics. Because the edge of the navel of a soybean seed is often more clearly defined at the boundary with the soybean body, that is, the transition is significant, and according to the growth process of the disease, it usually starts from a local point and gradually spreads outward, the edge of the disease will exhibit a color gradient. Therefore, when identifying disease characteristics, the embodiments of the present invention eliminate the interference of the navel based on the gradient characteristics of the edge of the disease area.

[0043] Furthermore, as an optional embodiment of the present invention, all characteristic pixel points of the soybean seeds in the target area are clustered according to the color values ​​of the characteristic pixel points of the soybean seeds in the target area to obtain multiple clusters, including: using the Otsu method to convert the target area into a binary image, and performing denoising preprocessing on the binary image to obtain multiple characteristic pixel points; correcting the Euclidean distance between each characteristic pixel point according to the difference between the color values ​​of each characteristic pixel point of the soybean seeds in the target area to obtain a corrected cluster distance; clustering all characteristic pixel points of the soybean seeds in the target area based on the corrected cluster distance to obtain multiple clusters.

[0044] Specifically, the embodiment of the present invention uses the Otsu method to perform threshold segmentation, thereby converting each target area into a binary image, performing denoising preprocessing on the binary image, and obtaining a number of characteristic pixel points. Since the surface of soybean seeds in the same target area may present multiple different disease characteristics, or the disease characteristics exist in the bean navel bordering and overlapping, the embodiment of the present invention divides all characteristic pixel points according to the color values ​​of the several characteristic pixel points of the threshold segmentation result to obtain a number of suspected characteristic areas. Specifically, the embodiment of the present invention obtains the values ​​of all characteristic pixel points in the RGB channel, and Cluster all the characteristic pixels of the target seed using the modified clustering distance to obtain several clusters, each of which is a suspected characteristic region. Respectively represent the differences between the R value, G value, and B value of the pixel in the RGB channel. Represents the Euclidean distance between feature pixels.

[0045] S104, determining the degree of gradient of the suspected feature region according to the centroid feature pixel point of the suspected feature region, the gradient amplitude of the first edge pixel points of the suspected feature region, and the distance between each first edge pixel point and the centroid feature pixel point.

[0046] Specifically, since symptoms of bean navel and rotten beans often appear in the segmentation results, it is necessary to further screen and identify all suspected feature regions based on the distinguishing features of gradients. In a suspected feature region, if a portion of the disease is present in the image, the edge of the soybean seed is not the actual edge of the disease. In other words, the actual edge of the disease should be on the side that contacts the detection platform and is not captured by the camera. In this case, the suspected feature region in the current soybean seed image does not meet the requirements of having gradient characteristics at all edge points.

[0047] Furthermore, as an optional embodiment of the present invention, determining the degree of gradual change of the suspected feature area according to the centroid feature pixel point of the suspected feature area, the gradient amplitude of the first edge pixel point of the suspected feature area, and the distance between each first edge pixel point and the centroid feature pixel point includes: determining the vector from the centroid feature pixel point of the suspected feature area to each first edge pixel point of the suspected feature area as the edge ray segment of each first edge pixel point; when the edge of the suspected feature area coincides with the edge of the soybean seed in the target area, selecting the sum vector of the vectors from all the second edge pixel points of the coincident edge to the centroid feature pixel point as the main direction vector of the suspected feature area; determining the angle between the main direction vector and the edge ray segment as the first weight, and determining the angle between the main direction vector and the edge ray segment according to the first weight. The reference weight of the edge ray segment is determined by the weight and the first maximum value of the gradient amplitudes of the first edge pixel points corresponding to each edge ray segment of the suspected feature area; when the edge of the suspected feature area does not coincide with the edge of the soybean seeds in the target area, the distance between the first edge pixel point and the centroid feature pixel point is selected as the second weight, and the reference weight of the edge ray segment is determined according to the second weight and the maximum distance between the first edge pixel point and the centroid feature pixel point corresponding to each edge ray segment; the gradient degree of the suspected feature area is determined by using the reference weight, the second maximum value and the minimum value of the gradient amplitudes of all pixels on the edge ray segment of the suspected feature area, and the second average value of the gradient amplitudes of all pixels on the edge ray segment of the suspected feature area.

[0048] Specifically, the embodiment of the present invention selects the centroid feature pixel point of each suspected feature area, obtains the vector of the centroid feature pixel point of each suspected feature area pointing to each first edge pixel point of the suspected feature area, and records it as the edge ray segment of each first edge pixel point. suspected feature area, when the When the edge of the suspected feature area coincides with the edge of the soybean seed in the target area, the sum of the vectors of all the second edge pixels of the coincident edge pointing to the centroid feature pixel of the soybean seed is selected as the first vector. The main direction vector of the suspected feature area reflects the possible disease spread direction of the current suspected feature area. The smaller the angle between the edge ray of the suspected feature area and the main direction vector, the more desirable the gradient feature of the first edge pixel corresponding to the current edge ray segment is, that is, the greater the weight. When the edge of the suspected feature area does not overlap with the edge of the soybean seeds in the target area, the distance between the first edge pixel and the centroid feature pixel is selected as the weight distribution standard. The closer the first edge pixel of the suspected feature area is to the centroid feature pixel of the soybean seeds in the target area, the more credible the gradient feature it reflects, and therefore the greater the weight assigned.

[0049] Furthermore, as an optional embodiment of the present invention, determining the reference weight of an edge ray segment based on the first weight and the first maximum value of the gradient amplitudes of the first edge pixel points corresponding to each edge ray segment of the suspected feature region includes: calculating a third ratio between the first weight and a predetermined value, and a fourth ratio between the gradient amplitude of the first edge pixel points corresponding to each edge ray segment and the first maximum value; calculating a fourth product between the third ratio and the fourth ratio; and performing inverse normalization on the fourth product to obtain the reference weight. Determining the reference weight of an edge ray segment based on the second weight and the maximum distance between the first edge pixel points corresponding to each edge ray segment and the centroid feature pixel point includes: calculating a fifth ratio between the second weight and the maximum distance; and performing inverse normalization on the fifth ratio to obtain the reference weight.

[0050] Specifically, the predetermined value in the embodiment of the present invention is , the embodiment of the present invention specifically uses the following formula to calculate the reference weight:

[0051]

[0052] In the above formula, Indicates the The first suspected feature area The reference weight of each edge ray segment. To judge the parameters, when the edge of the suspected feature area coincides with the edge of the soybean seed in the target area, If there is no overlap . Indicates the The first suspected feature area The gradient amplitude of the first edge pixel point corresponding to the edge ray segment. Indicates the The first maximum value among the gradient amplitudes of the first edge pixel points corresponding to the edge ray segments of the suspected feature areas. Indicates the The main direction vectors of the suspected feature regions. Indicates the The first The vectors corresponding to the edge ray segments. Represents the angle between the main direction vector and the edge ray segment, that is, the first weight. Indicates the The first The distance between the first edge pixel point corresponding to the edge ray segment and the centroid feature pixel point of the soybean seed is the second weight. Indicates the The maximum value of all distances between all first edge pixels of the suspected feature area and the centroid feature pixel of the soybean seed is the maximum distance. (-) indicates the inverse normalization function, which is used to or Perform inverse proportional normalization.

[0053] Among them, when The larger the The first suspected feature area The more significant the edge feature of the first edge pixel corresponding to the edge ray segment, the more likely it is to be the edge pixel of the soybean seed, and the smaller the weight of the corresponding edge ray segment. The larger the value, the more it reflects the current The first suspected feature area The larger the angle between the vector corresponding to each edge ray segment and the main direction vector, the greater the difference between it and the possible disease diffusion direction, and the smaller the reference weight.

[0054] Furthermore, an embodiment of the present invention reflects the gradient characteristics of the suspected feature area based on the gradient transformation of all edge ray segments of the suspected feature area, and determines the gradient degree of the suspected feature area in combination with the reference weight of the edge ray segment. As an optional embodiment of the present invention, the gradient degree of the suspected feature area is determined by using the reference weight, the second maximum amplitude and the minimum amplitude of the gradient amplitude of all pixel points on the edge ray segment of the suspected feature area, and the second average value of the gradient amplitude of all pixel points on the edge ray segment of the suspected feature area, including: calculating the first difference between the second maximum amplitude and the minimum amplitude, and the fifth product of the first difference, the second average value and the reference weight; and superimposing each fifth product of the suspected feature area to obtain the gradient degree.

[0055] Specifically, the embodiment of the present invention uses the following formula to calculate the degree of gradual change:

[0056]

[0057] In the above formula, Indicates the The gradient degree of a suspected feature area. Indicates the The first suspected feature area The reference weight of each edge ray segment. Indicates the The first suspected feature area The second maximum value of the gradient magnitudes of all pixels on the edge ray segment. Indicates the The first suspected feature area The minimum value of the gradient amplitude of all pixels on the edge ray segment, that is, the minimum amplitude. Indicates the The first suspected feature area The second average value of the gradient amplitudes of all pixels on the edge ray segment. Indicates the The number of edge ray segments in a suspected feature area.

[0058] in, The larger the value, and A larger value indicates a larger gradient amplitude and greater gradient amplitude difference on the current edge ray segment, which in turn indicates a more likely presence of a gradient feature. Furthermore, the maximum, minimum, and average values ​​of all gradient amplitudes in the above formula are determined without considering the gradient of the first edge pixel of the soybean seeds in the target region. This is because, on an edge ray segment, a larger gradient amplitude for a pixel is more consistent with a gradient feature. For soybean seeds in the target region, a smaller gradient amplitude for the first edge pixel is more likely to represent a gradient feature, while a larger gradient amplitude for the first edge pixel indicates a more significant grayscale change, meaning it is more likely to represent a soybean navel structure or a diseased area within the soybean edge.

[0059] S105, determining a disease score of the suspected characteristic region based on the surface shriveling evaluation and the gradient degree, and determining that the suspected characteristic region is actually diseased in the soybean seed when the disease score is greater than a first threshold.

[0060] Specifically, the higher the degree of gradient in a suspected characteristic region, the greater the likelihood that the suspected characteristic region is diseased. This is then combined with the suspected characteristic region's area and the surface shriveling evaluation of soybean seeds in the target region to determine a disease score for the suspected characteristic region. As an optional embodiment of the present invention, determining a disease score for a suspected characteristic region based on the surface shriveling evaluation and the degree of gradient includes: calculating a sixth product between the surface shriveling evaluation and the degree of gradient; and normalizing the sixth product to determine a disease score for the suspected characteristic region.

[0061] Specifically, the embodiment of the present invention uses the following formula to calculate the disease score of the suspected feature area:

[0062]

[0063] In the above formula, Indicates the Disease score of each suspected characteristic area. Surface shriveling evaluation of soybean seeds indicating target areas. Respectively represent The gradient degree of a suspected feature area. Represents the normalization function, which is used to Perform normalization processing.

[0064] For each suspected characteristic region, the disease score is quantitatively obtained based on the surface shriveling evaluation of the soybean seeds in the overall target area and the degree of gradient of the suspected characteristic region.

[0065] Furthermore, the first threshold can be set based on actual conditions; in the embodiment of the present invention, it is set to 0.6. For any suspected characteristic region in the target area, if the disease score is greater than 0.6, the suspected characteristic region is considered to be actually diseased. All soybean seeds on the detection platform are identified and analyzed according to the above data processing process, and the edge of the actual diseased region in each soybean seed is marked with a solid red line, making it more prominent and easier to detect. This enables visual inspection of seed quality for soybean breeding, ensuring that qualified soybean seeds are propagated and reducing losses.

[0066] The embodiment of the present invention can first quantitatively evaluate the surface shriveling of soybean seeds, thereby providing an objective basis for seed quality screening. It can further optimize the clustering algorithm based on the color values ​​of the characteristic pixel points of the soybean seeds in the target area, obtain all suspected characteristic areas, and then effectively distinguish the degree of gradient between disease characteristics and interference factors. Finally, the disease score of the suspected characteristic area is determined by the surface shriveling evaluation and gradient degree of the soybean seeds, which provides a scientific and reliable basis for the disease degree assessment of the soybean seeds. When the disease score is greater than the first threshold, the suspected characteristic area is determined to be the actual disease of the soybean seeds, rather than the soybean navel characteristic of the soybean seeds. This avoids the problem of errors in seed classification and evaluation, and improves the reliability and accuracy of seed quality detection results in soybean breeding.

[0067] Example 2:

[0068] Corresponding to the seed quality visual detection method for soybean breeding provided in the above embodiment, based on the same technical concept, an embodiment of the present invention further provides a seed quality visual detection system for soybean breeding, which is used to execute the seed quality visual detection method for soybean breeding. Figure 4 A schematic diagram of a seed quality visual inspection system for soybean breeding provided by another embodiment of the present invention is shown in FIG. Figure 4 The seed quality visual inspection system for soybean breeding may have relatively large differences due to different configurations or performances, and may include one or more processors 401 and memory 402, wherein the memory 402 is used to store computer programs that can be run on the processor 401, and the processor 401 is used to execute the programs stored in the memory 402 to achieve the above Figure 1The various steps in the method embodiment are described above. Memory 402 may be either transient or persistent storage. The application stored in memory 402 may include one or more modules (not shown), each of which may include a series of computer-executable instructions for a seed quality visual inspection system for soybean breeding.

[0069] Furthermore, the processor 401 can be configured to communicate with the memory 402 to execute a series of computer-executable instructions in the memory 402 on the soybean breeding seed quality visual inspection system. The soybean breeding seed quality visual inspection system can also include one or more power supplies 403, one or more wired or wireless network interfaces 404, one or more input / output interfaces 405, and one or more keyboards 406.

[0070] Specifically in this embodiment, the seed quality visual inspection system for soybean breeding includes a processor, a communication interface, a memory and a communication bus; wherein the processor, the communication interface and the memory communicate with each other through the bus; the memory is used to store computer programs; the processor is used to execute the programs stored in the memory to achieve the above Figure 1 The various steps in the method embodiment have the beneficial effects of the above method embodiments. To avoid repetition, the embodiments of the present invention will not be described again here.

[0071] It should be noted that the seed quality visual detection system for soybean breeding provided by the embodiment of the present invention and the seed quality visual detection method for soybean breeding provided by the embodiment of the present invention are based on the same application concept. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned seed quality visual detection method for soybean breeding, and has the same or similar beneficial effects, and the repetitions will not be repeated.

[0072] It should be noted that the order in which the embodiments of the present invention are described above is for illustrative purposes only and does not necessarily represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0073] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.

Claims

1. A method for visual inspection of seed quality for soybean breeding, characterized in that: The seed quality visual detection method for soybean breeding comprises: identifying target areas from the target image, each of the target areas including a soybean seed; Determining a surface shriveling evaluation of soybean seeds in the target area based on the gradient amplitude of each pixel in the target area, the variance of the gradient amplitudes of all neighboring pixels in the neighborhood of each pixel, the maximum value of the angles between the gradient directions of all neighboring pixels in the neighborhood of each pixel, and the grayscale value of each pixel in the target area; Clustering all characteristic pixel points of the soybean seeds in the target area according to the color values ​​of the characteristic pixel points of the soybean seeds in the target area to obtain a plurality of clusters, each cluster being a suspected characteristic area; determining a degree of gradient of the suspected feature region based on a centroid feature pixel point of the suspected feature region, a gradient amplitude of a first edge pixel point of the suspected feature region, and a distance between each first edge pixel point and the centroid feature pixel point; The disease score of the suspected characteristic region is determined based on the surface shriveling evaluation and the gradient degree. When the disease score is greater than a first threshold, the suspected characteristic region is determined to be an actual disease of the soybean seed.

2. The seed quality visual detection method for soybean breeding according to claim 1, characterized in that: Determining the surface shriveling evaluation of soybean seeds in the target area based on the gradient amplitude of each pixel in the target area, the variance of the gradient amplitudes of all neighboring pixels in the neighborhood of each pixel, the maximum value of the angles between the gradient directions of all neighboring pixels in the neighborhood of each pixel, and the grayscale value of each pixel in the target area includes: Determine the neighborhood texture of each pixel point in the target area according to the gradient amplitude of each pixel point in the target area, the variance of the gradient amplitudes of all neighboring pixel points in the neighborhood of each pixel point, and the maximum value of the angle between the gradient directions of all neighboring pixel points in the neighborhood of each pixel point; The surface shriveling evaluation of soybean seeds in the target area is determined based on the variance of the grayscale values ​​of all pixels in the target area, the grayscale value of each pixel in the target area, the neighborhood texture, and the first average value of the difference between all two adjacent edge chain codes in the edge chain code sequence of the target area.

3. The seed quality visual detection method for soybean breeding according to claim 2, characterized in that: Determining the neighborhood texture of each pixel point in the target area according to the gradient amplitude of each pixel point in the target area, the variance of the gradient amplitudes of all neighboring pixel points in the neighborhood of each pixel point, and the maximum value of the angle between the gradient directions of all neighboring pixel points in the neighborhood of each pixel point includes: Determine a first ratio between a gradient magnitude of each pixel point in the target area and a variance of the gradient magnitudes of all neighboring pixel points in a neighborhood of each pixel point and a sum of a preset anti-zero parameter; A first product of the first ratio and the maximum value of the angle is determined as the neighborhood texture condition of each pixel point.

4. The seed quality visual detection method for soybean breeding according to claim 2, characterized in that: Determining the surface shriveling evaluation of soybean seeds in the target area according to the variance of the grayscale values ​​of all pixels in the target area, the grayscale value of each pixel in the target area, the neighborhood texture, and a first average value of the difference between all two adjacent edge chain codes in the edge chain code sequence of the target area includes: Determine a second ratio between the neighborhood texture and the grayscale value of each pixel in the target area, and a second product between the second ratio and the first average value; superimposing each of the second products to obtain a first superimposed value; A third product of the variance of the grayscale values ​​of all pixels in the target area, the first superposition value, and the first average value is determined as a surface shriveling evaluation of the soybean seeds in the target area.

5. The seed quality visual detection method for soybean breeding according to claim 1, characterized in that: The clustering of all characteristic pixel points of the soybean seeds in the target area according to the color values ​​of the characteristic pixel points of the soybean seeds in the target area to obtain a plurality of clusters includes: The target area is converted into a binary image using the Otsu method, and the binary image is pre-processed to obtain a plurality of feature pixels; Correcting the Euclidean distance between the characteristic pixels according to the difference between the color values ​​of the characteristic pixels of the soybean seeds in the target area to obtain a corrected cluster distance; All characteristic pixel points of the soybean seeds in the target area are clustered based on the corrected clustering distance to obtain a plurality of clusters.

6. The seed quality visual detection method for soybean breeding according to any one of claims 1 to 5, characterized in that: The determining the degree of gradient of the suspected feature region according to the centroid feature pixel of the suspected feature region, the gradient amplitude of the first edge pixel of the suspected feature region, and the distance between each of the first edge pixel and the centroid feature pixel comprises: Determine that a vector pointing from the centroid feature pixel point of the suspected feature area to each first edge pixel point of the suspected feature area is an edge ray segment of each first edge pixel point; When the edge of the suspected feature area coincides with the edge of the soybean seeds in the target area, selecting the sum vector of the vectors of all second edge pixel points of the coincident edge pointing to the centroid feature pixel point as the feature direction vector of the suspected feature area; Determining an angle between the feature direction vector and the edge ray segment as a first weight, and determining a reference weight of the edge ray segment based on the first weight and a first maximum value of gradient amplitudes of first edge pixels corresponding to each edge ray segment of the suspected feature region; When the edge of the suspected feature area does not overlap with the edge of the soybean seeds in the target area, selecting the distance between the first edge pixel point and the centroid feature pixel point as a second weight, and determining the reference weight of the edge ray segment according to the second weight and the maximum distance between the first edge pixel point and the centroid feature pixel point corresponding to each edge ray segment; The degree of gradient of the suspected feature area is determined using the reference weight, the second maximum and minimum amplitudes of the gradient amplitudes of all pixels on the edge ray segment of the suspected feature area, and the second average value of the gradient amplitudes of all pixels on the edge ray segment of the suspected feature area.

7. The seed quality visual detection method for soybean breeding according to claim 6, characterized in that: The determining of the reference weight of the edge ray segment according to the first weight and a first maximum value among the gradient amplitudes of the first edge pixels corresponding to each edge ray segment of the suspected feature area includes: Calculating a third ratio between the first weight and a predetermined value, and a fourth ratio between the gradient amplitude of the first edge pixel point corresponding to each edge ray segment and the first maximum amplitude; calculating a fourth product between the third ratio and the fourth ratio; Perform inverse proportional normalization processing on the fourth product to obtain the reference weight.

8. The seed quality visual inspection method for soybean breeding according to claim 6, characterized in that: The determining of the reference weight of the edge ray segment according to the second weight and the maximum distance between the first edge pixel point corresponding to each edge ray segment and the centroid feature pixel point includes: calculating a fifth ratio between the second weight and the maximum distance; Perform inverse proportional normalization processing on the fifth ratio to obtain the reference weight.

9. The seed quality visual inspection method for soybean breeding according to claim 6, characterized in that: Determining the degree of gradual change of the suspected feature region by using the reference weight, the second maximum magnitude and the minimum magnitude of the gradient magnitudes of all pixels on the edge ray segment of the suspected feature region, and the second average magnitude of the gradient magnitudes of all pixels on the edge ray segment of the suspected feature region includes: calculating a first difference between the second maximum amplitude and the minimum amplitude, and a fifth product of the first difference, the second average value, and the reference weight; The fifth products of the suspected feature areas are superimposed to obtain the degree of gradual change.

10. The seed quality visual inspection method for soybean breeding according to claim 1, characterized in that: Determining the disease score of the suspected characteristic area based on the surface shrinkage evaluation and the gradient degree includes: calculating a sixth product between the surface shrinkage evaluation and the degree of gradient; The sixth product is normalized to obtain a disease score of the suspected characteristic area.

Citation Information

Patent Citations

  • Redirected image quality information processing method and system based on instance segmentation

    CN111028195A

  • X-ray-based food foreign matter traceless rapid detection method

    CN114994102A