Stubble height identification method and device, corn harvester and readable storage medium

Through binocular image processing and small hole imaging principles, efficient and accurate identification of the corn harvester stubble height is achieved, and the problems of low recognition accuracy and high subjectivity in the existing technology are solved, and are suitable for large-scale agricultural production.

CN119904751APending Publication Date: 2025-04-29ZOOMLION HEAVY MASCH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411992789.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

In the prior art, the identification of the height of stubble reserved during the operation of corn harvester has problems of subjectivity and low accuracy, which cannot meet the needs of large-scale agricultural production.

Method used

By acquiring the binocular image of the target area, identifying and annotating the stubble with a preset object detection model, identifying and matching feature points based on the image matching algorithm, and determining the stubble height with the small hole imaging principle.

Benefits of technology

Improves the accuracy and efficiency of stubble height identification, reduces manual intervention and error, is suitable for large-scale agricultural production, and can be expanded to other areas where objects are measured and monitored.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119904751A_ABST
    Figure CN119904751A_ABST
Patent Text Reader

Abstract

The invention discloses a stubble height identification method and device, a corn harvester and a readable storage medium, and relates to the technical field of agricultural machinery. The method comprises the steps of obtaining a first to-be-recognized image and a second to-be-recognized image of a target area, and ensuring the comprehensiveness of image acquisition through wider view angle images. The stubbles in the first to-be-recognized image and the second to-be-recognized image are recognized and labeled based on the preset target detection model, the first stubble labeling image and the second stubble labeling image are obtained, and the accuracy and efficiency of target detection are improved. Feature points in the first stubble labeling image and the second stubble labeling image are identified and matched based on an image matching algorithm, and a plurality of feature matching groups are obtained; the stubble height corresponding to each feature matching group is determined based on the pinhole imaging principle, the target stubble height of the target area is determined based on the stubble heights corresponding to all the feature matching groups, and the working efficiency and accuracy are improved through automatic execution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of agricultural machinery, and in particular to a stubble height recognition method, device, corn harvester and readable storage medium. Background Art

[0002] The improvement of the mechanization level of modern agriculture has put forward higher requirements for the performance and intelligence of agricultural machinery. As an important agricultural machinery and equipment, the work efficiency and operation quality of corn harvesters directly affect the harvesting effect of crops. Crop stubble has an important impact on crop growth, soil protection, farmland management and other aspects. Corn harvesters include field returners, which are usually equipped with a mechanism for adjusting the stubble height. By adjusting the relevant parts of the field returner, it can be ensured that the stubble height meets the agricultural technical requirements, thereby meeting the needs of crop growth and soil management.

[0003] In order to ensure the effect of returning the field to the soil, the height of the field returner can be adjusted by referring to the stubble height during the operation of the field returner. At present, the stubble height after returning the field can be identified by manual visual inspection. Farmers or operators check the stubble height after returning the field in the field and measure it manually. However, the recognition results of the manual visual inspection method are subjective, and different people have different judgment criteria, and the recognition accuracy is low. In addition, the manual visual inspection method is inefficient and cannot meet the needs of large-scale agricultural production. The stubble height after returning the field can also be identified by using sensors to detect the stubble height during the operation of the field returner. However, the accuracy and applicability of the sensors in the sensor method are limited, and they are easily affected by environmental factors such as light, humidity, soil type, etc. Therefore, how to effectively identify the stubble height during the operation of the field returner has become a widely concerned issue. Summary of the invention

[0004] In view of the above-mentioned deficiencies in the prior art, the purpose of the embodiments of the present application is to provide a stubble height identification method, device, corn harvester and readable storage medium.

[0005] In order to achieve the above-mentioned object, the first aspect of the present application provides a stubble height recognition method, comprising: Acquire a first image to be identified and a second image to be identified of a target area, wherein the first image to be identified is acquired by a first image collector, and the second image to be identified is acquired by a second image collector, the first image collector and the second image collector are installed on the operating machine, and the first image collector and the second image collector are separated by a preset interval and are located on the same horizontal plane; Based on a preset target detection model, stubble in the first image to be identified and the second image to be identified are respectively identified and labeled to obtain a first stubble labeled image and a second stubble labeled image; Based on the image matching algorithm, feature points in the first stubble labeled image and the second stubble labeled image are respectively identified and matched to obtain a plurality of feature matching groups, wherein the feature matching group includes two feature points, which are feature points in the first stubble labeled image and feature points in the second stubble labeled image; Based on the pinhole imaging principle, the stubble height corresponding to each feature matching group is determined; The target stubble height of the target area is determined based on the stubble heights corresponding to all feature matching groups.

[0006] In the embodiment of the present application, feature points in the first stubble annotated image and the second stubble annotated image are respectively identified and matched based on an image matching algorithm to obtain a plurality of feature matching groups, including: Constructing a first Gaussian difference pyramid and a second Gaussian difference pyramid based on the first stubble labeled image and the second stubble labeled image, respectively, to determine a first feature point in the first stubble labeled image and a second feature point in the second stubble labeled image; Constructing a first eigenvector of the first feature point and a second eigenvector of the second feature point; Performing vector matching based on the Euclidean distance between the first eigenvector and the second eigenvector; The first feature point and the second feature point corresponding to the target first feature vector and the target second feature vector whose Euclidean distance is less than the distance threshold are respectively taken as a feature matching group to obtain multiple feature matching groups.

[0007] In the embodiment of the present application, the stubble height corresponding to each feature matching group is determined based on the pinhole imaging principle, including: For each feature matching group, determine whether there is a depth difference between the top and bottom of the target stubble based on the parallax ranging principle, wherein the target stubble is the stubble corresponding to the feature matching group, the depth difference is the difference in depth values, and the depth value is the distance between the feature point and the optical center plane of the image acquisition device; Determine the projection height between the top and bottom based on the pinhole imaging principle; In the case where there is no depth difference between the top and bottom of the target stubble, determining the stubble height corresponding to the feature matching group based on the projection height; In the case where there is a depth difference between the top and bottom of the target stubble, the stubble height corresponding to the feature matching group is determined based on the projection height and the depth difference.

