Charging robot drivable area detection method and device and medium of charging robot drivable area detection method and device

By installing an image acquisition module on the charging robot, image data is processed to identify the boundary line of the travelable area, and calculating the yaw angle and lateral offset, the high cost and high computing resource requirements caused by relying on lidar in the prior art are solved, and low-cost and high-accuracy travelable area detection is achieved.

CN119693897APending Publication Date: 2025-03-25SHANGHAI HUICHANG NEW ENERGY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411601341.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

Existing mobile charging robots with autonomous driving functions need to rely on multi-line lidar in outdoor scenarios, resulting in high implementation costs and high demand for computing resources. The lidar acquires a lot of point cloud data, making it difficult to effectively reduce the demand for computing resources.

Method used

By installing an image acquisition module on the charging robot, the original image is obtained, and the LAB color space map is obtained through processing, the yellow and blue areas of interest are identified, the binarization process and edge detection are performed, the area to height ratio of the connected area is calculated, and the left and right boundary lines are obtained, and the yaw angle and lateral offset are calculated for navigation.

Benefits of technology

The cost of detection of the driving area of ​​the charging robot is low, the demand for computing resources is reduced, and the detection accuracy is high, avoiding the high cost and high computing resources demand for lidar.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119693897A_ABST
    Figure CN119693897A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of automatic driving of charging robots, in particular to a method for detecting a drivable area of a charging robot, which comprises the following steps of: processing an original image to obtain channel data of an LAB color space diagram a, and obtaining a yellow / blue area according to a color boundary of yellow / blue; binarization is carried out on the original image based on the yellow / blue region, edge detection and connected domain analysis are carried out after a binary image is obtained, and a plurality of connected regions are obtained; calculating the ratio of the area of each connected region to the pixel height of each connected region, and sorting the connected regions from low to high according to the ratio values to obtain a sorting result; according to the sorting result, reserving the connected regions with the connected region height close to the point number, screening, searching straight lines perpendicular to the direction of the original image in the screened connected regions, processing to obtain left and right boundary lines, and calculating yaw angles and transverse offsets of the left and right boundary lines and the central line of the image; the charging robot moves in the drivable area according to the yaw angle and the transverse offset, and the detection accuracy is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of automatic driving of a charging robot, and in particular to a method, a device and a medium thereof for detecting a drivable area of ​​a charging robot. Background Art

[0002] Unmanned driving technology mainly includes environmental perception, path planning and path tracking. Existing mobile charging robots with autonomous driving functions need to rely on multi-line lidar to ensure the robot's positioning within the drivable area in outdoor scenarios. The implementation cost is high, and the lidar obtains a lot of point cloud data, which requires high computing resources for the charging robot. Summary of the invention

[0003] The technical problem to be solved by the present invention is: in order to solve the technical problem that the existing technology has high implementation cost and high computing resource requirements, the present invention provides a method for detecting the drivable area of ​​a charging robot, which has low implementation cost, reduced computing resources and high detection accuracy.

[0004] The technical solution adopted by the present invention to solve the technical problem is: a method for detecting a drivable area of ​​a charging robot, the method comprising the following steps:

[0005] S1, obtaining the original image through the image acquisition module installed on the charging robot;

[0006] S2, processing the original image to obtain a LAB color space map;

[0007] S3, obtaining the a channel data in the LAB color space map, obtaining the yellow region of interest according to the color boundary, and obtaining the blue region of interest according to the blue color boundary;

[0008] S4, binarizing the original image based on the yellow region of interest and the blue region of interest to obtain a binary image;

[0009] S5, after edge detection is performed on the binary image, connected domain analysis is performed to obtain multiple connected regions;

[0010] S6, calculating the ratio between the area and the height of each connected region, and sorting the connected regions from low to high according to the ratio value to obtain a sorting result;

[0011] S7, retaining connected regions whose pixel heights and points are close to each other according to the sorting results;

[0012] S8, screening the connected areas after retention, finding straight lines perpendicular to the original image direction in the screened connected areas, and processing all the straight lines to obtain left and right boundary lines;

[0013] S9, based on the left and right boundary lines, calculating the yaw angles between the left and right boundary lines and the image center line, and the lateral offsets between the left and right boundary lines and the image center line;

[0014] S10: The charging robot moves in a drivable area according to the yaw angle and the lateral offset.

[0015] Further, specifically, the step S2 specifically includes the following steps:

[0016] Perform perspective transformation on the original image, converting the original image from a side view to a top view;

[0017] The top view is processed and converted into a LAB color space image.

