Seed selection method and system based on machine vision

By calculating and using the best edge feature values ​​to segment the image, the oversegment problem caused by the watershed algorithm is solved, and the accuracy and efficiency of rice seed detection are improved.

CN119672042AActive Publication Date: 2025-03-21RICE RES INST GUANGDONG ACADEMY OF AGRI SCI +1

Patent Information

Application Number
CN202510199209.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-24
Publication Date
2025-03-21
Estimated Expiration
2045-02-24

AI Technical Summary

Technical Problem

When using the watershed algorithm to segment images, oversegment problems are prone to occur, which affects the accuracy of rice seed detection results.

Method used

By obtaining the grayscale image of the seed, extracting the seed area, calculating the internal eigenvalue and initial edge eigenvalue of each pixel point on the edge line, using the best edge eigenvalue instead of the grayscale value in the watershed algorithm, image segmentation is performed to avoid oversegment.

Benefits of technology

It effectively avoids oversegmentation, improves the integrity of rice seed images, and improves the work efficiency and accuracy of seed selection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119672042A_ABST
    Figure CN119672042A_ABST
Patent Text Reader

Abstract

The invention relates to the field of seed selection, in particular to a seed selection method and system based on machine vision, and the method comprises the steps: obtaining a gray image of a seed, extracting a seed region in the gray image, the seed region comprising a plurality of first sub-regions, and selecting any pixel point in the first sub-regions as a seed point; edge detection is carried out on the grayscale image to obtain a plurality of edge lines, an internal characteristic value and an initial edge characteristic value of each pixel point on the edge lines are calculated, the initial characteristic value is in negative correlation with the internal characteristic value, and the initial edge characteristic value is updated to obtain an optimal edge characteristic value; according to the optimal edge feature value of each pixel point on the edge line, utilizing a watershed algorithm to segment the grayscale image to obtain a segmented image; and inputting the segmented image into the detection model to obtain the quality grade of the seed. According to the method, the over-segmentation phenomenon can be avoided in the segmentation process, and the working efficiency and accuracy of seed selection are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of seed selection, and in particular to a seed selection method and system based on machine vision. Background Art

[0002] Seed selection usually refers to the process of selecting high-quality, uniform-sized, and pest-free seeds from a batch of seeds through certain methods and equipment. Seed screening includes many ways, such as screening by seed size and seed weight. When screening rice seeds, by taking pictures of the rice seeds, extracting images of the rice seed area, and inputting the images of the rice seed area into the convolutional neural network model, the quality of the rice seeds can be tested, for example, the fullness of the rice seeds, the integrity of the rice seeds, and whether there are pests and diseases. When extracting the rice seed area, image segmentation technology is needed to separate the rice seed area from the background area to ensure the accuracy of the rice seed detection results.

[0003] A Chinese patent application document with publication number CN111738256A discloses a composite material CT image segmentation processing method based on an improved watershed algorithm and morphological evaluation. The method includes: preprocessing the original image to enhance its local features, obtaining initial marking points through morphological processing and distance transformation, and then pre-segmenting the global image using an adaptive h-value selection algorithm and a watershed algorithm; then evaluating the effectiveness of each connected area in the segmented mark through a regional effectiveness index, adaptively selecting local h values ​​and segmenting with a watershed algorithm for areas whose effectiveness is below a set standard, and iterating until almost all connected areas meet the effectiveness index requirements, thereby obtaining the final segmentation result of the algorithm.

[0004] In the related art, the watershed algorithm can be used to segment the rice seed area in the image. However, the internal edge line is formed at the intersection of the husks on the surface of the rice seeds. The internal edge line of the rice seeds has similar characteristics to the edge line of the rice seed contour. Therefore, when using the watershed algorithm to segment the image, over-segmentation problems are prone to occur, affecting the accuracy of the rice seed detection results. Summary of the invention

[0005] In order to solve the problem of over-segmentation when using a watershed algorithm to segment an image, the present invention provides a seed selection method and system based on machine vision.