[0008] In the embodiment of the present application, for each feature matching group, determining whether there is a depth difference between the top and bottom of the target stubble based on the parallax ranging principle includes: For each feature matching group, respectively obtain a first top feature point corresponding to the top and a first bottom feature point corresponding to the bottom of the target stubble in the first stubble labeled image, and a second top feature point corresponding to the top and a second bottom feature point corresponding to the bottom of the target stubble in the second stubble labeled image; Determine a first top target distance based on a first top imaging point position of the first top feature point in the first image acquisition device, wherein the first top target distance is a distance between the first top imaging point position and an edge position of an imaging surface of the first image acquisition device, and the edge position is the leftmost end or the rightmost end; Determine a second top target distance based on a second top imaging point position of the second top feature point in the second image acquisition device, wherein the second top target distance is a distance between the second top imaging point position and an edge position of an imaging surface of the second image acquisition device, and the edge position is the leftmost end or the rightmost end; determining a tip depth value based on the first tip target distance and the second tip target distance; Determine a first bottom target distance based on a first bottom imaging point position of the first bottom feature point in the first image acquisition device, wherein the first bottom target distance is a distance between the first bottom imaging point position and an edge position of an imaging surface of the first image acquisition device, and the edge position is the leftmost end or the rightmost end; Determine a second bottom target distance based on a second bottom imaging point position of the second bottom feature point in the second image acquisition device, wherein the second bottom target distance is a distance between the second bottom imaging point position and an edge position of an imaging surface of the second image acquisition device, and the edge position is the leftmost end or the rightmost end; determining a bottom depth value based on the first bottom target distance and the second bottom target distance; When the absolute value of the difference between the top depth value and the bottom depth value is greater than zero, it is determined that there is a depth difference between the top and bottom of the target stubble; When the absolute value of the difference between the top depth value and the bottom depth value is equal to zero, it is determined that there is no depth difference between the top and the bottom of the target stubble.

[0009] In an embodiment of the present application, the preset target detection model is constructed based on the YOLOv8 model, and a preset number of standard convolution modules in the Neck part of the YOLOv8 model are replaced with multi-scale convolution modules to obtain the preset target detection model.

[0010] In an embodiment of the present application, the preset target detection model also includes adding a CPCA attention module after the SPPF module in the Backbone part of the YOLOv8 model.

[0011] In the embodiment of the present application, the target stubble height of the target area is determined based on the stubble heights corresponding to all feature matching groups, including: The average value of the stubble heights corresponding to all feature matching groups is determined as the target stubble height of the target area.

[0012] A second aspect of the present application provides a stubble height recognition device, comprising: A first image collector and a second image collector, the first image collector and the second image collector are installed on the operating machine, and the first image collector and the second image collector are separated by a preset interval and are located on the same horizontal plane; The first image collector is used to acquire a first image to be identified in the target area, and send the first image to be identified to the processor; The second image collector is used to acquire a second image to be identified of the target area, and send the second image to be identified to the processor; a memory configured to store instructions; The processor is configured to call instructions from the memory and implement the stubble height recognition method as described in the above embodiment when executing the instructions.

[0013] A third aspect of the present application provides a corn harvester, comprising: A stubble height identification device as described in the above embodiment.

[0014] A fourth aspect of the present application provides a machine-readable storage medium having instructions stored thereon, the instructions being used to enable a machine to execute the stubble height identification method as described in the above embodiment.

[0015] Through the above technical solution, the first image to be identified and the second image to be identified of the target area are obtained, and a wider viewing angle image of the target area is captured, which ensures the comprehensiveness of image acquisition and reduces the blind area of ​​vision that may be caused by a single viewing angle. Based on the preset target detection model, the stubble in the first image to be identified and the second image to be identified are respectively identified and annotated to obtain the first stubble annotated image and the second stubble annotated image, which improves the accuracy and efficiency of target detection. Compared with manual recognition, it is more objective and fast, and can process a large amount of data. Based on the image matching algorithm, the feature points in the first stubble annotated image and the second stubble annotated image are respectively identified and matched to obtain multiple feature matching groups, which improves the accuracy of feature matching and provides a reliable basis for subsequent stubble height calculation. Based on the pinhole imaging principle, the stubble height corresponding to each feature matching group is determined, and the imaging principle of the camera is taken into consideration, so that the calculation of the stubble height is more reasonable and scientific, while avoiding the difficulties and errors caused by directly measuring the stubble height. The target stubble height of the target area is determined based on the stubble height corresponding to all feature matching groups. By integrating multiple data points, it helps to more accurately reflect the stubble height of the target area. And through automated execution, human intervention and errors are reduced, and work efficiency and accuracy are improved. It is not only suitable for stubble height measurement in the agricultural field, but can also be extended to other fields that need to measure and monitor the height of objects, and has a wide range of applicability.

[0016] Other features and advantages of the embodiments of the present application will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present application, but do not constitute a limitation on the embodiments of the present application. In the accompanying drawings: Figure 1 A schematic diagram of a process flow of a stubble height recognition method according to an embodiment of the present application is shown; Figure 2 A schematic diagram of the structure of an improved YOLOv8 model according to an embodiment of the present application is shown; Figure 3 A schematic diagram of an application scenario of a multi-scale convolution module according to an embodiment of the present application is schematically shown; Figure 4 A schematic diagram of a binocular vision measurement model according to an embodiment of the present application is schematically shown. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the specific implementation methods described herein are only used to illustrate and explain the embodiments of the present application, and are not used to limit the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0019] It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of this application are in compliance with the relevant provisions of national laws and regulations. In the embodiments of this application, some existing solutions in the industry such as certain software, components, and models may be mentioned, which should be considered as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of this application, but it does not mean that the applicant has or will necessarily use the solution.

[0020] It should be noted that if the embodiments of the present application involve directional indications (such as up, down, left, right, front, back...), such directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0021] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present application, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0022] Figure 1 The following schematically shows a flow chart of a stubble height recognition method according to an embodiment of the present application. Figure 1 As shown, the embodiment of the present application provides a stubble height recognition method, which may include the following steps: Step 100, acquiring a first image to be recognized and a second image to be recognized of a target area, wherein the first image to be recognized is acquired by a first image collector, and the second image to be recognized is acquired by a second image collector, the first image collector and the second image collector are installed on a working machine, and the first image collector and the second image collector are separated by a preset interval and are located on the same horizontal plane; In this embodiment, it should be noted that in order to improve the accurate recognition of the stubble height during the operation of the field return machine, the image information of the field return machine operation area is collected through a binocular vision system to provide accurate and effective data reference for the subsequent stubble height analysis. Among them, the binocular vision system may include a first image collector and a second image collector, and the first image collector and the second image collector select image collectors suitable for the task requirements to ensure that they have sufficient resolution, field of view, dynamic range and stability to adapt to different lighting conditions and working environments, such as area array cameras. In this embodiment, the first image collector and the second image collector are installed on the working machine and ensure that they are located on the same horizontal plane and maintain a preset interval. In one embodiment, it can be installed at both ends of the tail of the working machine to more conveniently obtain the working area after the field return. Due to the different installation positions of the two image collectors, the two image collectors can capture the image of the target area from different angles, thereby providing a stereoscopic perspective or a more comprehensive view. And the first image collector and the second image collector have the same camera parameters, including focal length, optical axis position, etc., so that they can capture consistent image information.