[0018] Further, specifically, the screening of the retained connected regions in step S8 includes:

[0019] The connected areas whose pixel counts are lower than the minimum number of clusters and the connected areas whose pixel count to height ratio is greater than a preset value are screened out and filtered.

[0020] Further, specifically, in step S8, searching for straight lines perpendicular to the original image direction in the screened connected area and processing all straight lines to obtain left and right boundary lines specifically includes the following steps:

[0021] Calculate the slopes of all the straight lines, the straight line equations being y=kx+b;

[0022] Filter the straight lines with slope greater than 30° and the straight lines whose intercept b is not in the original image;

[0023] Sort all the filtered straight lines from the far end to the near end according to the value of the intercept b, and select all the straight lines that are approximately parallel;

[0024] The spacing between all the approximately parallel straight lines is obtained, and the left and right boundary lines are obtained by screening.

[0025] Further, specifically, the calculation formula of the yaw angle between the left and right boundary lines and the image center line is:

[0026] yaw=actan((k1-k2) / (1+k1*k2))

[0027] Wherein, k1 is the slope of the left boundary line in the image, and k2 is the slope of the right boundary line in the image. Further, specifically, the calculation formula of the lateral offset between the left and right boundary lines and the center line of the image is:

[0028] lateral_offset=A*J*cos(yaw) / D

[0029] Among them, A is the length of the charging robot, J is the offset distance from the center point of the image to the midpoint of the left and right boundary lines, and D is the actual distance from the camera of the charging robot to the lowest pixel in the image.

[0030] A computer device comprising:

[0031] processor;

[0032] A memory for storing executable instructions;

[0033] Wherein, the processor is used to read the executable instructions from the memory and execute the executable instructions to implement the charging robot drivable area detection method as described above.

[0034] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the processor implements the above-mentioned method for detecting a drivable area of ​​a charging robot.

[0035] The beneficial effect of the present invention is that the method for detecting the drivable area of ​​a charging robot of the present invention collects original image data through the set image acquisition module to realize the method for detecting the drivable area. The implementation cost of the charging robot is low, the computing resources of the charging robot are reduced, and the detection accuracy is high. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0037] Figure 1 It is a schematic diagram of the method flow of embodiment 1 of the present invention.

[0038] Figure 2 It is a schematic diagram of an original image according to the first embodiment of the present invention.

[0039] Figure 3 It is a schematic diagram of converting the original image of the first embodiment of the present invention from a side view to a top view.

[0040] Figure 4 It is a schematic diagram of a binary image according to the first embodiment of the present invention.

[0041] Figure 5 It is a schematic diagram of the connected area of ​​the first embodiment of the present invention.

[0042] Figure 6 The first embodiment of the present invention is a schematic diagram of the displacement of the charging robot within the drivable area.

[0043] Figure 7 It is a schematic diagram of the structure of a computer device according to the second embodiment of the present invention.

[0044] In the figure, 10 is a computer device; 1002 is a processor; 1004 is a memory; and 1006 is a transmission device. DETAILED DESCRIPTION

[0045] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.

[0046] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.

[0047] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0048] Example 1

[0049] The present application embodiment provides a method for detecting a drivable area of ​​a charging robot, such as Figure 1 As shown, the method comprises the following steps:

[0050] S1, obtain the original image through the image acquisition module installed on the charging robot, and participate in Figure 1 As shown;

[0051] S2, processing the original image to obtain a LAB color space map; further, step S2 specifically includes the following steps:

[0052] Perform a perspective transformation on the original image, converting the original image from a side view to a top view, see Figure 2 As shown;

[0053] The top view is processed and converted into a LAB color space image.

[0054] S3, obtaining channel a data in the LAB color space image, obtaining a yellow region of interest according to the yellow color boundary, and obtaining a blue region of interest according to the blue color boundary;

[0055] S4, binarizing the original image based on the yellow region of interest and the blue region of interest to obtain a binary image;

[0056] S5, after edge detection is performed on the binary image, connected domain analysis is performed to obtain multiple connected regions;

[0057] S6, calculating the ratio between the area of ​​each connected region and the corresponding pixel height, and sorting the connected regions from low to high according to the ratio value to obtain a sorting result;

[0058] S7, retaining the connected regions whose pixel heights are close to the number of image pixels of the connected regions according to the sorting results, so as to facilitate the identification of the vertical drivable region boundary in the subsequent steps,

[0059] S8, screening the connected areas after retention, finding straight lines perpendicular to the original image direction in the screened connected areas, and processing all the straight lines to obtain left and right boundary lines;