[0006] In a first aspect, the present invention provides a seed selection method based on machine vision, which adopts the following technical solution: Obtaining a grayscale image of the seed, extracting a seed region in the grayscale image, wherein the seed region includes a plurality of first subregions, and selecting any pixel point in the first subregion as a seed point; Perform edge detection on the grayscale image to obtain multiple edge lines, calculate the internal eigenvalue and initial edge eigenvalue of each pixel on the edge line, the initial eigenvalue is negatively correlated with the internal eigenvalue, and update the initial edge eigenvalue to obtain the optimal edge eigenvalue; The grayscale image is segmented using the watershed algorithm according to the optimal edge feature value of each pixel on the edge line to obtain a segmented image; Input the segmented image into a preset detection model to obtain the quality grade of the seeds; The expression of the internal eigenvalue is: ; In the formula, Represents the internal eigenvalue of the jth edge pixel on the edge line, Represents the gradient value of the jth edge pixel on the edge line, Represents the grayscale difference between two pixels that are symmetrical to each other in the gradient direction of the j-th edge pixel on the edge line. represents the activation function, and n represents the preset correlation coefficient.

[0007] The optimal edge eigenvalue can reflect whether the corresponding edge pixel is a contour edge line pixel or an internal edge line pixel. The optimal edge eigenvalue replaces the grayscale value in the watershed algorithm. When segmenting the image, the interference caused by the internal edge line can be weakened. In the segmentation process, over-segmentation can be avoided, so that a complete rice seed image can be obtained, which improves the work efficiency and accuracy of seed selection.

[0008] Preferably, the method of selecting any pixel point in the first sub-region as a seed point is: The grayscale image is segmented using the Otsu method to obtain a binary image, the binary image is processed using a distance transform algorithm to obtain a distance transform image, and the distance transform image is binarized to obtain a foreground image and a background image; the foreground image includes multiple second sub-regions, and the pixel point corresponding to the center point of the second sub-region in the grayscale image is used as a seed point.

[0009] The accuracy of the optimal edge eigenvalue calculation results is further improved by determining the seed point.

[0010] Preferably, the method further comprises: calculating the mean value of the grayscale values ​​of the pixels corresponding to the foreground image in the grayscale image; calculating the background difference feature value of each pixel in the grayscale image; The expression of the background difference eigenvalue is: ; is the background difference feature value of the i-th pixel in the grayscale image and the corresponding area in the foreground image, is the absolute value of the difference between the grayscale value of the i-th pixel in the corresponding area in the foreground image and the mean value, is the distance between the i-th pixel in the foreground image and the background.

[0011] The background difference feature value can be used to preliminarily determine the possibility that the corresponding pixel point is an internal point of the rice seed, thereby facilitating the distinction between the corresponding pixel point belonging to the internal pixel point of the rice seed or the background pixel point.

[0012] Preferably, the expression of the initial edge eigenvalue is: ; In the formula, For the The initial edge feature value of edge pixels, represents the internal eigenvalue of the jth edge pixel, is the background difference feature value of the jth edge pixel in the grayscale image corresponding to the foreground image.

[0013] The initial edge feature value can reflect the possibility that the corresponding edge pixel point is a contour edge point.

[0014] Preferably, the expression of the optimal edge eigenvalue is: ; In the formula, For the The best edge feature value of edge pixels, is the distance between the mth edge line where the jth edge pixel is located and the seed point, For the The edge pixel is located at The preset similarity of the edge lines, For the The initial edge feature value of edge pixels.

[0015] The optimal edge feature value can accurately reflect the possibility that the corresponding edge pixel point is a contour edge line pixel point or an internal edge line pixel point, thereby improving the recognition efficiency of the edge pixel points.

[0016] Preferably, the similarity is calculated as follows: Draw a change curve of edge feature value and position of pixel points on the edge line, calculate the first similarity between the change curve of any edge line and the change curve of the edge line on one side; calculate the first distance between the corresponding edge line and the seed point, and the second distance between the edge line on one side and the seed point, and use the difference between the first distance and the second distance as the first difference; calculate the second similarity between the change curve of the corresponding edge line and the change curve of the edge line on the other side, calculate the third distance between the edge line on the other side and the seed point, and use the difference between the first distance and the third distance as the second difference; The expression of similarity is: ; In the formula, For the The edge pixel is located at The preset similarity of the edge lines, is the first similarity, is the first difference, is the second similarity, is the second difference.

[0017] Preferably, the detection model is a convolutional neural network model.