[0023] It should be noted that the target area is the area where the field return machine has been operated, and the first image to be identified and the second image to be identified are image information corresponding to a certain area range in the target area, wherein the certain area range can be adaptively adjusted based on actual application requirements. In one embodiment, it is assumed that the field return amplitude of the corn harvester is X1, and the driving speed of the corn harvester during operation is V. The driving distance of the corn harvester is calculated according to the driving speed and the driving time, and the shooting interval is determined in combination with the field return amplitude of X1. That is, every time the distance X1 is traveled, the image acquisition device is controlled to perform an image acquisition action, that is, at this time, the certain area range is a square area of ​​X1*X1. And during the driving process of the corn harvester, the image acquisition device is used to collect images of the area after the field return according to the determined shooting interval, and each image acquisition can capture a complete field return area image of X1*X1. It can be understood that in order to accurately compare and analyze the first image to be identified and the second image to be identified later, it is necessary to ensure that the first image to be identified and the second image to be identified are collected at the same time point or a similar time point.

[0024] Step 200, based on a preset target detection model, the stubble in the first image to be identified and the second image to be identified are respectively identified and labeled to obtain a first stubble labeled image and a second stubble labeled image; In this embodiment, stubble refers to leaves that have not been trimmed and tiller buds that have not yet stretched to form leaves. In the field of agricultural production, there are many crops that can be cultivated with stubble. For example, wheat, corn, rice, sorghum, etc. Stubble cultivation can increase the surface roughness, reduce the velocity of surface runoff, fix and intercept soil, prevent black soil loss, and increase soil organic matter. In this embodiment, corn stubble is taken as an example to illustrate in the subsequent stubble height recognition embodiment. The first image to be identified and the second image to be identified are processed using a preset target detection model to identify the stubble in the first image to be identified and the second image to be identified, so that the stubble can be marked. After processing by the preset target detection model, two images marked with stubble can be obtained, namely the first stubble marked image and the second stubble marked image.

[0025] Specifically, in one embodiment, the preset target detection model is constructed based on the YOLOv8 model, and a preset number of standard convolution modules in the Neck part of the YOLOv8 model are replaced with multi-scale convolution modules to obtain the preset target detection model.

[0026] It should be noted that the basis of the preset target detection model is the YOLOv8 (You Only Look Once Version 8, YOLO eighth version) model. The YOLOv8 model is a target detection model that can quickly and accurately detect various objects in an image. The YOLOv8 model is mainly composed of the Backbone (backbone network) part, the Neck (neck network) part, and the Head (detection head) part. The YOLOv8 model includes 23 modules, which are distributed in these three parts. Specifically, the first 10 modules are located in the Backbone part, which are used to extract image features and provide basic feature representation for target detection tasks. The middle 12 modules are located in the Neck part, which are used to fuse features from different layers. The last module is located in the Head part, which is used for target classification detection.

[0027] refer to Figure 2 In this embodiment, a key improvement is made based on the YOLOv8 model. In the Neck part of the YOLOv8 model, a certain number of standard convolution modules are replaced with multi-scale convolution modules (MSConv). The multi-scale convolution module can help the model better capture features of different scales, which is very helpful for identifying stubble of different sizes and shapes.

[0028] Specifically, refer to Figure 3In the multi-scale convolution module, the feature map channel segmentation is first performed: MSConv first divides the channels of the input feature map into three parts according to the ratio of 1 / 2, 1 / 4, and 1 / 4. This means that if the input feature map has M channels, it will be divided into three channel subsets of M / 2, M / 4, and M / 4. Then multi-scale convolution is performed: standard convolution is performed on these three channel subsets using convolution kernels of sizes 1×1, 3×3, and 5×5, respectively. Among them, the 1×1 convolution kernel is mainly used to keep the number of channels of the feature map unchanged, and at the same time, the feature map can be interacted and information integrated across channels. The 3×3 convolution kernel can capture local features in the image while maintaining good computational efficiency. The 5×5 convolution kernel has a larger receptive field and can capture more global feature information. By using convolution kernels of different sizes, MSConv can generate feature maps with different scale features, thereby enhancing the model's ability to recognize corn stubble features. Then, the feature maps are concatenated: in the channel direction, all the convolved feature maps are concatenated together, so that the concatenated feature maps will contain rich feature information from convolutions of different scales. Finally, point-by-point convolution is performed: a 1×1 convolution kernel is used to perform point-by-point convolution on the concatenated feature maps to further perform feature fusion and dimensionality reduction. The 1×1 convolution kernel can adjust the number of channels of the feature map, while achieving cross-channel feature interaction and information integration, thereby generating a more discriminative feature representation.

[0029] Through multi-scale convolution, MSConv can generate more feature maps that can extract the required information from corn stubble features at a lower cost. And because convolution kernels of different sizes are used for parallel convolution and spliced ​​in the channel direction, feature fusion and dimensionality reduction can be performed through point-by-point convolution without increasing too much computation, thereby reducing the number of model parameters. MSConv improves the accuracy of the model by enhancing the model's ability to recognize corn stubble features. At the same time, since the model parameters are reduced and the calculation process is optimized, the recognition speed of the model is also improved, which is more in line with the requirements of real-time detection during the driving process of the corn harvester.

[0030] In this embodiment, MSConv is used to improve the recognition accuracy and speed of the deep learning model on corn stubble targets through multi-scale convolution and feature fusion, providing strong technical support for the real-time detection of the stubble height after the corn harvester returns the field.

[0031] Please continue to refer to Figure 2 ,Further, in order to enable the preset target detection model to focus on important feature information while ignoring irrelevant information, in one embodiment, the preset target detection model also includes adding a CPCA attention module after the SPPF module in the Backbone part of the YOLOv8 model.

[0032] It should be noted that the CPCA (Channel Prior Convolutional Attention) attention module improves the model's ability to extract corn stubble features by dynamically distributing attention weights in channel and spatial dimensions. Its overall structure includes the sequential arrangement of channel attention and spatial attention. This design enables the model to focus on important feature information while ignoring irrelevant information, thereby improving detection accuracy.