[0060] For example, screening the retained connected regions in step S8 includes:

[0061] The connected areas whose pixel counts are lower than the minimum number of clusters and the connected areas whose pixel count to height ratio is greater than a preset value are selected and filtered. The preset value is set to 1.6, which is an empirical value that can detect lines with loops in the connected areas to improve the accuracy of the vertical drivable area boundary detection in the subsequent steps.

[0062] It should be noted that the 0th element in the connected area detection result is the entire image, and the 0th element will be filtered.

[0063] In step S8, straight lines perpendicular to the original image direction in the filtered connected area are searched, and all straight lines are processed to obtain left and right boundary lines, which specifically includes the following steps:

[0064] Calculate the slope of all straight lines, the equation of the line is y = kx + b;

[0065] Filter the straight lines with slope greater than 30° and the straight lines whose intercept b is not in the original image;

[0066] All filtered straight lines are sorted from the far end to the near end according to the value of the intercept b, and all approximately parallel straight lines are screened out; specifically, the starting point and end point coordinate values ​​of all straight lines are obtained, such as the starting points of the four straight lines at the far end (upper part of the image) are [1, 2, 3, 4], and the end points of the four straight lines at the near end (lower part of the image) are [1, 3, 2, 4]; then the two straight lines at the far end and the two straight lines at the near end are approximately parallel, and the two straight lines at the far end and the two straight lines at the near end have an intersection, and the two straight lines with an intersection cannot be used as the boundary lines on both sides of the drivable area.

[0067] Get the distance between all nearly parallel lines and filter out the left and right boundary lines. After filtering out the non-parallel lines, get the distance between the lines. If the distance is less than the preset value, the lines are on the same side of the drivable area (such as the left side or the right side). Filter one of the lines and get the best two lines based on the length of the line. The two lines are the left and right boundary lines.

[0068] In this embodiment, the left and right boundary lines are also corrected to be inward / outward to ensure that the left and right boundary lines are parallel, thereby improving the detection accuracy.

[0069] S9, based on the left and right boundary lines, calculating the yaw angles of the left and right boundary lines and the image center line, and the lateral offsets of the left and right boundary lines and the image center line; see Figure 6 As shown in the figure, the calculation formula of the yaw angle between the left and right boundary lines and the image center line is:

[0070] yaw=actan((k1-k2) / (1+k1*k2))

[0071] Among them, k1 is the slope of the left boundary line in the image, and k2 is the slope of the right boundary line in the image. The calculation formula for the lateral offset between the left and right boundary lines and the center line of the image is:

[0072] lateral_offset=A*J*cos(yaw) / D

[0073] Among them, A is the length of the charging robot, J is the distance between the intersection of the center line of the left and right boundary lines (the center of the drivable area) and the lower edge of the image and the intersection of the center line of the image and the lower edge of the image, and D is the actual distance from the charging robot's camera to the lowest pixel in the image.

[0074] S10, the charging robot moves in the drivable area according to the yaw angle and the lateral offset.

[0075] In step S5, it also includes performing secondary fitting on the small surface connected areas and splicing the small area connected areas. After splicing, the spliced ​​connected areas with pixel height greater than 0.6*original image height are saved to avoid the situation where image noise may cause multiple connected areas to be disconnected in the middle, resulting in low detection accuracy.

[0076] In summary, the method for detecting the drivable area of ​​a charging robot of the present invention collects original image data through the set image acquisition module to realize the method for detecting the drivable area. The implementation cost of the charging robot is low, the computing resources of the charging robot are reduced, and the detection accuracy is high.

[0077] Example 2

[0078] An embodiment of the present application provides a computer device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement a method for detecting a drivable area of ​​a charging robot as provided in the above method embodiment.

[0079] Figure 7 The hardware structure diagram of a device for implementing a method for detecting a drivable area of ​​a charging robot provided in an embodiment of the present application is shown. The device may participate in constituting or include the apparatus or system provided in an embodiment of the present application. Figure 7 As shown, the computer device 10 may include one or more processors 1002 (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 1004 for storing data, and a transmission device 1006 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 7 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 7 More or fewer components as shown, or with Figure 7 Different configurations are shown.

[0080] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer device 10 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0081] The memory 1004 can be used to store software programs and modules of application software, such as a program instruction / data storage device corresponding to a method for detecting a drivable area of ​​a charging robot in an embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 1004, that is, implementing the above-mentioned method. The memory 1004 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1004 may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer device 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0082] The transmission device 1006 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer device 10. In one example, the transmission device 1006 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 1006 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0083] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer device 10 (or mobile device).