[0018] In a second aspect, the present invention provides a seed selection system based on machine vision, which adopts the following technical solution: A seed selection system based on machine vision, a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the seed selection method based on machine vision is implemented.

[0019] The present invention has the following technical effects: The optimal edge eigenvalue can reflect whether the corresponding edge pixel point is a contour edge line pixel point or an internal edge line pixel point. The optimal edge eigenvalue replaces the grayscale value in the watershed algorithm. When the image is segmented, the interference caused by the internal edge line can be weakened. In the segmentation process, over-segmentation can be avoided, so that a complete rice seed image can be obtained, which improves the work efficiency and accuracy of seed selection. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-restrictive manner, and the same or corresponding reference numerals represent the same or corresponding parts.

[0021] Figure 1 It is a flow chart of the seed selection method based on machine vision of the present invention.

[0022] Figure 2 It is a grayscale image of the rice seeds of the present invention. DETAILED DESCRIPTION

[0023] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0024] It should be understood that when the terms "first", "second", etc. are used in the claims, descriptions, and drawings of the present invention, they are only used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the description and claims of the present invention indicate the presence of the described features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their collections.

[0025] Combination Figure 2 As shown, the surface of the rice seed husk has an edge line. On the horizontal projection of the rice seed, the edge line is located inside the rice seed area. The edge line located inside the rice seed area is taken as the internal edge line, and the following text will be developed based on this background.

[0026] The embodiment of the present invention discloses a seed selection method based on machine vision, referring to Figure 1 , including the following steps, as follows: S1: Obtain a grayscale image of the seed, extract a seed region in the grayscale image, the seed region includes a plurality of first subregions, and select any pixel point in the first subregion as a seed point.

[0027] In one embodiment, the rice seeds to be screened are laid flat on a pure white background plate, and the rice seed image is photographed from above and parallel to the background plate under uniform lighting conditions, and the rice seed image is grayed to obtain a gray image. The gray image is segmented using the Otsu method to obtain a binary image, and the binary image is processed using a distance transformation algorithm to obtain a distance transformation image, and the distance transformation image is binarized to obtain a foreground image and a background image, wherein the gray value of the foreground image is 255, and the gray value of the background image is 0; the foreground image includes multiple second sub-areas, one second sub-area corresponds to one rice seed, and its distribution state is: adjacent second sub-areas are interconnected or independent, and the geometric center point of the second sub-area is obtained, and the pixel point corresponding to the center point of the second sub-area in the gray image is used as a seed point. It should be noted here that in the gray image, the pixel point corresponding to the second sub-area in the foreground image is the first sub-area, one first sub-area corresponds to one rice seed, and multiple first sub-areas constitute a seed area.

[0028] In one implementation, in the first sub-region, the grayscale mean of the pixels is calculated, the absolute value of the difference between the grayscale of each pixel and the grayscale mean is calculated, and the pixel with the smallest absolute value of the difference is used as the seed point.

[0029] S2: Calculate the background difference feature value of each pixel in the grayscale image.

[0030] In the grayscale image, the mean grayscale value of the pixel corresponding to the foreground image is calculated, and the expression of the background difference feature value is: ; In the formula, is the background difference feature value of the i-th pixel in the grayscale image and the corresponding area in the foreground image, is the absolute value of the difference between the grayscale value of the i-th pixel in the corresponding area in the foreground image and the mean value, is the distance between the i-th pixel in the foreground image and the background. The distance between the i-th pixel in the foreground image and the background is calculated by a distance transformation algorithm, which is the prior art.

[0031] In the grayscale image, the grayscale value of the rice seed surface is relatively uniform, which is quite different from the grayscale value of the background. The larger the value is, the greater the grayscale difference between the corresponding pixel and the background point is, and the greater the probability that it is an internal point of the rice seed. The smaller the value is, the smaller the grayscale difference between the corresponding pixel and the background point is, and the greater the probability that it is a background pixel point is; The smaller the value, the closer the pixel is to the background and the closer it is to the rice seed boundary. The larger the value is, the farther the pixel is from the background and the closer it is to the center of the rice seed.

[0032] In summary, Represents the difference between the corresponding pixel and the background in the grayscale image. The larger the value is, the greater the difference between the corresponding pixel and the background is, and the greater the possibility that it is an internal point of the rice seed. The smaller the value, the smaller the difference between the corresponding pixel and the background, and the smaller the possibility of being an internal point of the rice seed.

