Seed detection method and system based on three-dimensional point cloud data construction technology
By constructing sparse point clouds and generating dense point clouds through cross-mapping, the accuracy and efficiency problems of seed 3D morphology analysis in existing technologies are solved, realizing comprehensive high-precision analysis of seed detection and supporting seed improvement and coating process optimization.
Patent Information
- Application Number
- CN202511245382.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-02
- Publication Date
- 2025-12-09
AI Technical Summary
Existing technologies are insufficient to achieve comprehensive and high-precision quantitative analysis of the three-dimensional morphology, size, and color spatial distribution of seeds, and cannot construct complete three-dimensional geometric models, thus limiting the accurate analysis of seed phenotypes and the optimization of coating processes.
By acquiring multi-view image data of seeds through a camera, a sparse point cloud is constructed and cross-mapped to generate a high-precision dense point cloud. This includes morphological closed contour extraction, multi-view contour 3D reconstruction, and point cloud-RGB image mapping, which improves the detail accuracy and dimensionality of the point cloud.
It enables the acquisition of comprehensive, high-precision three-dimensional shape, color, and size information of seeds, supporting refined research on seed improvement and coating processes, and improving detection efficiency and accuracy.
Smart Images

Figure CN121095201A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of agricultural seed testing technology, and in particular to a seed testing method and system based on three-dimensional point cloud data construction technology. Background Technology
[0002] Against the backdrop of continuous development in modern agricultural technology and bio-breeding research, seed quality testing, as a crucial link in ensuring high-yield and high-quality crops and promoting technological innovation in the seed industry, has received increasing attention. Traditional seed testing methods mostly rely on manual observation or analysis techniques based on two-dimensional images, primarily acquiring seed morphological characteristics and surface information through methods such as microscopic imaging and optical scanning. Although these methods have achieved a certain degree of automated identification, they have significant limitations in acquiring multi-dimensional information such as three-dimensional morphology, dimensional accuracy, and color space distribution.
[0003] In the prior art, CN108593663A discloses a seed coating qualification rate detection system and method. This technology uses industrial cameras arranged around a high-transmittance glass, combined with a coaxial light source, to acquire images of seeds in four directions (top, bottom, front, and back). An industrial control computer then preprocesses the images, calculates the area, and analyzes the coverage rate, thereby automatically determining the seed coating coverage rate. This method significantly improves detection efficiency and consistency compared to traditional manual observation and possesses a certain online detection capability. However, this technology is essentially based on two-dimensional planar image analysis, only able to obtain the projected outline and surface color distribution of the seed from a limited perspective, and cannot construct a complete three-dimensional geometric model. Its detection results are limited by the shooting angle and lighting conditions, and there are blind spots in the evaluation of coating quality for seeds with uneven surface coverage, local defects, or complex shapes, making it difficult to achieve truly comprehensive, high-precision three-dimensional quantitative analysis. Furthermore, the system does not involve point cloud modeling and density reconstruction, and cannot provide key three-dimensional parameters such as the seed's morphology, surface curvature, and volume, limiting its applicability in high-end applications such as precise seed phenotypic analysis and coating process optimization. Summary of the Invention
[0004] Purpose of the invention: In order to overcome the shortcomings of the existing technology, the present invention provides a seed detection method and system based on three-dimensional point cloud data construction technology, which can acquire seed shape, size and color information in a refined manner to construct seed point cloud data for detection.
[0005] Technical solution: To achieve the above objectives, the present invention provides a seed detection method based on 3D point cloud data construction technology, which includes:
[0006] The seed is captured by a camera from multiple perspectives, and the image data is processed to obtain the two-dimensional outer contour of the seed.
[0007] Based on the relative position of the camera and the seed, the two-dimensional contour line is transformed into three-dimensional space to construct a sparse point cloud of the seed. ;
[0008] Using the sparse point cloud The original image data is cross-mapped to obtain a denser point cloud with RGB information; the cross-mapping includes:
[0009] -The sparse point cloud Projecting the data onto the image data yields a dimensionality-reduced point set. ;
[0010] - Sample each pixel of the image data one by one, perform inverse distance weighted interpolation with the dimensionality-reduced point set, calculate the interpolation weight based on the distance between the pixel and the projection point in the point set, and obtain the depth data corresponding to each pixel;
[0011] - Project the pixels onto the sparse point cloud based on the depth data. The dense point cloud is obtained by using a coordinate system;
[0012] The indicators of the seeds are detected based on the dense point cloud.
[0013] Furthermore, the acquisition of multi-view image data of the seed via camera includes:
[0014] The relative motion between the seed and the camera allows the camera to acquire image data around the seed at equal step angles. Specifically, the seed can be placed on a rotating platform and the platform can rotate at equal step angles while the camera acquires image data at a fixed position; alternatively, the seed can be fixed, allowing the camera to move around the seed to acquire image data.
[0015] Further, the processing of each of the image data to obtain the two-dimensional outer contour line of the seed includes:
[0016] Read the image data and use the rgb2gray() function to convert the original image into a grayscale image;
[0017] The Sobel operator is used to detect edge points of the seed image in the grayscale image to obtain a two-dimensional outer contour. In this scheme, four 3×3 Sobel operator modules are used to detect edge directions of 45°, 135°, 225° and 315° respectively. The grayscale values of the upper, lower, left and right neighbors of the pixel are first averaged or weighted averaged, and then first-order derivative processing is performed to detect the edge points.
[0018] Furthermore, based on the relative position of the camera and the seed, the two-dimensional contour line is transformed into three-dimensional space to construct a sparse point cloud of the seed. ,include:
[0019] Define an initial outer body that contains the seed to the maximum extent. That is, the outer casing. The dimensions of the outer shell are large enough to allow the seed to be completely contained within it. Within;
[0020] The two-dimensional outer contour lines are sequentially based on the image data corresponding to each viewpoint. Perform the following operations:
[0021] -The two-dimensional outer contour line Stretching is performed along a direction perpendicular to the image plane to form a stretched body that penetrates the latest outer envelope. During the first calculation, the latest outer body is the initial outer body. ;
[0022] - Use Boolean operations to find the latest outer body and the stretched body. The intersection of the two-dimensional outer contours of the image data with an angle of 0° relative to the seed is used as the new outer contour. The resulting outer contour is then used as the spatial contour of the seed. The above process is repeated, starting from the two-dimensional outer contour of the image data with an angle of 0° relative to the seed, and continuing to the two-dimensional outer contour of the image data with an angle of 1.8° increment relative to the seed. The calculation is repeated until the spatial contour of the seed is finally obtained.
[0023] The vertices where each edge intersects on the outer contour surface of the spatial contour volume are extracted to form a point set, which is used as a sparse point cloud to describe the seed contour. .
[0024] Further, projecting the sparse point cloud S onto the image data includes:
[0025] For the sparse point cloud S= The points in the equation are centered using the following formula:
[0026] ;
[0027] Calculate the covariance matrix XX of the sample T ;
[0028] For covariance matrix XX T Perform eigenvalue decomposition and take the maximum value. The eigenvectors corresponding to each eigenvalue Form the projection matrix W;
[0029] Based on the projection matrix W, the sparse point cloud S is projected onto the image plane corresponding to the image data to obtain the dimensionality-reduced point set. .
[0030] Furthermore, the inverse distance weighted interpolation specifically includes:
[0031] For any point in the point set P Take the pixels in its neighborhood as a discrete point set, and calculate the interpolation weights:
[0032] ;
[0033] in, Let be any positive real number, usually taken as 2; , for coordinate, These are the coordinates of a discrete point.
[0034] A seed detection system based on 3D point cloud data construction technology includes a placement platform, a camera, and a data acquisition and processing system. The placement platform and the camera are capable of relative movement, allowing the camera to acquire images of the seeds on the placement platform from multiple angles. The data acquisition and processing system is used to implement the aforementioned seed detection method based on 3D point cloud data construction technology.
[0035] Beneficial Effects: The seed detection method and system based on 3D point cloud data construction technology of the present invention have the following beneficial effects:
[0036] (1) In this invention, by extracting the closed contour with high precision in morphology, reconstructing the three-dimensional contour line of multiple views and mapping the point cloud to RGB image, a high-precision three-dimensional dense point cloud with RGB information can be obtained. This allows for the acquisition of information such as the shape, color and size of the seed in all directions, which is convenient for the fine extraction of seed information and the fine identification of seed defects. It is suitable for fine research fields such as scientific research and development. Based on the acquisition of full-dimensional information, it can provide data support for seed improvement, coating process improvement and other aspects.
[0037] (2) By defining an initial outer body and performing stretching and Boolean intersection operations based on multi-view contour lines, the vertices of the spatial contour body are finally extracted to form a sparse point cloud S. The technical effect is that the three-dimensional spatial contour of the seed can be reconstructed efficiently and accurately from multi-view images, providing a reliable foundation for the subsequent generation of high-precision dense point clouds and improving the accuracy and efficiency of three-dimensional data reconstruction.
[0038] (3) By cross-mapping the sparse point cloud 𝑆 with the original image data from each viewpoint, the detail of the point cloud can be greatly improved, and the mapped RGB information can improve the dimension of the three-dimensional data. Attached Figure Description
[0039] Figure 1 This is a schematic diagram of a seed detection system based on 3D point cloud data construction technology;
[0040] Figure 2 This is a flowchart illustrating a seed detection method based on 3D point cloud data construction technology.
[0041] Figure 3 The module diagram is for four 3×3 Sobel operator modules. Detailed Implementation
[0042] The invention will now be further described with reference to the accompanying drawings.
[0043] like Figure 1 The diagram illustrates a seed detection system based on 3D point cloud data construction technology. The seed detection system includes a placement platform, a camera, and a data acquisition and processing system. The placement platform and the camera are capable of relative movement, allowing the camera to acquire images of the seeds on the placement platform from multiple angles. The data acquisition and processing system is used to implement the seed detection method based on 3D point cloud data construction technology of the present invention.
[0044] like Figure 2 The seed detection method based on 3D point cloud data construction technology shown includes the following steps S101-S104:
[0045] Step S101: Acquire multi-view image data of the seed using a camera, and process each image data to obtain the two-dimensional outer contour of the seed; in this embodiment, the seed being detected is a seed with a coating; in other embodiments, the seed may also be a bare seed itself.
[0046] Step S102: Based on the relative position of the camera and the seed, the two-dimensional contour line is transformed into three-dimensional space to construct a sparse point cloud of the seed. ;
[0047] Step S103, utilizing the sparse point cloud The original image data is cross-mapped to obtain a denser point cloud with RGB information; the cross-mapping includes:
[0048] -The sparse point cloud Projecting the data onto the image data yields a dimensionality-reduced point set. ;
[0049] - Sample each pixel of the image data one by one, perform inverse distance weighted interpolation with the dimensionality-reduced point set, calculate the interpolation weight based on the distance between the pixel and the projection point in the point set, and obtain the depth data corresponding to each pixel;
[0050] - Project the pixels onto the sparse point cloud based on the depth data. The dense point cloud is obtained by using a coordinate system;
[0051] Step S104: Detect seed indicators based on the dense point cloud. In this application, the data obtained from the detection allows for comprehensive acquisition of seed coating indicators and defect assessment, facilitating subsequent adjustments to the coating process based on the indicator data and defects.
[0052] In this invention, high-precision closed contour extraction by morphology, three-dimensional reconstruction of multi-view contour lines, and point cloud-RGB image mapping are used to obtain a high-precision three-dimensional dense point cloud with RGB information. This allows for the acquisition of seed shape, color, size, and other information from all angles, facilitating the refined extraction of seed information and the precise identification of seed defects. It is suitable for precise research fields such as scientific research and development, and the acquisition of full-dimensional information can provide data support for seed improvement and coating process improvement.
[0053] By sparse point clouds Cross-mapping with the original image data from various perspectives can significantly improve the detail and fineness of point clouds, while the mapped RGB information can increase the dimensionality of the 3D data.
[0054] Preferably, the acquisition of multi-view image data of the seed via camera in step S101 above includes:
[0055] The seed and camera are moved relative to each other so that the camera can acquire image data around the seed at a constant step angle. In this embodiment, the step angle is 1.8°, and a 360-degree relative rotation between the camera and the seed can acquire 200 image data sets. Specifically, the seed can be placed on a rotating platform and the platform can rotate at a constant step angle, while the camera acquires image data at a fixed position; alternatively, the seed can be fixed so that the camera moves around the seed to acquire image data.
[0056] like Figure 2 As shown, the global coordinate system OXYZ in this embodiment is defined as follows: the origin O is the intersection of the relative rotation axis and the center of the seed placement platform, with the seed placed at the center of the platform; the Z-axis is the rotation axis. When the seed is in its initial position, i.e., the rotation angle is zero, the Y-axis is parallel to the camera's principal optical axis, and the X-axis is determined by the right-hand rule. For a series of camera positions... Using π0 corresponding to the camera position C0 as the initial image plane, α k π represents the angle that the camera has rotated relative to its initial position at time k. k Indicates the camera position C at time k. k The image plane corresponding to the location; the image plane coordinate system π0 is defined as follows: the origin o of the image plane is the projection of the origin O in the global coordinate system onto the current image plane, the x-axis is parallel to the X-axis in the global coordinate system, and the y-axis is parallel to the Z-axis. For any camera position C at time k...k Establish a time coordinate system OX k Y k Z k To perform auxiliary transformation. At time k, any point p on the object's contour n In the image plane π k The corresponding coordinate is i n k ,j n k The coordinates of the origin O of the global coordinate system on the image plane are i. k ,j k Point p n The coordinates are represented as:
[0057] ;
[0058] In the formula, , This represents the actual size of a single pixel along the length and width of the image plane.
[0059] Preferably, the processing of each of the image data in step S101 to obtain the two-dimensional outer contour line of the seed includes the following steps S201-S202:
[0060] Step S201: Read the image data and use the rgb2gray function to convert the original image into a grayscale image;
[0061] Step S202: The Sobel operator is used to detect edge points of the seed image in the grayscale image to obtain a two-dimensional outer contour line. In this embodiment, four 3×3 Sobel operator modules are used to detect edge directions at 45°, 135°, 225°, and 315° respectively. The grayscale values of the top, bottom, left, and right neighbors of the pixel are first averaged or weighted averaged, and then first-order derivative processing is performed to detect the edge points. The four Sobel operator modules are as follows: Figure 3 As shown.
[0062] Preferably, in step S103 above, the two-dimensional contour line is transformed into three-dimensional space based on the relative position of the camera and the seed to construct a sparse point cloud of the seed. This includes the following steps S301-S303:
[0063] Step S301: Define an initial outer body that contains the seed to the maximum extent. That is, the outer casing. The dimensions of the outer shell are large enough to allow the seed to be completely contained within it. Within;
[0064] Step S302: Sequentially based on the two-dimensional outer contour lines corresponding to the image data from each viewpoint. Perform the following operations:
[0065] -The two-dimensional outer contour line Stretching is performed along a direction perpendicular to the image plane to form a stretched body that penetrates the latest outer envelope. During the first calculation, the latest outer body is the initial outer body. ;
[0066] - Use Boolean operations to find the latest outer body and the stretched body. The intersection of the two-dimensional outer contours of the image data with an angle of 0° relative to the seed is used as the new outer contour. The resulting outer contour is then used as the spatial contour of the seed. The above process is repeated, starting from the two-dimensional outer contour of the image data with an angle of 0° relative to the seed, and continuing to the two-dimensional outer contour of the image data with an angle of 1.8° increment relative to the seed. The calculation is repeated until the spatial contour of the seed is finally obtained.
[0067] Step S303: Extract the vertices where each edge intersects on the outer contour surface of the spatial contour volume to form a point set, and use it as a sparse point cloud to describe the seed contour. .
[0068] By defining an initial bounding volume and performing stretching and Boolean intersection operations iteratively based on multi-view contour lines, the vertices of the spatial contour volume are finally extracted to form a sparse point cloud S. The technical effect is that it can efficiently and accurately reconstruct the three-dimensional spatial contour of the seed from multi-view images, providing a reliable foundation for the subsequent generation of high-precision dense point clouds and improving the accuracy and efficiency of three-dimensional data reconstruction.
[0069] Preferably, the step S103 above, which involves projecting the sparse point cloud S onto the image data, includes the following steps S401-S404:
[0070] Step S401, for the sparse point cloud S= The points in the equation are centered using the following formula:
[0071] ;
[0072] Step S402, calculate the covariance matrix XX of the sample. T ;
[0073] Step S403, for the covariance matrix XX T Perform eigenvalue decomposition and take the maximum value. The eigenvectors corresponding to each eigenvalue Form the projection matrix W;
[0074] Step S404: Based on the projection matrix W, project the sparse point cloud S onto the image plane corresponding to the image data to obtain the dimensionality-reduced point set. .
[0075] Preferably, the inverse distance weighted interpolation described in step S103 specifically includes:
[0076] For any point in the point set P Take the pixels in its neighborhood as a discrete point set, and calculate the interpolation weights:
[0077] ;
[0078] in, Let be any positive real number, usually taken as 2; , for coordinate, These are the coordinates of a discrete point.
[0079] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A seed detection method based on 3D point cloud data construction technology, which includes: The seed is captured by a camera from multiple perspectives, and the image data is processed to obtain the two-dimensional outer contour of the seed. The method is characterized by: Based on the relative position of the camera and the seed, the two-dimensional contour line is transformed into three-dimensional space to construct a sparse point cloud of the seed. ; Utilizing the sparse point cloud The original image data is cross-mapped to obtain a denser point cloud with RGB information; the cross-mapping includes: -The sparse point cloud Projecting the image data onto it yields a dimensionality-reduced set of points. ; - Sample each pixel of the image data one by one, and perform inverse distance weighted interpolation with the dimension-reduced point set to obtain the depth data corresponding to each pixel; - Project the pixels onto the sparse point cloud based on the depth data. The dense point cloud is obtained by using a coordinate system; The indicators of the seeds are detected based on the dense point cloud.
2. The seed detection method based on 3D point cloud data construction technology according to claim 1, characterized in that, The acquisition of multi-view image data of the seed via camera includes: The seed is made to move relative to the camera so that the camera can acquire image data around the seed at equal step angles.
3. The seed detection method based on 3D point cloud data construction technology according to claim 1, characterized in that, The process of processing each of the image data to obtain the two-dimensional outer contour line of the seed includes: Read the image data and use the rgb2gray() function to convert the original image into a grayscale image; The Sobel operator is used to detect the edge points of the seed image in the grayscale image to obtain a two-dimensional outer contour line.
4. The seed detection method based on 3D point cloud data construction technology according to claim 1, characterized in that, Based on the relative position of the camera and the seed, the two-dimensional contour line is transformed into three-dimensional space to construct a sparse point cloud of the seed. ,include: Define an initial outer body that contains the seed to the maximum extent. ; The two-dimensional outer contour lines are sequentially based on the image data corresponding to each viewpoint. Perform the following operations: -The two-dimensional outer contour line Stretching is performed along a direction perpendicular to the image plane to form a stretched body that penetrates the latest outer envelope. During the first calculation, the latest outer body is the initial outer body. ; - Use Boolean operations to find the latest outer body and the stretched body. The intersection of the elements is used as the new latest outer body; the final latest outer body is used as the spatial contour of the seed. The vertices where each edge intersects on the outer contour surface of the spatial contour volume are extracted to form a point set, which is used as a sparse point cloud to describe the seed contour. .
5. The seed detection method based on 3D point cloud data construction technology according to claim 1, characterized in that, The step of projecting the sparse point cloud S onto the image data includes: For the sparse point cloud S= The points in the equation are centered using the following formula: ; Calculate the covariance matrix XX of the sample T ; For covariance matrix XX T Perform eigenvalue decomposition and take the maximum value. The eigenvectors corresponding to each eigenvalue Form the projection matrix W; Based on the projection matrix W, the sparse point cloud S is projected onto the image plane corresponding to the image data to obtain the dimensionality-reduced point set. .
6. The seed detection method based on 3D point cloud data construction technology according to claim 1, characterized in that, The inverse distance weighted interpolation specifically includes: For any point in the point set P Take the pixels in its neighborhood as a discrete point set, and calculate the interpolation weights: ; in, Let be any positive real number, usually taken as 2; , for coordinate, These are the coordinates of a discrete point.
7. A seed detection system based on 3D point cloud data construction technology, characterized in that, The method includes a seed placement platform, a camera, and a data acquisition and processing system. The seed placement platform and the camera are capable of relative movement, allowing the camera to acquire images of seeds on the seed placement platform from multiple angles. The data acquisition and processing system is used to implement the seed detection method based on three-dimensional point cloud data construction technology as described in any one of claims 1-6.
Citation Information
Patent Citations
System and method for detecting percent of pass of seed coating
CN108593663A