[0033] In the CPCA attention module, the channel attention mechanism first aggregates the feature map information: the channel information of the input feature map of the preset target detection model will be aggregated by average pooling and maximum pooling. Among them, average pooling helps to obtain global information, while maximum pooling can capture local significant features. Then multilayer perceptron (MLP) processing is performed: the aggregated channel information will be processed by a shared MLP. Among them, the role of MLP is to further abstract and extract the channel information and generate a channel attention map. Then generate a channel attention map: after MLP processing, a channel attention map is generated, which represents the importance weights of different channels. Finally, the input feature is multiplied by the channel attention map: the input feature is multiplied element by element by the generated channel attention map to obtain the channel prior. Among them, the channel prior emphasizes important channel information and suppresses unimportant channel information.

[0034] In the CPCA attention module, the spatial attention mechanism first generates a spatial attention map: the channel prior is input into a deep convolution module, which further processes the channel prior and generates a spatial attention map. The spatial attention map represents the importance weights of different spatial positions. Then channel mixing is performed: the deep convolution module receives the spatial attention map and performs channel mixing operations. Channel mixing helps to integrate information from different channels and improve the robustness of the model. Finally, refined features can be obtained: by element-by-element multiplication of the channel mixing result and the channel prior, refined features are obtained as output. These refined features contain more precise and important information, which helps the model to detect corn stubble more accurately.

[0035] The CPCA attention module dynamically adjusts the attention weights in the channel and spatial dimensions, allowing the preset target detection model to focus on important feature information. This helps the model accurately identify corn stubble under complex working conditions and improves detection accuracy. And by integrating information from different channels and capturing global and local significant features, the CPCA attention module enhances the robustness of the preset target detection model, which enables the model to cope with various complex environments and lighting conditions and maintain stable detection performance.

[0036] In this embodiment, the CPCA mechanism is used to dynamically adjust the attention weights in the channel and spatial dimensions to improve the extraction capability and detection accuracy of the preset target detection model for corn stubble features.

[0037] It should be noted that in order to train the preset target detection model to achieve accurate recognition of corn stubble, when the preset target detection model is trained, enough pictures are required as data sets to input the model. Specifically, through the historical operation process of the corn harvester, the first image collector and the second image collector are respectively installed at both ends of the tail of the operating machine and ensure that they are located on the same horizontal plane, maintaining a preset interval, and the first image collector and the second image collector can be used to collect images for the training of the preset target detection model. Since the number of images directly collected may not be sufficient to meet the needs of the preset target detection model training, it is necessary to expand the data of these images to increase the diversity and scale of the data set, thereby improving the generalization ability of the preset target detection model. The data expansion method may include image rotation, changing the image brightness, adding Gaussian noise, filling rectangular areas, etc. Among them, image rotation is used to rotate the original image to generate images at different angles, simulate different viewing angles, and help the preset target detection model learn the characteristics of corn stubble at different angles. Changing the image brightness adjusts the brightness of the image to simulate the field return effect under different lighting conditions, which helps the preset target detection model to accurately identify corn stubble under different lighting conditions. Adding Gaussian noise adds Gaussian noise to the image to simulate the noise interference that may be caused during image acquisition, which helps the preset target detection model maintain stable recognition performance in a noisy environment. Filling rectangular areas is used to fill or crop certain areas in the image to change the shape and size of the image, which helps the preset target detection model learn corn stubble features of different sizes and shapes. Through the above data augmentation method, the original image is expanded to a preset number, such as 2000. These expanded images will be used to train the preset target detection model to improve the recognition accuracy and generalization ability of the preset target detection model.

[0038] After data expansion of the image, the position of corn stubble in the image is annotated by annotation software to form a data set. The annotation software may include LabelImg, Labelme, etc. The annotation process may include: opening the annotation software and importing the image to be annotated; using the tools provided by the software, such as rectangular boxes, polygons, etc., to annotate the position of corn stubble in the image; saving the annotation results and generating the corresponding annotation file, which may include XML, JSON and other formats; the annotation file should contain the size information of the corn stubble target, such as width and height; coordinate information, such as the coordinates of the upper left corner and the lower right corner; and category information, such as "corn stubble" and other information.

[0039] Use a random number generator to shuffle the order of images and annotation files, and put the shuffled data into the folders of training set, validation set and test set according to the division ratio. For example, divide the dataset into training set, validation set and test set in a ratio of 7:2:1. Ensure that the images and annotation files in each dataset correspond one to one. Iterate the training of the preset target detection model. For example, set the number of training times to 100, and each iteration includes four steps: forward propagation, loss calculation, back propagation and parameter update. Verify and adjust: After each training, use the validation set to verify the model, and calculate indicators such as validation loss and accuracy. Adjust the learning rate, optimizer parameters, etc. according to the verification results to optimize the model performance. Save the model: Save the model parameters regularly during the training process so that the training can be resumed when the training is interrupted or needed. Convert the trained preset target detection model into a format suitable for running on an embedded device and integrate it into the central control unit of the corn harvester to ensure that the model can process image data in real time.

[0040] Step 300, identifying and matching feature points in the first stubble labeled image and the second stubble labeled image based on an image matching algorithm, respectively, to obtain a plurality of feature matching groups, wherein the feature matching group includes two feature points, namely, a feature point in the first stubble labeled image and a feature point in the second stubble labeled image; In this embodiment, it should be noted that the feature points include those points in the image that have unique properties and can still maintain stability under different viewing angles, such as corner points, edge points or spots. After the stubble in the first image to be identified and the second image to be identified are identified and annotated respectively to obtain the first stubble annotated image and the second stubble annotated image, it is necessary to detect the feature points in the first stubble annotated image and the second stubble annotated image respectively. In this embodiment, the feature points are identified and matched by an image matching algorithm, and the image matching algorithm can include a feature point detection and recognition algorithm and a feature point matching algorithm respectively, or an algorithm can be used to simultaneously realize the identification and matching of the feature points. The identification of feature points can be detected and identified by algorithms such as SIFT (Scale-invariant feature transform), SURF (Speeded UpRobust Features), and ORB (Oriented FAST and Rotated BRIEF). For each detected feature point, it is necessary to calculate the feature point feature descriptor. The feature descriptor is a vector used to describe the image information around the feature point so as to identify the same feature point in different images.