[0033] S3: Perform edge detection on the grayscale image to obtain multiple edge lines, calculate the internal eigenvalue and initial edge eigenvalue of each pixel on the edge line, and the initial eigenvalue is negatively correlated with the internal eigenvalue.

[0034] The canny operator is used to perform edge detection on the grayscale image to obtain the edge lines in the grayscale image, wherein the edge lines include the contour edge lines and internal edge lines of the rice seeds, and the internal edge lines are the boundary lines of the husks. The intersections between the edge lines are removed, and all edge lines are divided into multiple independent edge line segments. On the surface of the rice seeds, the color difference of the pixels on both sides of the internal edge line is small, while the color difference of the pixels on both sides of the contour edge line of the rice seeds is large, that is, the color difference between the pixels on the surface of the rice seeds and the background pixels is large. Therefore, the grayscale value of the pixel in the normal direction of the edge line is used to determine whether it is an internal edge line.

[0035] S31: Calculate the internal feature value of each pixel on the edge line.

[0036] The expression of the internal eigenvalue is: ; In the formula, Represents the internal eigenvalue of the jth edge pixel on the edge line, Represents the gradient value of the jth edge pixel on the edge line, represents the grayscale difference between two pixels that are symmetrical to each other in the gradient direction of the j-th edge pixel on the edge line, specifically, two pixels that are symmetrical to each other with the j-th edge pixel as the center. It can be understood that the two pixels are located in the gradient direction of the j-th edge pixel. represents the activation function, n represents the preset correlation coefficient, whose value is 2, so that the value of the internal eigenvalue is in the range of (0, 1).

[0037] The larger the value of indicates, the greater the grayscale change at the jth edge pixel; The smaller the value, the smaller the color difference on both sides of the edge line where the jth edge pixel is located, and the greater the possibility that the corresponding edge line is the internal edge line of the rice seed. The larger the value is, the greater the color difference on both sides of the edge line where the j-th edge pixel is located, and the greater the possibility that the corresponding edge line is the edge line of the rice seed contour.

[0038] In summary, the internal eigenvalue reflects the internal features of the corresponding edge line. The larger the value, the greater the possibility that the corresponding edge line is an internal edge line. Conversely, the smaller the value, the smaller the possibility that the corresponding edge line is an internal edge line and the greater the possibility that it is a contour edge line.

[0039] S32: Calculate the initial edge feature value of each pixel on the edge line.

[0040] The expression of the initial edge eigenvalue is: ; In the formula, For the The initial edge feature value of edge pixels, represents the internal eigenvalue of the jth edge pixel, is the background difference feature value of the jth edge pixel in the grayscale image corresponding to the foreground image.

[0041] For the The background difference feature value of the edge pixel represents the difference feature between the corresponding pixel and the background. The larger the value, the The greater the difference between an edge pixel and the background, the greater the possibility that it is an internal point of the rice seed; conversely, The smaller the value, the The smaller the difference between the edge pixel and the background, the closer it is to the outline edge of the rice seed; is the internal edge feature value of the jth edge pixel, The larger the value, the The greater the possibility that the edge pixel is an internal edge point of the rice seed, The smaller the value, the The greater the possibility that the edge pixel point is the edge point of the rice seed contour.

[0042] Therefore, the initial edge feature value reflects the possibility that the corresponding edge pixel point is a contour edge point. Specifically, the larger the value, the more likely the corresponding edge pixel point is to be a contour edge point of the rice seed, and the smaller the value, the more likely the corresponding edge pixel point is to be an internal edge point of the rice seed.

[0043] S4: Calculate the similarity of edge lines.

[0044] The edge lines in the binary image are taken as the base lines. In the grayscale image, the edge lines corresponding to the base lines are removed. The remaining edge lines are the internal edge lines and the edge lines of the overlapping parts of multiple rice seeds. The similarity of the remaining edge lines is calculated.

