Automatic corn variety inspection method and device based on single-face visual deduction
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- LUOYANG INST OF SCI & TECH
- Filing Date
- 2026-04-13
- Publication Date
- 2026-06-23
Smart Images

Figure CN122032889B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of agricultural machinery and intelligent detection technology, specifically relating to an automated corn variety assessment method and device based on single-sided visual deduction. Background Technology
[0002] Maize is an important food crop in my country, and its seed security is directly related to the national food security strategy. In the breeding of high-yield and high-quality maize varieties, parameters such as the number of kernels per ear, the number of rows per ear, and geometric dimensions in the ear phenotype are key evaluation indicators in the seed evaluation process. Achieving high-throughput, low-cost, and high-precision acquisition of ear phenotypic data is crucial for promoting the digital and intelligent transformation of modern breeding. Currently, the main technical solutions for acquiring maize ear phenotypic information in the industry include the following:
[0003] (1) Traditional manual seed selection method. As the most basic measurement method, researchers usually rely on visual observation and manual counting, supplemented by simple tools such as vernier calipers to measure each corn ear one by one. Although this method is intuitive, it has problems such as high labor intensity, low work efficiency and great influence of subjective factors, making it difficult to meet the requirements of large-scale breeding screening.
[0004] (2) Destructive threshing measurement method. In order to obtain accurate total number and total weight of kernels in the whole ear, some methods use photoelectric counters or weighing sensors to measure in batches after the corn ears are completely threshed. This method can provide a relatively accurate yield baseline, but it is a destructive test. Once the ears are threshed, their original three-dimensional morphological characteristics and spatial arrangement parameters of kernels will be lost, which cannot meet the needs of modern breeding for in-depth tracing and review of the spatial structural traits of ears.
[0005] (3) Single-sided seed selection method based on low-cost two-dimensional images. This method typically uses ordinary industrial cameras or scanners to acquire two-dimensional images of one side of the ear, and then uses traditional image processing algorithms for threshold segmentation and counting. This method has low equipment cost and fast detection speed, but it has limitations in data depth: it can only process and extract two-dimensional features of the visible surface of the ear, and cannot infer information about the occluded back side or the three-dimensional characteristics of the whole ear. Because it ignores the three-dimensional cylindrical structure characteristics of the ear, the phenotypic data obtained by this method has insufficient depth of utilization, and inferring the whole from a single side often leads to systematic errors, which restricts the accuracy of screening superior germplasm.
[0006] (4) Automated platform based on multi-view camera array and mechanical flipping. To overcome the limitations of single-view perspective, existing high-end automated seed testing devices mostly use multi-view camera arrays for surround shooting, or install complex mechanical flipping mechanisms on conveyor belts to force the ears to rotate in order to splice together the whole picture of the ears. Although this solution improves data integrity, it has the disadvantages of complex equipment structure, large size, high manufacturing cost, high mechanical failure rate, and difficulty in popularizing and applying it in grassroots breeding stations or in-situ field environments.
[0007] (5) Methods based on three-dimensional laser scanning or CT tomography. This type of method uses structured light, three-dimensional laser scanners, or X-ray CT equipment to perform high-precision non-destructive scanning of ear of fruit to obtain extremely detailed three-dimensional point clouds or internal perspective models. This approach can provide high-precision phenotypic reconstruction, but it also has problems such as high cost, long single-ear scanning cycle, and strict requirements for the working environment, making it unsuitable for application in grassroots agricultural production environments such as in-situ field work.
[0008] (6) Deep learning counting method based on conventional dense target regression. At the pure algorithm level, existing visual seed examination equipment mostly directly applies general dense target detection or density map regression networks to identify corn kernels. Such models only treat kernels as disordered dense targets, ignoring the strong geometric prior and symmetry of the "row-kernel" relationship unique to corn ears. This leads to a decrease in the model's generalization ability when faced with interference from natural light in the field, mutual shading among multiple ears, or encountering heterogeneous ears such as purple corn, spotted corn, or deformed ears, making it impossible to achieve stable cross-variety and cross-morphological phenotypic measurements.
[0009] In summary, how to break free from the dependence on complex mechanical transmissions and multi-view hardware, and achieve high-precision, high-throughput in-situ analysis of the whole ear's full-dimensional phenotype at low cost, has become a crucial issue that urgently needs to be addressed in the fields of agricultural intelligent devices and breeding informatization. Summary of the Invention
[0010] To address the shortcomings of existing technologies, the present invention aims to provide an automated corn seed evaluation method and apparatus based on single-sided visual deduction, in order to solve the technical problems of existing seed evaluation equipment relying on mechanical flipping, which easily leads to material jamming and damage to the seed quality, and the disconnect between electromechanical sorting sequence caused by multiple material obstructions and fluctuations in calculation time.
[0011] To achieve the above objectives, in a first aspect, the present invention provides an automated corn variety evaluation method based on single-sided visual deduction, comprising the following steps:
[0012] Step 1: The corn ears are conveyed at a constant speed in a single row through the feeding and conveying mechanism, and the physical displacement is tracked in real time by a rotary encoder;
[0013] Step 2: When the ear of fruit cuts off the beam of the photoelectric sensor, the single-view vision perception module is triggered to acquire a single-sided two-dimensional image and latch the physical pulse reference.
[0014] Step 3: The edge computing and control unit receives the image and performs phenotypic parameters by performing three-dimensional cylindrical perspective distortion physical compensation and restricted curvature bidirectional topology search. When material stacking is detected, a spatial topology feature compensation mechanism based on visual exposure confidence is automatically triggered for calibration and calculation.
[0015] Step 4: Based on the calculated classification results and the locked dynamic target pulse value, when the absolute displacement of the ear of fruit reaches the sorting station, the execution and sorting mechanism are triggered to perform physical classification and removal of the fruit.
[0016] Secondly, the present invention provides an automated corn evaluation device based on single-view visual inference to implement the aforementioned automated corn evaluation method based on single-view visual inference, comprising a feeding and conveying mechanism, a single-view visual perception module, an edge computing and control unit, and an execution and sorting mechanism.
[0017] The feeding and conveying mechanism is used to receive materials and convey corn cobs in a single row at a uniform speed along a set direction.
[0018] The single-view vision perception module is located above the feeding and conveying mechanism and is used to acquire a single-sided two-dimensional image of the ear of fruit without mechanical flipping when the target ear of fruit reaches the set capture position.
[0019] The edge computing and control unit is electrically connected to the feeding and conveying mechanism and the single-view vision perception module, respectively. It is used to receive the single-sided two-dimensional image and extract the physical characteristics of the ear of fruit, calculate the phenotypic parameters of the ear of fruit by combining the three-dimensional geometric prior model and the spatial topology compensation mechanism, and output the sorting control signal.
[0020] The execution and sorting mechanism is located at the end of the feeding and conveying mechanism and is communicatively connected to the edge computing and control unit. It is used to receive the sorting control signal and perform corresponding pneumatic sorting actions on the ear of fruit.
[0021] The surface of the feeding and conveying mechanism is provided with guide grooves for limiting the lateral displacement and axial rolling of the ears of fruit, and its main drive roller is coaxially connected to an incremental rotary encoder; the single-view vision perception module is encapsulated in a light-shielding dark box and includes a vertically downward industrial camera and a front-end trigger photoelectric sensor.
[0022] The edge computing and control unit, combined with a three-dimensional geometric prior model, calculates ear phenotypic parameters, specifically including:
[0023] Based on the extracted pixel coordinates of the single-sided two-dimensional image of the ear, the physical principal axis vector of the ear is extracted to establish a local coordinate system; the physical radius pixel equivalent is determined according to the minor axis of the maximum cross section of the ear bounding box, and the physical central angle of the kernel on the three-dimensional cylindrical surface is calculated using inverse trigonometric functions; lateral reverse stretching compensation is performed based on the principle of equidistant mapping to eliminate optical perspective distortion; then, taking the middle row of the trajectory with the least distortion as the benchmark, a bidirectional topological search is performed according to the spatial angle constraint between adjacent kernels to reconstruct the number of independent trajectories, and the total number of kernels is inferred by combining the number of visible kernels on one side.
[0024] The edge computing and control unit, combined with a spatial topology compensation mechanism, calculates ear phenotypic parameters, specifically including:
[0025] When multiple overlapping ears of fruit are detected in an image, locally visible ears of fruit are mapped as nodes in a heterogeneous topological graph containing physical occlusion edges and spatially adjacent edges. The visual exposure confidence of the nodes is calculated based on the geometric integrity of the entity's outline and the proportion of the mask area. Using this confidence as a gating coefficient, the spatial compensatory correlation between adjacent nodes is calculated. The phenotypic inference values of high-confidence adjacent nodes are used to perform environmental consensus weighted fusion and compensatory update of the phenotypic parameters of the occluded individuals.
[0026] The edge computing and control unit outputs a sorting control signal and triggers a pneumatic sorting action, specifically including:
[0027] The physical distance from the camera to the cylinder's impact center line is mapped to an absolute pulse constant using rotary encoder parameters. The capture pulse reference point is latched at the moment the photoelectric sensor triggers the camera. After the phenotypic parameters are calculated, the absolute pulse constant is superimposed and the feedforward compensation pulse for the cylinder's mechanical response delay is subtracted to lock the dynamic target pulse value of the ear of fruit. When the real-time accumulated pulse equals the target value, a specific control level is output to the peripheral high-speed solenoid valve to trigger the cylinder to perform a physical impact.
[0028] The beneficial effects of this invention are: it solves the problems of high cost, low efficiency, and low accuracy in complex environments of existing automated testing devices, specifically:
[0029] (1) By using a single industrial camera combined with geometric deduction logic to obtain full ear phenotypic data, the traditional test equipment uses multiple depth camera arrays or mechanical flipping rollers, effectively avoiding material jamming and secondary damage to germplasm caused by complex mechanical transmission, reducing the overall cost and maintenance cost, and making it easy to deploy in grassroots breeding stations or production line environments.
[0030] (2) By performing lateral reverse stretching compensation and bidirectional topological search of the edge grains of the image and the limited curvature, the system can directly infer and output the total number of grains in the whole ear containing the hidden area and the number of rows in the whole ear without obtaining the back image, thus improving the efficiency of in-situ detection.
[0031] (3) By calculating the visual exposure confidence of the ear, the phenotypic inference value of the ear with high visibility is used to adaptively weighted fuse the ear with shading, which overcomes the defects of repeated counting or missed measurement under high-throughput continuous feeding and ensures the reliability of the group yield measurement data.
[0032] (4) By mapping the physical distance to an absolute pulse constant that is not affected by time, the dynamic coordinates of the target ear and the action of the cylinder are strictly aligned in time, which ensures the reliability of the physical rejection action of the device under high-speed continuous feeding and reduces the misclassification and omission rate.
[0033] The device structure and working method described in this invention can achieve efficient and non-destructive extraction of three-dimensional full phenotypic parameters of maize ears in continuous assembly line operations without mechanical turning, providing a reliable device and technical means for high-throughput seed testing and yield measurement, germplasm resource evaluation, and modern agricultural automated breeding improvement. Attached Figure Description
[0034] Figure 1 This is a schematic diagram of an automated corn variety assessment method based on single-sided visual deduction.
[0035] Figure 2 This is a schematic diagram of the overall mechanical structure of an automated corn testing device based on single-sided visual deduction, provided as an embodiment of the present invention.
[0036] Figure 3 The hardware topology and signal flow diagram of the control system of the automated corn testing device provided in the embodiment of the present invention.
[0037] Figure 4 A flowchart illustrating the single-sided visual deduction logic within the edge computing and control unit provided in this embodiment of the invention.
[0038] Figure 5 This is a schematic diagram illustrating the principle of the heterogeneous topological space compensation mechanism provided in the embodiment of the present invention in a multi-ear stacking scenario. Detailed Implementation
[0039] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. It should be noted that the described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0040] It should be noted that the terms "first" and "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0041] Example 1:
[0042] Combination Figures 1 to 5 This embodiment provides an automated corn variety assessment method and apparatus based on single-sided visual inference. In terms of macroscopic system architecture, the apparatus includes: a feeding and conveying mechanism for uniformly conveying ears of corn; a single-view visual perception module for acquiring single-sided images of ears of corn; an edge computing and control unit equipped with a lightweight inference model; and a controlled execution and sorting mechanism for entity removal.
[0043] In one alternative embodiment, to enhance the physical stability and anti-interference capabilities of the device during in-situ operation on an agricultural production line, the mechanical main structure of the automated corn seed testing device is refined. Combined with... Figure 2 The diagram shows the overall mechanical structure of the device. All electromechanical modules are modularly mounted on a rigid support frame (using industrial aluminum profiles or a welded stainless steel skeleton). Specifically, the main mechanical body of the device is divided into the following sections along the material conveying direction: the feeding area, the dark-box vision area, and the physical sorting area.
[0044] In the feeding area, the feeding and conveying mechanism includes a wide-mouth hopper at the top and an electromagnetic vibrating feeder located below it. A height-adjustable flow-limiting baffle is provided between the discharge port of the wide-mouth hopper and the receiving plate of the electromagnetic vibrating feeder to physically limit the number of ears of corn falling at a time. The output end of the electromagnetic vibrating feeder smoothly transitions to the starting end of a single-row conveyor belt. To prevent unintended axial tumbling or lateral displacement of the corn ears during high-speed transport (which would cause the visual projection reference plane to fail), the surface of the single-row conveyor belt is fixed with dark matte material V-shaped or U-shaped guide grooves, allowing the ears to be naturally confined by gravity at the bottom of the guide grooves, ensuring that their long axis is parallel to the direction of conveyor belt operation.
[0045] In the darkroom vision area, to isolate the interference of complex natural stray light from field or greenhouse environments on image feature extraction, the single-view vision sensing module is encapsulated in a sealed metal or acrylic light-shielding darkroom. The light-shielding darkroom straddles and covers the middle section of a single conveyor belt, and a vision sensing bracket with a vertical height of 60 cm is fixed inside. A single industrial RGB camera equipped with a global shutter is inverted and suspended at the center of the bracket via a three-dimensional fine-tuning gimbal, with its optical axis vertically downward aligned with the center line of the V-shaped guide groove of the conveyor belt. A ring-shaped LED strobe light source, concentrically arranged at a downward tilt of 45 degrees, is positioned around the camera lens to eliminate shadows on the surface of the ears of fruit. Furthermore, through-beam photoelectric sensors are horizontally aligned on both sides of the conveyor belt directly in front of the camera's field of view to provide the physical trigger zero point for visual capture.
[0046] In the physical sorting area, the execution and sorting mechanism includes multi-stage pneumatic actuators. Below the end of a single conveyor belt, multiple quality collection bins (good seed bins, shriveled bins, and deformed bins) with flexible cushioning liners are arranged in parallel to prevent physical damage to the germplasm from falls. On the side of the parabolic drop trajectory at the end of the conveyor belt, a corresponding number of high-speed miniature cylinders or high-frequency pneumatic spray valves are horizontally mounted via flange brackets. Each cylinder's piston rod is fitted with an engineering plastic impact plate. These cylinders are connected to corresponding solenoid valve groups via pneumatic pipelines, and the control pins of the solenoid valve groups are hardwired to the GPIO relay terminals of the edge control motherboard, thus forming an electromechanical physical execution link.
[0047] Based on the above physical architecture, the specific workflow of this automated corn testing device includes:
[0048] S101, Physical Feeding and Uniform Displacement Tracking:
[0049] The corn ears to be tested fall into the feed hopper, are oriented by the electromagnetic vibrating feeder at the bottom, and then fall onto a single-row conveyor belt. To facilitate subsequent background segmentation, the single-row conveyor belt is preferably made of a dark matte material and has V-shaped guide grooves with an angle of 120 degrees on its surface to limit the lateral rolling of the corn ears. These guide grooves, in conjunction with the electromagnetic vibrating feeder, globally limit the lateral rolling of the corn ears and achieve single-row organization. However, under real-world physical conditions of high-speed, high-throughput continuous feeding, extreme situations may still occasionally occur, such as ears colliding head-to-tail or localized compression and adhesion. In these cases, the spatial topology compensation mechanism of Embodiment 3 is triggered. The conveyor belt is driven by a variable frequency motor, conveying the corn forward at a set linear velocity at a uniform speed. Transport forward at a constant speed.
[0050] The main drive roller of the variable frequency motor (given roller diameter) A high-precision incremental rotary encoder (resolution 60mm) is rigidly connected to the end coaxially. (1024 pulses per revolution). During conveyor belt operation, the rotary encoder outputs two orthogonal A / B phase pulse signals in real time to the hardware counter of the edge computing and control unit. By accumulating the pulse count, the absolute physical displacement coordinate system of the corn ears on the production line is established.
[0051] S102, Photoelectric Co-triggered Triggering and Single-Sided Visual Acquisition:
[0052] When the corn ears enter the darkroom's vision zone via the conveyor belt, their physical front end cuts off the light beam from the through-beam photoelectric sensor, causing the sensor to generate a falling edge signal. Upon receiving this hardware interrupt signal, the edge computing and control unit, combined with the currently known and set conveyor belt linear speed v, calculates and executes... A millisecond hardware delay (this delay ensures the ear of fruit is precisely centered in the camera's field of view). At the end of the delay, the control unit sends a hard trigger pulse to the industrial RGB camera. Without any physical flipping mechanism, the industrial camera instantaneously captures a single-sided, two-dimensional, high-resolution image of the ear of fruit from an orthogonal top-down perspective, and transmits the image losslessly to the memory of the edge computing and control unit via the GigE (Gigabit Ethernet) interface, awaiting inference algorithm calls.
[0053] S103, Implicit 3D Deduction Based on Geometric Priors:
[0054] like Figure 4 As shown in the edge computing deduction logic flowchart, the edge computing and control unit in this embodiment adopts an industrial control motherboard equipped with an independent edge computing acceleration module. The motherboard receives the image within milliseconds and calls the quantized and compressed single-sided three-dimensional geometric and physical deduction logic.
[0055] To address the optical dimensionality limitations of two-dimensional vision, the system does not directly perform planar dense counting. Instead, it abstracts the physical morphology of the corn ear a priori into a three-dimensional cylindrical space with convergent ends and varying curvature. Specifically, the ear is defined as a semi-ellipsoid or a cylinder with a major axis of 'a' and a minor axis of 'b'. The system first extracts the visible two-dimensional local appearance features and edge geometric distortion information, and then constructs a nonlinear spatial coordinate mapping mechanism. This mechanism correlates the collected two-dimensional entity pixel coordinates with the physical occupancy rate abstracted from the three-dimensional cylindrical space with varying curvature.
[0056] When inferring specific phenotypic parameters, to address the issues of kernel adhesion and edge overlap, the system introduces a dynamic point query mechanism to locate the two-dimensional physical coordinates of visible kernels in the image plane. Subsequently, leveraging the unique "row-column orthogonal topology" of maize, the system extracts spatial geometric information from the ear's center to the edge region and performs inverse physical compensation for three-dimensional cylindrical perspective distortion, thereby calculating the full-dimensional "number of rows" of the entire ear. Finally, the system uses the number of visible kernels on one side, combined with the integral proportionality coefficient of the surface area of the variable-curvature three-dimensional cylinder, to perform inverse inference, compensating for the spatial arrangement of kernels in the invisible back region, and outputting the total number of kernels in the entire ear, including hidden blind areas, and the three-dimensional full phenotypic geometric parameters.
[0057] The execution of this physical deduction and coordinate mapping mechanism ensures that the single-sided visual measurement not only converges in the three-dimensional spatial reconstruction, but also conforms to the objective physical laws of the corn ear in terms of the reconstructed structural topology and the total number of grain entities.
[0058] S104. Multi-objective heterogeneous graph aggregation and complex scene compensation:
[0059] If multiple overlapping ears of fruit are detected in the transport flow during the image preprocessing stage, the system dynamically implements a heterogeneous spatial topology compensation mechanism. The control unit maps each locally visible ear of fruit extracted from the image into an independent representation node. The physical pixel distance between ear of fruit and the overlapping occlusion boundary are modeled as edges of a graph. .
[0060] The system incorporates a visibility assessment logic module built into the edge control board, which calculates the visual exposure confidence level of each ear of fruit based on the proportion of its exposed area and the geometric integrity of its outline. In spatial feature compensation computation, the system utilizes a confidence gating mechanism to aggregate spatial geometric features among effectively physically adjacent nodes. For physically occluded individuals, the system performs environmental consensus-based weighted fusion and compensation updates through varietal morphological features transmitted by high-weighted adjacent entities and their own exposed local textures. Even in complex production line conditions with mixed stacking of heterogeneous ears such as purple corn and deformed ears, this mechanism can still stably output population total phenotypic yield data.
[0061] S105, Quantization Timing Alignment and Electromechanical Closed-Loop Sorting:
[0062] The system pre-determines and calibrates the fixed physical distance from the center of the industrial camera's optical axis to the end pneumatic sorting baffle.
[0063] The edge control motherboard compares the derived three-dimensional full phenotypic data with the preset breeding threshold and generates corresponding digital classification instructions. To eliminate the mechanical lag caused by fluctuations in algorithm derivation time, the edge control motherboard combines the diameter of the conveyor belt's main drive roller and the rotary encoder parameters to map the fixed physical distance into an absolute pulse constant.
[0064] The hardware timer within the motherboard latches the encoder's capture reference point at the moment of visual triggering, dynamically superimposes the absolute pulse constant, and feeds forward to subtract the compensation pulse calculated based on the inherent mechanical response delay time of the cylinder, thereby locking the corresponding dynamic target pulse value for that ear of fruit. When the hardware interrupt program monitors that the real-time accumulated pulse of the conveyor belt encoder equals the target value, it indicates that the physical entity of the ear of fruit has moved to the front of the pneumatic actuator.
[0065] At this moment, the edge control motherboard instantly outputs a 24V high-level control signal through the general purpose input / output interface (GPIO), triggering the peripheral high-speed optocouplers and relays, and outputting the corresponding high-frequency solenoid valve of the air circuit. The high-pressure airflow drives the cylinder piston rod to extend according to the predetermined stroke, physically striking the target ear of fruit or pushing it into the good product collection bin through the guide baffle. After the action is completed, the piston rod immediately retracts under the action of the spring or reverse air pressure. The whole process realizes the time synchronization of digital spatial visual coordinates and physical spatial mechanical actions, and constructs an electromechanical control closed loop of in-situ visual perception, geometric three-dimensional deduction, pulse displacement tracking, and pneumatic physical rejection.
[0066] S106. Local storage of test data and output of yield measurement logs:
[0067] While completing the physical sorting of the production line, the edge computing and control unit packages the three-dimensional full phenotypic data of each ear of fruit obtained through simulation. This data includes, but is not limited to, the total number of kernels per ear, the number of rows per ear, the length and maximum cross-sectional diameter of the ear, and the corresponding pneumatic channel action records. The data is then synchronously written into the local register of the industrial control computer. After the completion of a single yield measurement or variety evaluation batch, the system automatically summarizes the count values and group phenotypic characteristics of the physical sorting, generating a yield measurement log in a standard industrial data format. This yield measurement log is directly sent to the industrial touch screen (HMI) mounted on the equipment rack for on-site display via the field industrial Ethernet, or transmitted to the host computer in the control room for archiving.
[0068] In the physical feeding and conveying stage, the technical solution of this embodiment solves the problems of unexpected axial rolling of corn ears and interference from natural field light by using a V-shaped guide trough and a closed light-shielding dark box design, providing a stable physical benchmark for high-precision imaging with single-view vision. In the visual perception and core deduction stage, the proposed single-view implicit three-dimensional deduction mechanism based on geometric prior replaces the mechanical turning rollers or costly multi-camera arrays in traditional seed evaluation equipment that are prone to jamming. The system can reconstruct high-dimensional whole-ear full-phenotypic data with monocular vision, reducing the overall cost, shrinking the equipment size, and reducing the mechanical failure rate. In the electromechanical execution stage, by connecting the displacement tracking of the incremental rotary encoder with the GPIO level output of the edge control motherboard, the physical delay error caused by conveyor belt speed fluctuations is eliminated, and the timing alignment of digital spatial visual coordinates and physical spatial pneumatic movements is achieved. In summary, this embodiment constructs an automated mechanical physical architecture. Through a software and hardware collaborative strategy of single-sided deduction and displacement tracking, it realizes a closed loop from in-situ non-destructive sensing and physical removal to full-scale phenotypic data digital retention, thereby improving the throughput, accuracy, and equipment reliability of maize seed testing under complex agricultural conditions.
[0069] Example 2:
[0070] This embodiment, based on Embodiment 1, refines and expands the underlying mathematical and topological constraints of the geometric prior-based one-sided implicit three-dimensional deduction logic (step S103) executed by the edge computing and control unit. To reconstruct the three-dimensional physical spatial arrangement of the ear of grains under hardware conditions without physical mechanical flipping, the deduction logic is specifically implemented through the following geometric mapping and spatial topological extension steps:
[0071] S201. Spatial reference point extraction based on feature response:
[0072] An edge computing and control unit constructs a deep cross-domain sensing network. This network first extracts multi-scale low-level features of the image (achieved by introducing a Feature Pyramid Network, FPN), then introduces an asymmetric gridded self-attention mechanism (corresponding to a rectangular receptive field adapted to the ear's aspect ratio) to aggregate features between the global feature map and local details, accurately capturing the relative positional dependence of grains in the physical space of the ear axis. To locate the physical center coordinates of the grains, the system employs the aforementioned dynamic point query mechanism, dynamically allocating query anchor points based on local feature density, and outputting a set of two-dimensional pixel coordinates of each grain entity on the visible surface of the ear in the image plane. Where N is the total number of grains visible on one side. Let be the pixel coordinates of the i-th seed.
[0073] S202, Inverse Physical Compensation for Perspective Distortion of a 3D Cylinder:
[0074] Because the single-sided images acquired by industrial cameras exhibit a cylindrical perspective compression effect in the ear edge region, the system introduces a three-dimensional cylindrical geometric prior model of the corn ear for inverse physical stretching compensation.
[0075] First, the physical principal axis vector of the ear in the image is extracted by fitting the second-order geometric moments in space, and a local geometric coordinate system is established with this principal axis as a reference. Based on the physical occupancy rate output by the nonlinear spatial coordinate mapping mechanism in step S103, the system extracts the maximum cross-sectional minor axis b of the ear's three-dimensional bounding box, and dynamically calculates the pixel equivalent R (R=b / 2) corresponding to the maximum physical radius of the middle section of the ear. For any grain in the coordinate set P... Assuming the y-axis is parallel to the main axis of the ear and the x-axis is perpendicular to the main axis, then its physical central angle on the cylindrical surface of the ear is... This can be deduced as:
[0076] ;
[0077] To "flatten" the grains attached to the three-dimensional curved surface onto the two-dimensional topological surface, the system performs a transverse isometric inverse mapping and calculates the compensated flattened abscissa. :
[0078] ;
[0079] Using this nonlinear mapping formula, the physical spacing of the grain coordinates at the edge due to perspective compression is restored, and a new set of coordinates after distortion compensation is output. This eliminates the curvature error caused by single-sided optical imaging of the camera.
[0080] S203, Bidirectional Topology Search and Complete Row Reconstruction with Constrained Curvature:
[0081] After obtaining the compensated coordinate set P′, the system uses an unsupervised K-means clustering algorithm in the steady-state middle section region where the ear distortion is small to divide the longitudinally arranged grains into initial independent clusters and establish the baseline centerline of each ear row.
[0082] Subsequently, the system initiates a restricted bidirectional topology search logic, using the direction vector formed by two adjacent seed points A and B within the middle baseline row. Using the above as a baseline, a point-by-point search is performed towards both ends of the ear. When the search reaches the next candidate kernel point C, a new vector is calculated. Change in spatial angle between the reference vector and the reference vector :
[0083] ;
[0084] The system sets a line curvature tolerance threshold based on biological statistical priors. (Preferably 10°~15°). If If point C is determined to belong to the current row, then it is determined that the point C belongs to the current row; if it is due to local missing grains or disease... If a mutation occurs and exceeds the threshold, the algorithm then follows the preceding vector. The slope is used for a second interpolation search, crossing the break zone to find the next valid node.
[0085] This bidirectional search mechanism based on the included angle gradient constraint enables the equipment to maintain continuous and accurate row structure inference when dealing with ear bending or local surface damage, thereby counting the number of complete independent trajectories (i.e., the total number of ear rows).
[0086] After obtaining the total number of rows in the ear, the system combines the number of visible grains N on one side with the aforementioned dynamic point query mechanism. Based on the variable curvature three-dimensional cylindrical space parameters abstracted in S103, the system calculates the integral proportion coefficient of the visible field of view on one side to the total surface area of the ear. This integral proportion coefficient is then integrated with the number of visible grains N and the total number of rows in the ear to ultimately infer and output the total number of grains in the ear, including the invisible back area, thus completing the three-dimensional full phenotypic calculation described in S103.
[0087] Example 3:
[0088] This embodiment, based on Embodiment 1, refines and expands the underlying computational logic of the complex scene analysis step (step S104) triggered by the edge computing and control unit when facing multiple ear stacking and partial occlusion conditions. In actual high-throughput production line operations, although the front-end feeding mechanism has implemented physical flow restriction and single-column constraints, due to the friction of the rough surface of the corn ears and the inertia of high-speed falling, occasional partial side-by-side, head-to-tail collision, and random stacking of ear entities may still occur on the conveyor belt, resulting in feature defects in single-sided vision. To achieve high-precision group yield measurement without adding mechanical flip levers, the system constructs a multi-objective heterogeneous spatial topology model, and realizes numerical compensation through the logic of "deriving the hidden part from the visible part and the high-quality individual compensating for the damaged individual". The specific steps are as follows:
[0089] S301. Physical entity contour segmentation and visual exposure confidence assessment:
[0090] When a single image I is input into the system, the control unit first performs entity contour segmentation to extract all independent ear-like instance regions within the current field of view. If the number of instances is detected to be greater than a preset stacking threshold, or the pixel intersection-over-union (IoU) ratio of any two instances exceeds the overlap tolerance, complex scene parsing logic is automatically applied.
[0091] For each extracted ear of fruit entity, the control unit physically maps it to an independent representation node vi in the topological space within the underlying memory. The system extracts its local appearance feature vector fapp and the entity's two-dimensional boundary mask. To quantify the degree of occlusion of each entity in physical space, the system introduces a "visual exposure confidence" parameter wi. This parameter is jointly determined by the geometric integrity of the entity and the proportion of the masked area, where geometric integrity... The calculation formula is:
[0092] ;
[0093] In the formula, Let the area of the minimum convex hull polygon of this entity mask be . Let λ represent the number of topological holes within the contour caused by physical occlusion, and λ be the hole penalty coefficient. The system will then consider geometric integrity. The state vector Si is concatenated with the external boundary features and mapped to the visual exposure confidence score within the interval (0,1) through the visibility evaluation logic module built into the edge control panel. . The closer the value is to 1, the more fully the ear of fruit is exposed on the conveyor belt and the more reliable the visual information.
[0094] S302. Topology mapping of heterogeneous physical adjacency states:
[0095] The system uses all ear-like entities as the node set. A heterogeneous edge set is constructed based on their spatial adjacency relationships on the physical conveyor belt. For any two ear nodes and Calculate its minimum pixel spatial distance Intersection and Union with Mask .
[0096] To distinguish between different types of physical interference, the system defines two heterogeneous edge states:
[0097] (1) Physical Overlap Edge: If This indicates that the two ears of fruit are directly stacked and obstructed in the direction perpendicular to the optical axis.
[0098] (2) Near Edge: If This indicates that the two ears of fruit are on the same plane and closely side by side, with edge shadows or texture adhesion interference.
[0099] The system encodes edge state type, overlapping boundary length, and relative spatial distance into edge attribute vectors. This allows for the construction of a heterogeneous spatial topology diagram describing the current material arrangement status of the production line. .
[0100] S303, Confidence-gated spatial feature adaptive compensation:
[0101] After obtaining the topology graph G, the system executes a cross-node feature compensation mechanism. Its core physical logic is: utilizing the sufficiently exposed ( The superior morphological characteristics of high-quality fruit ears are used to compensate for and correct those that are severely shaded. (Lower) ear phenotypic parameters.
[0102] For the target node and any of its adjacent nodes The system first calculates the spatial compensatory correlation degree between the two under a specific heterogeneous edge relationship. To prevent occluded low-confidence features from negatively impacting the overall system, the system introduces an "adjacent node confidence gating" mechanism, which gates the correlation degree. The calculation formula is:
[0103] ;
[0104] In the formula, and These are the current hidden state vectors of the two nodes, respectively. For feature splicing operations, Adjacent nodes The formula ensures that only neighboring ears with intact physical morphology and clear visual information can output high-weight compensation information. Subsequently, the correlation degree of all neighboring nodes is normalized to obtain the compensation coefficient. Based on this, a weighted sum is performed on the adjacency features, and the target node is iteratively updated through the built-in time-series state loop module. Based on the state characteristics, the phenotypic data of the physically occluded area is used to complete the compensatory inference.
[0105] S304, Consensus Fusion of Neighboring Entities and Group Product Measurement Output:
[0106] After multiple topology compensation iterations, the system targets each node. Output preliminary spikelet phenotypic inference values (Total number of grains per ear, number of rows per ear).
[0107] To further suppress yield fluctuations in heavily shaded scenarios, the system establishes a low visibility tolerance barrier. If the visual exposure confidence level of a certain ear of fruit is detected... (If the value is below 0.3, it indicates that more than 70% of the ear of fruit is blocked by other materials), and the system triggers the morphological consensus compensation logic. This is achieved by extracting the inferred values of all valid physical adjacency nodes of the occluded entity in the topology graph. Combined with heterogeneous edge type gain (Occlusion edge gain is greater than adjacent edge gain), calculate the weighted environment consensus expectation. :
[0108] ;
[0109] Finally, the local inferred values and the environmental consensus expectation are adaptively scaled together to output the final compensated phenotypic parameters for the severely shaded ear. :
[0110] ;
[0111] Based on the aforementioned underlying computing mechanism, the control unit endows the testing device with adaptive physical yield compensation capability: when the visual sensor determines that the ear of fruit on the production line is severely obscured ( When the value is smaller, the system automatically increases the weighting of the statistical consensus on high-visibility ears of fruit in the same batch in the surrounding area when generating the terminal yield measurement report. Finally, the control unit summarizes all nodes in the graph after compensation. The value generates the total yield index of the group (total number of grains in the batch, average number of rows), overcoming the perception limitations of agricultural machinery when facing complex stacked materials.
[0112] Example 4:
[0113] This embodiment, based on Embodiment 1, further elaborates on the underlying physical compensation details of step S105, quantization timing alignment and electromechanical closed-loop sorting. In actual high-throughput pipeline testing operations, when the edge computing unit triggers the single-sided 3D inference of Embodiment 2 or the spatial topology compensation of Embodiment 3, the inference computing time consumption of its related units ( The computational fluctuations can occur at the millisecond or even second level depending on the complexity of the stacking of fruit ears within the field of view. If traditional pure time-delay control is used, these computational peaks will directly lead to a lag in the physical impact position of the cylinder or complete miss. To solve the problem of physical sorting failure caused by computational time fluctuations, this system, based on the S105, constructs an absolute displacement closed-loop sorting mechanism with feedforward compensation. The specific execution steps are as follows:
[0114] S401, Equivalent mapping from physical space to digital pulse:
[0115] The system pre-computed the physical structure with reference mapping: the center projection point of the industrial camera's optical axis in the dark box was set as the origin of the physical coordinate system. Determine the origin The fixed physical distance from the material running direction along the conveyor belt to the center line of the corresponding pneumatic sorting cylinder piston rod is [missing information]. .
[0116] On the main drive roller of the conveyor belt (the physical diameter of the roller is known to be...) A high-precision incremental rotary encoder is rigidly connected to the shaft end. The encoder outputs an absolute number of pulses per revolution. The hardware counter on the edge control motherboard reads pulses in real time through an orthogonal decoding circuit. The system thus establishes the relationship between the physical displacement of the ear of grain and the digital pulse increment. The absolute mapping formula between them:
[0117] ;
[0118] This mapping transforms a fixed distance in mechanical space into an absolute impulse constant that is unaffected by time dimension and velocity fluctuations.
[0119] S402, Asynchronous Simulation and Dynamic Target Pulse Locking:
[0120] When the tip of any ear of fruit is at the origin When the photoelectric sensor is triggered (i.e., step S102 in Embodiment 1) and visual capture is completed, the underlying hardware interrupt program of the edge control motherboard latches the encoder absolute pulse count value at the current moment and records it as the capture pulse reference point. .
[0121] Subsequently, the control motherboard asynchronously invokes the phenotypic deduction and spatial topological feature compensation mechanisms from Embodiments 2 and 3 in the background. Even if the deduction calculation is time-consuming ( Fluctuations at the millisecond or even second level can occur, as long as the following conditions are met. For quantities less than the physical time it takes for the ear of fruit to travel from the origin to the cylinder, the system can lock a unique and unchanging physical removal target pulse value for that ear of fruit by superimposing a pulse constant. :
[0122] ;
[0123] in, This is a feedforward compensation pulse for mechanical action. Due to the inherent mechanical response delay time between the solenoid valve opening and the cylinder piston rod fully extending... The system calculates the feedforward compensation pulse in real time based on the instantaneous encoder pulse frequency of the current conveyor belt. This allows the trigger signal to be sent in advance before the physical arrival, eliminating the inherent mechanical hysteresis error of pneumatic components.
[0124] S403, hardware-level high-speed level output and lossless pneumatic actuation:
[0125] After the inference algorithm outputs the quality classification result of the ear of fruit (if it needs to be removed to a specific collection bin), the high-speed comparator of the edge control motherboard continuously polls the real-time accumulated pulse of the current encoder. For the multi-stacked condition that triggers spatial topology compensation in Example 3, the control unit introduces a priority elimination rule for defective products: if the topology graph... There are physical occlusion edges between multiple nodes. This indicates that they form a physically difficult-to-separate "material cluster" on the conveyor belt. If any damaged node in this material cluster fails to meet the breeding threshold, the control unit will calculate the joint bounding box and common centroid of the physical material cluster, and lock it as a whole as the target for removal. .
[0126] when When the conditions are met, a specific pin on the general purpose input / output (GPIO) interface of the control motherboard outputs a 24V high-level control signal. This signal first passes through an industrial-grade high-speed optocoupler isolation circuit (to shield against electromagnetic surge interference caused by power outages of inductive loads in the workshop), and then drives a solid-state relay. The relay then activates the high-frequency solenoid valve in the corresponding pneumatic circuit.
[0127] The released high-pressure airflow (0.4–0.6 MPa) rushes into the rodless chamber of the miniature cylinder, driving the piston rod, which has an engineering plastic push plate at the front end, to extend by a predetermined stroke, impacting the center of gravity of the target ear of fruit and pushing it into the corresponding sorting and collection bin. The control board maintains this high-level signal. Milliseconds later (ensuring the ears of fruit are completely detached from the conveyor belt), the output is canceled, the solenoid valve is de-energized to release air, and the cylinder piston rod immediately retracts under the action of the built-in reset spring, waiting for the next electromechanical coordination command.
[0128] Based on the aforementioned underlying electromechanical control mechanism, this invention solves the problem of "spatiotemporal decoupling" between complex multidimensional optical sensing signal processing and high-speed mechanical physical execution. This feedforward compensation mechanism allows the edge control motherboard to compensate for time-consuming reconstruction of the three-dimensional physical features of the ear of grain and phenotypic calculations under multi-material occlusion conditions in the background, without affecting the accuracy of the front-end assembly line's physical sorting. Even under complex conditions such as ear sizes varying, stacking and sticking, and conveyor belt speed fluctuations, the micro-cylinder can accurately strike the target ear's center of gravity, accurately pushing it into the superior or inferior seed bin, while the flexible pusher avoids secondary mechanical damage to the germplasm.
[0129] Thus, this device has solved the technical problems of "low efficiency of manual measurement, incompleteness of traditional machines, and inaccuracy of complex calculations" in traditional agricultural seed testing, and has achieved a high-throughput, non-destructive, and highly accurate automated corn phenotypic yield measurement and physical screening at the physical level.
[0130] 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 spirit and principles of the present invention should be included within the protection scope of the present invention.
[0131] The parts of this invention not described in detail are prior art.
Claims
1. An automated corn variety assessment method based on single-sided visual deduction, characterized in that: Includes the following steps: Step 1: The corn ears are conveyed at a constant speed in a single row through the feeding and conveying mechanism, and the physical displacement is tracked in real time by a rotary encoder; Step 2: When the ear of fruit cuts off the beam of the photoelectric sensor, the single-view vision perception module is triggered to acquire a single-sided two-dimensional image and latch the physical pulse reference. Step 3: The edge computing and control unit receives the image and performs phenotypic parameters by performing three-dimensional cylindrical perspective distortion physical compensation and restricted curvature bidirectional topology search. When material stacking is detected, a spatial topology feature compensation mechanism based on visual exposure confidence is automatically triggered for calibration and calculation. Step 4: Based on the calculated classification results and the locked dynamic target pulse value, when the absolute displacement of the ear of fruit reaches the sorting station, trigger the execution and sorting mechanism to perform physical classification and removal of the fruit. The automated corn variety assessment method based on single-view vision is implemented through the following assessment device, which includes a feeding and conveying mechanism, a single-view vision perception module, an edge computing and control unit, and an execution and sorting mechanism. The feeding and conveying mechanism is used to receive materials and convey corn cobs in a single row at a uniform speed along a set direction. The single-view vision perception module is located above the feeding and conveying mechanism and is used to acquire a single-sided two-dimensional image of the ear of fruit without mechanical flipping when the target ear of fruit reaches the set capture position. The edge computing and control unit is electrically connected to the feeding and conveying mechanism and the single-view vision perception module, respectively. It is used to receive the single-sided two-dimensional image and extract the physical characteristics of the ear of fruit, calculate the phenotypic parameters of the ear of fruit by combining the three-dimensional geometric prior model and the spatial topology compensation mechanism, and output the sorting control signal. The execution and sorting mechanism is located at the end of the feeding and conveying mechanism and is communicatively connected to the edge computing and control unit. It is used to receive the sorting control signal and perform corresponding pneumatic sorting actions on the ear of fruit. The edge computing and control unit, combined with a three-dimensional geometric prior model, calculates ear phenotypic parameters, specifically including: Multi-scale features are extracted from a single-sided two-dimensional image of the ear of grain, and a set of two-dimensional pixel coordinates of the kernels on the visible surface is output based on a local density query mechanism. Extract the physical principal axis vector of the ear to establish a local geometric coordinate system, and obtain the minor axis parameter of the maximum cross section of the ear bounding box; The maximum physical radius pixel equivalent of the middle section of the ear is determined based on the maximum cross-sectional minor axis parameter. The physical central angle of each grain on the three-dimensional cylindrical surface of the ear is calculated using the inverse trigonometric function. Lateral reverse stretching compensation is performed based on the principle of equidistant mapping to convert the two-dimensional pixel coordinate set into a flattened coordinate set to eliminate optical perspective distortion. Using the middle row with the least distortion as a reference, a bidirectional topological search is performed towards both ends of the ear. When the change in the spatial angle between adjacent kernels is within the preset tolerance threshold, they are identified as the same row, thereby reconstructing the number of independent tracks in the whole ear. The total number of kernels is inferred by combining the number of visible kernels on one side with the surface area integral ratio. The edge computing and control unit, combined with a spatial topology compensation mechanism, calculates ear phenotypic parameters, specifically including: Perform entity contour segmentation on a single-sided 2D image to extract all independent ear-like instances within the field of view; When instances are detected to overlap or the number exceeds a preset threshold, they are mapped to a set of nodes in a heterogeneous spatial topology graph, and a heterogeneous edge set containing physically occluded edges and spatially adjacent edges is established based on the pixel distance between instances and the overlap-intersection-union ratio. The visual exposure confidence of each node is calculated based on the geometric integrity of the entity's outline and the proportion of the mask area. Using the visual exposure confidence level as a gating coefficient, the spatial compensatory correlation between adjacent nodes is calculated, and the phenotypic inference values of high-confidence adjacent nodes are extracted. The phenotypic parameters of low-confidence nodes are then subjected to environmental consensus weighted fusion and compensatory update.
2. The automated maize variety evaluation method based on single-sided visual deduction according to claim 1, characterized in that: The surface of the feeding and conveying mechanism is provided with guide grooves to limit the lateral displacement and axial rolling of the ear of fruit, and its main drive roller is coaxially connected to an incremental rotary encoder.
3. The automated maize seed evaluation method based on single-sided visual deduction according to claim 1, characterized in that: The single-view vision perception module is encapsulated in a light-shielding dark box and includes a vertically downward-facing industrial camera and a front-end trigger photoelectric sensor.
4. The automated maize seed evaluation method based on single-sided visual deduction according to claim 1, characterized in that: The edge computing and control unit outputs a sorting control signal and triggers a pneumatic sorting action, specifically including: The fixed physical distance from the center of the camera optical axis to the center line of the cylinder at the end of the execution and sorting mechanism is measured, and combined with the number of pulses per revolution of the incremental rotary encoder and the diameter of the main drive roller, the physical distance is mapped to an absolute pulse constant. At the moment when the photoelectric sensor triggers the camera, the capture pulse reference point of the encoder is latched; After the phenotypic parameters are calculated, the absolute pulse constant is added to the capture pulse reference point, and the feedforward compensation pulse calculated based on the cylinder mechanical response delay time is subtracted to obtain the dynamic target pulse value of the ear of fruit. When the encoder's real-time accumulated pulse equals the dynamic target pulse value, a high-level signal is output to the execution and sorting mechanism to trigger the cylinder extension action.