[0041] Furthermore, the feature descriptors in the first stubble labeled image are matched with the feature descriptors in the second stubble labeled image. The matching process usually involves calculating the similarity or distance between the descriptors, and selecting the feature point pair with the highest similarity or the smallest distance as the matching pair. The feature point matching algorithm may include Brute-ForceMatcher, FLANN (Fast Library for Approximate Nearest Neighbors, fast nearest neighbor search library), etc. The correctly matched pairs selected form a feature matching group. Each feature matching group includes two feature points: one is a feature point in the first stubble labeled image, and the other is a feature point in the second stubble labeled image.

[0042] Step 400, determining the stubble height corresponding to each feature matching group based on the pinhole imaging principle; It should be noted that the pinhole imaging principle shows that when light passes through a pinhole, an inverted real image will be formed on the screen behind the pinhole. The shape of this real image is the same as that of the object but in the opposite direction, and the size is related to the object distance and the image distance, wherein the object distance is the distance from the object to the pinhole, and the image distance is the distance from the screen to the pinhole. In this embodiment, the first image collector and the second image collector are both area array cameras. When the stubble height corresponding to each feature matching group is determined by using the pinhole imaging principle, the focal length, shooting angle, and image resolution of the first image collector and the second image collector can be combined at the same time. Since the size of the image in the pinhole imaging principle is related to the object distance and the image distance, a proportional relationship can be established in the image. This proportional relationship can be a known size object in the image, for example, the ratio between the projection height and the actual size of the corn stubble. Then, based on the proportional relationship, the actual size of the corn stubble is obtained, that is, the stubble height corresponding to the feature matching group.

[0043] Step 500: determining a target stubble height of a target area based on the stubble heights corresponding to all feature matching groups.

[0044] It should be noted that after collecting the stubble heights corresponding to all feature matching groups, in order to ensure the accuracy and consistency of the data, all stubble heights can be preprocessed, including denoising, filtering, calibration and other steps. Since the feature matching group may involve multiple images and multiple points, it is necessary to fuse these data into a unified data set. This can be achieved through methods such as averaging, weighted average, median, mode, etc. After data fusion, the results can be further statistically analyzed to verify their accuracy and reliability. This can include calculating indicators such as standard deviation, coefficient of variation, confidence interval, etc. to evaluate the degree of discreteness and uncertainty of the data. Finally, based on the results of the statistical analysis, the target stubble height of the target area can be determined. The target stubble height is a comprehensive reflection of the stubble heights corresponding to all feature matching groups, which can reflect the overall characteristics and trends of the target area.

[0045] Specifically, in one embodiment, determining a target stubble height of a target area based on the stubble heights corresponding to all feature matching groups includes: The average value of the stubble heights corresponding to all feature matching groups is determined as the target stubble height of the target area.

[0046] In this embodiment, the average value of the stubble height is obtained by summing the stubble heights corresponding to all feature matching groups and then dividing it by the total number of feature matching groups. This average value represents the overall average level of the stubble height in the target area. The calculated average value is used as the target stubble height for the target area. The target stubble height can be used for subsequent decision analysis, such as evaluating crop growth, formulating agricultural management measures, etc. It should be noted that data anomalies may occur due to incorrect matching, noise in the image, or measurement errors. Therefore, before calculating the average value, the data should be carefully checked to identify and process any possible outliers to improve the reliability of the data.

[0047] In this embodiment, a first image to be identified and a second image to be identified of a target area are obtained, wherein the first image to be identified is acquired by a first image collector, and the second image to be identified is acquired by a second image collector, the first image collector and the second image collector are installed on an operating machine, and the first image collector and the second image collector are separated by a preset interval and are located on the same horizontal plane; by capturing a wider viewing angle image of the target area, the comprehensiveness of image acquisition is ensured, and the blind area of ​​vision that may be caused by a single viewing angle is reduced. Based on a preset target detection model, the stubble in the first image to be identified and the second image to be identified are respectively identified and annotated to obtain a first stubble annotated image and a second stubble annotated image, thereby improving the accuracy and efficiency of target detection, being more objective and faster than manual recognition, and being able to process a large amount of data. Based on an image matching algorithm, the feature points in the first stubble annotated image and the second stubble annotated image are respectively identified and matched to obtain a plurality of feature matching groups, wherein the feature matching group includes two feature points, which are feature points in the first stubble annotated image and feature points in the second stubble annotated image, respectively, thereby improving the accuracy of feature matching and providing a reliable basis for subsequent stubble height calculation. The stubble height corresponding to each feature matching group is determined based on the pinhole imaging principle. The imaging principle of the camera is taken into consideration, making the calculation of the stubble height more reasonable and scientific, while avoiding the difficulties and errors caused by directly measuring the stubble height. The target stubble height of the target area is determined based on the stubble height corresponding to all feature matching groups. By integrating multiple data points, it helps to more accurately reflect the stubble height of the target area. And through automated execution, manual intervention and errors are reduced, and work efficiency and accuracy are improved. It is not only suitable for stubble height measurement in the agricultural field, but can also be extended to other fields that need to measure and monitor the height of objects, and has a wide range of applicability.

[0048] In one embodiment, feature points in the first stubble annotated image and the second stubble annotated image are identified and matched based on an image matching algorithm to obtain a plurality of feature matching groups, including: Constructing a first Gaussian difference pyramid and a second Gaussian difference pyramid based on the first stubble labeled image and the second stubble labeled image, respectively, to determine a first feature point in the first stubble labeled image and a second feature point in the second stubble labeled image; Constructing a first eigenvector of the first feature point and a second eigenvector of the second feature point; Performing vector matching based on the Euclidean distance between the first eigenvector and the second eigenvector; The first feature point and the second feature point corresponding to the target first feature vector and the target second feature vector whose Euclidean distance is less than the distance threshold are respectively taken as a feature matching group to obtain multiple feature matching groups.

[0049] It should be noted that in this embodiment, the image matching algorithm is used to identify and match feature points in the first stubble annotated image and the second stubble annotated image, thereby obtaining multiple feature matching groups. These feature matching groups will be used for subsequent three-dimensional information acquisition and stubble height calculation. In this embodiment, the image matching algorithm adopts the SIFT algorithm, which can accurately identify and match feature points under different scales, rotations, and lighting conditions.

[0050] It should be noted that, for ease of understanding, when explaining the principle of the SIFT algorithm, this embodiment uses the "corn stubble image" as an example to illustrate the first stubble labeled image and the second stubble labeled image. Specifically, in one embodiment, a Gaussian pyramid is constructed based on the SIFT algorithm to capture features of different sizes through images of different scales. The following steps may be included: Step a, first, the corn stubble image is enlarged by doubling it through image magnification as the first group and first layer of the Gaussian pyramid. This step is to ensure that more details can be captured in subsequent processing.