[0045] The calculation method is as follows: construct a rectangular coordinate system, with the horizontal axis being the ordinal number of the pixel point and the vertical axis being the edge feature value of the pixel point, draw a change curve of the edge feature value and position of the pixel point on the edge line in the coordinate system, and use the Flamenche distance algorithm to calculate the first similarity between the change curve of any edge line and the change curve of the edge line on one side; calculate the first distance between the corresponding edge line and the seed point, and the second distance between the edge line on one side and the seed point, and use the difference between the first distance and the second distance as the first difference; use the Flamenche distance algorithm to calculate the second similarity between the change curve of the corresponding edge line and the change curve of the edge line on the other side, calculate the third distance between the edge line on the other side and the seed point, and use the difference between the first distance and the third distance as the second difference. Among them, the first distance, the second distance, and the third distance are all the minimum distances between the pixel point on the corresponding edge line and the seed point.

[0046] Exemplarily, among the pixel points a, b, c, and d on the edge, the distance between point d and the seed point is the smallest, so the distance between point d and the seed point is taken as the first distance, and the calculation method of the second distance and the third distance is the same as the calculation method of the first distance.

[0047] The expression of similarity is: ; In the formula, For the The edge pixel is located at The preset similarity of the edge lines, is the first similarity, is the first difference, is the second similarity, is the second difference.

[0048] The greater the difference in distance between the mth edge line and its adjacent edge line from the same seed point, the smaller the possibility that the two edge lines belong to the same internal edge line of the rice seed, and the smaller their similarity; conversely, the smaller the difference in distance between the two edge lines and the same seed point, the greater the possibility that they belong to the same internal edge line of the seed, and the greater their similarity.

[0049] is the similarity between the mth edge line where the jth edge pixel is located and the two adjacent edge lines, The smaller it is, the greater the possibility that the mth edge line is an overlapping external edge line. The larger the value, the greater the possibility that the mth edge line is an internal edge line. It should be noted that when calculating the similarity of edge lines, the edge lines corresponding to the base lines have been removed. Therefore, a fixed value is set for the similarity of edge lines not involved in the calculation according to the actual situation. For example, the similarity of edge lines not involved in the calculation is 0.8.

[0050] S5: Update the initial edge eigenvalue to obtain the optimal edge eigenvalue.

[0051] The expression of the optimal edge eigenvalue is: ; In the formula, is the best edge feature value of the jth edge pixel, is the distance between the mth edge line where the jth edge pixel is located and the seed point, For the The edge pixel is located at The preset similarity of the edge lines, For the The initial edge feature value of edge pixels.

[0052] The smaller it is, the closer the edge line where the j-th edge pixel is located is to the seed point, and the more likely it is a pixel on the edge line inside the seed. The larger the value, the more likely it is that the jth edge pixel is an external edge point. It should be noted that when calculating the distance between the mth edge line and the seed point, the distance between the pixel point on each edge line and the seed point is calculated, and the minimum value is taken.

[0053] pass It can accurately reflect the possibility that the jth edge pixel is a contour edge line pixel and an internal edge line pixel. Specifically, The larger the value of is, the greater the possibility that the jth edge pixel is a contour edge line pixel. The smaller the value of is, the greater the possibility that the j-th edge pixel is an internal edge line pixel.

[0054] S6: Segment the grayscale image using a watershed algorithm according to the optimal edge feature value of each pixel on the edge line to obtain a segmented image.

[0055] The optimal feature value of the pixel point replaces the gray value of the pixel point in the watershed algorithm, and the watershed algorithm is used to segment the gray image to obtain a segmented image. One segmented image corresponds to an independent rice seed image.

[0056] S7: Input the segmented image into a preset detection model to obtain the quality level of the seed.

[0057] The method for obtaining the detection model is: constructing a convolutional neural network model, and training the convolutional neural network model to obtain the detection model, wherein the training method is a prior art and will not be described in detail here. The segmented image is input into the detection model to obtain the quality level of the seed, and the quality level is artificially set according to the actual situation. For example, the quality levels include level one, level two, and level three.

[0058] An embodiment of the present invention also discloses a seed selection system based on machine vision, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a seed selection method based on machine vision according to the present invention is implemented.

[0059] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface, and their configuration and functions are known in the art, so they will not be described in detail here.

