Cotton picker control method and system, electronic equipment and storage medium
Through the image segmentation model and path correction technology, the automatic alignment of cotton pickers is realized, which solves the control lag problem of traditional cotton pickers, improves picking efficiency and operation timeliness, and is suitable for the needs of large-scale cotton fields.
Patent Information
- Application Number
- CN202410898039.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2024-09-27
AI Technical Summary
Traditional cotton pickers have control lag during the picking process and cannot achieve automatic alignment, resulting in low picking efficiency and high labor intensity, and cannot meet the needs of large-scale cotton fields.
By obtaining the scene image of the cotton field area, use the image segmentation model to segment the position information of cotton rows and cotton roads, adjust the position of the cotton picker to align the cotton picking head with the cotton rows, generate a target path based on the cotton road position information, and calculate the deviation distance Make corrections to ensure that the picker follows the reference path to maintain alignment.
It realizes the automatic alignment of cotton pickers, improves picking efficiency, reduces labor intensity and labor costs, can effectively respond to environmental changes in cotton fields, and ensures that cotton pickers and cotton rows are always aligned.
Smart Images

Figure CN118707958A
Abstract
Description
Technical Field
[0001] The present application relates to the field of automation control technology, and in particular to a control method, system, electronic equipment and storage medium for a cotton picker. Background Art
[0002] Cotton is an important raw material for the textile industry and has great value. The traditional method of picking cotton manually has problems such as low picking efficiency, high cost, and high labor intensity, which cannot meet the needs of large-scale cotton fields. As an important agricultural equipment, cotton pickers have made great contributions to improving cotton picking efficiency and reducing labor intensity.
[0003] In order to further improve cotton picking efficiency, reduce labor costs and labor intensity, and realize mechanized operations in agricultural production, an angle sensing device is installed on the cotton picker in the related technology to realize automatic alignment of the picking mechanism and the cotton row, thereby improving the picking efficiency. However, the above method can only make a heading adjustment after sensing that the picking mechanism has yawed, and the control of the cotton picker has a certain lag.
[0004] Therefore, how to realize automatic row alignment of the cotton picker and improve the timeliness of the row alignment operation is a technical problem that technical personnel in this field currently need to solve. Summary of the invention
[0005] The purpose of the present application is to provide a control method, system, electronic device and storage medium for a cotton picker, which can realize automatic row alignment of the cotton picker and improve the timeliness of row alignment operation.
[0006] In order to solve the above technical problems, the present application provides a control method for a cotton picker, comprising:
[0007] Acquire a scene image of a cotton field area; wherein the cotton field area includes a plurality of cotton rows and cotton paths;
[0008] The scene image is segmented using an image segmentation model to obtain a region segmentation result; wherein the region segmentation result includes position information of the cotton row and the cotton path;
[0009] Adjust the position of the cotton picker according to the position information of the cotton row so that the cotton picking head of the cotton picker is aligned with the cotton row;
[0010] According to the location information of the cotton trail, the cotton trail closest to the cotton picker is marked as a target cotton trail, and a target path is generated according to the target cotton trail;
[0011] Calculating the deviation distance between the center point of the cotton picker and the target path, and using the deviation distance to correct the target path to obtain a reference path;
[0012] The cotton picker is controlled to move along the reference path so that the cotton picking head is aligned with the cotton row during the moving process of the cotton picker.
[0013] Optionally, after controlling the cotton picker to walk along the reference path, the method further includes:
[0014] Determine the cotton picking boundary according to the region segmentation result;
[0015] Determining whether the distance between the cotton picker and the cotton picking boundary is less than or equal to a preset value;
[0016] If so, the cotton picking machine is controlled to perform a turning operation.
[0017] Optionally, after controlling the cotton picker to walk along the reference path, the method further includes:
[0018] Recording the travel distance of the cotton picker in the target cotton path;
[0019] Determining whether the walking distance is greater than or equal to the preset length;
[0020] If so, the cotton picker is controlled to perform a turning operation.
[0021] Optionally, marking the cotton track closest to the cotton picker as a target cotton track according to the position information of the cotton track includes:
[0022] Selecting a reference point on the ground directly in front of the cotton picker;
[0023] Determine the distance between each of the cotton paths and the reference point according to the position information of the cotton paths;
[0024] The cotton track closest to the reference point is marked as the target cotton track.
[0025] Optionally, before obtaining the scene image of the cotton field area, the following is also included:
[0026] Using a camera to shoot an operation video of the cotton picker performing the cotton picking operation in the cotton field area; wherein the camera is arranged on the cotton picker;
[0027] Extracting frames from the operation video to obtain multiple sample images;
[0028] The regions in the sample image are labeled, and the labeled sample image is used to train the image segmentation model.
[0029] Optionally, also include:
[0030] Generating a simulation environment of the cotton field area;
[0031] Generate a cotton picker dynamics model according to the equipment parameters of the cotton picker; wherein the cotton picker dynamics model is used to simulate the physical state of the cotton picker;
[0032] Generate a sensor model; wherein the sensor model is used to collect status information of the cotton picker dynamics model and the simulation environment;
[0033] The cotton picker dynamic model is simulated and controlled based on a preset algorithm according to the status information collected by the sensor model; wherein the preset algorithm includes any one or a combination of any several of a perception algorithm, a detection algorithm, an automatic alignment algorithm and a path tracking algorithm.
[0034] Optionally, after the cotton picker dynamics model is simulated and controlled based on a preset algorithm according to the state information collected by the sensor model, the method further includes:
[0035] Displaying the motion trajectory, sensor data and simulation scene of the cotton picker according to the simulation control result;
[0036] And / or, determining the execution effect of the preset algorithm according to the simulation control result.
[0037] The present application also provides a control system for a cotton picker, the system comprising:
[0038] An image acquisition module is used to acquire a scene image of a cotton field area; wherein the cotton field area includes a plurality of cotton rows and cotton paths;
[0039] An image segmentation module, used to segment the scene image using an image segmentation model to obtain a region segmentation result; wherein the region segmentation result includes the position information of the cotton row and the cotton path;
[0040] An alignment module, used for adjusting the position of the cotton picker according to the position information of the cotton row, so that the cotton picking head of the cotton picker is aligned with the cotton row;
[0041] A path generation module is used to mark the cotton path closest to the cotton picker as a target cotton path according to the location information of the cotton path, and to generate a target path according to the target cotton path; and is also used to calculate the deviation distance between the center point of the cotton picker and the target path, and to correct the target path using the deviation distance to obtain a reference path;
[0042] The path tracking module is used to control the cotton picker to move along the reference path so that the cotton picking head is aligned with the cotton row during the movement of the cotton picker.
[0043] The present application also provides a storage medium on which a computer program is stored, and when the computer program is executed, the steps of the control method of the cotton picker are implemented.
[0044] The present application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor calls the computer program in the memory, the steps of executing the control method of the cotton picker are implemented.
[0045] The present application provides a control method for a cotton picker. After acquiring a scene image of a cotton field area, the method uses an image segmentation model to divide the scene image to obtain the position information of the cotton rows and cotton paths in the cotton field area. The present application adjusts the position of the cotton picker according to the position information of the cotton rows so that the cotton picking head is aligned with the cotton rows. The present application marks the cotton path closest to the cotton picker as a target cotton path, and generates a target path based on the target cotton path. The present application also corrects the target path according to the deviation distance between the center point of the cotton picker and the target path to obtain a reference path, and controls the cotton picker to walk according to the reference path to ensure that the cotton picking head is aligned with the cotton row during the walking process. The above scheme can effectively cope with changes in the cotton field environment, ensure that the cotton picker is always aligned with the cotton row, thereby realizing automatic row alignment of the cotton picker and improving the timeliness of the row alignment operation of the cotton picker. The present application also provides a control system, a storage medium and an electronic device for a cotton picker, which have the above beneficial effects and are not repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0047] Figure 1 A flow chart of a control method for a cotton picker provided in an embodiment of the present application;
[0048] Figure 2 A schematic diagram of the principle of automatic row alignment of a cotton picker provided in an embodiment of the present application;
[0049] Figure 3 A schematic diagram of an automatic row alignment simulation system for a cotton picker provided in an embodiment of the present application;
[0050] Figure 4 A schematic diagram of cotton row detection provided in an embodiment of the present application;
[0051] Figure 5 A schematic diagram of path extraction and alignment provided in an embodiment of the present application;
[0052] Figure 6 A schematic diagram of the principle of the first automatic turning solution provided in an embodiment of the present application;
[0053] Figure 7 A schematic diagram of the principle of the second automatic turning solution provided in the embodiment of the present application;
[0054] Figure 8 A schematic diagram of the composition of a simulation control module provided in an embodiment of the present application. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution 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. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0056] See below Figure 1 , Figure 1 A flow chart of a control method for a cotton picker provided in an embodiment of the present application.
[0057] Specific steps may include:
[0058] S101: Acquire a scene image of a cotton field area;
[0059] Among them, this embodiment can be applied to the processor of the cotton picker, and can also be applied to an electronic device connected to the cotton picker, and the electronic device can send instructions to the cotton picker to realize control.
[0060] The cotton in the cotton field is planted according to the standard row spacing to form cotton rows. The intervals between the cotton rows are cotton paths. Therefore, the cotton rows and cotton paths in the cotton field are distributed at intervals. Cotton rows refer to the areas in the cotton field where cotton is planted, and cotton paths refer to the areas in the cotton field where cotton is not planted.
[0061] In this step, a camera may be used to obtain a scene image of a cotton field area. The cotton field area includes a plurality of cotton rows and cotton paths, so the scene image includes images corresponding to the cotton rows and images corresponding to the cotton paths.
[0062] S102: Segmenting the scene image using an image segmentation model to obtain a region segmentation result;
[0063] After obtaining the scene image, the present embodiment can input the scene image into an image segmentation model, and then use the image segmentation model to segment the scene image to obtain a region segmentation result. The image segmentation model can divide the scene image into regions such as cotton rows, cotton paths, boundaries, and landmarks, and the region segmentation results include location information of each region, such as location information of cotton rows and location information of cotton paths.
[0064] S103: adjusting the position of the cotton picker according to the position information of the cotton row, so that the cotton picking head of the cotton picker is aligned with the cotton row;
[0065] There are multiple cotton picking heads at the front end of the cotton picker, and the row-aligning operation of the cotton picker means that the cotton picking heads are aligned with the cotton rows, that is, the cotton picking heads and the cotton rows are in the same straight line. After obtaining the region segmentation result, this embodiment can adjust the position of the cotton picker according to the position information of the cotton rows, so that the cotton picking heads of the cotton picker are aligned with the cotton rows.
[0066] S104: marking the cotton track closest to the cotton picker as a target cotton track according to the location information of the cotton track, and generating a target path according to the target cotton track;
[0067] Among them, this embodiment can also mark the cotton track closest to the cotton picker as the target cotton track according to the position information of the cotton track, and generate the target path with reference to the target cotton track. The target path can be a path in the target cotton track. In this embodiment, the center line of the target cotton track can be used as the target path, and the distance from any point on the center line to the boundaries on both sides of the target cotton track is equal.
[0068] S105: calculating the deviation distance between the center point of the cotton picker and the target path, and using the deviation distance to correct the target path to obtain a reference path;
[0069] Among them, the cotton picker tracks the path based on its own center point, and there may be a deviation between the center point of the cotton picker and the target path, so the deviation distance between the center point of the cotton picker and the target path can be calculated, and the target path can be corrected using the deviation distance to obtain a reference path. The reference path is the path to be tracked when controlling the movement of the cotton picker, that is, the center point of the cotton picker needs to be on the reference path during the movement of the cotton picker. When the center point of the cotton picker deviates from the reference path, the steering angle and speed are adjusted to make the center point of the cotton picker deviate in the direction of the reference path to achieve cotton row alignment.
[0070] S106: Control the cotton picker to move along the reference path so that the cotton picking head is aligned with the cotton row during the moving process of the cotton picker.
[0071] Among them, on the basis of obtaining the reference path, this embodiment can control the cotton picker based on the path tracking algorithm, so that the cotton picker walks along the reference path. In the process of controlling the cotton picker to walk along the reference path, the cotton picking head can perform the cotton picking operation. Because the cotton picking head of the cotton picker is aligned with the cotton row before generating the target path and the reference path, the cotton picking head can be aligned with the cotton row in real time during the walking process of the cotton picker.
[0072] After acquiring the scene image of the cotton field area, this embodiment uses the image segmentation model to divide the scene image to obtain the position information of the cotton rows and cotton paths in the cotton field area. This embodiment adjusts the position of the cotton picker according to the position information of the cotton rows so that the cotton picking head is aligned with the cotton rows. This embodiment marks the cotton path closest to the cotton picker as the target cotton path, and generates a target path based on the target cotton path. This embodiment also corrects the target path according to the deviation distance between the center point of the cotton picker and the target path to obtain a reference path, and controls the cotton picker to walk along the reference path to ensure that the cotton picking head is aligned with the cotton rows during the walking process. The above scheme can effectively cope with changes in the cotton field environment, ensure that the cotton picker is always aligned with the cotton rows, thereby realizing automatic row alignment of the cotton picker and improving the timeliness of the row alignment operation of the cotton picker.
[0073] The solution of turning by relying on angle sensors in the related art is difficult to achieve automatic turning at the head of the field and automatic alignment after turning, and still relies on manual intervention by the cotton picker driver to perform this part of the operation. Figure 1 As further described in the corresponding embodiment, during the operation of the cotton picker, scene images of the cotton field area can be continuously collected, and the collected scene images can be segmented using an image segmentation model to obtain image segmentation results for each scene image.
[0074] As a feasible implementation, after controlling the cotton picker to walk along the reference path, the cotton picking boundary can also be determined according to the region segmentation result; it is determined whether the distance between the cotton picker and the cotton picking boundary is less than or equal to a preset value; if so, the cotton picker is controlled to perform a turning operation; if not, the cotton picker continues to be controlled to walk along the reference path. In the above manner, the cotton picker can automatically turn when it approaches the cotton picking boundary. After the cotton picker turns, the position of the cotton picker can also be adjusted so that the cotton picking head of the cotton picker is aligned with the unpicked cotton row.
[0075] As another feasible implementation, after controlling the cotton picker to walk along the reference path, the walking distance of the cotton picker in the target cotton road can also be recorded; determine whether the walking distance is greater than or equal to the preset length; if so, control the cotton picker to perform a turning operation; if not, continue to control the cotton picker to walk along the reference path. The above walking distance is the displacement of the cotton picker in the centerline direction of the target cotton road. In the above manner, the cotton picker can automatically turn after walking a certain distance in the target cotton road, and the above preset length can be determined according to the length of the target cotton road.
[0076] As for Figure 1 Further introduction to the corresponding embodiment, the target cotton trail can be determined in the following manner: select a reference point on the ground directly in front of the cotton picker; determine the distance between each cotton trail and the reference point based on the position information of the cotton trail; mark the cotton trail closest to the reference point as the target cotton trail. The reference point can be the point in front of the cotton picker that is closest to the center point of the cotton picker and can be photographed. Before calculating the distance between the cotton trail and the reference point, a conversion between the world coordinate system and the camera coordinate system can be performed.
[0077] As for Figure 1 Further introduction to the corresponding embodiment, before obtaining the scene image of the cotton field area, the image segmentation model can also be trained in the following way: using a camera to shoot an operation video of the cotton picker performing the cotton picking operation in the cotton field area; wherein the camera is set on the cotton picker; extracting frames from the operation video to obtain multiple sample images; annotating the areas in the sample images, and using the annotated sample images to train the image segmentation model.
[0078] Considering the seasonal nature of cotton picking, the automatic row alignment test of a cotton picker requires a large amount of experimental data and venues, with relatively high time costs and risks. The embodiment of the present application also provides a simulation scheme for cotton picker operations, and the specific process is as follows: generating a simulation environment for the cotton field area; generating a cotton picker dynamics model according to the equipment parameters of the cotton picker; wherein the cotton picker dynamics model is used to simulate the physical state of the cotton picker; generating a sensor model; wherein the sensor model is used to collect status information of the cotton picker dynamics model and the simulation environment; performing simulation control of the cotton picker dynamics model based on a preset algorithm according to the status information collected by the sensor model; wherein the preset algorithm includes a perception algorithm, a detection algorithm, and an automatic row alignment algorithm (i.e., for Figure 1 Any one or a combination of any two of the algorithms in the corresponding embodiment) and the path tracing algorithm.
[0079] After the cotton picker dynamic model is simulated and controlled based on a preset algorithm according to the status information collected by the sensor model, the motion trajectory, sensor data and simulation scene of the cotton picker can also be displayed according to the simulation control results, and the execution effect of the preset algorithm can also be determined according to the simulation control results.
[0080] The process described in the above embodiment is explained below through an embodiment in actual application.
[0081] This embodiment proposes a vision-based solution for automatic row alignment and simulation of cotton pickers. The cotton rows are segmented by a deep learning visual algorithm, and then the target path is extracted based on the segmentation results based on the reference points. Then, the target path is tracked in real time to obtain the target turning angle and driving speed. For the problem of automatic turning, this embodiment provides two specific implementation plans that can be used in different cotton field scenarios. In order to reduce the experimental cost and risk of automatic row alignment of cotton pickers, the simulation system in this embodiment establishes simulation models including cotton plants, fields, cotton pickers, visual sensors, and control systems. By simulating various scenarios, the performance of the automatic row alignment system of cotton pickers is tested in a wider and more complex situation, helping to optimize the scheme design and parameter settings. This embodiment uses a pure visual solution combined with a deep learning algorithm to automatically segment and detect cotton fields. This embodiment proposes a cotton road path extraction solution based on reference points and proposes two automatic turning solutions at the head of the field. This embodiment also designs a simulation system for automatic row alignment of cotton pickers.
[0082] See also Figure 2 , Figure 2 A schematic diagram of the principle of automatic row alignment of a cotton picker is provided in an embodiment of the present application. The system for implementing the automatic row alignment solution of the cotton picker includes a cotton row detection module, a path extraction and alignment module and an automatic turning module. The motion control of the cotton picker can be achieved through the above three modules.
[0083] See also Figure 3 , Figure 3 A schematic diagram of a cotton picker automatic row alignment simulation system provided in an embodiment of the present application, the cotton picker automatic row alignment simulation system includes a scene modeling module, a simulation control module, and a data analysis and visualization module. The simulation control module includes a cotton picker model, a sensor model, and a control algorithm, and may also include a cotton field model and a control system model.
[0084] The cotton row detection module is used to distinguish cotton rows and cotton roads, and provide prior information for determining the drivable area. In this embodiment, cotton row detection is mainly based on a deep learning semantic segmentation algorithm. First, a camera installed on the front top of the cotton picker is used to collect cotton field image data at a certain angle, and then the collected data is annotated at the pixel level. The annotated data is then used to train the cotton row detection model, and finally the optimized model is obtained for inference deployment to obtain the segmentation result map of cotton rows and cotton roads.
[0085] See also Figure 4 , Figure 4 A schematic diagram of cotton row detection provided in an embodiment of the present application shows the process of photographing a cotton field, data annotation, model training, and cotton field detection, and finally obtaining the detection result. The cotton row detection module can implement the following steps:
[0086] Step A1: Data collection.
[0087] The camera is installed at the front end of the top of the cotton picker cab, shooting diagonally downward at an angle of 30 degrees to the horizontal plane. During the cotton picking operation, 5 minutes of video is recorded every hour, and a total of 20 videos are collected. The video is then framed and a picture is saved every 1 second. Some pictures that do not meet the requirements are manually removed, and a total of about 5,000 picture data are saved.
[0088] Step A2: Data labeling.
[0089] Use open source data annotation tools such as PixelAnnotationTool and Labelme to annotate the 5,000 image data in step A1, and set the labels to three / four categories such as "background", "cotton row", "cotton road", and "boundary / landmark" (if any), and generate 5,000 labeled images that correspond one to one to the 5,000 original image data.
[0090] Step A3: Model training and optimization.
[0091] The 5000 data sets in step A2 are randomly divided into training set, validation set, and test set in a ratio of 8:1:1. Taking PP-LiteSeg as the basic framework, data enhancement methods such as image scaling, cropping, Gaussian filtering, and color gamut transformation are used. The training set is used to train model parameters, and the validation set is used to train hyperparameters. Finally, the test set is used to evaluate the model performance to obtain a detection model suitable for the task scenario.
[0092] Step A4: Model inference.
[0093] The real-time monitoring video is obtained through the camera in step A1, the image read frame by frame is scaled to 960×720, and then the scaled image is input into the detection model obtained in step A3, and the inference result is obtained through the encoder-decoder.
[0094] The path extraction and alignment module is implemented based on the results of the cotton row detection module. Figure 5 , Figure 5 A schematic diagram of path extraction and alignment is provided for an embodiment of the present application, which shows the operation of path extraction and real-time path tracking. This embodiment can calculate the reference point based on the parameter information of the cotton picker body, camera and imaging screen, and then use the reference point as a reference to lock the nearest cotton path as the target passable cotton path. Finally, the center line of the target passable cotton path is extracted, and the center line is smoothed, and the processed center line is used as the target path. Based on the target path obtained by the above operation, real-time path tracking is performed. Specifically comprising the following steps:
[0095] Step B1: Camera calibration.
[0096] The camera is installed on the front of the top of the cotton picker cab. This embodiment uses Zhang Zhengyou calibration method to obtain the camera internal parameters, including focal length (f x ,f y ), main point (c x ,c y ) and distortion coefficients D (k1, k2, k3, p1, p2). The above k1, k2 and k3 represent radial distortion coefficients, and p1 and p2 represent tangential distortion coefficients. On the basis of the intrinsic calibration, the ground is used as the reference plane, and multiple calibration objects (such as triangular cones) are placed on the reference plane. The position of each calibration object in the world coordinate system, the position in the cotton picker body coordinate system, and their two-dimensional coordinates in the image are recorded. The external parameter matrix [R w |T w ] and the external parameter matrix of the camera and the cotton picker body [R c |T c ]. w Represents the rotation matrix in the extrinsic matrix between the camera and the world, T w Represents the translation vector in the extrinsic matrix between the camera and the world; R c represents the rotation matrix in the external parameter matrix of the camera cotton picker body, T c Represents the translation vector in the extrinsic matrix between the camera and the cotton picker body.
[0097] Step B2: Path extraction.
[0098] According to the position of the cotton picking head aligned with the cotton row, a reference point is placed on the ground in front of the cotton picking machine body, and the two-dimensional coordinates of the reference point in the original image (u o ,v o ), the original image coordinates are converted into the cotton picker body coordinates through equations (1), (2) and (3), and the horizontal deviation between the coordinate system origin and the cotton picker body coordinate system origin is calculated (dx , d y ). Among them, (u,v) is the original image coordinate, (x',y') is the normalized coordinate, (X c ,Y c ,Z c ) is the coordinate in the camera coordinate system.
[0099] Formula (1);
[0100] Formula (2);
[0101] Formula (3);
[0102] In the above formula, R represents the rotation matrix and T represents the translation vector. The original image detection result is distorted by equations (1), (4) and (5), where (x, y) is the normalized coordinate after distortion correction, (u new ,v new ) is the corrected image coordinate. Based on the coordinates of the reference point after distortion correction, the nearest cotton road is extracted as the target passable cotton road on the correction result image, the cotton road coordinates are converted into coordinates in the world coordinate system, and then the local weighted regression algorithm is used to obtain the smooth cotton road centerline as the target path, and r is the distance of the normalized coordinate (x', y') at the origin of the coordinate.
[0103] Formula (4);
[0104] Formula (5);
[0105] Step B3: Align the cotton rows.
[0106] The result obtained by subtracting the horizontal deviation from the target path obtained in step B2 is used as the real-time path, and the real-time speed is obtained from the chassis controller. The path tracking algorithm (such as Pure Pursuit, Model Predictive Control, etc.) is used to calculate the distance and angle difference between the target point and the cotton picker. Finally, the steering angle and speed are calculated based on these differences to achieve cotton row alignment.
[0107] The automatic turning module can realize automatic turning according to the actual situation of the cotton field through the following two schemes:
[0108] See also Figure 6 , Figure 6This is a schematic diagram of the principle of the first automatic turning solution provided in the embodiment of the present application. This solution first performs boundary detection to determine whether a boundary is detected; if a boundary is detected, it determines whether the boundary reaches a limited distance. If so, a turning operation is performed. If not, the workflow of the path extraction and alignment module is entered; if no boundary is detected, the workflow of the path extraction and alignment module is entered. This solution is applicable to situations where there are reserved boundaries or boundary markers in the cotton field. The above-mentioned limited distance represents the set value of the reserved boundary or boundary marker from the front section of the cotton picker.
[0109] See also Figure 7 , Figure 7 This is a schematic diagram of the principle of the second automatic turning solution provided in the embodiment of the present application. This solution first determines the custom side length, detects the displacement of the cotton picker, and then determines whether the displacement reaches the custom side length. If so, the turning operation is performed, otherwise, the workflow of the path extraction and alignment module is entered. This solution can also be called a self-set boundary solution. This solution flexibly formulates the implementation position of the automatic turning of the cotton picker by customizing the side length of the cotton field and recording the displacement of the cotton picker in the specified direction. The displacement of the cotton picker can be measured using RTK (Real-time kinematic, real-time differential positioning) measurement.
[0110] The scene modeling module is used to model the geography and environment of the cotton field. The scene modeling module is the basis of the simulation system and is used to simulate the topography, vegetation distribution, soil type, etc. of the cotton field. In order to be as close to the real scene as possible, weather control and lighting change functions are also added to this module.
[0111] The scene modeling content can be completed based on the open source 3D computer graphics software Blender and Unreal Engine. In the simulation system, Blender can be used to create various specific object models such as cotton plants, obstacles, buildings, etc., and provide basic models for subsequent virtual environment rendering and simulation by modeling their appearance and structure. Unreal Engine is mainly responsible for scene rendering, physical simulation and real-time demonstration, including but not limited to creating and modifying terrain, setting physical properties such as material, movement, collision, etc. of objects in the simulation scene, creating and modifying climate and lighting, etc.
[0112] The simulation control module includes three parts: the cotton picker dynamics model, the sensor model, and the control algorithm. The cotton picker dynamics model is used to simulate the real physical state of the cotton picker. It will interact with the scene in the previous module and pass its own state and environmental state to the control algorithm through the sensor model. The control algorithm calculates these data in real time and then returns the calculation results to control the movement of the cotton picker.
[0113] See also Figure 8 , Figure 8A schematic diagram of the composition of a simulation control module provided in an embodiment of the present application shows a cotton picker dynamics model, a sensor model and a control algorithm. The input of the cotton picker dynamics model includes a three-dimensional model, a torque curve, gearbox parameters and a tire friction coefficient. The input of the sensor model includes sensor type, sensor position, sensor angle and signal type. The control algorithm includes a perception algorithm, a detection algorithm and a path tracking algorithm.
[0114] The data analysis and visualization module is divided into two parts: data analysis and simulation visualization. The simulation visualization part is used to display the motion trajectory, sensor data and simulation scene of the cotton picker in real time, which helps users observe the simulation situation and perform corresponding debugging. The data analysis part can record various information during the simulation, such as the position, speed, sensor data, cotton field location information, cotton row distribution information, etc. of the cotton picker. By analyzing these data, the effect of the automatic row alignment algorithm and the system performance can be evaluated. For example, formula (5) is used to evaluate the row alignment efficiency, formula (6) is used to evaluate the row alignment error, and E f represents the alignment efficiency, t represents the time required to move to the set alignment position, and d s Indicates the set row position, E r represents the line error, d a Indicates the actual moving position of the picker.
[0115] Formula (5);
[0116] Formula (6);
[0117] This embodiment provides a vision-based automatic row alignment method and simulation system for cotton pickers, solves the lag problem in the automatic row alignment method based on angle sensing devices, realizes automatic turning of cotton pickers and automatic alignment after turning, helps complete the simulation test and optimization of automatic row alignment of cotton pickers, further promotes the automation and intelligence of cotton pickers, improves cotton picking efficiency and reduces cotton picking costs. This embodiment simulates various real scenarios to test the performance of the automatic row alignment system of cotton pickers in a wider range and more complex situations, helps optimize the design of solutions and parameter settings, reduces test costs and risks, and improves efficiency.
[0118] A control system for a cotton picker provided in an embodiment of the present application includes:
[0119] An image acquisition module is used to acquire a scene image of a cotton field area; wherein the cotton field area includes a plurality of cotton rows and cotton paths;
[0120] An image segmentation module, used to segment the scene image using an image segmentation model to obtain a region segmentation result; wherein the region segmentation result includes the position information of the cotton row and the cotton path;
[0121] An alignment module, used for adjusting the position of the cotton picker according to the position information of the cotton row, so that the cotton picking head of the cotton picker is aligned with the cotton row;
[0122] A path generation module is used to mark the cotton path closest to the cotton picker as a target cotton path according to the location information of the cotton path, and to generate a target path according to the target cotton path; and is also used to calculate the deviation distance between the center point of the cotton picker and the target path, and to correct the target path using the deviation distance to obtain a reference path;
[0123] The path tracking module is used to control the cotton picker to move along the reference path so that the cotton picking head is aligned with the cotton row during the movement of the cotton picker.
[0124] After acquiring the scene image of the cotton field area, this embodiment uses the image segmentation model to divide the scene image to obtain the position information of the cotton rows and cotton paths in the cotton field area. This embodiment adjusts the position of the cotton picker according to the position information of the cotton rows so that the cotton picking head is aligned with the cotton rows. This embodiment marks the cotton path closest to the cotton picker as the target cotton path, and generates a target path based on the target cotton path. This embodiment also corrects the target path according to the deviation distance between the center point of the cotton picker and the target path to obtain a reference path, and controls the cotton picker to walk along the reference path to ensure that the cotton picking head is aligned with the cotton rows during the walking process. The above scheme can effectively cope with changes in the cotton field environment, ensure that the cotton picker is always aligned with the cotton rows, thereby realizing automatic row alignment of the cotton picker and improving the timeliness of the row alignment operation of the cotton picker.
[0125] Furthermore, it also includes:
[0126] The first turning control module is used to determine the cotton picking boundary according to the area segmentation result after controlling the cotton picker to walk along the reference path; it is also used to determine whether the distance between the cotton picker and the cotton picking boundary is less than or equal to a preset value; if so, control the cotton picker to perform a turning operation.
[0127] The second turning control module is used to record the walking distance of the cotton picker in the target cotton road after controlling the cotton picker to walk along the reference path; it is also used to determine whether the walking distance is greater than or equal to the preset length; if so, control the cotton picker to perform a turning operation.
[0128] Furthermore, the process in which the path generation module marks the cotton trail closest to the cotton picker as the target cotton trail based on the location information of the cotton trail includes: selecting a reference point on the ground directly in front of the cotton picker; determining the distance between each cotton trail and the reference point based on the location information of the cotton trail; and marking the cotton trail closest to the reference point as the target cotton trail.
[0129] Furthermore, it also includes:
[0130] The model training module is used to use a camera to shoot an operation video of the cotton picker performing cotton picking operations in the cotton field area before obtaining a scene image of the cotton field area; wherein the camera is set on the cotton picker; it is also used to extract frames from the operation video to obtain multiple sample images; it is also used to mark the areas in the sample images and use the marked sample images to train the image segmentation model.
[0131] Furthermore, it also includes:
[0132] A simulation module, used to generate a simulation environment of the cotton field area; also used to generate a cotton picker dynamics model according to the equipment parameters of the cotton picker; wherein the cotton picker dynamics model is used to simulate the physical state of the cotton picker; also used to generate a sensor model; wherein the sensor model is used to collect status information of the cotton picker dynamics model and the simulation environment; and also used to perform simulation control of the cotton picker dynamics model based on a preset algorithm according to the status information collected by the sensor model; wherein the preset algorithm includes any one or a combination of any several of a perception algorithm, a detection algorithm, an automatic alignment algorithm and a path tracking algorithm.
[0133] Furthermore, it also includes:
[0134] A first result processing module, used for displaying the motion trajectory, sensor data and simulation scene of the cotton picker according to the simulation control result;
[0135] And / or, a second result processing module is used to determine the execution effect of the preset algorithm according to the simulation control result.
[0136] Since the embodiments of the system part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the system part, which will not be repeated here.
[0137] The present application also provides a storage medium on which a computer program is stored, and when the computer program is executed, the steps provided in the above embodiment can be implemented. The storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0138] The present application also provides an electronic device, which may include a memory and a processor, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the steps provided in the above embodiment may be implemented. Of course, the electronic device may also include various network interfaces, power supplies and other components.
[0139] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of this application.
[0140] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article 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, article or device. In the absence of further restrictions, an element defined by the statement "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
Claims
1. A control method for a cotton picker, characterized in that: include: Acquire a scene image of a cotton field area; wherein the cotton field area includes a plurality of cotton rows and cotton paths; The scene image is segmented using an image segmentation model to obtain a region segmentation result; wherein the region segmentation result includes position information of the cotton row and the cotton path; Adjust the position of the cotton picker according to the position information of the cotton row so that the cotton picking head of the cotton picker is aligned with the cotton row; According to the location information of the cotton trail, the cotton trail closest to the cotton picker is marked as a target cotton trail, and a target path is generated according to the target cotton trail; Calculating the deviation distance between the center point of the cotton picker and the target path, and using the deviation distance to correct the target path to obtain a reference path; The cotton picker is controlled to move along the reference path so that the cotton picking head is aligned with the cotton row during the moving process of the cotton picker.
2. The control method of the cotton picker according to claim 1, characterized in that: After controlling the cotton picker to walk along the reference path, the method further includes: Determine the cotton picking boundary according to the region segmentation result; Determining whether the distance between the cotton picker and the cotton picking boundary is less than or equal to a preset value; If so, the cotton picking machine is controlled to perform a turning operation.
3. The control method of the cotton picker according to claim 1, characterized in that: After controlling the cotton picker to walk along the reference path, the method further includes: Recording the travel distance of the cotton picker in the target cotton path; Determining whether the walking distance is greater than or equal to a preset length; If so, the cotton picker is controlled to perform a turning operation.
4. The control method of the cotton picker according to claim 1, characterized in that: According to the location information of the cotton path, marking the cotton path closest to the cotton picker as a target cotton path includes: Selecting a reference point on the ground directly in front of the cotton picker; Determine the distance between each of the cotton paths and the reference point according to the position information of the cotton paths; The cotton track closest to the reference point is marked as the target cotton track.
5. The control method of the cotton picker according to claim 1, characterized in that: Before obtaining the scene image of the cotton field area, it also includes: Using a camera to shoot an operation video of the cotton picker performing the cotton picking operation in the cotton field area; wherein the camera is arranged on the cotton picker; Extracting frames from the operation video to obtain multiple sample images; The regions in the sample image are labeled, and the labeled sample image is used to train the image segmentation model.
6. The control method of the cotton picker according to claim 1, characterized in that: Also includes: Generating a simulation environment of the cotton field area; Generate a cotton picker dynamics model according to the equipment parameters of the cotton picker; wherein the cotton picker dynamics model is used to simulate the physical state of the cotton picker; Generate a sensor model; wherein the sensor model is used to collect status information of the cotton picker dynamics model and the simulation environment; The cotton picker dynamic model is simulated and controlled based on a preset algorithm according to the status information collected by the sensor model; wherein the preset algorithm includes any one or a combination of any several of a perception algorithm, a detection algorithm, an automatic alignment algorithm and a path tracking algorithm.
7. The control method of the cotton picker according to claim 6, characterized in that: After the cotton picker dynamics model is simulated and controlled based on a preset algorithm according to the state information collected by the sensor model, the method further includes: Displaying the motion trajectory, sensor data and simulation scene of the cotton picker according to the simulation control result; And / or, determining the execution effect of the preset algorithm according to the simulation control result.
8. A control system for a cotton picker, characterized in that: include: An image acquisition module is used to acquire a scene image of a cotton field area; wherein the cotton field area includes a plurality of cotton rows and cotton paths; An image segmentation module, used to segment the scene image using an image segmentation model to obtain a region segmentation result; wherein the region segmentation result includes the position information of the cotton row and the cotton path; An alignment module, used for adjusting the position of the cotton picker according to the position information of the cotton row, so that the cotton picking head of the cotton picker is aligned with the cotton row; A path generation module is used to mark the cotton path closest to the cotton picker as a target cotton path according to the location information of the cotton path, and to generate a target path according to the target cotton path; and is also used to calculate the deviation distance between the center point of the cotton picker and the target path, and to correct the target path using the deviation distance to obtain a reference path; The path tracking module is used to control the cotton picker to move along the reference path so that the cotton picking head is aligned with the cotton row during the movement of the cotton picker.
9. An electronic device, characterized in that: It comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the cotton picker control method as claimed in any one of claims 1 to 7 when calling the computer program in the memory.
10. A storage medium, characterized in that: The storage medium stores computer executable instructions, and when the computer executable instructions are loaded and executed by the processor, the steps of the cotton picker control method as described in any one of claims 1 to 7 are implemented.