[0051] Step b, perform Gaussian convolution on the first layer of the first group of images to obtain a total of 6 layers of images. Gaussian convolution is to smooth the image through a Gaussian function to reduce noise and details, thereby highlighting the main features. The Gaussian convolution process is expressed as:

[0052] Among them, G(x, y, σ) is the Gaussian convolution function, I(x, y) is the value of each pixel in the image, and σ is a fixed parameter value used to control the degree of smoothing.

[0053] Step c: downsample the third-to-last layer image of the first group to obtain the first-layer image of the second group. Downsampling is to reduce the computational complexity by reducing the resolution of the image while retaining the main features.

[0054] The downsampling process is to take every other pixel in each row and column, so as to obtain an image with rows and columns that are 1 / 2 of the original image.

[0055] Repeat steps b and c, assuming that O groups of images are obtained, each group of images contains 6 layers, and a total of O×6 images are the Gaussian pyramid. By subtracting pixels from images in adjacent groups, a Gaussian difference pyramid (DOG) is obtained.

[0056] Furthermore, local extreme points are detected in the Gaussian difference pyramid, and these extreme points are feature points. Specifically, for each pixel point in the Gaussian difference pyramid, all its surrounding adjacent points are compared to check whether the pixel point is a local extreme point at the scale. If it is a local extreme point, the position, scale and direction information of the point are recorded. The feature point in the first stubble annotation image is the first feature point; the feature point in the second stubble annotation image is the second feature point.

[0057] Generate a distinguishing feature vector for each feature point for matching. Specifically, for each feature point, calculate the gradient size and direction of each pixel in the neighborhood of the Gaussian pyramid image where it is located. Among them, the distribution characteristics of the gradient m(x, y) and direction θ(x, y) of each pixel in the 3×3 neighborhood of the Gaussian pyramid image where the feature point is located can be calculated by the following formula:

[0058] The gradient direction of pixels in the neighborhood is counted using a histogram to generate a direction histogram of the feature point. The histogram divides the direction of 0-360° into 8 columns, each with 45°. In the histogram, the peak direction is regarded as the main direction of the feature point. To improve robustness, directions higher than 80% of the main direction are retained as auxiliary directions.

[0059] It should be noted that after obtaining the feature points in the image and knowing the position, scale and direction of each feature point, in order to complete the feature point matching in the two images, it is necessary to construct a descriptor for the information of each feature point, that is, to vectorize the feature point information. Obtain the feature vector of the feature point. The feature vector of the first feature point is the first feature vector; the feature vector of the second feature point is the second feature vector. It is determined based on the Gaussian image of the scale of the feature point. The image area radius required to calculate the descriptor is generally calculated by a fixed formula. For example, the radius r is related to the number of blocks in which the image is divided. In one embodiment, the calculation formula of the radius r is as follows:

[0060] Among them, d=4 means that the image area is divided into 4×4 sub-blocks, and σ is a fixed parameter value. In order to maintain the rotation invariance of the feature description, the coordinate axis where the feature point is located is rotated to the direction of the feature point. Statistical histogram: Perform histogram statistics in 8 directions for each of the sub-blocks divided to obtain the gradient amplitude in each direction. Through the above steps, each feature point will generate a 128-dimensional (4×4×8) feature point description vector. This vector contains the gradient distribution information of the pixels around the feature point and is the basis for subsequent feature point matching.

[0061] Match is performed between the feature vectors of the first stubble annotation image and the second stubble annotation image. Specifically, calculate the Euclidean distance between each feature vector in the first stubble annotation image and each feature vector in the second stubble annotation image. Set a distance threshold, and regard the feature vector pairs with Euclidean distance less than this threshold as matching pairs, that is, feature matching groups. The Euclidean distance calculation formula is as follows:

[0062] Among them, a(i) is the feature vector of the feature point of the corn stubble image collected by the first image collector, and b(i) is the feature vector of the feature point of the corn stubble image collected by the second image collector. Set the threshold T, and when d < T, the feature point matching is successful.

[0063] In this embodiment, the image matching algorithm is used to achieve accurate recognition and detection of feature points, providing key information for the subsequent calculation of the stubble height and improving the accuracy of the stubble height calculation.

[0064] In one embodiment, based on the principle of pinhole imaging, determine the stubble height corresponding to each feature matching group, including: For each feature matching group, based on the principle of parallax ranging, determine whether there is a depth difference between the top and bottom of the target stubble, where the target stubble is the stubble corresponding to the feature matching group, the depth difference is the difference in depth values, and the depth value is the distance from the feature point to the optical center plane of the image acquisition device; Based on the principle of pinhole imaging, determine the projected height between the top and bottom; In the case where there is no depth difference between the top and bottom of the target stubble, determine the stubble height corresponding to the feature matching group based on the projected height; In the case where there is a depth difference between the top and bottom of the target stubble, determine the stubble height corresponding to the feature matching group based on the projected height and the depth difference.

[0065] In this embodiment, it should be noted that, taking the first image acquisition device and the second image acquisition device as an array camera as an example, for each feature matching group, the parallax distance measurement principle is used, and according to the position difference of the matched feature points in the left and right images, that is, the parallax, the depth value of the actual object corresponding to these feature points from the optical center plane of the image acquisition device array camera is calculated, wherein the actual object corresponding to the feature point here refers to the top and bottom of the corn stubble. For each feature matching group, the depth values ​​of the top and bottom of the corresponding corn stubble are compared to determine whether there is a depth difference. The depth difference reflects whether the corn stubble is tilted or has a height change in three-dimensional space. Regardless of whether the corn stubble is tilted, it will have a projection on the array camera image. The projection height is the actual height corresponding to the pixel length, and the projection height can be calculated by the pinhole imaging principle. Based on the pinhole imaging principle, it can be known that the projection height of the object on the image is related to its actual height, the focal length of the camera, and the distance from the object to the camera, wherein the distance from the object to the camera is also the depth value. Therefore, the known camera parameters, such as focal length, pixel size, etc. and depth value, can be used to calculate the projection height. The calculation formula can be:

[0066] Among them, L represents the projection height of the corn stubble; l represents the pixel length corresponding to the pixel coordinates of the corn stubble after imaging by the mid-area array camera; dx represents the size occupied by a single pixel in the area array camera; f represents the focal length of the camera; D represents the depth value from the horizontal plane where the corn stubble is located to the optical center of the camera, which may include the depth value from the horizontal plane where the top feature point is located to the optical center of the camera and the depth value from the horizontal plane where the bottom feature point is located to the optical center of the camera.