[0060] In the present invention, the aforementioned memory may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus or device. For example, a computer-readable storage medium may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high bandwidth memory HBM (High Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc., or any other medium that can be used to store the required information and can be accessed by an application, a module or both. Any such computer storage medium may be part of a device or accessible or connectable to a device.

[0061] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.

[0062] The above are all preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A seed selection method based on machine vision, characterized in that: Includes steps: Obtaining a grayscale image of the seed, extracting a seed region in the grayscale image, wherein the seed region includes a plurality of first subregions, and selecting any pixel point in the first subregion as a seed point; Perform edge detection on the grayscale image to obtain multiple edge lines, calculate the internal eigenvalue and initial edge eigenvalue of each pixel on the edge line, the initial eigenvalue is negatively correlated with the internal eigenvalue, and update the initial edge eigenvalue to obtain the optimal edge eigenvalue; The grayscale image is segmented using the watershed algorithm according to the optimal edge feature value of each pixel on the edge line to obtain a segmented image; Input the segmented image into a preset detection model to obtain the quality grade of the seeds; The expression of the internal eigenvalue is: ; In the formula, Represents the internal eigenvalue of the jth edge pixel on the edge line, Represents the gradient value of the jth edge pixel on the edge line, Represents the grayscale difference between two pixels that are symmetrical to each other in the gradient direction of the j-th edge pixel on the edge line. represents the activation function, and n represents the preset correlation coefficient.

2. The seed selection method based on machine vision according to claim 1, characterized in that: The method of selecting any pixel point in the first sub-region as a seed point is: The grayscale image is segmented by using the Otsu method to obtain a binary image, the binary image is processed by using the distance transform algorithm to obtain a distance transform image, and the distance transform image is binarized to obtain a foreground image and a background image; The foreground image includes a plurality of second sub-regions, and the pixel points corresponding to the center points of the second sub-regions in the grayscale image are used as seed points.

3. The seed selection method based on machine vision according to claim 2, characterized in that: The method further includes: calculating the mean value of the grayscale values ​​of the pixels corresponding to the foreground image in the grayscale image; calculating the background difference characteristic value of each pixel in the grayscale image; The expression of the background difference eigenvalue is: ; is the background difference feature value of the i-th pixel in the grayscale image and the corresponding area in the foreground image, is the absolute value of the difference between the grayscale value of the i-th pixel in the corresponding area in the foreground image and the mean value, is the distance between the i-th pixel in the foreground image and the background.

4. The seed selection method based on machine vision according to claim 3 is characterized in that: The expression of the initial edge eigenvalue is: ; In the formula, For the The initial edge feature value of edge pixels, represents the internal eigenvalue of the jth edge pixel, is the background difference feature value of the jth edge pixel in the grayscale image corresponding to the foreground image.

5. The seed selection method based on machine vision according to claim 1, characterized in that: The expression of the optimal edge eigenvalue is: ; In the formula, For the The best edge feature value of edge pixels, is the distance between the mth edge line where the jth edge pixel is located and the seed point, For the The edge pixel is located at The preset similarity of the edge lines, For the The initial edge feature value of edge pixels.

6. The seed selection method based on machine vision according to claim 5, characterized in that: The similarity is calculated as: Draw a change curve of edge feature value and position of pixel points on the edge line, calculate the first similarity between the change curve of any edge line and the change curve of the edge line on one side; calculate the first distance between the corresponding edge line and the seed point, and the second distance between the edge line on one side and the seed point, and use the difference between the first distance and the second distance as the first difference; calculate the second similarity between the change curve of the corresponding edge line and the change curve of the edge line on the other side, calculate the third distance between the edge line on the other side and the seed point, and use the difference between the first distance and the third distance as the second difference; The expression of similarity is: ; In the formula, For the The edge pixel is located at The preset similarity of the edge lines, is the first similarity, is the first difference, is the second similarity, is the second difference.

7. The seed selection method based on machine vision according to claim 1, characterized in that: The detection model is a convolutional neural network model.

8. The seed selection system based on machine vision is characterized by: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the machine vision-based seed selection method according to any one of claims 1-7 is implemented.

Citation Information

Patent Citations

  • Composite material CT image segmentation method based on improved watershed algorithm

    CN111738256A

  • Prefabricated box girder formwork detection method and system

    CN119180786A

  • Machine vision-based machine tool part online inspection method

    WO2023134793A2

Cited By

  • A machine vision-based grass seed quality detection method

    CN122715140A