Air-ground cooperative selective visual harvesting method and system
Through the selective harvesting vision method of air-ground cooperation, the drone and ground-side vision system are combined with the YOLOv8 algorithm and the SAM image segmentation model to achieve automated and standardized harvesting of broccoli, solving the problems caused by manual field patrols and naked eye judgment. The problem of harvesting inaccuracies is improved, harvesting efficiency is improved and costs are reduced.
Patent Information
- Application Number
- CN202410921562.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2024-10-15
AI Technical Summary
In the existing technology, the decision-making and execution of broccoli harvesting relies on manual field patrols and naked eye judgment, resulting in inaccurate harvesting, increased labor costs and waste of resources, and is not in line with the development trends of agricultural automation and smart agriculture.
Adopting a selective harvesting vision method of air-ground collaboration, using drones and ground-side vision systems combined with the YOLOv8 algorithm and SAM image segmentation model to achieve automated inspections and standardized harvesting, and obtaining the location of broccoli in real time through depth cameras and RTK technology and quality information for precise picking and grading.
It realizes the automation and standardization of broccoli harvesting, improves harvesting efficiency, reduces labor costs, provides high-precision data support, and provides an important data basis for broccoli growth status assessment and agronomic management.
Smart Images

Figure CN118781503A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of agricultural information technology, and in particular relates to an air-ground collaborative selective harvesting visual method and system. Background Art
[0002] For high-value crops such as broccoli, the maturity of the same plot will also vary greatly, and the fruits need to be selectively harvested based on indicators such as coloring and size. At present, due to the delicate operation of selective harvesting, it is all done manually, which makes it one of the most labor-intensive and expensive agricultural tasks. In order to solve the problem of labor substitution in the harvesting link, selective harvesting technology has become an emerging technology. Because of its delicate operation requirements, it has become one of the most challenging tasks in agricultural robotics technology. Broccoli has the characteristics of selective harvesting, and it usually takes half a month to more than a month to harvest. Before harvesting, it is necessary to manually inspect the broccoli planting plots to make harvesting decisions. During harvesting, it is necessary to manually estimate the diameter of the broccoli head to determine whether the broccoli should be harvested. If the diameter of the broccoli head is greater than 12cm, the harvester uses a cutter to manually harvest, and puts the harvested head into a backpack on the back, and carries it to the ridge of the field. The pickers classify the broccoli of different qualities and place them in the large frame. In order to save time, workers usually rely on their naked eyes to determine whether to harvest during harvesting. Due to the uneven quality of the harvesters, broccoli with a diameter of about 11cm-13cm is prone to missed or wrong harvesting, which will cause certain economic losses. In addition, as the transfer of agricultural land contracting and management rights has promoted the development of agricultural industrialization, large-scale planting of broccoli has become a development trend. Large-scale management of broccoli in multiple plots requires low-cost and high-efficiency scientific methods. With the expansion of the planting area and total output, defects such as low efficiency of manual harvesting and high labor costs have restricted the development of the broccoli industry.
[0003] The growth of broccoli is closely related to its variety, planting pattern, soil quality, agronomic operations, and weather conditions, and it is difficult to accurately predict the yield data. The use of aerial drones with a visual system can efficiently complete the inspection task and obtain the growth of the flower heads of each broccoli plot, and obtain the quantitative statistics of the graded sizes of the flower heads in each plot through algorithms, which can provide a high-throughput data basis for the formulation of harvesting decisions. The visual system of the ground-end harvesting robot is used to identify the broccoli flower heads during the picking operation and determine whether the harvesting standards are met. If the harvesting standards are met, the robot arm and the end effector will perform the harvesting operation. In addition, the quality is graded according to the color and size of the broccoli flower heads, and they are placed in different harvesting frames and will be sold to the mid-to-high-end market. During the harvesting process, the depth camera combined with the vehicle-mounted RTK can record the quality, location and other information of the broccoli in real time. The integration with the aerial data can provide data information with reference value for the growth status evaluation of broccoli and subsequent agronomic operations.
[0004] In summary, the current harvesting decision and execution of open-air broccoli rely on manual field inspections and visual judgment to complete the harvesting operation. Harvesting decision and execution that have not been standardized and automated will cause loss and waste of broccoli resources and increase labor costs, and are not in line with the development trend of agricultural automation and smart agriculture. The unification of harvesting decision and execution is the sign of the realization of air-ground collaborative automated harvesting of broccoli. Harvesting decision, as a guide for harvesting execution, will directly affect the deployment of harvesting machines, harvesting efficiency and final benefits; harvesting execution, as the result of harvesting decision, can well verify the accuracy of the decision and provide timely feedback, which is conducive to optimizing the formulation of subsequent harvesting decisions. Summary of the invention
[0005] In order to overcome the shortcomings of the existing technology, the present invention provides an air-ground collaborative selective harvesting visual method and system. Compared with the traditional harvesting standards judged by the naked eye, the air-ground collaborative broccoli selective harvesting visual system can realize automated inspection and standardized harvesting, and unify harvesting decisions and harvesting execution, which is a key step in realizing unmanned farms. Compared with the existing broccoli automated harvesting visual system, the algorithm model strategy for broccoli quality grading can better meet the needs of the current grading market. At the same time, the aerial drone introduced can effectively target the characteristics of selective harvesting of broccoli, provide a high-throughput data basis for making harvesting decisions, and is extremely important for managing the harvesting process of broccoli in multiple plots over a large area.
[0006] The technical solution adopted by the present invention to solve its technical problem is:
[0007] A selective harvesting visual method for air-ground collaboration includes the following steps:
[0008] Step 1: Based on the broccoli image obtained by the air-ground end, obtain the air-end weight file and the ground-end weight file based on YOLOv8 that have been trained and verified and meet the recognition rate requirements;
[0009] Step 2: based on the remote sensing aerial scanning image of the broccoli plot obtained by the aerial end, obtain a two-dimensional digital distribution map of the broccoli heads at the aerial end;
[0010] Step 3: The ground mobile data acquisition and processing system is mounted on the field autonomous mobile carrier, which acquires and processes the broccoli images on the ground in real time, and determines whether the detected flower heads have been harvested accordingly. The ground mobile data acquisition and processing system is composed of an image acquisition sensor depth camera mounted on a mobile vehicle, an RTK mobile station, and a data processing module Jetson Xavier NX. The depth camera acquires the broccoli images of the target area in real time when the ground harvesting robot performs the harvesting task, including visible light RGB images and infrared depth images. After the depth camera acquires the image, it transmits it to Jetson Xavier NX performs real-time processing, and the RTK mobile station obtains the three-dimensional spatial position of the acquisition system in real time, which is used to solve the actual geographical location of the flower head in the acquired broccoli image; the ground mobile terminal data acquisition and processing system obtains the broccoli image and completes the detection and classification, contour segmentation, circle fitting, and positioning calculation of the flower head. The result is the data basis for the robotic arm and the end effector to perform the corresponding picking operation on the broccoli and decide whether to place it in the corresponding harvesting frame; at the same time, the two-dimensional digital distribution map obtained by the ground end can complete the verification of the two-dimensional digital distribution map of the air end, and the two-dimensional digital distribution map of the air-ground end can construct a broccoli phenotypic database.
[0011] Further, the process of step 1 is as follows:
[0012] Step 1.1, use a drone equipped with an RGB gimbal camera to obtain the remote sensing dataset of broccoli at the ground-air end, and use an aluminum profile cart equipped with an RGB-D depth camera to obtain the broccoli dataset at the ground end of the field under shading and lighting conditions;
[0013] Step 1.2, complete manual labeling of the broccoli data sets on the aerial end and the ground end respectively. The labeling needs to be done under the guidance of a broccoli expert. When labeling the aerial end data, the labeled flower heads must meet the following three conditions: 1) The coloring is basically normal, 2) The occlusion rate of the broccoli is less than 50%, and 3) The actual diameter is greater than 8cm; when labeling the ground end data, the broccoli must be divided into normal broccoli and abnormal broccoli based on the coloring and morphology of the broccoli flower heads;
[0014] In step 1.3, data augmentation is performed on the labeled data to expand the data set, including affine transformations such as rotation, translation, and scaling, brightness changes, adding Gaussian and salt and pepper noise, and adding motion blur; then the YOLOv8 algorithm model is used to train the labeled image data sets of the air end and the ground end respectively, and the air end weight file and the ground end weight file that have been trained and verified and meet the recognition rate requirements are obtained.
[0015] Furthermore, the process of step 2 is as follows:
[0016] Step 2.1, the drone is equipped with an automatic cruise system. After receiving the mission, it can automatically take off from the control center and fly to the target plot. Then the drone completes the aerial scanning of the target plot, ensuring 80% of the heading and lateral overlap. The RGB gimbal camera on board obtains high-throughput broccoli image data of the target plot, and the IoT card equipped uploads the captured images to the cloud in real time;
[0017] Step 2.2: The ground control center directly obtains the broccoli data of each plot from the cloud. The ground station image processing system of the control center is equipped with DJI Zhitu software, which performs two-dimensional reconstruction of the aerial images of the broccoli target plot obtained from the cloud to obtain the digital orthophoto of the broccoli;
[0018] Step 2.3, use the python script to crop the digital orthophoto 2D images of each broccoli plot into image groups of a set size. Before cropping the images, ensure that adjacent images have a certain overlap rate;
[0019] Step 2.4, using the trained and verified air-side weight file based on the YOLOv8 algorithm to process the image group, complete the detection of broccoli heads, and solve the pixel coordinates of the center point of each head identification box;
[0020] Step 2.5, using the pixel coordinates of the center point of the YOLOv8 recognition frame as a prompt input into the SAM image segmentation model, completing the image mask segmentation of the area where the center point in the image group is located, and this area is the image mask of the flower head detected by YOLOv8; using findContours in OpenCV to process the segmented mask to obtain the contour of the flower head;
[0021] Step 2.6: Use the least squares method to complete the circle fitting of the contour. The diameter of the circle is the pixel diameter d of the broccoli head. The actual diameter d of the broccoli head is i =d×GSD, where GSD=h×p / f, GSD is the ground sampling distance, which indicates how much actual distance one pixel represents on the ground in the remote sensing image, where h is the shooting height of the drone gimbal camera relative to the ground, p is the pixel size of the gimbal camera sensor, and f is the focal length of the lens at the point where the aerial photo was acquired;
[0022] Step 2.7, based on the obtained flower head data in each photo in the image group, that is, the flower head at the pixel position (x m ,y m ) and diameter d, the data with the coordinate system of the cropped small image is converted into the data with the coordinate system of the reconstructed large image through the conversion formula, that is, the actual position (X i ,Y i ) and diameter d i, and store the data in the aerial end flower curd data matrix, where the number of rows represents the number of flower curds, the first and second columns store the horizontal and vertical coordinates of the flower curd positions, respectively, and the third column stores the diameter of the flower curd;
[0023] Step 2.8, draw a two-dimensional digital distribution map of the aerial broccoli balls of the measured plot based on the aerial ball data matrix, then complete the quantitative statistics of the actual diameters of the balls of multiple broccoli plots, and compare the proportions of the number of harvestable balls, so as to decide whether to harvest each plot and the corresponding harvesting order.
[0024] Furthermore, the process of step 3 is as follows:
[0025] Step 3.1: The depth camera on the ground mobile terminal data acquisition and processing system obtains the RGB image and depth image of the broccoli in real time. The equipped Jetson Xavier NX has a built-in ground-side weight file based on YOLOv8, which detects the broccoli head in the RGB image and completes the classification of whether the broccoli is normal.
[0026] Step 3.2, using the pixel coordinates of the center point of the detection frame of the YOLOv8 recognition result as a prompt input into the SAM image segmentation model, and obtaining the image mask of the area where the center point is located, which is the image mask of the flower ball recognized by YOLOv8;
[0027] Step 3.3, use findContours in OpenCV to process the curd segmentation mask to obtain the contour of the curd, and then use the least squares method to complete the circle fitting of the contour. The center of the circle is the pixel coordinate position (u, v) of the curd in the image. The spatial position (X, Y, Z) of the curd center in the camera coordinate system is obtained through the formula, which provides a data basis for the subsequent broccoli curd harvesting end effector to determine the harvesting point;
[0028] Step 3.4, find all the diameters passing through the center of the flower ball fitting circle in the RGB image, solve the two points where each diameter intersects the outer contour of the flower ball, record the pixel coordinates of each pair of points, and obtain the corresponding depth value in the depth image, convert the two pixel coordinates into coordinates in the camera coordinate system, and then calculate the distance between the two spatial points, and select the largest distance as the actual diameter d of the broccoli flower ball n ;
[0029] Step 3.5, by classifying the identified broccoli, and then performing the harvesting operation, the first category is temporarily unharvestable broccoli, which is broccoli with good appearance but less than 12 cm in diameter; the second category is harvestable broccoli, which includes high-quality broccoli and qualified broccoli. High-quality broccoli is dark green with uniform color, round and firm flower heads, uniform bud size without yellowing, blackening and flowering, and flower head diameter size is between 12 cm and 14 cm. It is sold by piece for export and high-end retail market; qualified broccoli heads meet one of the following conditions One: (1) low roundness, (2) insufficient firmness of the flower heads, (3) uneven bud sizes with a small number of yellow or black buds, (4) flower heads larger than 14 cm in diameter, sold whole to ordinary markets or cut into pieces; the third category is broccoli that is picked but not harvested, including diseased broccoli, with dark buds often with large areas of black or reddish purple; overmature broccoli, i.e., the buds have already bloomed; broccoli with more than two flower heads on the same plant needs to be thinned out and only one is retained to avoid affecting the development of the flower heads on the same plant. The third category is directly thrown into the field after being picked;
[0030] Step 3.6, based on the ground-side image stream and RTK data, construct a two-dimensional digital distribution map of broccoli heads on the ground side.
[0031] Preferably, the process of step 3.3 is as follows:
[0032] Step 3.3.1, use the pixel coordinate position (u, v) to find the corresponding depth value D(u, v) in the depth image. The depth value represents the distance of the object from the camera along the Z axis, that is, the vertical direction;
[0033] Step 3.3.2, get the intrinsic parameter matrix of the depth camera where f x and f y is the focal length of the camera in the x and y directions, c x and c y is the optical center of the image;
[0034] Step 3.3.3, use the camera intrinsic parameters and depth value to convert the pixel coordinates to camera coordinates. The three-dimensional point (X, Y, Z) in the camera coordinate system is calculated by the following formula:
[0035]
[0036]
[0037] Z=D(u,v)(3-3).
[0038] More preferably, the process of step 3.6 is as follows:
[0039] Step 3.6.1, the Jetson Xavier NX built-in program reads the longitude and latitude of its geographic location in real time through the RTK mobile station, and combines the longitude and latitude with the image at the corresponding time through the timestamp, completes the coordinate translation based on the relative installation position between the RTK and the depth camera, and obtains the longitude and latitude of the geographic location of the flower ball identified in the image stream. ;
[0040] Step 3.6.2, taking a certain corner of the broccoli field as the origin, convert the longitude and latitude of the flower head into position coordinates relative to the origin;
[0041] Step 3.6.3, the flower curd data obtained in sequence during the harvesting process are stored in the ground-end flower curd data matrix of p rows and 6 columns in order of rows, where p represents the number of broccoli, and the 1st and 2nd columns respectively store the horizontal and vertical position coordinates of the flower curd relative to the origin; the 3rd column stores the altitude data of the flower curd, which is the difference between the altitude measured by RTK and the vertical distance from the depth camera to the flower curd; the 4th column stores the actual diameter data of the flower curd; the 5th column stores the quality grade data of the flower curd, where 0 represents high quality, 1 represents qualified quality, 2 represents poor quality (the degree of abnormality of the flower curd is serious), and 3 represents unknown at present, that is, the flower curd size is less than 12 cm; the 6th column stores the picture number corresponding to the flower curd, and 0 represents that the picture is not stored;
[0042] Step 3.6.4, repeat the processing of broccoli in the image stream. During the harvesting process, the center position of the broccoli curd is calculated in real time, and the distance with the positions of the several curds just stored is solved. If the distance is less than 5 cm and the curd diameter difference is within 1 cm, it means that the currently identified curd is the same as the stored curd, and there is no need to store the relevant information of the curd in this frame of the image;
[0043] Step 3.6.5, for the flower curds with serious abnormalities, a small picture of the identification frame area of the flower curd is cut out from the image obtained by the depth camera and numbered, and saved in the memory card configured by the processor, and the number is stored in the sixth column of the broccoli data of the row, which is used for subsequent analysis of the yield, disease, and water and fertilizer conditions of each plot;
[0044] Step 3.6.6, based on the ground-end flower ball data matrix, draw a two-dimensional digital distribution map of the ground-end flower balls with a corner point of the broccoli field as the origin, including the plane position, diameter and quality. The flower balls are represented by circles. The position of the center of the circle in the distribution map is the position of the flower ball, and the diameter of the circle is the diameter of the flower ball. The quality is from high to low, with red, yellow and black respectively. The quality is currently unknown and no color matching is required.
[0045] A selective harvesting vision system for air-ground collaboration includes an air-end image acquisition system, a ground station image processing system and a ground mobile end image acquisition and processing system. The air-end image acquisition system is communicatively connected with the ground station image processing system, and the ground station image processing system is bidirectionally communicatively connected with the ground mobile end image acquisition and processing system.
[0046] In the present invention, on the one hand, the large-scale surface data obtained by drone aerial photography usually involves the two-dimensional digital distribution map of the aerial end of broccoli flower heads in multiple plots, which records the position and size of all identified broccoli. Due to the limitation of the shooting height, it is difficult to make a very accurate evaluation of the growth status of a single broccoli, but it can grasp the maturity of each broccoli plot as a whole from the perspective of the size of the broccoli, which is of great significance for the formulation of harvesting plans. On the other hand, the small-scale point data of each harvesting point obtained by the ground-end depth camera can record and identify the detailed characteristics of each broccoli in the area in real time to determine whether the broccoli meets the harvesting standard, which is very important for whether to perform the harvesting operation. And the ground end obtains the detailed information of each broccoli flower head, and can draw a more detailed two-dimensional digital distribution of the ground-end flower head containing the quality information of broccoli. The fusion of the two-dimensional data distribution of the broccoli flower head at the air end is conducive to providing a data basis for statistics and analysis of the growth status of broccoli and timely adjustment of agronomic management strategies. It is extremely important to complete the longitudinal comparison of broccoli based on time series and the horizontal comparison of different plots in the same period. In summary, the air-ground collaborative broccoli selective harvesting vision system can obtain multi-scale data of the broccoli field, and after being processed by the corresponding algorithm, it can provide the air-ground collaborative broccoli selective harvesting robot system with the data required for making harvesting decisions and execution.
[0047] The beneficial effects of the present invention are mainly manifested in: realizing automated inspection and standardized harvesting. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 It is a schematic diagram of the relationship between the air-ground collaborative broccoli selective harvesting system and the visual system.
[0049] Figure 2 This is the architecture diagram of the visual algorithm model for selective harvesting of broccoli in air-ground collaboration.
[0050] Figure 3 This is a demonstration of how to crop a large digital orthophoto of a broccoli plot and splice small images together, where (a) represents the theoretical cropping method, (b) represents the cropping method with overlapping areas set, and (c) represents the effect display of the two-dimensional digital distribution map of the flower heads.
[0051] Figure 4It is a flow chart of the ground mobile end data acquisition and processing system performing graded processing on the flower ball image and determining whether the flower ball should be harvested when the ground end harvesting robot performs the harvesting operation. DETAILED DESCRIPTION
[0052] The present invention will be further described below in conjunction with the accompanying drawings.
[0053] Reference Figure 1 to Figure 4 , a selective harvesting visual method for air-ground collaboration, comprising the following steps:
[0054] Step 1: Based on the broccoli image obtained by the air-ground end, obtain the air-end weight file and the ground-end weight file based on YOLOv8 that have been trained and verified and meet the recognition rate requirements;
[0055] The process of step 1 is as follows:
[0056] Step 1.1: Use a drone equipped with an RGB gimbal camera to obtain a remote sensing dataset of broccoli at the ground-air end, and use an aluminum profile cart equipped with an RGB-D depth camera to obtain a broccoli dataset at the field ground end under shading and lighting conditions.
[0057] Step 1.2, complete manual labeling of the data sets of broccoli on the air side and the ground side respectively. Due to the limitation of the shooting height, the detailed information of broccoli is limited in the air side data. When making labels, the main labeling is that the flower head meets the following three conditions: 1. The coloring is basically normal, 2. The occlusion rate is less than 50% of the broccoli, and 3. The actual diameter is about greater than 8cm. The data details on the ground side are more obvious. When making labels, broccoli is divided into normal broccoli and abnormal broccoli according to the coloring and morphology of the broccoli flower head. Normal broccoli flower heads are dark green and have uniform chromaticity, the flower heads are tight, and the flower buds are uniform in size without yellowing, blackening, and flowering. There are many reasons for abnormal broccoli, such as late harvesting time, pests and diseases, weather conditions, lack of fertilizer, etc., which usually have one or more of the following manifestations: uneven color of the flower head, black and purple color abnormalities in some parts of the flower head, cat's eyes (uneven flower grain size), scattered flowers, yellowing of the flower grains or small flowers, etc.
[0058] Step 1.3, perform data augmentation on the labeled data to expand the data set, including affine transformations such as rotation, translation, and scaling, brightness changes, adding Gaussian and salt and pepper noise, adding motion blur, etc. Then use the YOLOv8 algorithm model to complete the training of the labeled image data sets of the air end and the ground end respectively, and obtain the air end weight file and the ground end weight file that have been trained and verified and meet the recognition rate requirements.
[0059] Step 2: based on the remote sensing aerial scanning image of the broccoli plot obtained by the air end, obtain a two-dimensional digital distribution map of the broccoli heads at the air end;
[0060] The process of step 2 is as follows:
[0061] Step 2.1, the drone is equipped with an automatic cruise system. After receiving the mission, it can automatically take off from the control center and fly to the target plot. The drone then completes an aerial scan of the target plot, ensuring 80% of the heading and lateral overlap. The RGB gimbal camera on board obtains high-throughput broccoli image data of the target plot, and the IoT card equipped uploads the captured images to the cloud in real time.
[0062] Step 2.2: The ground control center directly obtains the broccoli data of each plot from the cloud. The ground station image processing system of the control center is equipped with DJI Zhitu software, which performs two-dimensional reconstruction of the aerial images of the broccoli target plot obtained from the cloud to obtain the digital orthophoto (DOM) of the broccoli.
[0063] In step 2.3, the digital orthophoto 2D images of each broccoli plot are cropped into 1000×1000 image groups using a python script, which can maximize the efficiency of GPU memory usage during deep learning. However, before cropping the images, it is necessary to ensure that adjacent images have a certain overlap rate, which can solve the problem of detecting flower heads on the cropping line.
[0064] Step 2.4, use the trained and verified air-side weight file based on the YOLOv8 algorithm to process the image group, complete the detection of broccoli heads, and solve the pixel coordinates of the center point of each head identification box.
[0065] Step 2.5, use the pixel coordinates of the center point of the YOLOv8 recognition frame as a prompt to input into the SAM image segmentation model, complete the image mask segmentation of the area where the center point in the image group is located, and this area is the image mask of the flower ball detected by YOLOv8; use findContours in OpenCV to process the segmented mask to obtain the outline of the flower ball.
[0066] Step 2.6: Use the least squares method to complete the circle fitting of the contour. The diameter of the circle is the pixel diameter d of the broccoli head. The actual diameter d of the broccoli head i =d×GSD, where GSD=h×pf, GSD stands for "Ground Sample Distance", which indicates how much actual distance on the ground a pixel represents in a remote sensing image. h is the shooting height of the drone gimbal camera relative to the ground, p is the pixel size of the gimbal camera sensor, and f is the focal length of the lens at the point where the aerial photo was acquired.
[0067] Step 2.7, based on the obtained flower head data in each photo in the image group, that is, the flower head at the pixel position (xm ,y m ) and diameter d, the data with the coordinate system of the cropped small image is converted into the data with the coordinate system of the reconstructed large image through the conversion formula, that is, the actual position (X i ,Y i ) and diameter d i , and stores the data in the flower ball data matrix at the aerial end, where the number of rows represents the number of flower balls, the first and second columns store the horizontal and vertical coordinates of the flower ball positions respectively, and the third column stores the diameter of the flower ball.
[0068] Step 2.8, draw a two-dimensional digital distribution map of the aerial broccoli cabbage of the measured plot based on the aerial cabbage data matrix. Then complete the number statistics of the actual diameters of cabbage in multiple broccoli plots, and compare the proportion of harvestable cabbage numbers to decide whether to harvest each plot and the corresponding harvesting order.
[0069] Step 3: The ground mobile terminal data acquisition and processing system is mounted on the field autonomous mobile carrier, and acquires and processes the broccoli image on the ground side of the field in real time, and determines whether the detected flower head is subjected to the corresponding harvesting operation. The ground mobile terminal data acquisition and processing system is mainly composed of a depth camera, an RTK mobile station, and a data processing module Jetson Xavier NX, which are image acquisition sensors mounted on a mobile vehicle. The depth camera acquires the broccoli image of the target area in real time when the ground-end harvesting robot performs the harvesting task, including visible light RGB image and infrared depth image. After the depth camera acquires the image, it is transmitted to Jetson Xavier NX for real-time processing. The RTK mobile station acquires the three-dimensional spatial position of the acquisition system in real time, which is used to solve the actual geographical location of the flower head in the acquired broccoli image. In short, on the one hand, the ground mobile terminal data acquisition and processing system acquires the broccoli image and completes the detection and classification, contour segmentation, circular fitting, positioning and other calculations of the flower head. The result is the data basis for the robotic arm and the end effector to perform the corresponding picking operation on the broccoli, and decide whether to place it in the corresponding harvesting frame. On the other hand, the two-dimensional digital distribution map obtained on the ground side can verify the two-dimensional digital distribution map on the air side, which helps to improve the data accuracy on the air side. In addition, the two-dimensional digital distribution map on the air-ground side can construct a broccoli phenotype database, which can together provide the necessary data basis for studying the growth model of broccoli.
[0070] The process of step 3 is as follows:
[0071] Step 3.1: The depth camera on the ground mobile data acquisition and processing system acquires the RGB and depth images of the broccoli in real time. The Jetson Xavier NX equipped with the system has a built-in ground-side weight file based on YOLOv8, which detects the broccoli heads in the RGB image and classifies whether the broccoli is normal.
[0072] Step 3.2, use the pixel coordinates of the center point of the detection box of the YOLOv8 recognition result as a prompt to input into the SAM image segmentation model to obtain the image mask segmentation of the area where the center point is located. This area is the image mask of the flower ball recognized by YOLOv8.
[0073] Step 3.3, use findContours in OpenCV to process the curd segmentation mask to obtain the contour of the curd. Then use the least squares method to complete the circular fitting of the contour. The center of the circle is the pixel coordinate position (u, v) of the curd in the image. The spatial position (X, Y, Z) of the curd center in the camera coordinate system is obtained through the corresponding formula, which provides a data basis for the subsequent broccoli curd harvesting end effector to determine the harvesting point;
[0074] The process of step 3.3 is as follows:
[0075] Step 3.3.1, use the pixel coordinate position (u, v) to find the corresponding depth value D(u, v) in the depth image. The depth value represents the distance from the object to the camera along the Z axis (vertical direction).
[0076] Step 3.3.2, get the intrinsic parameter matrix of the depth camera where f x and f y is the focal length of the camera in the x and y directions, c x and c y is the optical center of the image.
[0077] Step 3.3.3, use the camera intrinsic parameters and depth value to convert the pixel coordinates to camera coordinates. The three-dimensional point (X, Y, Z) in the camera coordinate system can be calculated by the following formula:
[0078]
[0079]
[0080] Z=D(u,v) (3-3)
[0081] Step 3.4, find all the diameters passing through the center of the flower ball fitting circle in the RGB image, solve the two points where each diameter intersects the outer contour of the flower ball, record the pixel coordinates of each pair of points, and obtain the corresponding depth value in the depth image. The two pixel coordinates can be converted into coordinates in the camera coordinate system through the above formulas (3-1) to (3-3), and then the distance between the two spatial points is calculated, and the largest distance is selected as the actual diameter d of the broccoli flower ball. n .
[0082] Step 3.5, by identifying the broccoli, Figure 3 The broccoli is classified according to the process and then harvested accordingly. The first category is broccoli that cannot be harvested temporarily, which mainly includes broccoli with good appearance but less than 12 cm in diameter. The second category is broccoli that can be harvested, including high-quality broccoli and broccoli of qualified quality. High-quality broccoli is dark green with uniform color, round and firm flower heads, and uniform bud size without yellowing, blackening or blooming. The diameter of the flower heads is between 12 cm and 14 cm. It is usually sold by piece and is mainly used in export and high-end retail markets. Qualified quality broccoli heads meet one of the following conditions: (1) low roundness, (2) insufficient firmness, (3) uneven bud size with a small amount of yellowing or blackening, (4) larger than 14 cm in diameter, and usually sold as a whole to ordinary low-priced markets or cut into pieces. The third category is broccoli that is picked but not harvested, mainly including diseased broccoli, whose buds are dark in color and often accompanied by large areas of black or reddish purple; overmature broccoli, that is, the buds have already bloomed; broccoli with more than two flower heads on the same plant needs to be thinned out and only one is retained to avoid affecting the development of the flower heads on the same plant. The third category is usually picked manually and thrown directly into the field. This operation can prevent the flower heads from continuing to absorb nutrients from the field and causing waste.
[0083] Step 3.6, based on the ground-side image stream and RTK data, construct a two-dimensional digital distribution map of broccoli heads on the ground side.
[0084] The process of step 3.6 is as follows:
[0085] In step 3.6.1, the built-in program of Jetson Xavier NX reads the longitude and latitude of its geographic location in real time through the RTK mobile station, and combines the longitude and latitude with the picture at the corresponding time through the timestamp, completes the coordinate translation based on the relative installation position between the RTK and the depth camera, and obtains the longitude and latitude of the geographic location of the flower ball identified in the picture stream.
[0086] Step 3.6.2, taking a corner of the broccoli field as the origin, convert the longitude and latitude of the flower head into position coordinates relative to the origin.
[0087] Step 3.6.3, the flower ball data obtained in sequence during the harvesting process are stored in the ground-end flower ball data matrix of p rows and 6 columns in order of rows, where p represents the number of broccoli, and the 1st and 2nd columns respectively store the horizontal and vertical position coordinates of the flower ball relative to the origin; the 3rd column stores the altitude data of the flower ball, which is the difference between the altitude measured by RTK and the vertical distance from the depth camera to the flower ball; the 4th column stores the actual diameter data of the flower ball; the 5th column stores the quality grade data of the flower ball, 0 represents high quality, 1 represents qualified quality, 2 represents poor quality (the degree of abnormality of the flower ball is serious), and 3 represents unknown (when the flower ball size is less than 12 cm); the 6th column stores the picture number corresponding to the flower ball, and 0 represents that the picture is not stored.
[0088] Step 3.6.4, repeated processing of broccoli in the image stream. Since the depth camera works during the movement of the harvesting robot, the frame rate is 30 frames per second, so there is a possibility that the same broccoli will appear in the subsequent image frame as in the current frame, which will lead to repeated measurement of broccoli. During the harvesting process, the center position of the broccoli ball is calculated in real time, and the distance is solved with the positions of the several balls just stored. If the distance is less than 5cm (the horizontal position accuracy of RTK is 2cm) and the difference in ball diameter is within 1cm, it means that the currently identified ball is the same as the stored ball, and there is no need to store the relevant information of the ball in this frame.
[0089] Step 3.6.5, for the flower heads that are identified to be seriously abnormal, a small picture of the identification box area of the flower head is cut out from the picture obtained by the depth camera and numbered, saved in the memory card configured by the processor, and the number is stored in the 6th column of the broccoli data in this row for subsequent analysis of the yield, disease, water and fertilizer conditions of each plot.
[0090] Step 3.6.6, based on the ground-end flower curd data matrix, draw a two-dimensional digital distribution map of the ground-end flower curd with a corner point of the broccoli field as the origin, which mainly includes the plane position, diameter, and quality. The flower curd is represented by a circle, and the position of the center of the circle in the distribution map is the position of the flower curd, and the diameter of the circle is the diameter of the flower curd. The quality is from high to low, respectively, in red, yellow, and black. The quality is unknown and no color matching is done.
[0091] A selective harvesting visual system for air-ground collaboration includes an air-end image acquisition system, a ground station image processing system and a ground mobile end image acquisition and processing system. The air-end image acquisition system is communicatively connected with the ground station image processing system, and the ground station image processing system is bidirectionally communicatively connected with the ground mobile end image acquisition and processing system. The three subsystems realize the processing process of steps 1 to 3 of the selective harvesting visual method for air-ground collaboration.
[0092] Figure 2This is the model architecture diagram of the selective harvesting visual method of broccoli in air-ground collaboration. The figure shows the main methods used by the system and their processing flow. The following is a horizontal and vertical comparison of the air-ground visual method processing based on the model architecture to highlight the similarities and differences. The process of the processing flow is as follows:
[0093] 1) Image acquisition: The drone’s gimbal camera obtains the aerial RGB image of the broccoli field, and the depth camera of the ground mobile data acquisition and processing system obtains the ground RGB image and depth image of the broccoli field;
[0094] 2) Image preprocessing: Aerial images need to be reconstructed in two dimensions using DJI Maps and cropped into overlapping small images. There is no preprocessing process for ground images.
[0095] 3) Image detection: The aerial image is processed using the trained and verified YOLOv8-based aerial weights to detect the flower balls; the ground image is processed using the trained and verified YOLOv8-based ground weights to detect the flower balls and classify them into normal flower balls and abnormal flower balls according to the color and shape characteristics of the flower ball particles;
[0096] 4) Image segmentation and circle fitting: Both the air and ground end images need to use the SAM image segmentation model to complete the image segmentation of the detected flower ball, then extract the flower ball mask contour, and use the least squares method to fit the center of the circle; the air end directly uses the least squares method to fit the diameter of the circle as the pixel diameter of the flower ball, while the ground end uses the largest line segment passing through the center of the circle and with two points on the flower ball contour as the pixel diameter of the flower ball;
[0097] 5) Curd grading: In addition to the location and diameter information of the curd, the aerial image cannot capture the color and shape characteristics of the curd grains. Therefore, only the diameter of the curd is graded. The ground image grades the curds according to the color and shape of the curd grains, the actual diameter of the curd, and the roundness of the curd. The curds are divided into three categories. The second category of broccoli is further divided into high-quality and qualified quality broccoli. The harvesting end effectors for broccoli of different grades include temporary non-harvesting, harvesting and placing in a high-quality box or a qualified quality box, and placing in the field after picking.
[0098] 6) Flower ball data matrix: The aerial end image converts the pixel position and diameter in the flower ball image into the actual position and diameter through GSD, and the ground end image converts the pixel position and diameter in the flower ball image into the actual position and diameter through the depth information of the corresponding points and the camera internal parameters, and stores them in the aerial end and ground end flower ball data matrix respectively;
[0099] 7) Obtain a two-dimensional digital distribution map of flower balls: The positions of flower balls in the image at the air-field end need to be converted from the coordinate system relative to the small image to the coordinate system of the entire field and drawn out for visual display. However, the two-dimensional digital distribution map of flower balls at the air-field end only has the position and diameter information of the flower balls, while the ground end also has relevant quality information.
[0100] In summary, the visual method model for selective harvesting of broccoli in air-ground collaboration has both similarities and complementarities in terms of the two lines at the air-ground end. It can characterize the growth status of broccoli heads at multiple scales. In addition to providing important data for harvesting decisions and execution, it is also of great significance for studying the growth model of broccoli and subsequent agronomic guidance.
[0101] Figure 3 This is a demonstration of how to crop a large DOM image of a broccoli plot and stitch small images together. (a) is the theoretical cropping method for a broccoli plot digital orthophoto. Its disadvantage is that it divides the broccoli on the cropping boundary, resulting in errors in the detection and fitting of the broccoli, which will affect the measurement of the overall number and size of the broccoli. In order to solve this problem, Figure 3 As shown in (b), based on the theoretical cropping boundary, overlapping areas are set on the right and bottom of each image, so that the integrity of the broccoli on the theoretical cropping boundary can be guaranteed. The splicing process is as follows:
[0102] Step 1): Use Python script to divide the large digital orthophoto image of the broccoli plot into 1000×1000 small image groups, and set the overlap area. The pixel width of the overlap area is w=30cm / GSD, that is, twice the number of pixels of the image corresponding to the diameter of 15cm of the general size of broccoli harvested, and sufficient space is reserved to ensure the integrity of the broccoli in the overlap area;
[0103] Step 2): Number and name the split small images in order, starting from the upper left corner. n _Y n , where X n Indicates the row number, Y n Indicates the number of columns, such as Figure 3 As shown in (b), the thumbnail number at the 2nd row and 2nd column is 2_2;
[0104] Step 3): Process the broccoli curds in the small image group through broccoli detection, segmentation, and circular fitting algorithm models, and output the diameter and position of the curds respectively, including the coordinate position in the coordinate system xoy of each small image and the coordinate position in the large image coordinate system XOY. The former is used to determine the ownership of the curds in the overlapping area, and the latter is used to draw a two-dimensional digital distribution map of the curds;
[0105] Step 4): When processing each image using the broccoli detection, segmentation, and circle fitting algorithm model, the image coordinate system xoy is established with the upper left vertex of the image as the origin. Each image is processed in sequence. First, the flower head in each image is detected based on the YOLOv8 model. After SAM image segmentation and circle fitting, the pixel diameter d and the pixel position coordinates of the center of the flower head after circle fitting (x m ,y m ). If 0≤x m ≤1000 and 0≤y m ≤1000, which means that the broccoli head belongs to the range of this small image; otherwise, it means that the head belongs to the range of other adjacent images and is not considered;
[0106] Step 5): Use the transition matrix to store the data of the diameter of the broccoli and the center of the flower head in the large-scale coordinate system XOY, which is convenient for subsequent data processing. The position coordinates of the center of the flower head in the large-scale coordinate system XOY are (X m ,Y m ), and X m =(X n -1)×1000+x m , Y m =(Y n -1)×1000+y m , where X m and Y m They represent the position of the small image in the large image. m Row and Y m Column, x m and m Represents the pixel coordinates of the center of the flower ball in the corresponding small image (x m ,y m );
[0107] Step 6): Use the pixel coordinates (X m ,Y m ) and the flower head pixel diameter d multiplied by GSD, we can obtain the actual (X i ,Y i ) Position distribution diagram and the corresponding actual diameter size d i The data is saved as a k-row, 3-column aerial end flower curd data matrix, where k represents the total number of broccoli curds and the first column is the actual horizontal coordinate X of the center of the curd. i , the second column is the actual ordinate Y of the center of the flower ball i , the third column stores the actual diameter of the flower ball d i ;
[0108] Step 7): Figure 3As shown in (c), a two-dimensional digital distribution map of broccoli heads is drawn in the coordinate system X0O0Y0 with the starting point of the drone mapping as the origin. The data of the large digital orthophoto of the broccoli plot is cropped into small images and spliced into a large image for visualization. The thin solid line represents the center line of each ridge of the broccoli field, because most of the current planting patterns are planted in two rows of broccoli along the center line of each ridge. The smart irrigation dripper is buried just on the center line of the ridge, which can irrigate two rows of broccoli at the same time, effectively reducing the cost of smart irrigation equipment and layout. In addition, more spacing is reserved between the two ridges of broccoli, which reserves more operating space for actual mechanical or manual harvesting.
[0109] Figure 4 This is a flowchart of the ground-end harvesting robot performing the harvesting operation, in which the ground mobile end data acquisition and processing system performs graded processing on the flower ball image and determines whether the flower ball should be harvested. The process is as follows:
[0110] Step 1: The depth camera obtains the picture of the broccoli field, and the color and shape features of the flower balls are extracted based on the ground-side weight file of YOLOv8 to classify the flower balls into normal flower balls and abnormal flower balls;
[0111] Step 2: Based on the SAM image segmentation model, the image of the normal flower ball is segmented, and the outer contour of the flower ball is obtained. The circle fitting of the outer contour is completed by the least squares method, and the center of the circle is solved. The farthest distance between two points of the straight line passing through the center of the circle and falling on the flower ball contour is taken as the flower ball pixel diameter size d m , and combined with the depth data of the two end points of the straight line from the depth camera, the actual diameter size d of the flower ball is solved n , if d n ≤14cm, the broccoli will proceed to the next step of identification; if d n >14cm, indicating that the broccoli is of qualified quality and should be placed in the qualified quality box after harvesting;
[0112] Step 3: Determine the degree of abnormality of abnormal broccoli. First, segment the abnormal flower head based on the SAM image segmentation model, and then use the color threshold method to solve the pixel area S of the yellow, black and purple areas within the flower head. m , and the total pixel area S of the abnormal flower ball n For comparison, if S m / S n ≥20%, it is considered abnormally serious and the broccoli can be picked and thrown into the field; if S m / S n <20% is considered abnormally mild, and this type of broccoli is of qualified quality and is placed in the qualified quality box after harvesting;
[0113] Step 4: For 12≤d n For normal broccoli florets ≤14cm, the roundness of the florets needs to be further measured by measuring the distances from all points on the floret contour to the center of the floret fitting circle and finding the farthest distance l max and the closest distance l min , and then compare the two. If l min / l max ≥0.7, indicating that the roundness of the flower head is relatively high, belonging to the high-quality category, and it is placed in the high-quality box after harvesting; if l min / l max <0.7, indicating that the roundness of the flower head is low, which is of qualified quality. After harvesting, it should be placed in the qualified quality box;
[0114] Step 5: For d n For normal broccoli with a diameter less than 12 cm, the distance l0 between its fitting circle center and the fitting circle center of the adjacent broccoli is used to determine whether it needs to be thinned. If l0>20 cm, it means that the broccoli is not to be harvested for the time being. If l0≤20 cm, and the planting distance between broccoli seedlings is generally 25 to 35 cm, and the flower heads generally grow in the middle of the leaves of the broccoli plants, excluding the influence of errors, it means that the two flower heads are most likely the flower heads of the same broccoli plant. The flower head with the smallest diameter can be selected and placed in the field with the harvesting claws, and the fruit thinning operation is then completed.
[0115] The contents described in the embodiments of this specification are merely enumerations of implementation forms of the inventive concept and are for illustrative purposes only. The protection scope of the present invention should not be considered to be limited to the specific forms described in this embodiment, and the protection scope of the present invention also extends to equivalent technical means that can be thought of by ordinary technicians in this field based on the inventive concept.
Claims
1. A selective harvesting visual method for air-ground collaboration, characterized in that: The method comprises the following steps: Step 1: Based on the broccoli image obtained by the air-ground end, obtain the air-end weight file and the ground-end weight file based on YOLOv8 that have been trained and verified and meet the recognition rate requirements; Step 2: based on the remote sensing aerial scanning image of the broccoli plot obtained by the air end, obtain a two-dimensional digital distribution map of the broccoli heads at the air end; Step 3: The ground mobile data acquisition and processing system is mounted on the field autonomous mobile carrier, which acquires and processes the broccoli images on the ground in real time, and determines whether the detected flower heads have been harvested accordingly. The ground mobile data acquisition and processing system is composed of a depth camera, an RTK mobile station and a data processing module Jetson Xavier Nx, which are image acquisition sensors mounted on the mobile vehicle. The depth camera acquires the broccoli images of the target area in real time when the ground harvesting robot performs the harvesting task, including visible light RGB images and infrared depth images. After the depth camera acquires the images, it transmits them to Jetson Xavier Nx and performs real-time processing. The RTK mobile station obtains the three-dimensional spatial position of the acquisition system in real time, which is used to solve the actual geographical location of the flower head in the acquired broccoli image; the ground mobile terminal data acquisition and processing system obtains the broccoli image and completes the detection and classification, contour segmentation, circle fitting, and positioning calculation of the flower head. The result is the data basis for the robotic arm and the end effector to perform the corresponding picking operation on the broccoli and decide whether to place it in the corresponding harvesting frame; at the same time, the two-dimensional digital distribution map obtained by the ground end can complete the verification of the two-dimensional digital distribution map of the air end, and the two-dimensional digital distribution map of the air-ground end can construct a broccoli phenotypic database.
2. The selective harvesting visual method for air-ground collaboration as claimed in claim 1, characterized in that: The process of step 1 is as follows: Step 1.1, use a drone equipped with an RGB gimbal camera to obtain the remote sensing dataset of broccoli at the ground-air end, and use an aluminum profile cart equipped with an RGB-D depth camera to obtain the broccoli dataset at the ground end of the field under shading and lighting conditions; Step 1.2, manually label the data sets of broccoli on the aerial end and the ground end respectively. When labeling the aerial end data, the labeled flower heads meet the following three conditions: 1). The coloring is basically normal, 2). The occlusion rate of broccoli is less than 50%, and 3). The diameter is greater than 8 cm. When labeling the ground end data, the broccoli is divided into normal broccoli and abnormal broccoli according to the coloring and morphology of the broccoli flower heads. In step 1.3, data augmentation is performed on the labeled data to expand the data set, including affine transformations such as rotation, translation, and scaling, brightness changes, adding Gaussian and salt and pepper noise, and adding motion blur; then the YOLOv8 algorithm model is used to train the labeled image data sets of the air end and the ground end respectively, and the air end weight file and the ground end weight file that have been trained and verified and meet the recognition rate requirements are obtained.
3. A selective harvesting visual method for air-ground collaboration as claimed in claim 1 or 2, characterized in that: The process of step 2 is as follows: Step 2.1, the drone is equipped with an automatic cruise system. After receiving the mission, it can automatically take off from the control center and fly to the target plot. Then the drone completes the aerial scanning of the target plot, ensuring 80% of the heading and lateral overlap. The RGB gimbal camera on board obtains high-throughput broccoli image data of the target plot, and the IoT card equipped uploads the captured images to the cloud in real time; Step 2.2: The ground control center directly obtains the broccoli data of each plot from the cloud. The ground station image processing system of the control center is equipped with DJI Zhitu software. It performs two-dimensional reconstruction on the aerial images of the broccoli target plot obtained from the cloud to obtain the digital orthophoto of the broccoli. Step 2.3, use the python script to crop the digital orthophoto 2D images of each broccoli plot into image groups of a set size. Before cropping the images, ensure that adjacent images have a certain overlap rate; Step 2.4, using the trained and verified air-side weight file based on the YOLOv8 algorithm to process the image group, complete the detection of broccoli heads, and solve the pixel coordinates of the center point of each head identification box; Step 2.5, using the pixel coordinates of the center point of the YOLOv8 recognition frame as a prompt input into the SAM image segmentation model, completing the image mask segmentation of the area where the center point in the image group is located, and this area is the image mask of the flower head detected by YOLOv8; using findContours in OpenCV to process the segmented mask to obtain the contour of the flower head; Step 2.6: Use the least squares method to complete the circle fitting of the contour. The diameter of the circle is the pixel diameter d of the broccoli head. The actual diameter d of the broccoli head is i =d×GSD, where GSD=h×p / f, GSD is the ground sampling distance, which indicates how much actual distance one pixel represents on the ground in the remote sensing image, where h is the shooting height of the drone gimbal camera relative to the ground, p is the pixel size of the gimbal camera sensor, and f is the focal length of the lens at the point where the aerial photo was acquired; Step 2.7, based on the obtained flower head data in each photo in the image group, that is, the flower head at the pixel position (x m ,y m ) and diameter d, the data with the coordinate system of the cropped small image is converted into the data with the coordinate system of the reconstructed large image through the conversion formula, that is, the actual position (X i ,Y i ) and diameter d i , and store the data in the aerial end flower curd data matrix, where the number of rows represents the number of flower curds, the first and second columns store the horizontal and vertical coordinates of the flower curd positions, respectively, and the third column stores the diameter of the flower curd; Step 2.8, draw a two-dimensional digital distribution map of the aerial broccoli balls of the measured plot based on the aerial ball data matrix, then complete the quantitative statistics of the actual diameters of the balls of multiple broccoli plots, and compare the proportions of the number of harvestable balls, so as to decide whether to harvest each plot and the corresponding harvesting order.
4. The selective harvesting visual method of air-ground collaboration as claimed in claim 1 or 2, characterized in that: The process of step 3 is as follows: Step 3.1: The depth camera on the ground mobile terminal data acquisition and processing system obtains the RGB image and depth image of the broccoli in real time. The equipped Jetson Xavier Nx has a built-in ground-side weight file based on YOLOv8, which detects the broccoli head in the RGB image and completes the classification of whether the broccoli is normal. Step 3.2, using the pixel coordinates of the center point of the detection frame of the YOLOv8 recognition result as a prompt input into the SAM image segmentation model, and obtaining the image mask segmentation of the area where the center point is located. This area is the image mask of the flower ball recognized by YOLOv8; Step 3.3, use findContours in OpenCV to process the curd segmentation mask to obtain the contour of the curd, and then use the least squares method to complete the circle fitting of the contour. The center of the circle is the pixel coordinate position (u, v) of the curd in the image. The spatial position (X, Y, Z) of the curd center in the camera coordinate system is obtained through the formula, which provides a data basis for the subsequent broccoli curd harvesting end effector to determine the harvesting point; Step 3.4, find all the diameters passing through the center of the flower ball fitting circle in the RGB image, solve the two points where each diameter intersects the outer contour of the flower ball, and record the pixel coordinates of each pair of points, and obtain the corresponding depth value in the depth image, convert the two pixel coordinates into coordinates in the camera coordinate system, and then calculate the distance between the two spatial points, and select the largest distance as the actual diameter d of the broccoli flower ball n ; Step 3.5, by classifying the identified broccoli, the harvesting operation is then carried out. The first category is temporarily unharvestable broccoli, which is broccoli with good appearance but less than 12 cm in diameter; the second category is harvestable broccoli, which includes high-quality broccoli and qualified broccoli. High-quality broccoli is dark green with uniform color, round and firm flower heads, uniform bud size without yellowing, blackening and flowering, and flower head diameter size is between 12 cm and 14 cm. It is sold by piece for export and high-end retail market; qualified broccoli heads meet one of the following conditions : (1) low roundness, (2) insufficient firmness of the flower heads, (3) uneven bud sizes with a small number of yellow or black buds, (4) flower heads larger than 15 cm in diameter, sold whole to ordinary markets or cut into pieces; the third category is broccoli that is picked but not harvested, including diseased broccoli, with dark buds often accompanied by large areas of black or reddish purple; overmature broccoli, that is, the buds have bloomed; broccoli with more than two flower heads on the same plant needs to be thinned out and only one is retained to avoid affecting the development of the flower heads on the same plant; the third category is picked manually and thrown directly into the field; Step 3.6, based on the ground-side image stream and RTK data, construct a two-dimensional digital distribution map of broccoli heads on the ground side.
5. The selective harvesting visual method of air-ground collaboration as claimed in claim 4, characterized in that: The process of step 3.3 is as follows: Step 3.3.1, use the pixel coordinate position (u, v) to find the corresponding depth value D(u, v) in the depth image. The depth value represents the distance of the object along the Z axis, that is, the vertical direction to the camera; Step 3.3.2, obtain the intrinsic parameter matrix of the depth camera where f x and f y is the focal length of the camera in the x and y directions, c x and c y is the optical center of the image; Step 3.3.3, use the camera intrinsic parameters and depth value to convert the pixel coordinates to camera coordinates. The three-dimensional point (X, Y, Z) in the camera coordinate system is calculated by the following formula: Z=D(u,v)(3-3).
6. The selective harvesting visual method of air-ground collaboration as claimed in claim 4, characterized in that: The process of step 3.6 is as follows: Step 3.6.1, the Jetson Xavier Nx built-in program reads the longitude and latitude of its geographic location in real time through the RTK mobile station, and combines the longitude and latitude with the image at the corresponding time through the timestamp, completes the coordinate translation based on the relative installation position between the RTK and the depth camera, and obtains the longitude and latitude of the geographic location of the flower ball identified in the image stream; Step 3.6.2, taking a certain corner of the broccoli field as the origin, convert the longitude and latitude of the flower head into position coordinates relative to the origin; Step 3.6.3, the flower curd data obtained in sequence during the harvesting process are stored in the ground-end flower curd data matrix of p rows and 6 columns in order of rows, where p represents the number of broccoli, and the 1st and 2nd columns respectively store the horizontal and vertical position coordinates of the flower curd relative to the origin; the 3rd column stores the altitude data of the flower curd, which is the difference between the altitude measured by RTK and the vertical distance from the depth camera to the flower curd; the 4th column stores the actual diameter data of the flower curd; the 5th column stores the quality grade data of the flower curd, where 0 represents high quality, 1 represents qualified quality, 2 represents poor quality (the degree of abnormality of the flower curd is serious), and 3 represents unknown at present, that is, the flower curd size is less than 12 cm; the 6th column stores the picture number corresponding to the flower curd, and 0 represents that the picture is not stored; Step 3.6.4, repeat the processing of broccoli in the image stream. During the harvesting process, the center position of the broccoli curd is calculated in real time, and the distance with the positions of the several curds just stored is solved. If the distance is less than 5 cm and the curd diameter difference is within 1 cm, it means that the currently identified curd is the same as the stored curd, and there is no need to store the relevant information of the curd in this frame of the image; Step 3.6.5, for the flower curds with serious abnormalities, a small picture of the identification frame area of the flower curd is cut out from the image obtained by the depth camera and numbered, and saved in the memory card configured by the processor, and the number is stored in the sixth column of the broccoli data of the row, which is used for subsequent analysis of the yield, disease, and water and fertilizer conditions of each plot; Step 3.6.6, based on the ground-end flower ball data matrix, draw a two-dimensional digital distribution map of the ground-end flower balls with a corner point of the broccoli field as the origin, including the plane position, diameter and quality. The flower balls are represented by circles. The position of the center of the circle in the distribution map is the position of the flower ball, and the diameter of the circle is the diameter of the flower ball. The quality is from high to low, with red, yellow and black respectively. The quality is currently unknown and no color matching is required.
7. A system for implementing the selective harvesting visual method of air-ground collaboration as claimed in claim 1, characterized in that: The system includes an aerial image acquisition system, a ground station image processing system and a ground mobile end image acquisition and processing system. The aerial image acquisition system is communicatively connected with the ground station image processing system, and the ground station image processing system is bidirectionally communicatively connected with the ground mobile end image acquisition and processing system.
Citation Information
Patent Citations
Air-land collaborative fruit target harvesting decision-making method, system and device
CN116958032A
Intelligent identification harvesting method suitable for broccoli
CN117016200A
Unmanned aerial vehicle crop state visual identification method for air-ground cooperation
CN117409339A
