A computer vision-based intelligent seeding monitoring method and system
By extracting the boundary features and distance distribution of seed candidate regions using computer vision methods and combining them with multi-frame image analysis, the problem of misjudging the number of seeds when multiple seeds overlap and stick together is solved, achieving high accuracy and stability in sowing monitoring.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHAANXI YOULIAN RICK TECHNOLOGY CO LTD
- Filing Date
- 2026-05-08
- Publication Date
- 2026-07-28
AI Technical Summary
In existing technologies, when multiple seeds overlap and stick together, the detection frame count fails, making it difficult to distinguish the actual number of seeds inside. This leads to reseeding holes being misjudged as single-seed sowing, affecting the reliability of sowing quality evaluation.
By extracting the boundary point turning angles of the seed candidate region, calculating the boundary indentation ratio and the degree of local anomaly, and combining the distance distribution data, a local central response field is constructed, effective central points are extracted, and through comprehensive consistency analysis of multiple consecutive frames, the support and confidence of a single frame are calculated, and the final number of seeds is output.
It significantly improves the accuracy and stability of seed quantity determination in overlapping and sticky scenarios, provides a reliable basis for identifying missed sowing and reseeding, and enhances the reliability of sowing quality monitoring.
Smart Images

Figure CN122473644A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image recognition, and more specifically to an intelligent seeding monitoring method and system based on computer vision. Background Technology
[0002] Agricultural sowing is transforming towards higher efficiency, higher precision, and greater intelligence. Sowing quality directly determines crop yield and agricultural production efficiency. Developing a real-time, accurate, and stable intelligent sowing monitoring method is a core technology for addressing pain points such as missed sowing and double sowing in high-speed operations and complex field environments, ensuring sowing uniformity, and improving the intelligence level of sowing equipment and operational quality control capabilities.
[0003] Existing technologies typically employ target detection-based seeding monitoring methods. These methods identify seed targets in tray seeding images and use the number of detection boxes within a single seedhole area as the criterion for determining the number of seeds sown. For determining single-seed sowing, reseeding, and missed sowing, a common approach is to first locate the seed using a convolutional neural network or a YOLO-like target detection network, and then determine whether a seed has been missed or reseeded based on the number of targets detected in each seedhole. Some solutions further enhance seed detection capabilities by increasing input resolution, adding target detection layers, or optimizing feature extraction networks, thereby improving the effectiveness of seeding quality monitoring.
[0004] The drawback of the aforementioned existing technology is that it relies on the number of detection boxes to directly represent the number of seeds. When multiple seeds overlap and stick together, multiple seeds are easily identified as a single target box. Furthermore, after the outer boundary of a single frame image is fused, it is difficult to distinguish the actual number of seeds inside, which leads to the reseeding hole being misjudged as a single seed sowing, affecting the reliability of subsequent reseeding decisions and sowing quality evaluation. Summary of the Invention
[0005] This invention provides a computer vision-based intelligent seeding monitoring method and system to solve existing problems.
[0006] The intelligent seeding monitoring method based on computer vision of the present invention adopts the following technical solution:
[0007] One embodiment of the present invention provides an intelligent seeding monitoring method based on computer vision, the method comprising the following steps:
[0008] Obtain the seed tray sowing image sequence of the sowing area, segment the frame images in the sequence, and obtain the seed candidate area for each single seed area;
[0009] For each seed candidate region, its boundary points are extracted, and the boundary indentation ratio and the degree of local anomaly of the boundary are calculated based on the boundary point turning angle. The edge overlap indicator of the seed candidate region is calculated by combining the two.
[0010] Calculate the distance from each point within the seed candidate region to the region boundary to obtain distance distribution data;
[0011] Based on distance distribution data, the average distance and standard deviation of distance are calculated in the local neighborhood of each point in the seed candidate region, and the local central response value of each point is calculated based on the average distance and standard deviation of distance.
[0012] Based on the local center response value, effective center points are extracted from all points within the seed candidate region, and the number of effective center points is determined as the center number representation value of the single hole region in the frame image.
[0013] For each single-hole region, the overall consistency of adjacent frames is calculated based on the edge overlap indicator and center number representation value in all its frame images, and the single-frame support of each frame image is calculated based on the overall consistency.
[0014] The number of centers in each frame of the image is weighted and accumulated based on the support of each frame. The number with the largest cumulative support value is determined as the final number of seeds. The ratio of the cumulative support value of this number to the sum of the cumulative support values of all candidate seeds is used as the confidence level to generate the seeding monitoring results.
[0015] Preferably, the seed tray sowing image sequence of the sowing area is obtained, and the frame images are segmented to obtain the seed candidate region for each single hole area, specifically including:
[0016] Obtain the seed tray sowing image sequence of the sowing area;
[0017] Based on the camera installation location and the hole spacing parameters of the acupoint plate, the single acupoint region in the frame image is located to obtain the position of each single acupoint region;
[0018] Based on the location of each single hole region, an instance segmentation method is used to extract the seed candidate region within that single hole region.
[0019] Preferably, the boundary concavity ratio and the degree of local boundary anomaly are calculated based on the boundary point turning angle, and the edge overlap indicator of the seed candidate region is calculated by combining the two, specifically including:
[0020] Extract the boundary point sequence of the seed candidate region. For each boundary point, obtain its boundary point angle, where a positive angle indicates that the boundary bulges outward and a negative angle indicates that it is concave inward.
[0021] The ratio of the sum of the absolute values of the negative turning angles at each boundary point to the sum of the absolute values of the turning angles at all boundary points is taken as the boundary concavity ratio.
[0022] The ratio of the number of boundary points whose absolute value of the angle difference between adjacent boundary points exceeds a preset angle threshold to the total number of boundary points is used as the degree of local anomaly at the boundary. The preset angle threshold is determined based on the statistical distribution of the angle difference of a single seed sample.
[0023] The edge overlap indicator is obtained by weighting and summing the boundary indentation ratio and the degree of local anomaly at the boundary.
[0024] Preferably, the distance from each point within the seed candidate region to the region boundary is calculated to obtain distance distribution data, specifically including:
[0025] Obtain the set of boundary points of the seed candidate region;
[0026] For each point within the seed candidate region, calculate the Euclidean distance from that point to all boundary points in the boundary point set, and take the minimum Euclidean distance as the distance from that point to the region boundary.
[0027] The distance values from all points within the seed candidate region to the region boundary are used as distance distribution data.
[0028] Preferably, based on distance distribution data, the average distance and standard deviation of distance are calculated in the local neighborhood of each point within the seed candidate region, and the local central response value of each point is calculated based on the average distance and standard deviation of distance, specifically including:
[0029] For each point within the seed candidate region, construct a local neighborhood centered on that point;
[0030] Based on the distance distribution data, calculate the average and standard deviation of the distance values of all points in the local neighborhood of the point, and use them as the average distance and standard deviation of the distance to the point, respectively.
[0031] The ratio of the square of the average distance to the square of the standard deviation of the distance is taken as the local central response value of that point.
[0032] Preferably, based on the local center response value, valid center points are extracted from all points within the seed candidate region, specifically including:
[0033] The local central response values of all points within the seed candidate region are normalized to obtain the normalized local central response values.
[0034] Local maxima are extracted from all points within the seed candidate region, where the normalized local central response value of a local maxima is greater than the normalized local central response value of all points within its eight neighborhoods.
[0035] Local maxima whose normalized local center response values are greater than a preset response threshold are identified as valid center points.
[0036] Preferably, for each single-hole region, the overall consistency of adjacent frames is calculated based on the edge overlap indicator and center number representation value in all its frame images, specifically including:
[0037] For the same single-hole region, obtain the edge overlap indicator of two adjacent frames, calculate the ratio of the absolute value of the difference between the edge overlap indicators of the two frames to the sum of the edge overlap indicators of the two frames, and subtract the ratio from 1 to obtain the edge consistency of adjacent frames.
[0038] Obtain the center quantity representation value of two adjacent frames, calculate the ratio of the absolute value of the difference between the two frame center quantity representation values to the larger value of the two frame center quantity representation values, and subtract the ratio from 1 to obtain the quantity consistency of adjacent frames.
[0039] Multiplying edge consistency with quantity consistency yields the overall consistency between adjacent frames.
[0040] Preferably, the single-frame support of each image frame is calculated based on overall consistency, specifically including:
[0041] Obtain the overall consistency of the same single-hole region between adjacent frames in all frame images;
[0042] For the first frame image, its overall consistency with the next frame image is taken as the single-frame support of that frame.
[0043] For the last frame image, its overall consistency with the previous frame image is taken as the single-frame support of that frame.
[0044] For an intermediate frame image, the average of its overall consistency with the previous frame image and its overall consistency with the next frame image is taken as the single-frame support of that frame.
[0045] Preferably, the number of centers in each frame of the image is weighted and accumulated based on the single-frame support, and the number with the largest cumulative support value is determined as the final number of seeds. The ratio of the cumulative support value of this number to the sum of the cumulative support values of all candidate seeds is used as the confidence level to generate the seeding monitoring results, specifically including:
[0046] Obtain the representation value of the number of centers of the same single hole region in each frame image and the single-frame support of each frame image;
[0047] The set of all center quantity representation values appearing in each frame image is used as the candidate seed quantity set;
[0048] For each candidate seed in the candidate seed set, the single-frame support of that seed in all frames in each frame image is summed to obtain the cumulative support value of that candidate seed.
[0049] The number of candidate seeds with the highest cumulative support value is determined as the final number of seeds for that single hole region.
[0050] The ratio of the cumulative support value of the final number of seeds to the sum of the cumulative support values of all candidate seeds is used as the confidence level of the single hole region.
[0051] Based on the final seed count and confidence level of each individual hill area, sowing monitoring results are generated.
[0052] This invention proposes an intelligent seeding monitoring system based on computer vision, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps of an intelligent seeding monitoring method based on computer vision.
[0053] The beneficial effects of the technical solution of the present invention are:
[0054] In this embodiment of the invention, to address the problems of detection box counting failure when multiple seeds overlap and adhesion, and difficulty in distinguishing the actual number of seeds inside after fusion of the outer boundary of a single frame image, the following measures are taken: The edge overlap indicator is obtained by extracting the boundary point corners of the seed candidate region, calculating the boundary concavity ratio and the degree of local boundary anomaly, and making a preliminary judgment on the degree of overlap. Based on this, a local center response field is constructed by calculating the distance from each point in the region to the boundary, and effective center points are extracted. The number of center points is used as the center quantity representation value, realizing the ability to recover potential seed centers from the internal structure and solving the problem of difficulty in distinguishing individuals after outer boundary fusion. Furthermore, through comprehensive consistency analysis of multiple consecutive frames, the support of a single frame is calculated and the center quantity representation value is weighted and accumulated to adaptively output the final seed quantity and confidence level. This effectively eliminates the influence of single-frame noise and instantaneous interference, significantly improving the accuracy and stability of seed quantity judgment in overlapping and adhesion scenarios, and providing a reliable basis for missed seeding, replay identification, and subsequent replay decisions. Attached Figure Description
[0055] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0056] Figure 1 A flowchart illustrating a computer vision-based intelligent seeding monitoring method provided in one embodiment of the present invention;
[0057] Figure 2 This is a structural diagram of a computer vision-based intelligent seeding monitoring system provided in one embodiment of the present invention. Detailed Implementation
[0058] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a computer vision-based intelligent seeding monitoring method proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0059] Unless otherwise defined, 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 pertains.
[0060] The following description, in conjunction with the accompanying drawings, details a specific scheme for an intelligent seeding monitoring method based on computer vision provided by the present invention.
[0061] This invention provides a computer vision-based intelligent seeding monitoring method and system. Please refer to [link / reference]. Figure 1 The diagram illustrates a flowchart of a computer vision-based intelligent seeding monitoring method according to an embodiment of the present invention, which includes the following steps:
[0062] S101. Obtain the seed tray sowing image sequence of the sowing area, segment the frame images in it, and obtain the seed candidate area for each single hole area.
[0063] In this embodiment, the seed tray sowing image sequence of the sowing area is obtained, and the frame images are segmented to obtain the seed candidate region for each single seed tray region, specifically including:
[0064] Obtain the seed tray sowing image sequence of the sowing area;
[0065] Based on the camera installation location and the hole spacing parameters of the acupoint plate, the single acupoint region in the frame image is located to obtain the position of each single acupoint region;
[0066] Based on the location of each single hole region, an instance segmentation method is used to extract the seed candidate region within that single hole region.
[0067] For example, an image acquisition device is deployed above the sowing completion station or each channel of the seed tray conveying system of the sowing equipment. The image acquisition device includes an industrial camera, a fixed bracket, and an auxiliary lighting device. The industrial camera is mounted vertically above the movement path of the seed tray, with its optical axis substantially perpendicular to the plane of the seed tray, ensuring stable morphology and minimal geometric distortion of each seed tray area in the image. The industrial camera is connected to the frame of the sowing equipment via the fixed bracket, and its shooting height and field of view are adjusted according to the size of the seed tray and the density of seed trays in front and behind, ensuring that the entire seed tray or the area of each seed tray in front and behind smoothly enters the camera's field of view during continuous data acquisition.
[0068] To reduce the impact of ambient light changes on image quality, a ring or evenly distributed LED light source is set around the camera to create a relatively stable imaging environment, thereby reducing the interference of shadows, reflections, and background brightness fluctuations on seed identification.
[0069] During the seeding process, the seedling trays pass sequentially through the image acquisition area via a conveyor mechanism. An industrial camera captures images of the tray surface in a continuous video stream, acquiring a sequence of seeding images containing the seeding area through trigger signals or time intervals. After the seeding image sequence is transmitted from the acquisition module to the image processing unit, complete and clear frames are extracted from the continuous video stream as analysis images.
[0070] To improve the stability of subsequent monitoring and analysis, the seed tray seeding image sequence was preprocessed. The preprocessing included brightness and contrast enhancement, as well as noise suppression, to eliminate brightness differences and random noise interference between different frames, while simultaneously enhancing the distinguishability between the seed region and the background.
[0071] In actual sowing processes, the arrangement of holes in images usually exhibits a strong regularity. By combining the camera positional relationships, field of view, and hole spacing parameters determined during equipment installation, the location of individual hole regions in the image can be determined.
[0072] After completing the localization of each hole region, the seed target in each hole region is segmented based on the preprocessed frame image using an instance segmentation method.
[0073] For example, the SOLOv2 instance segmentation method, an improvement on existing algorithms, is used to segment and extract seed targets in each hole region. The SOLOv2 method, through dynamic convolution and a feature pyramid network, effectively handles small target segmentation tasks. For each hole region, the localized region image is input into the SOLOv2 network, which outputs an instance mask for each seed target within that region. Each mask corresponds to the contour and morphological information of a seed candidate region. These masks constitute the seed candidate regions within that hole region.
[0074] S102. For each seed candidate region, extract its boundary points, calculate the boundary indentation ratio and the degree of local anomaly of the boundary based on the boundary point turning angle, and combine the two to calculate the edge overlap indicator of the seed candidate region.
[0075] In this embodiment, the boundary concavity ratio and the degree of local boundary anomaly are calculated based on the boundary point turning angle, and the edge overlap indicator of the seed candidate region is calculated by combining the two. Specifically, this includes:
[0076] Extract the boundary point sequence of the seed candidate region. For each boundary point, obtain its boundary point angle, where a positive angle indicates that the boundary bulges outward and a negative angle indicates that it is concave inward.
[0077] The ratio of the sum of the absolute values of the negative turning angles at each boundary point to the sum of the absolute values of the turning angles at all boundary points is taken as the boundary concavity ratio.
[0078] The ratio of the number of boundary points whose absolute value of the angle difference between adjacent boundary points exceeds a preset angle threshold to the total number of boundary points is used as the degree of local anomaly at the boundary. The preset angle threshold is determined based on the statistical distribution of the angle difference of a single seed sample.
[0079] The edge overlap indicator is obtained by weighting and summing the boundary indentation ratio and the degree of local anomaly at the boundary.
[0080] For example, for each acquired seed candidate region, its boundary contour is first extracted. Specifically, for the binary mask of the seed candidate region, an eight-neighbor boundary tracking algorithm is used to extract the boundary point sequence. The boundary points are recorded sequentially in a clockwise or counterclockwise direction to obtain the boundary point set. .
[0081] For each boundary point Calculate the turning angle at its boundary point. The turning angle is defined as the angle of change in the boundary orientation at that point. The specific calculation method is as follows: Take... The previous boundary point and the next boundary point Define vector ,vector Calculate from Rotate to directional angle .
[0082] when When, it indicates that the boundary bulges outward at that point; when When the angle is 0, it indicates that the boundary curves inward at that point. The magnitude of the absolute value of the angle reflects the degree of boundary curvature; the larger the absolute value, the more severe the curvature.
[0083] The boundary concavity ratio is used to quantify the proportion of concave portions on the boundary of the seed candidate region. When multiple seeds overlap and adhere together, obvious concave areas will appear on the boundary, manifested as more negative corner points; while the boundary of a single seed is approximately convex overall, with fewer negative corner points.
[0084] Specifically, the proportion of boundary concavity The calculation formula is:
[0085]
[0086] in, Indicates the number of boundary points. It represents the sum of the absolute values of all negative corner values, reflecting the total degree of boundary concavity; This represents the sum of the absolute values of the rotation angles at all boundary points, used for normalization; To represent a very small positive number and prevent the denominator from being zero, we can use 0.000001.
[0087] When the seed candidate region contains a single seed, the boundary is generally smooth with very few negative turning angles. The value is relatively small; when multiple seeds overlap and stick together, a noticeable indentation appears at the boundary, and the negative turning angle increases. The value is relatively large.
[0088] The degree of local anomaly at the boundary is used to quantify the extent of local mutations at the boundary. When two seeds overlap and adhere together, a directional abrupt change occurs at the junction, manifested as a large difference in the angle between adjacent boundary points.
[0089] Specifically, the degree of local anomaly at the boundary The calculation formula is:
[0090]
[0091] in, This represents the absolute value of the angle difference between adjacent boundary points; Indicates the preset corner threshold; Indicates an indicator function, when If true, set the value to 1; otherwise, set the value to 0. This indicates the proportion of boundary points where the difference between adjacent turning angles exceeds a threshold.
[0092] The preset corner threshold is determined as follows: During the equipment calibration or sample modeling stage, a batch of standard single-hole samples containing only a single seed are selected, and the same corner difference calculation is performed on their boundary points to obtain all the corner differences in the single-seed sample. The statistical distribution of . Let the mean of this distribution be . The standard deviation is The threshold can then be set to This threshold can effectively distinguish between normal boundary fluctuations of a single seed and abnormal mutations caused by overlapping seeds.
[0093] The edge overlap indicator comprehensively reflects the degree of overlap of the outer contours of the seed candidate regions. By weighted summing of the boundary concavity ratio and the degree of local boundary anomalies, the complementarity of the two features can be fully utilized.
[0094] Specifically, edge overlap indicator The calculation formula is:
[0095]
[0096] in, For the weighting coefficients, satisfying The weighting coefficients can be adjusted according to the actual application scenario. For example, they can be set to... , That is, the two features have the same weight.
[0097] When the seed candidate region is a single seed, the boundary concavity ratio and the degree of local anomaly at the boundary The values are all relatively small, therefore the edge overlap indicator is small. The values are relatively small; when multiple seeds overlap and stick together, both values are relatively large. A larger value indicates a higher probability of overlap in the region.
[0098] Edge overlap indicators serve as a preliminary judgment criterion, effectively screening out potential seed candidate regions that may overlap, providing a basis for subsequent, more in-depth internal structure analysis. Regions with small edge overlap indicators can be directly identified as single seeds; regions with large edge overlap indicators require further local center response analysis to determine the actual number of seeds.
[0099] S103. Calculate the distance from each point within the seed candidate region to the region boundary to obtain distance distribution data.
[0100] In this embodiment, the distance from each point within the seed candidate region to the region boundary is calculated to obtain distance distribution data, specifically including:
[0101] Obtain the set of boundary points of the seed candidate region;
[0102] For each point within the seed candidate region, calculate the Euclidean distance from that point to all boundary points in the boundary point set, and take the minimum Euclidean distance as the distance from that point to the region boundary.
[0103] The distance values from all points within the seed candidate region to the region boundary are used as distance distribution data.
[0104] For example, for each seed candidate region, its boundary contour is first extracted. For the binary mask of the seed candidate region, an eight-neighborhood boundary tracking algorithm is used to extract the set of boundary points. The boundary points are recorded sequentially in a clockwise or counterclockwise direction to obtain the boundary point set. ,in, This represents the total number of boundary points. Each point in the boundary point set is a pixel on the region outline with a distance value of 0.
[0105] For seed candidate regions Each point within Calculate its distance to each boundary point in the set of boundary points. The Euclidean distance is calculated, and the minimum value is taken as the distance from the point to the region boundary.
[0106] Specifically, for points Its shortest Euclidean distance to the boundary The calculation formula is:
[0107]
[0108] in, Point With boundary points The Euclidean distance between them This represents the set of boundary points.
[0109] The physical meaning of this distance is: if a point is located near the center of a seed, its shortest distance to the boundary is usually larger; if a point is close to the edge or located in a narrow connecting region between two seeds, its boundary distance is smaller. This creates a distance distribution within the candidate region that gradually increases from the boundary inwards.
[0110] For example, for a pixel within a seed candidate region, the shortest distance can be calculated by traversing all points in the boundary point set. When the region is large, a distance transformation algorithm can be used to improve computational efficiency. Distance transformation is a method for quickly calculating the distance from each pixel in a binary image to the nearest background point. For a binary mask of the seed candidate region, the area inside the region is set as foreground (value 1), and the area outside the region is set as background (value 0). Applying the Euclidean distance transformation directly yields the distance value from each point within the region to the boundary.
[0111] The distance values of all points within the seed candidate region are organized according to their positions in the image to form distance distribution data. The distance distribution data is a two-dimensional array of the same size as the seed candidate region, where each element represents the distance from the corresponding pixel to the region boundary.
[0112] Distance distribution data reflects the spatial structure information within the seed candidate region. For a single seed region, the distance distribution usually exhibits a unimodal structure, with the distance being the largest at the center and gradually decreasing outwards; for regions where multiple seeds overlap and adhere, the distance distribution may exhibit a multimodal structure, with each local peak point corresponding to the potential center position of a seed.
[0113] For example, a seed candidate region is circular with a radius of 10 pixels. For a point within the region, if it is located at the center of the circle, the distance to the boundary is 10 pixels; if it is located 5 pixels from the center, the distance to the boundary is 5 pixels; if it is on the boundary, the distance is 0.
[0114] For the peanut-shaped region formed by the overlap of two seeds, after calculating the distance distribution, a distance peak will appear near the center of each seed, while the distance value will be smaller at the depression where the two seeds connect.
[0115] Distance distribution data forms the basis for subsequent local centrality response analysis. By analyzing the distance values and distribution characteristics of points within a region, potential seed center locations can be identified. Specifically: points with larger distance values indicate greater distance from the boundary and are likely seed center regions; local maxima of distance values indicate that the surrounding area is relatively far from the boundary and is relatively uniform, potentially seed center points; the standard deviation of distance values reflects the dispersion of distance values within a region and can be used to assess the complexity of the region's internal structure.
[0116] S104. Based on the distance distribution data, calculate the average distance and standard deviation of distance in the local neighborhood of each point within the seed candidate region, and calculate the local central response value of each point based on the average distance and standard deviation of distance.
[0117] In this embodiment, based on distance distribution data, the average distance and standard deviation of distance are calculated in the local neighborhood of each point within the seed candidate region. The local central response value of each point is then calculated based on the average distance and standard deviation of distance. Specifically, this includes:
[0118] For each point within the seed candidate region, construct a local neighborhood centered on that point;
[0119] Based on the distance distribution data, calculate the average and standard deviation of the distance values of all points in the local neighborhood of the point, and use them as the average distance and standard deviation of the distance to the point, respectively.
[0120] The ratio of the square of the average distance to the square of the standard deviation of the distance is taken as the local central response value of that point.
[0121] For example, for seed candidate regions Each point within Construct a local neighborhood centered on it. The size of the local neighborhood can be preset based on the seed size and image resolution.
[0122] Optionally, the local neighborhood can be represented by a square window, with a window size of [size missing]. pixels, of which This setting can be adjusted based on the expected pixel size of the seed diameter. For small seed scenarios, the setting can be adjusted accordingly. or That is, taking the current point as the center. or The pixel region is considered as a local neighborhood.
[0123] The physical meaning of local neighborhood is: by analyzing the distance distribution characteristics within a certain range around the current point, it can be determined whether the point is located near the seed center. A true seed center should not only have a large distance value, but also have good neighborhood distance balance.
[0124] For point Obtain its local neighborhood Calculate the arithmetic mean and standard deviation of the distance values to all points within the range.
[0125] Specifically, a local neighborhood is defined. The number of interior points is The distance value of each point in this neighborhood is ,in, Then the average distance The calculation formula can be:
[0126]
[0127] At the same time, the standard deviation of the distance is calculated based on the distance values of each point in the neighborhood, thus obtaining the distance standard deviation. .
[0128] Average distance Reflects the point The average distance of the surrounding area from the boundary. A larger average distance indicates that the area surrounding the point is further from the boundary and more likely to be located inside the seed. Standard deviation of distance. Reflects the point The dispersion of distance values in the surrounding area. The smaller the standard deviation, the more uniform the distribution of distances from the point to the boundary within the surrounding area, and the more likely the point is to be located in the center of a structurally homogeneous region.
[0129] The local center response value comprehensively reflects whether a point is located near the seed center. A true seed center should simultaneously meet two conditions: first, the surrounding area is far from the boundary (large average distance); second, the distance distribution in the surrounding area is uniform (small standard deviation). Based on this, the local center response value... The calculation formula can be:
[0130]
[0131] in, Represents the square of the average distance. It represents the square of the distance from the standard deviation.
[0132] The physical meaning of this formula is as follows: when the average distance is large and the standard deviation is small, the local center response value is large, indicating that the point may be a seed center; when the average distance is large but the standard deviation is also large, the local center response value will be suppressed, indicating that although the point is far from the boundary, the surrounding distance distribution is uneven, and it may be a local wide region rather than a seed center; when the average distance is small, the local center response value is small, indicating that the point is close to the boundary and cannot be a seed center.
[0133] Repeat the above steps for each point within the seed candidate region to calculate the local center response value of all points, thus obtaining the local center response field of the region. The local center response field is a two-dimensional array of the same size as the seed candidate region, where each element represents the local center response value of the corresponding pixel.
[0134] The local center response field reflects the probability distribution of points within the region as seed centers. Regions with high response values correspond to seed center locations, while locations with low response values correspond to boundary or connected regions. By analyzing the local peaks of the response field, multiple potential seed centers can be effectively identified from overlapping and adherent regions.
[0135] S105. Based on the local center response value, extract the effective center points from all points in the seed candidate region, and determine the number of effective center points as the center number representation value of the single hole region in the frame image.
[0136] In this embodiment, effective center points are extracted from all points within the seed candidate region based on the local center response value, specifically including:
[0137] The local central response values of all points within the seed candidate region are normalized to obtain the normalized local central response values.
[0138] Local maxima are extracted from all points within the seed candidate region, where the normalized local central response value of a local maxima is greater than the normalized local central response value of all points within its eight neighborhoods.
[0139] Local maxima whose normalized local center response values are greater than a preset response threshold are identified as valid center points.
[0140] For example, in the previous step, the seed candidate region was... Each point within Local center response values were calculated. Since the area, shape, and imaging conditions of different seed candidate regions may vary, directly comparing the response values of different regions may lack a unified benchmark. Therefore, it is necessary to normalize the local center response values to make the response values between different regions comparable.
[0141] Specifically, the normalized local central response value The calculation method is as follows:
[0142]
[0143] in, This represents the maximum local center response value within the current seed candidate region.
[0144] After normalization, the normalized local center response value ranges from 0 to 1, and its magnitude reflects the relative centrality of the point with respect to the strongest center position of the current candidate region. The closer the response value is to 1, the more likely the point is to be a seed center; the closer the response value is to 0, the less likely the point is to be a seed center.
[0145] In the normalized local central response field, the seed center location typically corresponds to a local peak in the response field. Therefore, by extracting local maxima, potential candidate seed center locations can be identified.
[0146] Specifically, for each point within the seed candidate region Examine all points within its eight neighborhoods (i.e., adjacent points in the eight directions: up, down, left, right, upper left, upper right, lower left, and lower right). If the normalized local central response value of this point... If the response value is greater than that of all points in its eight neighborhood, then the point is marked as a local maximum.
[0147] Eight-neighborhood is a commonly used local neighborhood definition in image processing, which can effectively detect local peaks. For points on the boundary, their eight-neighborhood may be partially located outside the region; in this case, only the neighboring points within the region are considered for judgment.
[0148] Candidate points extracted solely through local maxima conditions may contain false centers caused by noise, minor edge undulations, or irregular shapes. These false centers typically have small response values, insufficient to qualify as true seed centers. Therefore, a preset response threshold needs to be set. Only local maxima with normalized response values greater than the threshold are considered valid center points.
[0149] Preset response threshold The threshold can be set according to the actual application scenario. For example, it can be set to 0.5, meaning only local maxima with response values greater than half the maximum response value are considered valid center points. This threshold effectively filters out false centers with low response values while retaining true seed centers. In practical applications, the preset response threshold can be determined experimentally: during the calibration phase, calculate the local center response field for known single seed samples and multiple overlapping seed samples, statistically analyze the response value distribution of valid center points, and select a threshold that can distinguish between true and false centers. It is typically set between 0.3 and 0.7, and can be adjusted according to the specific scenario.
[0150] Let the set of extracted valid centroids be... ,in, This indicates the number of valid center points. This number... This serves as a representation of the number of centers in the single-hole region within the image frame. :
[0151]
[0152] The center number representation value reflects the estimated number of potential seeds within the seed candidate region of the image frame. Specifically: when When the seed candidate region forms only one stable center, the region is closer to a single-grain structure; when When this occurs, it indicates that two separate stable centers have formed within the region, which is more consistent with the scenario of two seeds overlapping and adhering together; when This indicates that multiple stable centers have formed within the region, corresponding to the situation where multiple seeds overlap and adhere together.
[0153] The number of centers has the following characteristics: it can directly reflect the number of stable centers detected within the seed candidate region; through local maximum detection and threshold screening, it can effectively filter noise and false centers; and its value has a good correspondence with the actual number of seeds.
[0154] S106. For each single-hole region, calculate the overall consistency of adjacent frames based on the edge overlap indicator and center number representation value in all its frame images, and calculate the single-frame support of each frame image based on the overall consistency.
[0155] In this embodiment, for each single-hole region, the overall consistency of adjacent frames is calculated based on the edge overlap indicator and center number representation value in all its frame images, specifically including:
[0156] For the same single-hole region, obtain the edge overlap indicator of two adjacent frames, calculate the ratio of the absolute value of the difference between the edge overlap indicators of the two frames to the sum of the edge overlap indicators of the two frames, and subtract the ratio from 1 to obtain the edge consistency of adjacent frames.
[0157] Obtain the center quantity representation value of two adjacent frames, calculate the ratio of the absolute value of the difference between the two frame center quantity representation values to the larger value of the two frame center quantity representation values, and subtract the ratio from 1 to obtain the quantity consistency of adjacent frames.
[0158] Multiplying edge consistency with quantity consistency yields the overall consistency between adjacent frames.
[0159] The single-frame support of each image is calculated based on comprehensive consistency, specifically including:
[0160] Obtain the overall consistency of the same single-hole region between adjacent frames in all frame images;
[0161] For the first frame image, its overall consistency with the next frame image is taken as the single-frame support of that frame.
[0162] For the last frame image, its overall consistency with the previous frame image is taken as the single-frame support of that frame.
[0163] For an intermediate frame image, the average of its overall consistency with the previous frame image and its overall consistency with the next frame image is taken as the single-frame support of that frame.
[0164] For example, for the first In a single acupoint area, a total of [number] samples were obtained during continuous collection. Valid keyframe. For the first... Frame and the Frames, their edge overlap indicators are denoted as follows: and .
[0165] For two adjacent frames and Edge consistency The calculation formula can be:
[0166]
[0167] in, This represents the absolute value of the difference between the edge overlap indicators of two adjacent frames. This represents the sum of the edge overlap indicators for the two frames.
[0168] The physical meaning of edge consistency is: when the edge overlap indicators of two adjacent frames are close, A value close to 1 indicates a stable edge structure; when the difference in edge overlap between two frames is large, ... The decrease indicates that there are fluctuations in the outer contour of the single acupoint area.
[0169] For two adjacent frames and The central quantity representation values are respectively denoted as , Consistency in quantity The calculation formula can be:
[0170]
[0171] in, This represents the absolute value of the difference between the center count values of two adjacent frames. This represents the maximum value among the two frame count representations.
[0172] The physical meaning of quantity consistency is: when the quantity representation values of two adjacent frames are the same, The value is close to 1; the greater the difference in the quantity representation value between the two frames, The smaller the value, the more stable the seed quantity determination becomes across consecutive frames.
[0173] Overall consistency comprehensively reflects the stability of two adjacent frames in terms of both edge features and quantity features. The calculation formula is:
[0174]
[0175] This formula shows that the overall consistency is high only when two adjacent frames have high consistency in both edge features and quantity features; if either of these features is significantly abnormal, the overall consistency will decrease accordingly.
[0176] For the In a single acupoint area, a total of [number] samples were obtained during continuous collection. Valid keyframes. For each pair of adjacent frames... and A comprehensive consensus sequence can be obtained. .
[0177] In this case, the first frame (t=1) is only adjacent to the next frame (t=2), therefore its single-frame support is... Directly take the overall consistency of the adjacent frame pair The last frame (t=T) is only related to the previous frame. Because they are adjacent, their single-frame support is... Directly take the overall consistency of the adjacent frame pair For intermediate frames This frame is adjacent to both the previous and next frames, therefore its single-frame support is... Take the arithmetic mean of the generalization consistency of two adjacent frames. This average value comprehensively reflects the overall stability of the current frame compared to the two frames before and after it. If the current frame maintains a high degree of consistency with its neighboring frames, its support is high; if the current frame exhibits abrupt changes in the time series, its support decreases.
[0178] S107. Based on the single-frame support, the center number representation value in each frame image is weighted and accumulated to determine the number with the largest cumulative support value as the final seed number. The ratio of the cumulative support value of this number to the sum of the cumulative support values of all candidate seed numbers is used as the confidence level to generate the seeding monitoring results.
[0179] In this embodiment, the center number representation values in each frame image are weighted and accumulated based on the single-frame support, and the number with the largest cumulative support value is determined as the final seed number. The ratio of the cumulative support value of this number to the sum of the cumulative support values of all candidate seed numbers is used as the confidence level to generate the seeding monitoring results, specifically including:
[0180] Obtain the representation value of the number of centers of the same single hole region in each frame image and the single-frame support of each frame image;
[0181] The set of all center quantity representation values appearing in each frame image is used as the candidate seed quantity set;
[0182] For each candidate seed in the candidate seed set, the single-frame support of that seed in all frames in each frame image is summed to obtain the cumulative support value of that candidate seed.
[0183] The number of candidate seeds with the highest cumulative support value is determined as the final number of seeds for that single hole region.
[0184] The ratio of the cumulative support value of the final number of seeds to the sum of the cumulative support values of all candidate seeds is used as the confidence level of the single hole region.
[0185] Based on the final seed count and confidence level of each individual hill area, sowing monitoring results are generated.
[0186] For example, for the first In a single acupoint area, a total of [number] samples were obtained during continuous collection. Valid keyframes. For each frame, the center count representation value has been obtained. and single-frame support .
[0187] After removing duplicate center count representation values from all frames, a candidate seed number set is formed. For each candidate number n in the candidate seed number set, the frames with a center count representation value equal to n are counted, and the single-frame support of these frames is summed to obtain the cumulative support value for that candidate number. .
[0188] Specifically, cumulative support value The calculation formula is:
[0189]
[0190] in, This is an indicator function that takes the value 1 when the center count representation value of frame t is equal to n, and 0 otherwise. T is the total number of frames.
[0191] Compare the cumulative support values of all candidate numbers, and select the candidate number with the highest cumulative support value as the final seed number for that single-hole region. .
[0192] The physical meaning of this selection method is: among all keyframes, the number of values that receives the most continuous and stable support is used as the final seed number for that single-hole region. Since the support values are derived from the consistency of consecutive frames, this output process has adaptive characteristics and does not require additional manual specification of fixed judgment rules.
[0193] Confidence The formula reflecting the reliability of the final seed quantity determination result is as follows:
[0194]
[0195] in, For the final number of seeds The corresponding cumulative support value, This represents the sum of the cumulative support values for all candidates.
[0196] This ratio reflects the relative dominance of the final quantity result among all candidate quantities. If a quantity result receives significantly higher stable support in consecutive keyframes, the confidence level is higher; if the support values between different quantity results are similar, it indicates that the single hole region has large fluctuations in consecutive frames, and its confidence level is correspondingly lower.
[0197] Based on the final number of seeds output from each single-hole area and the corresponding confidence level, the sowing status of each channel tray of the sowing equipment is automatically determined, forming a single-hole-level sowing monitoring result.
[0198] Specifically, the number of individual holes is determined and compared with the preset sowing requirements:
[0199] like If it is, it is judged as a missed broadcast; if If it is, then it is judged as a single grain being qualified; if If so, it is judged as a replay.
[0200] Meanwhile, the output confidence level serves as a reference for the reliability of the judgment result. For judgment results with low confidence levels, the system can mark them as pending review or trigger a replay decision.
[0201] The results of seeding monitoring may include: statistics on the overall seeding qualification rate of the seed trays; specific location markings of missed and reseeded seed trays; alarm information for low confidence areas; and visualization charts of seeding quality for each channel.
[0202] In summary, in this embodiment of the invention, the three-layer progressive design of edge feature analysis, internal distance analysis, and continuous frame consistency verification effectively solves the problems of traditional detection box counting failure and difficulty in distinguishing the actual number of seeds after fusion of the outer boundary of a single frame image in seed overlap and adhesion scenarios. It significantly improves the accuracy and stability of seed quantity judgment, provides a reliable basis for missed seeding, replay identification, and subsequent replay decision-making, and has important practical value and application prospects.
[0203] This invention also proposes an intelligent seeding monitoring system based on computer vision; please refer to [link / reference]. Figure 2 The diagram shows a structural diagram of a computer vision-based intelligent seeding monitoring system provided in an embodiment of the present invention. The system includes: a data acquisition module 101, a data processing module 102, and a detection output module 103.
[0204] The data acquisition module 101 is used to acquire the seed tray sowing image sequence of the sowing area, segment the frame images in it, and obtain the seed candidate area for each single hole area;
[0205] The data processing module 102 is used to extract the boundary points of each seed candidate region, calculate the boundary concavity ratio and the degree of local anomaly of the boundary based on the boundary point turning angle, and combine the two to calculate the edge overlap indicator of the seed candidate region.
[0206] Calculate the distance from each point within the seed candidate region to the region boundary to obtain distance distribution data;
[0207] Based on distance distribution data, the average distance and standard deviation of distance are calculated in the local neighborhood of each point in the seed candidate region, and the local central response value of each point is calculated based on the average distance and standard deviation of distance.
[0208] Based on the local center response value, effective center points are extracted from all points within the seed candidate region, and the number of effective center points is determined as the center number representation value of the single hole region in the frame image.
[0209] For each single-hole region, the overall consistency of adjacent frames is calculated based on the edge overlap indicator and center number representation value in all its frame images, and the single-frame support of each frame image is calculated based on the overall consistency.
[0210] The detection output module 103 is used to perform weighted accumulation of the center number representation value in each frame image based on the single frame support, determine the number with the largest cumulative support value as the final seed number, and use the ratio of the cumulative support value of this number to the sum of the cumulative support values of all candidate seed numbers as the confidence level to generate the seeding monitoring result.
[0211] It should be noted that the system provided in the above embodiments is only an example of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device can be divided into different functional modules to complete all or part of the functions described above. In addition, the intelligent seeding monitoring system based on computer vision and the intelligent seeding monitoring method based on computer vision provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiment, which will not be repeated here.
[0212] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0213] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
[0214] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A computer vision based intelligent seeding monitoring method, characterized in that, include: Obtain the seed tray sowing image sequence of the sowing area, segment the frame images in the sequence, and obtain the seed candidate area for each single seed area; For each seed candidate region, its boundary points are extracted, and the boundary indentation ratio and the degree of local anomaly of the boundary are calculated based on the boundary point turning angle. The edge overlap indicator of the seed candidate region is calculated by combining the two. Calculate the distance from each point within the seed candidate region to the region boundary to obtain distance distribution data; Based on distance distribution data, the average distance and standard deviation of distance are calculated in the local neighborhood of each point in the seed candidate region, and the local central response value of each point is calculated based on the average distance and standard deviation of distance. Based on the local center response value, effective center points are extracted from all points within the seed candidate region, and the number of effective center points is determined as the center number representation value of the single hole region in the frame image. For each single-hole region, the overall consistency of adjacent frames is calculated based on the edge overlap indicator and center number representation value in all its frame images, and the single-frame support of each frame image is calculated based on the overall consistency. The number of centers in each frame of the image is weighted and accumulated based on the support of each frame. The number with the largest cumulative support value is determined as the final number of seeds. The ratio of the cumulative support value of this number to the sum of the cumulative support values of all candidate seeds is used as the confidence level to generate the seeding monitoring results.
2. The computer vision based intelligent seeding monitoring method as claimed in claim 1 wherein, The process of obtaining the seed tray sowing image sequence of the sowing area, segmenting the frame images within it to obtain the seed candidate region for each single-hole area, specifically includes: Obtain the seed tray sowing image sequence of the sowing area; Based on the camera installation location and the hole spacing parameters of the acupoint plate, the single acupoint region in the frame image is located to obtain the position of each single acupoint region; Based on the location of each single hole region, an instance segmentation method is used to extract the seed candidate region within that single hole region.
3. The intelligent seeding monitoring method based on computer vision according to claim 1, characterized in that, The calculation of the boundary concavity ratio and the degree of local boundary anomaly based on the boundary point turning angle, and the calculation of the edge overlap indicator of the seed candidate region by combining the two, specifically includes: Extract the boundary point sequence of the seed candidate region. For each boundary point, obtain its boundary point angle, where a positive angle indicates that the boundary bulges outward and a negative angle indicates that it is concave inward. The ratio of the sum of the absolute values of the negative turning angles at each boundary point to the sum of the absolute values of the turning angles at all boundary points is taken as the boundary concavity ratio. The ratio of the number of boundary points whose absolute value of the angle difference between adjacent boundary points exceeds a preset angle threshold to the total number of boundary points is used as the degree of local anomaly at the boundary. The preset angle threshold is determined based on the statistical distribution of the angle difference of a single seed sample. The edge overlap indicator is obtained by weighting and summing the boundary indentation ratio and the degree of local anomaly at the boundary.
4. The intelligent seeding monitoring method based on computer vision according to claim 1, characterized in that, The calculation of the distance from each point within the seed candidate region to the region boundary to obtain distance distribution data specifically includes: Obtain the set of boundary points of the seed candidate region; For each point within the seed candidate region, calculate the Euclidean distance from that point to all boundary points in the boundary point set, and take the minimum Euclidean distance as the distance from that point to the region boundary. The distance values from all points within the seed candidate region to the region boundary are used as distance distribution data.
5. The intelligent seeding monitoring method based on computer vision according to claim 1, characterized in that, The method based on distance distribution data calculates the average distance and standard deviation of distance within the local neighborhood of each point in the seed candidate region, and calculates the local central response value of each point based on the average distance and standard deviation of distance. Specifically, this includes: For each point within the seed candidate region, construct a local neighborhood centered on that point; Based on the distance distribution data, calculate the average and standard deviation of the distance values of all points in the local neighborhood of the point, and use them as the average distance and standard deviation of the distance to the point, respectively. The ratio of the square of the average distance to the square of the standard deviation of the distance is taken as the local central response value of that point.
6. The intelligent seeding monitoring method based on computer vision according to claim 1, characterized in that, The step of extracting effective center points from all points within the seed candidate region based on local center response values specifically includes: The local central response values of all points within the seed candidate region are normalized to obtain the normalized local central response values. Local maxima are extracted from all points within the seed candidate region, where the normalized local central response value of a local maxima is greater than the normalized local central response value of all points within its eight neighborhoods. Local maxima whose normalized local center response values are greater than a preset response threshold are identified as valid center points.
7. The intelligent seeding monitoring method based on computer vision according to claim 1, characterized in that, For each single-hole region, the overall consistency of adjacent frames is calculated based on the edge overlap indicator and center number representation value in all its frame images, specifically including: For the same single-hole region, obtain the edge overlap indicator of two adjacent frames, calculate the ratio of the absolute value of the difference between the edge overlap indicators of the two frames to the sum of the edge overlap indicators of the two frames, and subtract the ratio from 1 to obtain the edge consistency of adjacent frames. Obtain the center quantity representation value of two adjacent frames, calculate the ratio of the absolute value of the difference between the two frame center quantity representation values to the larger value of the two frame center quantity representation values, and subtract the ratio from 1 to obtain the quantity consistency of adjacent frames. Multiplying edge consistency with quantity consistency yields the overall consistency between adjacent frames.
8. The intelligent seeding monitoring method based on computer vision according to claim 1, characterized in that, The calculation of single-frame support for each image based on comprehensive consistency specifically includes: Obtain the overall consistency of the same single-hole region between adjacent frames in all frame images; For the first frame image, its overall consistency with the next frame image is taken as the single-frame support of that frame. For the last frame image, its overall consistency with the previous frame image is taken as the single-frame support of that frame. For an intermediate frame image, the average of its overall consistency with the previous frame image and its overall consistency with the next frame image is taken as the single-frame support of that frame.
9. The intelligent seeding monitoring method based on computer vision according to claim 1, characterized in that, The process involves weighting and accumulating the center number representation values in each frame image based on the single-frame support, determining the number with the largest cumulative support value as the final seed number, and using the ratio of the cumulative support value of this number to the sum of the cumulative support values of all candidate seed numbers as the confidence level to generate the seeding monitoring results. Specifically, this includes: Obtain the representation value of the number of centers of the same single hole region in each frame image and the single-frame support of each frame image; The set of all center quantity representation values appearing in each frame image is used as the candidate seed quantity set; For each candidate seed in the candidate seed set, the single-frame support of that seed in all frames in each frame image is summed to obtain the cumulative support value of that candidate seed. The number of candidate seeds with the highest cumulative support value is determined as the final number of seeds for that single hole region. The ratio of the cumulative support value of the final number of seeds to the sum of the cumulative support values of all candidate seeds is used as the confidence level of the single hole region. Based on the final seed count and confidence level of each individual hill area, sowing monitoring results are generated.
10. A computer vision-based intelligent seeding monitoring system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the computer program is executed by the processor, it implements the steps of the intelligent seeding monitoring method based on computer vision as described in any one of claims 1-9.