[0067] It should be noted that if there is no depth difference, that is, the depth values ​​of the top and bottom of the corn stubble are the same, or the difference is within an acceptable range, it means that the corn stubble is basically perpendicular to the ground or has a small inclination. In this case, the projection height can be directly used as the stubble height.

[0068] The presence of a depth difference means that the top and bottom depth values ​​of the corn stubble are different, indicating that the corn stubble is tilted. At this time, it is necessary to use the projection height and the depth difference to more accurately calculate the stubble height. It can be solved by considering the inclination angle, three-dimensional shape and other factors of the corn stubble, through methods such as geometric transformation or three-dimensional reconstruction. Specifically, in one embodiment, the stubble height can be calculated by the following formula:

[0069] Wherein, H represents the stubble height; L represents the projection height of the target stubble; and h represents the depth difference between the top and bottom of the target stubble.

[0070] In this embodiment, the preset target detection model can accurately identify corn stubble and mark its position in the image, while the binocular vision technology can obtain three-dimensional information of corn stubble including depth value, thereby achieving more accurate stubble height measurement, providing an effective reference for the identification and adjustment and optimization of the field return effect of operating machinery.

[0071] Specifically, in one embodiment, for each feature matching group, determining whether there is a depth difference between the top and bottom of the target stubble based on the parallax distance measurement principle includes: For each feature matching group, respectively obtain a first top feature point corresponding to the top and a first bottom feature point corresponding to the bottom of the target stubble in the first stubble labeled image, and a second top feature point corresponding to the top and a second bottom feature point corresponding to the bottom of the target stubble in the second stubble labeled image; Determine a first top target distance based on a first top imaging point position of the first top feature point in the first image acquisition device, wherein the first top target distance is a distance between the first top imaging point position and an edge position of an imaging surface of the first image acquisition device, and the edge position is the leftmost end or the rightmost end; Determine a second top target distance based on a second top imaging point position of the second top feature point in the second image acquisition device, wherein the second top target distance is a distance between the second top imaging point position and an edge position of an imaging surface of the second image acquisition device, and the edge position is the leftmost end or the rightmost end; determining a tip depth value based on the first tip target distance and the second tip target distance; Determine a first bottom target distance based on a first bottom imaging point position of the first bottom feature point in the first image acquisition device, wherein the first bottom target distance is a distance between the first bottom imaging point position and an edge position of an imaging surface of the first image acquisition device, and the edge position is the leftmost end or the rightmost end; Determine a second bottom target distance based on a second bottom imaging point position of the second bottom feature point in the second image acquisition device, wherein the second bottom target distance is a distance between the second bottom imaging point position and an edge position of an imaging surface of the second image acquisition device, and the edge position is the leftmost end or the rightmost end; determining a bottom depth value based on the first bottom target distance and the second bottom target distance; When the absolute value of the difference between the top depth value and the bottom depth value is greater than zero, it is determined that there is a depth difference between the top and bottom of the target stubble; When the absolute value of the difference between the top depth value and the bottom depth value is equal to zero, it is determined that there is no depth difference between the top and the bottom of the target stubble.

[0072] In this embodiment, it should be noted that, since the corn stubble left after returning to the field will fall in all directions, the entire corn stubble cannot be completely parallel to the phase plane of the array camera when photographing. Therefore, it is also necessary to consider whether there is a depth difference between the top and bottom of the target stubble. The presence of a depth difference means that the depth values ​​of the top and bottom of the corn stubble are different, indicating that the corn stubble is tilted. Specifically, when the absolute value of the difference between the top depth value and the bottom depth value is greater than zero, it is determined that there is a depth difference between the top and bottom of the target stubble; when the absolute value of the difference between the top depth value and the bottom depth value is equal to zero, it is determined that there is no depth difference between the top and bottom of the target stubble. Among them, the top depth value is the distance from the top feature point of the target stubble to the optical center plane of the array camera; the bottom depth value is the distance from the bottom feature point of the target stubble to the optical center plane of the array camera. The first top feature point and the first bottom feature point are the top feature point and the bottom feature point in the first stubble annotation image. The second top feature point and the second bottom feature point are the top feature point and the bottom feature point in the second stubble annotation image.

[0073] refer to Figure 4 In this embodiment, a binocular vision measurement model diagram is used as an example to illustrate the calculation of the top depth value and the bottom depth value of the target stubble. The edge position of the imaging surface of the image acquisition device is assumed to be the leftmost end. It can be understood that when the edge position is the rightmost end, the calculation method of the depth value is similar to the calculation method when the edge position is the leftmost end. Figure 4 In the embodiment, it is assumed that the first image acquisition device and the second image acquisition device are two area array cameras with the same camera parameters installed at the left and right ends of the tail of the working machine. L and O R They represent the optical centers of the left and right area array cameras respectively. The optical axes of the two area array cameras are parallel to each other and located in the same horizontal plane. The horizontal distance between the two optical centers is b. The imaging points of the corn stubble P on the imaging surfaces of the left and right area array cameras are point P L and point P R , where P L and P R The straight line between the two points and the camera optical center O R and O L The lines on which the two points lie are parallel. L The distance from the leftmost end of its imaging surface is X L , click P R The distance from the leftmost end of its imaging surface is X R The distance between the leftmost and rightmost ends of the imaging surface of the array camera is Y. Z is the length of the line segment PB, which represents the depth value of the feature point. L and P R The straight line between the two points is perpendicular to PB and point C. f is the focal length of the array camera.

[0074] According to the principle of similar triangles, we can deduce:

[0075]

[0076] Adding the above two equations together we get:

[0077] Further deduction yields:

[0078] That is, when determining the top depth value, Z represents the top depth value; X L Indicates the first top target distance, X R Indicates the second top target distance. When determining the bottom depth value, Z indicates the bottom depth value; X L Indicates the first bottom target distance, X R Indicates the second bottom target distance.

[0079] In this embodiment, the binocular vision system and the parallax distance measurement principle are used to accurately calculate the depth information of the two end points of the corn stubble, which is of great significance for the subsequent judgment of the field return effect and the adjustment of the height of the field return machine above the ground.

[0080] The present application also provides a stubble height recognition device, comprising: A first image collector and a second image collector, the first image collector and the second image collector are installed on the operating machine, and the first image collector and the second image collector are separated by a preset interval and are located on the same horizontal plane; The first image collector is used to acquire a first image to be identified in the target area, and send the first image to be identified to the processor; The second image collector is used to acquire a second image to be identified of the target area, and send the second image to be identified to the processor; a memory configured to store instructions; The processor is configured to call instructions from the memory and implement the stubble height recognition method as described in the above embodiment when executing the instructions.

