Water surface garbage cleaning route planning method and related device
By optimizing the image recognition and path planning of water surface garbage cleaning equipment, the problems of redundant and incomplete garbage cleaning paths in the existing technology have been solved, and accurate identification and efficient cleaning of water surface garbage have been achieved.
Patent Information
- Application Number
- CN202510839452.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2025-09-16
AI Technical Summary
Existing water surface garbage cleaning equipment relies on traditional image recognition technology and lacks intelligent analysis of garbage distribution density and morphological characteristics, resulting in repeated redundancy or incomplete coverage of cleaning paths, energy waste and low efficiency.
By acquiring images of monitored waters, performing area division and foreign object screening, the pre-trained water surface garbage recognition model is used to accurately determine the garbage area, and an improved RRT algorithm is used to plan the cleaning trajectory. Combined with the RGB three-channel color difference and preset threshold screening, the recognition accuracy and path planning efficiency are improved.
It achieves accurate identification and efficient cleaning of water surface garbage, reduces resource waste, and improves the operating accuracy and efficiency of cleaning equipment.
Smart Images

Figure CN120656113A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of route planning, and in particular to a route planning method and related devices for cleaning water surface garbage. Background Art
[0002] In current water surface garbage cleaning operations, most automated cleaning equipment relies on traditional image recognition technology to locate garbage, often performing straight-line path planning based on simple location recognition. It lacks intelligent analysis of garbage distribution density and morphological characteristics, resulting in repeated redundancy or incomplete coverage of cleaning paths, leading to energy waste and low operational efficiency. Summary of the Invention
[0003] The embodiment of the present application provides a surface garbage cleaning route planning method and related devices, which can obtain images of the monitored water area where the surface garbage collection operation is to be carried out, and then automatically screen and identify the monitored water area images, accurately determine the area where the surface garbage exists, and finally determine the surface garbage cleaning trajectory based on the surface garbage area, thereby improving the accuracy and efficiency of the surface garbage treatment equipment during operation.
[0004] A first aspect of an embodiment of the present application provides a method for planning a route for cleaning up water surface garbage, the method comprising: Obtaining images of monitored water areas where surface garbage collection operations are to be carried out; Dividing the monitored water area image into regions to obtain k sub-monitored water area images; The sub-monitoring water area images are sequentially screened for foreign matter areas to obtain m areas suspected of having water surface garbage; Input the sub-monitoring water area images corresponding to the m suspected water surface garbage areas into the pre-trained water surface garbage recognition model to obtain garbage recognition results of the water surface garbage areas; According to the garbage identification result of the water surface garbage area, a water surface garbage cleaning trajectory is determined.
[0005] In a possible implementation, the sub-monitoring water area images are sequentially screened for foreign matter areas to obtain m areas suspected of having water surface garbage, including: Acquire a pure water surface image corresponding to each of the sub-monitoring water area images; Comparing the sub-monitoring water area image with the corresponding pure water surface image in sequence to obtain a comparison result; If the foreign matter threshold indicated by the comparison result is greater than the preset threshold, the current sub-detection water area image is confirmed to be an image suspected of containing water surface garbage; All areas corresponding to the images suspected of having water surface garbage are gathered together to obtain areas suspected of having water surface garbage.
[0006] In a possible implementation, sequentially comparing the sub-monitoring water area image with the corresponding pure water surface image to obtain a comparison result includes: Extracting RGB three-channel color parameters from the sub-monitoring water area image and the corresponding pure water surface image respectively to obtain RGB three-channel color parameters of the sub-monitoring water area image and RGB three-channel color parameters of the corresponding pure water surface image; According to the RGB three-channel color parameters of the sub-monitoring water area image and the corresponding RGB three-channel color parameters of the pure water surface image, for each pixel, the R channel difference, G channel difference and B channel difference between the sub-monitoring water area image and the pure water surface image are calculated; If the difference value of any color channel exceeds the preset difference threshold of the corresponding channel, the pixel is marked as a difference pixel; A foreign body threshold is obtained by calculating the ratio of the number of difference pixels to the total number of pixels; The foreign body threshold is numerically compared with a preset threshold to generate the comparison result.
[0007] In one possible implementation, the training process based on the pre-trained water surface garbage recognition model includes: Acquire water surface environment sample image data, wherein the water surface environment sample image data includes positive sample images marked with garbage area location information and negative sample images without garbage; performing data preprocessing on the water surface environment sample image data to obtain preprocessed water surface environment sample image data; The pre-processed water surface environment sample image data is used to adjust the YOLO neural network to obtain a water surface garbage recognition model.
[0008] In one possible implementation, determining a water surface garbage cleaning trajectory based on the garbage identification result of the water surface garbage area includes: Determine the surface garbage area based on the garbage identification results; Extracting garbage position parameters of the corresponding area from the water surface garbage area to obtain the water surface garbage coordinates; According to the coordinates of the water surface garbage, an improved RRT algorithm is used to determine the water surface garbage cleaning trajectory.
[0009] In this example, by dividing the acquired monitoring water area image of the area to be used for water surface garbage collection operations into regions, k sub-monitoring water area images are first obtained, and then each sub-monitoring water area image is screened for the first time to obtain m suspected water surface garbage areas where "foreign matter" exists on the water surface. Then, these sub-monitoring water area images that have passed the initial screening are screened for the second time by using a water surface garbage recognition model to determine the final water surface garbage area garbage recognition result containing the regional information of water surface garbage. After obtaining the water surface garbage area garbage recognition result, the route trajectory of the water surface garbage cleaning equipment can be planned according to the water surface garbage area garbage recognition result to obtain the water surface garbage cleaning trajectory. The monitoring water area images can be automatically screened and identified to accurately determine the area where water surface garbage exists. Finally, the surface garbage cleaning trajectory is determined based on the water surface garbage area, thereby improving the accuracy and efficiency of the water surface garbage treatment equipment during operation.
[0010] A second aspect of an embodiment of the present application provides a route planning device for cleaning water surface garbage, the device comprising: An acquisition unit, configured to acquire an image of the monitored water area where surface garbage collection operations are to be performed; A region division unit is used to divide the monitoring water area image into regions to obtain k sub-monitoring water area images, The first processing unit is configured to sequentially screen the sub-monitoring water area images for foreign matter regions to obtain m areas suspected of containing water surface garbage; The second processing unit is configured to input the sub-monitoring water area images corresponding to the m suspected water surface garbage areas into a pre-trained water surface garbage recognition model to obtain garbage recognition results of the water surface garbage areas; The route determination unit is used to determine the surface garbage cleaning trajectory based on the garbage identification result of the surface garbage area.
[0011] In one possible implementation, in the aspect of sequentially screening the sub-monitoring water area images for foreign matter regions to obtain m areas suspected of having water surface garbage, the first processing unit is configured to: Acquire a pure water surface image corresponding to each of the sub-monitoring water area images; Comparing the sub-monitoring water area image with the corresponding pure water surface image in sequence to obtain a comparison result; If the foreign matter threshold indicated by the comparison result is greater than the preset threshold, the current sub-detection water area image is confirmed to be an image suspected of containing water surface garbage; All areas corresponding to the images suspected of having water surface garbage are gathered together to obtain areas suspected of having water surface garbage.
[0012] In one possible implementation, in the aspect of sequentially comparing the sub-monitoring water area image with the corresponding pure water surface image to obtain a comparison result, the first processing unit is configured to: Extracting RGB three-channel color parameters from the sub-monitoring water area image and the corresponding pure water surface image respectively to obtain RGB three-channel color parameters of the sub-monitoring water area image and RGB three-channel color parameters of the corresponding pure water surface image; According to the RGB three-channel color parameters of the sub-monitoring water area image and the corresponding RGB three-channel color parameters of the pure water surface image, for each pixel, the R channel difference, G channel difference and B channel difference between the sub-monitoring water area image and the pure water surface image are calculated; If the difference value of any color channel exceeds the preset difference threshold of the corresponding channel, the pixel is marked as a difference pixel; A foreign body threshold is obtained by calculating the ratio of the number of difference pixels to the total number of pixels; The foreign body threshold is numerically compared with a preset threshold to generate the comparison result.
[0013] In one possible implementation, in the aspect of inputting the m sub-monitoring water area images corresponding to the suspected water surface garbage areas into a pre-trained water surface garbage recognition model to obtain a water surface garbage area garbage recognition result, in the second processing unit, the training process based on the pre-trained water surface garbage recognition model includes: Acquire water surface environment sample image data, wherein the water surface environment sample image data includes positive sample images marked with garbage area location information and negative sample images without garbage; performing data preprocessing on the water surface environment sample image data to obtain preprocessed water surface environment sample image data; The pre-processed water surface environment sample image data is used to adjust the YOLO neural network to obtain a water surface garbage recognition model.
[0014] In one possible implementation, in determining a water surface garbage cleaning trajectory based on the garbage identification result of the water surface garbage area, the route determination unit is configured to: Determine the surface garbage area based on the garbage identification results; Extracting garbage position parameters of the corresponding area from the water surface garbage area to obtain the water surface garbage coordinates; According to the coordinates of the water surface garbage, an improved RRT algorithm is used to determine the water surface garbage cleaning trajectory.
[0015] A third aspect of an embodiment of the present application provides a terminal, comprising a processor, an input device, an output device, and a memory, wherein the processor, input device, output device, and memory are interconnected, wherein the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions and execute the step instructions described in the method for planning a route for cleaning water surface garbage in the first aspect of the embodiment of the present application.
[0016] The fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the above-mentioned computer-readable storage medium stores a computer program for electronic data exchange, wherein the above-mentioned computer program enables a computer to execute some or all of the steps described in the surface garbage cleaning route planning method in the first aspect of the embodiment of the present application.
[0017] A fifth aspect of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, wherein the computer program is operable to cause a computer to execute some or all of the steps described in the method for planning a route for water surface garbage removal in the first aspect of the present application. The computer program product may be a software installation package. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. 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 any creative work.
[0019] Figure 1 A schematic diagram of the overall process of a method for planning a route for cleaning up water surface garbage is provided for an embodiment of the present application; Figure 2 A schematic structural diagram of a water surface garbage cleaning route planning device is provided for an embodiment of the present application; Figure 3 A schematic diagram of the structure of a terminal is provided for an embodiment of the present application; Figure 4 A schematic structural diagram of a surface garbage cleaning vessel is provided for an embodiment of the present application; Reference numerals: Acquisition unit-1, area division unit-2, first processing unit-3, second processing unit-4, route determination unit-5, surface garbage cleaning hull-6, night vision infrared camera-601, millimeter wave radar-602, laser ranging radar-603, suspended garbage collector-604. DETAILED DESCRIPTION
[0020] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0021] The terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish between different objects, not to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.
[0022] References to "embodiments" in this application mean that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described in this application may be combined with other embodiments.
[0023] To better understand the surface garbage cleaning route planning method provided in the embodiments of this application, the following first briefly describes the scenarios in which the surface garbage cleaning route planning method applies. Currently, in surface garbage cleaning operations, most automated cleaning equipment relies on traditional image recognition technology for garbage identification. Existing garbage collection vessels often perform straight-line route planning based on simple location recognition, lacking accurate analysis of garbage distribution density and morphological characteristics. This results in redundant or incomplete cleaning routes, leading to energy waste and low operational efficiency.
[0024] The water surface garbage cleaning route planning method is applied to the water surface garbage cleaning route planning device. Figure 1 The figure shows a schematic diagram of the overall process of a route planning method for cleaning up water surface garbage. Figure 1 As shown, including: S1. Acquire a monitoring water area image of an area where surface garbage collection operations are to be performed.
[0025] Among them, the method of using drones equipped with cameras to capture images in the area where surface garbage collection operations are to be carried out can be used. The drones can be equipped with high-definition cameras and infrared cameras, and can synchronously capture images in various areas. After removing blurred images, the images can be saved in a unified 640×480RGB format.
[0026] S2. Divide the monitored water area image into regions to obtain k sub-monitored water area images.
[0027] Among them, the boundaries of the monitoring image area to be divided can be first determined based on the monitoring water area image, and then the monitoring water area image is divided into regular grid areas of 5m×5m to obtain k sub-monitoring water area images, so that these areas can be analyzed in sequence later.
[0028] S3. Screen the sub-monitoring water area images for foreign matter areas in sequence to obtain m areas suspected of having water surface garbage.
[0029] Among them, images of pure water surfaces can be obtained from the historical monitoring image data set of the monitored water surface area, and water surface images after the relevant agencies in the area have just completed water surface cleaning operations can be extracted to obtain pure water surface images. After obtaining the pure water surface images, the current sub-monitoring water area images can be compared with the pure water surface images in turn to screen out areas where suspected water surface garbage may exist, so as to perform a preliminary screening of the monitored water areas. This can reduce the workload of subsequent models in garbage identification in specific sub-monitoring images and speed up the efficiency of water surface garbage identification.
[0030] S4. Input the sub-monitoring water area images corresponding to the m areas suspected of having surface garbage into a pre-trained surface garbage recognition model to obtain garbage recognition results of the surface garbage areas.
[0031] Among them, the YOLOv8 neural network can be trained using the open water garbage dataset to obtain a water surface garbage recognition model that can identify garbage. Then, the sub-monitoring water area images corresponding to m suspected water surface garbage areas are input into the water surface garbage recognition model to obtain the garbage recognition results of the water surface garbage areas.
[0032] Among them, the garbage identification results in the water surface garbage area include non-garbage objects, recyclable garbage and non-recyclable garbage. Non-garbage objects can be natural objects such as birds, fish, and algae. Recyclable garbage includes recyclable categories of garbage such as plastic bottles, plastic bags, and cans. Non-recyclable garbage includes non-recyclable garbage such as fruit peels, paper towels, and cigarette butts.
[0033] S5. Determine a water surface garbage cleaning trajectory based on the garbage identification result of the water surface garbage area.
[0034] Among them, the water surface garbage area where recyclable garbage and non-recyclable garbage exist can be determined first according to the garbage identification results of the water surface garbage area, and then the coordinates of the water surface garbage area can be determined according to the existence of the water surface garbage area. Finally, the water surface garbage cleaning trajectory can be constructed according to the coordinates of the water surface garbage area. After obtaining the water surface garbage cleaning trajectory, the water surface garbage cleaning equipment can navigate according to the water surface garbage cleaning trajectory. During the navigation process, the garbage encountered on the route will be recycled according to classification, and the device will return after all recycling is completed.
[0035] In this example, by dividing the acquired monitoring water area image of the area to be used for water surface garbage collection operations into regions, k sub-monitoring water area images are first obtained, and then each sub-monitoring water area image is screened for the first time to obtain m suspected water surface garbage areas where "foreign matter" exists on the water surface. Then, these sub-monitoring water area images that have passed the initial screening are screened for the second time by using a water surface garbage recognition model to determine the final water surface garbage area garbage recognition result containing the regional information of water surface garbage. After obtaining the water surface garbage area garbage recognition result, the route trajectory of the water surface garbage cleaning equipment can be planned according to the water surface garbage area garbage recognition result to obtain the water surface garbage cleaning trajectory. The monitoring water area images can be automatically screened and identified to accurately determine the area where water surface garbage exists. Finally, the surface garbage cleaning trajectory is determined based on the water surface garbage area, thereby improving the accuracy and efficiency of the water surface garbage treatment equipment during operation.
[0036] In a possible implementation, the sub-monitoring water area images are sequentially screened for foreign matter areas to obtain m areas suspected of having water surface garbage, including: S301: Obtain the pure water surface image corresponding to each of the sub-monitoring water area images.
[0037] S302: Compare the sub-monitoring water area image with the corresponding pure water surface image in sequence to obtain a comparison result.
[0038] S303: If the foreign matter threshold indicated by the comparison result is greater than the preset threshold, confirm that the current sub-detected water area image is an image suspected of containing water surface garbage.
[0039] S304: All areas corresponding to the images suspected of having water surface garbage are collected to obtain areas suspected of having water surface garbage.
[0040] The clean water surface image corresponding to each sub-monitored water area image can be acquired through historical data or real-time acquisition. This clean water surface image serves as a baseline image in a debris-free state. By performing pixel-level comparison between the real-time monitored sub-images and the clean water surface image, environmental interference factors such as normal surface fluctuations and lighting changes can be effectively removed, allowing for focused feature analysis of abnormal areas.
[0041] During the comparison process, image registration technology can be used to ensure spatial alignment between the sub-monitoring image and the pure image, eliminating deviations caused by differences in shooting angle or distance. Subsequently, by calculating the difference features between the two images, a foreign object threshold reflecting the probability of the presence of foreign objects is dynamically generated. When this threshold exceeds the preset sensitivity parameter, it indicates that the current sub-region contains foreign object features that are significantly inconsistent with the pure water surface, and the system marks it as an image area suspected of containing surface garbage. This threshold judgment mechanism can not only avoid misjudgments caused by environmental noise, but also ensure sensitive capture of low-contrast garbage.
[0042] The system spatially aggregates multiple sub-regions that pass threshold screening to form a complete set of suspected garbage distribution areas. Regional fusion technology eliminates fragmented, falsely detected areas while preserving the clustering characteristics of actual garbage, providing a precise input range for subsequent high-precision recognition models. This reduces the amount of data requiring in-depth processing and improves overall detection efficiency through two-level screening, avoiding the resource waste associated with full-image processing in traditional methods.
[0043] In a possible implementation, sequentially comparing the sub-monitoring water area image with the corresponding pure water surface image to obtain a comparison result includes: S3021. Extract RGB three-channel color parameters from the sub-monitoring water area image and the corresponding pure water surface image respectively to obtain RGB three-channel color parameters of the sub-monitoring water area image and RGB three-channel color parameters of the corresponding pure water surface image.
[0044] S3022. Calculate the R channel difference, G channel difference, and B channel difference between the sub-monitoring water area image and the pure water surface image for each pixel based on the RGB three-channel color parameters of the sub-monitoring water area image and the corresponding pure water surface image.
[0045] S3023: If the difference value of any color channel exceeds the preset difference threshold of the corresponding channel, mark the pixel as a difference pixel.
[0046] S3024. Calculate the ratio of the number of difference pixels to the total number of pixels to obtain a foreign matter threshold.
[0047] S3025: Compare the foreign matter threshold with a preset threshold value to generate the comparison result.
[0048] First, the RGB three-channel color parameters can be extracted from the sub-monitoring water area image and its corresponding pure water surface image. The values of the R (red), G (green), and B (blue) channels represent the color characteristics of each pixel in the image. Through color space decoupling, the complex water surface image information is decomposed into independently controllable channel parameters, providing a multi-dimensional data foundation for subsequent difference analysis.
[0049] After obtaining the RGB parameters of the two images, the numerical differences of the R, G, and B channels are calculated for each pixel. For example, using the absolute difference method, ΔR = |R_monitoring - R_clean|, ΔG = |G_monitoring - G_clean|, and ΔB = |B_monitoring - B_clean| are calculated. Preset channel difference thresholds (e.g., ΔR > 15, ΔG > 10, ΔB > 20) are used to determine whether significant color deviation exists on a pixel-by-pixel basis. If the difference in a particular channel exceeds its corresponding threshold, the pixel is marked as a difference pixel. This setup effectively distinguishes water surface reflections from actual garbage, reducing the probability of misidentification due to environmental interference.
[0050] After completing the channel difference judgment of all pixels, the system counts the number of difference pixels and calculates its proportion of the total pixels as the foreign matter threshold. For example, if a sub-image contains 10,000 pixels, of which 1,500 are marked as difference pixels, the foreign matter threshold is 15%. This threshold reflects the degree of deviation of the current sub-area from the pure water surface. The system then compares the foreign matter threshold with the preset global judgment threshold: if it exceeds the threshold, the sub-image is judged as an area suspected of containing garbage.
[0051] In this example, channel-by-channel difference analysis and dynamic threshold calculations were used to maintain sensitivity for subtle color changes while filtering out random interference signals through statistical methods. Compared to traditional full-image texture comparison methods, this solution significantly improved detection efficiency. Furthermore, through multi-channel collaborative judgment, the algorithm's ability to identify transparent and translucent garbage was enhanced, providing high-confidence candidate regions for subsequent surface garbage recognition models, thereby optimizing the accuracy and real-time performance of garbage removal path planning.
[0052] In one possible implementation, the training process based on the pre-trained water surface garbage recognition model includes: S401 : Acquire water surface environment sample image data, wherein the water surface environment sample image data includes positive sample images marked with garbage area location information and negative sample images without garbage.
[0053] S402 : performing data preprocessing on the water surface environment sample image data to obtain preprocessed water surface environment sample image data.
[0054] S403 , using the pre-processed water surface environment sample image data to adjust the YOLO neural network to obtain a water surface garbage recognition model.
[0055] Among them, in the early stage of training, positive sample images containing marked garbage areas and negative sample images without garbage can be obtained through multi-source collection. The annotation information of the positive samples accurately calibrates the position and size of the garbage through the bounding box.
[0056] During the data preprocessing phase, the system normalizes the sample images, resizing them to a fixed resolution and balancing brightness differences in different environments through histogram equalization. For positive sample images, the system further applies enhancements such as random rotation, scaling, and reflection noise overlay. The reflection noise simulation specifically enhances the model's robustness to water surface reflection interference by adding Gaussian white noise and specular highlight areas. These enhancement strategies not only expand data diversity, but also force the model to learn the essential invariance of garbage features, avoiding overfitting to specific shooting angles or lighting conditions.
[0057] During model training, improvements were made to the YOLO neural network architecture, including the introduction of a channel attention module to enhance small-scale debris detection capabilities. The anchor box size was optimized to accommodate the aspect ratio characteristics of surface debris. During training, a cross-entropy loss function was used to measure the error between the predicted boxes and the ground-truth annotations. The Adam optimizer was used to update parameters using a dynamic learning rate. When the validation set loss value decreased by less than 1% for three consecutive training cycles, training was automatically terminated and the optimal model weights were saved. This training termination mechanism ensured model convergence while effectively preventing overfitting.
[0058] In this example, through targeted data enhancement and network structure optimization, the model can effectively distinguish real garbage from interference objects such as water ripples, flying birds, and fallen leaves, and maintain stable detection performance even in strong reflective or low-contrast environments.
[0059] In one possible implementation, determining a water surface garbage cleaning trajectory based on the garbage identification result of the water surface garbage area includes: S501. Determine the surface garbage area based on the garbage identification result of the sea surface garbage area.
[0060] S502: Extracting garbage position parameters corresponding to the water surface garbage area to obtain water surface garbage coordinates.
[0061] S503: Determine the water surface garbage cleaning trajectory using an improved RRT algorithm based on the water surface garbage coordinates.
[0062] First, the surface garbage distribution area can be determined based on the output of the surface garbage identification model. The bounding box information detected by the model is then mapped to the geographic coordinate system of the actual water area through a coordinate conversion module. By using a preset ratio parameter (e.g., 1 pixel = 0.5 meters) between the monitoring image pixels and the actual distance, combined with the GPS positioning data of the cleaning vessel, the garbage locations in the image can be accurately converted into latitude and longitude coordinates or plane rectangular coordinates to construct a spatial topological map of the garbage distribution.
[0063] After obtaining the coordinate set of surface garbage, an improved RRT algorithm can be used for path planning. The traditional RRT algorithm generates a tree-like path through random sampling. In this example, the garbage distribution density can be introduced as a gravitational weight, so that the expansion direction of the random tree is preferentially oriented towards the garbage accumulation area. At the same time, the connection rules of the path nodes are dynamically adjusted according to the turning radius limit of the cleaning ship to ensure that the generated trajectory conforms to the kinematic characteristics of the ship. For example, a local fine search with a smaller step size is used in garbage-dense areas, while long-distance cross-point connections are used in sparse areas, thereby balancing path coverage and navigation efficiency.
[0064] The improved RRT algorithm iteratively generates candidate path nodes. Each time the path tree is extended, the cost function from the current node to the target area is evaluated, and the node with the lowest overall cost is selected for extension. When the path tree first reaches all target garbage areas, the system backtracks to generate a complete trajectory and smooths the path curvature using cubic spline interpolation to eliminate sharp turns. This process transforms discrete garbage coordinate points into a continuous, navigable, smooth trajectory. Dynamic weight adjustment also implements an intelligent strategy of "prioritizing cleaning of dense areas and rapidly traversing sparse areas."
[0065] In this example, by improving the gravity weight design and motion constraint integration of the RRT algorithm, the accuracy of surface garbage collection can be guaranteed. At the same time, the operation efficiency is greatly improved through path optimization. The optimal trajectory can be quickly generated based on real-time detection results, thereby improving the accuracy and efficiency of surface garbage cleaning equipment.
[0066] In line with the above, please see Figure 2 , Figure 2 The present invention provides a schematic diagram of a water surface garbage cleaning route planning device. Figure 2 As shown, the device includes: An acquisition unit 1 is used to acquire an image of the monitored water area in the area where the water surface garbage collection operation is to be carried out; The region division unit 2 is used to divide the monitoring water area image into regions to obtain k sub-monitoring water area images. The first processing unit 3 is configured to sequentially screen the sub-monitoring water area images for foreign matter regions to obtain m areas suspected of containing water surface garbage; The second processing unit 4 is configured to input the sub-monitoring water area images corresponding to the m suspected water surface garbage areas into a pre-trained water surface garbage recognition model to obtain garbage recognition results of the water surface garbage areas; The route determination unit 5 is used to determine the surface garbage cleaning trajectory according to the garbage identification result of the surface garbage area.
[0067] In a possible implementation, in the aspect of sequentially screening the sub-monitoring water area images for foreign matter regions to obtain m areas suspected of having water surface garbage, the first processing unit 3 is configured to: Acquire a pure water surface image corresponding to each of the sub-monitoring water area images; Comparing the sub-monitoring water area image with the corresponding pure water surface image in sequence to obtain a comparison result; If the foreign matter threshold indicated by the comparison result is greater than the preset threshold, the current sub-detection water area image is confirmed to be an image suspected of containing water surface garbage; All areas corresponding to the images suspected of having water surface garbage are gathered together to obtain areas suspected of having water surface garbage.
[0068] In a possible implementation, in the aspect of sequentially comparing the sub-monitoring water area image with the corresponding pure water surface image to obtain a comparison result, the first processing unit 3 is configured to: Extracting RGB three-channel color parameters from the sub-monitoring water area image and the corresponding pure water surface image respectively to obtain RGB three-channel color parameters of the sub-monitoring water area image and RGB three-channel color parameters of the corresponding pure water surface image; According to the RGB three-channel color parameters of the sub-monitoring water area image and the corresponding RGB three-channel color parameters of the pure water surface image, for each pixel, the R channel difference, G channel difference and B channel difference between the sub-monitoring water area image and the pure water surface image are calculated; If the difference value of any color channel exceeds the preset difference threshold of the corresponding channel, the pixel is marked as a difference pixel; A foreign body threshold is obtained by calculating the ratio of the number of difference pixels to the total number of pixels; The foreign body threshold is numerically compared with a preset threshold to generate the comparison result.
[0069] In one possible implementation, in the aspect of inputting the m sub-monitoring water area images corresponding to the suspected water surface garbage areas into a pre-trained water surface garbage recognition model to obtain a water surface garbage area garbage recognition result, in the second processing unit 4, the training process based on the pre-trained water surface garbage recognition model includes: Acquire water surface environment sample image data, wherein the water surface environment sample image data includes positive sample images marked with garbage area location information and negative sample images without garbage; performing data preprocessing on the water surface environment sample image data to obtain preprocessed water surface environment sample image data; The pre-processed water surface environment sample image data is used to adjust the YOLO neural network to obtain a water surface garbage recognition model.
[0070] In one possible implementation, in determining the surface garbage cleaning trajectory based on the garbage identification result of the surface garbage area, the route determination unit 5 is configured to: Determine the surface garbage area based on the garbage identification results; Extracting garbage position parameters of the corresponding area from the water surface garbage area to obtain the water surface garbage coordinates; According to the coordinates of the water surface garbage, an improved RRT algorithm is used to determine the water surface garbage cleaning trajectory.
[0071] For the same example as above, please refer to Figure 3 , Figure 3 A schematic structural diagram of a terminal provided in an embodiment of the present application, as shown in the figure, includes a processor, an input device, an output device, and a memory, the processor, the input device, the output device, and the memory being interconnected, wherein the memory is used to store a computer program, the computer program including program instructions, the processor being configured to call the program instructions, and the program including instructions for executing the following steps; Obtaining images of monitored water areas where surface garbage collection operations are to be carried out; Dividing the monitored water area image into regions to obtain k sub-monitored water area images; The sub-monitoring water area images are sequentially screened for foreign matter areas to obtain m areas suspected of having water surface garbage; Input the sub-monitoring water area images corresponding to the m suspected water surface garbage areas into the pre-trained water surface garbage recognition model to obtain garbage recognition results of the water surface garbage areas; According to the garbage identification result of the water surface garbage area, a water surface garbage cleaning trajectory is determined.
[0072] In this example, by dividing the acquired monitoring water area image of the area to be used for water surface garbage collection operations into regions, k sub-monitoring water area images are first obtained, and then each sub-monitoring water area image is screened for the first time to obtain m suspected water surface garbage areas where "foreign matter" exists on the water surface. Then, these sub-monitoring water area images that have passed the initial screening are screened for the second time by using a water surface garbage recognition model to determine the final water surface garbage area garbage recognition result containing the regional information of water surface garbage. After obtaining the water surface garbage area garbage recognition result, the route trajectory of the water surface garbage cleaning equipment can be planned according to the water surface garbage area garbage recognition result to obtain the water surface garbage cleaning trajectory. The monitoring water area images can be automatically screened and identified to accurately determine the area where water surface garbage exists. Finally, the surface garbage cleaning trajectory is determined based on the water surface garbage area, thereby improving the accuracy and efficiency of the water surface garbage treatment equipment during operation.
[0073] The above mainly introduces the scheme of the embodiment of the present application from the perspective of the execution process on the method side. It is understandable that, in order to implement the above functions, the terminal includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of the various examples described in the embodiments provided herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in a hardware or computer software driven hardware manner depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0074] The embodiment of the present application can divide the terminal into functional units according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical functional division. In actual implementation, there may be other division methods.
[0075] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any one of the surface garbage cleaning route planning methods described in the above method embodiments.
[0076] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program enables a computer to execute part or all of the steps of any one of the surface garbage cleaning route planning methods recorded in the above method embodiments.
[0077] The present application also provides a surface garbage cleaning vessel. Figure 4 A schematic diagram of the structure of a surface garbage cleaning ship is shown. Figure 4 As shown, the surface garbage cleaning vessel includes a surface garbage cleaning hull 6, a night vision infrared camera 601, a millimeter wave radar 602, a laser ranging radar 603, and a suspended garbage collector 604. Specifically, the surface garbage cleaning vessel proposed in this example can, after obtaining the surface garbage cleaning route planned by the surface garbage cleaning route planning device, collect garbage on the surface garbage cleaning route in sequence through the external camera 601, the millimeter wave radar 602, the laser ranging radar 603, and the suspended garbage collector 604. After collection, the collected garbage is placed into a storage bin (not shown) according to the classification of recyclable garbage and non-recyclable garbage. After completing the surface garbage cleaning, the vessel can return. By applying the surface garbage cleaning route planning method proposed in the present invention, the accuracy and efficiency of the surface garbage cleaning vessel in the garbage cleaning operation process can be improved, avoiding the technical problems that traditional surface garbage cleaning equipment performs straight line path planning based on simple position recognition, lacks intelligent analysis of garbage distribution density and morphological characteristics, causes repeated redundancy or incomplete coverage of the cleaning path, and leads to energy waste and low operation efficiency.
[0078] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0079] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0080] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0081] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0082] In addition, the functional units in the various embodiments of the application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software program modules.
[0083] If the integrated unit is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a memory and includes a number of instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, magnetic disk or optical disk, and other media that can store program code.
[0084] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, which may include: a flash drive, a read-only memory, a random access memory, a magnetic disk or an optical disk, etc.
[0085] The above is a detailed introduction to the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for those skilled in the art, according to the idea of the present application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for planning a route for cleaning water surface garbage, characterized in that: include: Obtaining images of monitored water areas where surface garbage collection operations are to be carried out; Dividing the monitored water area image into regions to obtain k sub-monitored water area images; The sub-monitoring water area images are sequentially screened for foreign matter areas to obtain m areas suspected of having water surface garbage; Input the sub-monitoring water area images corresponding to the m suspected water surface garbage areas into the pre-trained water surface garbage recognition model to obtain garbage recognition results of the water surface garbage areas; According to the garbage identification result of the water surface garbage area, a water surface garbage cleaning trajectory is determined.
2. The method for planning a route for cleaning water surface garbage according to claim 1, characterized in that: The sub-monitoring water area images are sequentially screened for foreign matter areas to obtain m areas suspected of having water surface garbage, including: Acquire a pure water surface image corresponding to each of the sub-monitoring water area images; Comparing the sub-monitoring water area image with the corresponding pure water surface image in sequence to obtain a comparison result; If the foreign matter threshold indicated by the comparison result is greater than the preset threshold, the current sub-detection water area image is confirmed to be an image suspected of containing water surface garbage; All areas corresponding to the images suspected of having water surface garbage are gathered together to obtain areas suspected of having water surface garbage.
3. The method for planning a route for cleaning water surface garbage according to claim 2, characterized in that: The step of sequentially comparing the sub-monitoring water area image with the corresponding pure water surface image to obtain a comparison result includes: Extracting RGB three-channel color parameters from the sub-monitoring water area image and the corresponding pure water surface image respectively to obtain RGB three-channel color parameters of the sub-monitoring water area image and RGB three-channel color parameters of the corresponding pure water surface image; According to the RGB three-channel color parameters of the sub-monitoring water area image and the corresponding RGB three-channel color parameters of the pure water surface image, for each pixel, the R channel difference, G channel difference and B channel difference between the sub-monitoring water area image and the pure water surface image are calculated; If the difference value of any color channel exceeds the preset difference threshold of the corresponding channel, the pixel is marked as a difference pixel; A foreign body threshold is obtained by calculating the ratio of the number of difference pixels to the total number of pixels; The foreign body threshold is numerically compared with a preset threshold to generate the comparison result.
4. The method for planning a route for cleaning water surface garbage according to claim 1, characterized in that: The training process of the pre-trained water surface garbage recognition model includes: Acquire water surface environment sample image data, wherein the water surface environment sample image data includes positive sample images marked with garbage area location information and negative sample images without garbage; performing data preprocessing on the water surface environment sample image data to obtain preprocessed water surface environment sample image data; The pre-processed water surface environment sample image data is used to adjust the YOLO neural network to obtain a water surface garbage recognition model.
5. The method for planning a route for cleaning water surface garbage according to claim 4, characterized in that: The determining of a water surface garbage cleaning trajectory based on the garbage identification result of the water surface garbage area includes: Determine the surface garbage area based on the garbage identification results; Extracting garbage position parameters of the corresponding area from the water surface garbage area to obtain the water surface garbage coordinates; According to the coordinates of the water surface garbage, an improved RRT algorithm is used to determine the water surface garbage cleaning trajectory.
6. A route planning device for cleaning water surface garbage, characterized in that: include: An acquisition unit, configured to acquire an image of the monitored water area where surface garbage collection operations are to be performed; A region division unit is used to divide the monitoring water area image into regions to obtain k sub-monitoring water area images, The first processing unit is configured to sequentially screen the sub-monitoring water area images for foreign matter regions to obtain m areas suspected of containing water surface garbage; The second processing unit is configured to input the sub-monitoring water area images corresponding to the m suspected water surface garbage areas into a pre-trained water surface garbage recognition model to obtain garbage recognition results of the water surface garbage areas; The route determination unit is used to determine the surface garbage cleaning trajectory based on the garbage identification result of the surface garbage area.
7. The water surface garbage cleaning route planning device according to claim 6, characterized in that: In the aspect of sequentially screening the sub-monitoring water area images for foreign matter regions to obtain m areas suspected of having water surface garbage, the first processing unit is configured to: Acquire a pure water surface image corresponding to each of the sub-monitoring water area images; Comparing the sub-monitoring water area image with the corresponding pure water surface image in sequence to obtain a comparison result; If the foreign matter threshold indicated by the comparison result is greater than the preset threshold, the current sub-detection water area image is confirmed to be an image suspected of containing water surface garbage; All areas corresponding to the images suspected of having water surface garbage are gathered together to obtain areas suspected of having water surface garbage.
8. The water surface garbage cleaning route planning device according to claim 6, characterized in that: In the aspect of determining the surface garbage cleaning trajectory based on the garbage identification result of the surface garbage area, the route determination unit is used to: Determine the surface garbage area based on the garbage identification results; Extracting garbage position parameters of the corresponding area from the water surface garbage area to obtain the water surface garbage coordinates; According to the coordinates of the water surface garbage, an improved RRT algorithm is used to determine the water surface garbage cleaning trajectory.
9. A terminal, characterized in that: The method comprises a processor, an input device, an output device and a memory, wherein the processor, the input device, the output device and the memory are interconnected, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the surface garbage cleaning route planning method according to any one of claims 1 to 5.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which includes program instructions. When the program instructions are executed by a processor, the processor executes the water surface garbage cleaning route planning method according to any one of claims 1 to 5.