[0084] Example 3

[0085] An embodiment of the present application also provides a computer-readable storage medium, which can be set in a server to store at least one instruction or at least one program related to a method for detecting a charging robot's drivable area in a method embodiment. The at least one instruction or the at least one program is loaded and executed by the processor to implement a method for detecting a charging robot's drivable area provided in the above method embodiment.

[0086] Optionally, in this embodiment, the storage medium may be located in at least one of the multiple network servers of the computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0087] Example 4

[0088] The embodiment of the present invention further provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes a method for detecting a drivable area of ​​a charging robot provided in the above various optional embodiments.

[0089] It should be noted that the above-mentioned sequence of the embodiments of the present application is for description only and does not represent the advantages and disadvantages of the embodiments. The above-mentioned specific embodiments of the present application are described. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0090] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment and storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0091] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0092] Based on the above ideal embodiments of the present invention, the relevant staff can make various changes and modifications without departing from the technical concept of the present invention through the above description. The technical scope of the present invention is not limited to the contents of the specification, and its technical scope must be determined according to the scope of the claims.

Claims

1. A method for detecting a drivable area of ​​a charging robot, characterized in that: The method The following steps are involved: S1, obtaining the original image through the image acquisition module installed on the charging robot; S2, processing the original image to obtain a LAB color space map; S3, obtaining channel a data in the LAB color space image, obtaining a yellow region of interest according to the yellow color boundary, and obtaining a blue region of interest according to the blue color boundary; S4, binarizing the original image based on the yellow region of interest and the blue region of interest to obtain a binary image; S5, after edge detection is performed on the binary image, connected domain analysis is performed to obtain multiple connected regions; S6, calculating the ratio between the area of ​​each connected region and the corresponding pixel height, and sorting the connected regions from low to high according to the ratio value to obtain a sorting result; S7, retaining the connected regions whose pixel heights and points are close to each other according to the sorting results; S8, screening the connected areas after retention, finding straight lines perpendicular to the original image direction in the screened connected areas, and processing all the straight lines to obtain left and right boundary lines; S9, based on the left and right boundary lines, calculating the yaw angles between the left and right boundary lines and the image center line, and the lateral offsets between the left and right boundary lines and the image center line; S10: The charging robot moves in a drivable area according to the yaw angle and the lateral offset.

2. The method for detecting the drivable area of ​​a charging robot according to claim 1, characterized in that: The step S2 specifically includes the following steps: Perform perspective transformation on the original image, converting the original image from a side view to a top view; The top view is processed and converted into a LAB color space image.

3. The method for detecting the drivable area of ​​a charging robot according to claim 1, characterized in that: The step S8 of screening the retained connected regions includes: The connected areas whose pixel counts are lower than the minimum number of clusters and the connected areas whose pixel count to height ratio is greater than a preset value are screened out and filtered.

4. The method for detecting the drivable area of ​​a charging robot according to claim 3, characterized in that: In step S8, searching for straight lines perpendicular to the original image direction in the connected area after screening and processing all straight lines to obtain left and right boundary lines specifically includes the following steps: Calculate the slopes of all the straight lines, the straight line equations being y=kx+b; Filter the straight lines with slope greater than 30° and the straight lines whose intercept b is not in the original image; Sort all the filtered straight lines from the far end to the near end according to the value of the intercept b, and select all the straight lines that are approximately parallel; The spacing between all the approximately parallel straight lines is obtained, and the left and right boundary lines are obtained by screening.

5. The method for detecting the drivable area of ​​a charging robot according to claim 1, characterized in that: The calculation formula of the yaw angle between the left and right boundary lines and the image center line is: yaw=actan((k1-k2) / (1+k1*k2)) Wherein, k1 is the slope of the left boundary line in the image, and k2 is the slope of the right boundary line in the image.

6. The method for detecting the drivable area of ​​a charging robot according to claim 1, characterized in that: The calculation formula of the lateral offset between the left and right boundary lines and the image center line is: lateral_offset=A*J*cos(yaw) / D Among them, A is the length of the charging robot, J is the offset distance from the center point of the image to the midpoint of the left and right boundary lines, and D is the actual distance from the camera of the charging robot to the lowest pixel in the image.

7. A computer device, characterized in that: include: processor; A memory for storing executable instructions; The processor is used to read the executable instructions from the memory and execute the executable instructions to implement the method for detecting the drivable area of ​​the charging robot as described in any one of claims 1 to 6.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the method for detecting a drivable area of ​​a charging robot according to any one of claims 1 to 6.