[0081] The present application also provides a corn harvester, comprising: A stubble height identification device as described in the above embodiment.

[0082] An embodiment of the present application further provides a machine-readable storage medium, on which instructions are stored, and the instructions are used to enable a machine to execute the stubble height identification method as described in the above embodiment.

[0083] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0084] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0085] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0086] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0087] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0088] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0089] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0090] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0091] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A method for identifying stubble height, characterized in that: include: Acquire a first image to be recognized and a second image to be recognized of a target area, wherein the first image to be recognized is acquired by a first image collector, and the second image to be recognized is acquired by a second image collector, the first image collector and the second image collector are installed on an operating machine, and the first image collector and the second image collector are separated by a preset interval and are located on the same horizontal plane; Respectively identifying and marking stubble in the first image to be identified and the second image to be identified based on a preset target detection model to obtain a first stubble marked image and a second stubble marked image; Based on an image matching algorithm, feature points in the first stubble labeled image and the second stubble labeled image are respectively identified and matched to obtain a plurality of feature matching groups, wherein the feature matching group includes two feature points, which are feature points in the first stubble labeled image and feature points in the second stubble labeled image; Determine the stubble height corresponding to each feature matching group based on the pinhole imaging principle; The target stubble height of the target area is determined based on the stubble heights corresponding to all feature matching groups.

2. The stubble height recognition method according to claim 1, characterized in that: The method of identifying and matching the feature points in the first stubble annotated image and the second stubble annotated image based on an image matching algorithm to obtain a plurality of feature matching groups includes: constructing a first Gaussian difference pyramid and a second Gaussian difference pyramid based on the first stubble labeled image and the second stubble labeled image respectively, so as to determine a first feature point in the first stubble labeled image and a second feature point in the second stubble labeled image; Constructing a first feature vector of the first feature point and a second feature vector of the second feature point; Performing vector matching based on the Euclidean distance between the first feature vector and the second feature vector; The first feature point and the second feature point corresponding to the target first feature vector and the target second feature vector whose Euclidean distance is less than the distance threshold are respectively taken as a feature matching group to obtain multiple feature matching groups.

3. The stubble height recognition method according to claim 1, characterized in that: The determining of the stubble height corresponding to each of the feature matching groups based on the pinhole imaging principle includes: For each feature matching group, determine whether there is a depth difference between the top and bottom of the target stubble based on the parallax ranging principle, wherein the target stubble is the stubble corresponding to the feature matching group, the depth difference is the difference in depth values, and the depth value is the distance between the feature point and the optical center plane of the image acquisition device; Determine the projection height between the top end and the bottom end based on the pinhole imaging principle; In the case where there is no depth difference between the top and bottom of the target stubble, determining the stubble height corresponding to the feature matching group based on the projection height; In the case where there is a depth difference between the top and bottom of the target stubble, the stubble height corresponding to the feature matching group is determined based on the projection height and the depth difference.

4. The stubble height recognition method according to claim 3, characterized in that: For each feature matching group, determining whether there is a depth difference between the top and bottom of the target stubble based on the parallax distance measurement principle includes: For each feature matching group, respectively obtain a first top feature point corresponding to the top and a first bottom feature point corresponding to the bottom of the target stubble in the first stubble labeled image, and a second top feature point corresponding to the top and a second bottom feature point corresponding to the bottom of the target stubble in the second stubble labeled image; Determine a first top target distance based on a first top imaging point position of the first top feature point in the first image acquisition device, wherein the first top target distance is a distance between the first top imaging point position and an edge position of an imaging surface of the first image acquisition device, and the edge position is the leftmost end or the rightmost end; Determine a second top target distance based on a second top imaging point position of the second top feature point in the second image acquisition device, wherein the second top target distance is a distance between the second top imaging point position and an edge position of an imaging surface of the second image acquisition device, and the edge position is the leftmost end or the rightmost end; determining a tip depth value based on the first tip target distance and the second tip target distance; Determine a first bottom target distance based on a first bottom imaging point position of the first bottom feature point in the first image acquisition device, wherein the first bottom target distance is a distance between the first bottom imaging point position and an edge position of an imaging surface of the first image acquisition device, and the edge position is the leftmost end or the rightmost end; Determine a second bottom target distance based on a second bottom imaging point position of the second bottom feature point in the second image acquisition device, wherein the second bottom target distance is a distance between the second bottom imaging point position and an edge position of an imaging surface of the second image acquisition device, and the edge position is the leftmost end or the rightmost end; determining a bottom end depth value based on the first bottom end target distance and the second bottom end target distance; When the absolute value of the difference between the top depth value and the bottom depth value is greater than zero, it is determined that there is a depth difference between the top and the bottom of the target stubble; When the absolute value of the difference between the top depth value and the bottom depth value is equal to zero, it is determined that there is no depth difference between the top and the bottom of the target stubble.

5. The stubble height recognition method according to claim 1, characterized in that: The preset target detection model is built based on the YOLOv8 model, and the preset target detection model is obtained by replacing a preset number of standard convolution modules in the Neck part of the YOLOv8 model with multi-scale convolution modules.

6. The stubble height recognition method according to claim 5, characterized in that: The preset target detection model also includes adding a CPCA attention module after the SPPF module in the Backbone part of the YOLOv8 model.

7. The stubble height recognition method according to claim 1, characterized in that: The step of determining the target stubble height of the target area based on the stubble heights corresponding to all feature matching groups includes: The average value of the stubble heights corresponding to all feature matching groups is determined as the target stubble height of the target area.

8. A stubble height recognition device, characterized in that: include: A first image collector and a second image collector, wherein the first image collector and the second image collector are installed on the operating machine, and the first image collector and the second image collector are separated by a preset interval and are located on the same horizontal plane; The first image collector is used to acquire a first image to be identified in the target area, and send the first image to be identified to the processor; The second image collector is used to acquire a second image to be identified of the target area, and send the second image to be identified to the processor; a memory configured to store instructions; A processor is configured to call the instructions from the memory and implement the stubble height recognition method according to any one of claims 1 to 7 when executing the instructions.

9. A corn harvester, characterized in that: include: The stubble height identification device according to claim 8.

10. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores instructions, which are used to enable a machine to execute the stubble height identification method according to any one of claims 1 to 7.