Road width change key point extraction method and device and computer equipment
By segmenting roads on an obstacle map and searching for key points from different directions, the efficiency and accuracy of extracting key points for mobile robots in scenarios with multiple roads of varying widths are solved, thus improving the robot's decision-making intelligence.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-23
- Publication Date
- 2026-03-17
AI Technical Summary
In existing technologies, mobile robots struggle to efficiently extract key points of road width changes when dealing with scenarios where multiple roads have varying widths, resulting in insufficient decision-making intelligence.
By acquiring an obstacle map, the road is divided according to a preset differential length. Key points are searched from different directions using the width of the differential unit. Multiple key points are combined to determine key points where the width changes. Bidirectional search is used to correct the error of unidirectional search.
It improves the efficiency and accuracy of extracting key points of road width changes, reduces reliance on manual marking, and enhances the decision-making intelligence of mobile robots.
Smart Images

Figure CN116182832B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robotics technology, and in particular to a method, apparatus, and computer device for extracting key points of road width variation. Background Technology
[0002] For mobile robots, the map of the moving scene is an important basis for making decisions during the movement process. Generally, there are multiple roads in the moving scene, and the width of each road is not fixed. Some places may be wide and some places may be narrow. Extracting the key points of road width changes on the map can help the mobile robot make higher-order decisions during the movement process, thereby improving the intelligence of the mobile robot.
[0003] In traditional techniques, roads of different widths are usually marked manually. Summary of the Invention
[0004] Therefore, it is necessary to provide a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for extracting road width change key points that can improve the efficiency of extracting key points of width change, in order to address the above-mentioned technical problems.
[0005] Firstly, this application provides a method for extracting key points of road width variations. The method includes:
[0006] Obtain an obstacle map with topological paths;
[0007] According to the preset differential length, the roads corresponding to the topological path are segmented on the obstacle map to obtain multiple differential units;
[0008] Based on the differential length and the width of each differential unit, a search is performed from the first direction of the topological path to obtain multiple first key points on the topological path, and a search is performed from the second direction of the topological path to obtain multiple second key points on the topological path.
[0009] Based on multiple first key points and multiple second key points, determine the width variation key points.
[0010] Secondly, this application also provides a device for extracting key points of road width changes. The device includes:
[0011] The acquisition module is used to acquire an obstacle map with topological paths;
[0012] Differential units are used to divide the roads corresponding to the topological path on the obstacle map according to a preset differential length, resulting in multiple differential units.
[0013] The search unit is used to search from the first direction of the topological path based on the differential length and the width of each differential unit to obtain multiple first key points on the topological path, and to search from the second direction of the topological path to obtain multiple second key points on the topological path.
[0014] The determination module is used to determine the width variation key points based on multiple first key points and multiple second key points.
[0015] In some embodiments, the search unit is specifically configured to: take the first differential unit in the first direction as the search reference unit; for each differential unit after the search reference unit, obtain the width difference between the current differential unit and the search reference unit; if the width difference satisfies a first relationship with a preset width change threshold, obtain the length and value of all differential units between the current differential unit and the search reference unit; if the length and value satisfy a second relationship with a preset length threshold, take the intersection point between the current differential unit and the next differential unit as the first key point, and take the next differential unit as the search reference unit, repeat the above search process to obtain multiple first key points.
[0016] In some embodiments, the search unit is specifically configured to: take the first differential unit in the second direction as the search reference unit; for each differential unit after the search reference unit, obtain the width difference between the current differential unit and the search reference unit; if the width difference satisfies a first relationship with a preset width change threshold, obtain the length and value of all differential units between the current differential unit and the search reference unit; if the length and value satisfy a second relationship with a preset length threshold, take the intersection point between the next differential unit after the current differential unit as the second key point, and take the next differential unit as the search reference unit, repeat the above search process to obtain multiple second key points.
[0017] In some embodiments, the first relationship includes: the difference is greater than a preset width change threshold; the second relationship includes: the length of the current differential unit and the next differential unit after merging is greater than or equal to a preset length threshold.
[0018] In some embodiments, the determining module is specifically used to: filter multiple first key points based on the width of each of multiple road segments divided by multiple first key points to obtain multiple first target key points; filter multiple second key points based on the width of each of multiple road segments divided by multiple second key points to obtain multiple second target key points; and determine width change key points based on the multiple first target key points and the multiple second target key points.
[0019] In some embodiments, the determining module is specifically used to: for each road segment divided by multiple first key points, obtain the minimum width of the road segment, and use the minimum width as the width of the road segment; merge adjacent road segments with the same width among the multiple road segments, and based on the merging result, filter out multiple first target key points from the multiple first key points.
[0020] In some embodiments, the determining module is specifically configured to: find corresponding first target key points and second target key points from a plurality of first target key points and a plurality of second target key points; determine a first position weight of the found first target key points and a second position weight of the found second target key points based on the road width at the found first target key points and the road width at the found second target key points; and determine the corresponding width change key points based on the first position weight and the second position weight.
[0021] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:
[0022] Obtain an obstacle map with topological paths;
[0023] According to the preset differential length, the roads corresponding to the topological path are segmented on the obstacle map to obtain multiple differential units;
[0024] Based on the differential length and the width of each differential unit, a search is performed from the first direction of the topological path to obtain multiple first key points on the topological path, and a search is performed from the second direction of the topological path to obtain multiple second key points on the topological path.
[0025] Based on multiple first key points and multiple second key points, determine the width variation key points.
[0026] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:
[0027] Obtain an obstacle map with topological paths;
[0028] According to the preset differential length, the roads corresponding to the topological path are segmented on the obstacle map to obtain multiple differential units;
[0029] Based on the differential length and the width of each differential unit, a search is performed from the first direction of the topological path to obtain multiple first key points on the topological path, and a search is performed from the second direction of the topological path to obtain multiple second key points on the topological path.
[0030] Based on multiple first key points and multiple second key points, determine the width variation key points.
[0031] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:
[0032] Obtain an obstacle map with topological paths;
[0033] According to the preset differential length, the roads corresponding to the topological path are segmented on the obstacle map to obtain multiple differential units;
[0034] Based on the differential length and the width of each differential unit, a search is performed from the first direction of the topological path to obtain multiple first key points on the topological path, and a search is performed from the second direction of the topological path to obtain multiple second key points on the topological path.
[0035] Based on multiple first key points and multiple second key points, determine the width variation key points.
[0036] The aforementioned method, apparatus, computer equipment, storage medium, and computer program product for extracting key points of road width changes, after acquiring an obstacle map with a topological path, divides the road corresponding to the topological path on the obstacle map according to a preset differential length, obtaining multiple differential units. Using small-scale differential units as search units, key points of width changes that are not easily identified can be identified. Based on the differential length and the width of each differential unit, a search is performed from the first direction of the topological path to obtain multiple first key points on the topological path, and a search is performed from the second direction of the topological path to obtain multiple second key points on the topological path. Based on the multiple first key points and multiple second key points, the key points of width changes are determined. By searching for key points from two opposite directions, the final position of the key points of width changes is located based on the key points searched in these two directions. This method can fill in and correct key points that were not searched in one direction or erroneous key points, improving the accuracy of the finally determined key points of width changes. Compared with the method of manually marking key points, it greatly improves the extraction efficiency. Attached Figure Description
[0037] Figure 1 This is an application environment diagram of the key point extraction method for road width variation in one embodiment;
[0038] Figure 2 This is a flowchart illustrating a method for extracting key points of road width variation in one embodiment;
[0039] Figure 3 This is a schematic diagram of a static obstacle map in one embodiment;
[0040] Figure 4 This is a static obstacle map with topological paths in one embodiment;
[0041] Figure 5 This is a schematic diagram of a differential unit in one embodiment;
[0042] Figure 6 This is a schematic diagram of the first key point in one embodiment;
[0043] Figure 7 This is a schematic diagram of a principle for searching key points from a first direction in one embodiment;
[0044] Figure 8 This is a schematic diagram of the merging of the last road segments in one embodiment;
[0045] Figure 9 This is a schematic diagram of key points obtained from searching from two directions in one embodiment;
[0046] Figure 10 This is a schematic diagram illustrating the principle of road segment merging in one embodiment;
[0047] Figure 11 This is a schematic diagram of the first target key point, the second target key point, and the width change key point in one embodiment;
[0048] Figure 12 This is a schematic diagram of key points of width variation in one embodiment;
[0049] Figure 13 This is a structural block diagram of a road width change key point extraction device in one embodiment;
[0050] Figure 14 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0052] The method for extracting key points of road width changes provided in this application can be applied to, for example... Figure 1In the application environment shown, the mobile robot 102 communicates with the server 104 via a network. A data storage system can store the data that the server 104 needs to process. The data storage system can be integrated onto the server 104 or placed on a cloud or other network server. The road width change key point extraction method provided in this application embodiment can be executed by the mobile robot 102 or the server 104 individually, or by the mobile robot 102 or the server 104 collaboratively. Taking the execution by the mobile robot 102 alone as an example, the mobile robot 102 can acquire an obstacle map with a topological path, and divide the road corresponding to the topological path on the obstacle map according to a preset differential length to obtain multiple differential units. On one hand, based on the differential length and the width of each differential unit, a search is performed from the first direction of the topological path to obtain multiple first key points on the topological path. On the other hand, based on the differential length and the width of each differential unit, a search is performed from the second direction of the topological path to obtain multiple second key points on the topological path. Finally, based on the multiple first key points and the multiple second key points, the width change key points are determined. This method requires no manual intervention and improves the efficiency of extracting key points with width variations.
[0053] The mobile robot 102 can be any robot with navigation capabilities. For example, it can be a cleaning robot, a food delivery robot, a sorting robot, etc., but this application embodiment does not limit this. The implementation process of the road width change key point extraction method provided in this application embodiment will be described in detail below with reference to the accompanying drawings.
[0054] In one embodiment, such as Figure 2 As shown, a method for extracting key points of road width variation is provided, which can be applied to... Figure 1 Taking a mobile robot as an example, it can be understood that this method can also be applied to a server, and to a system that includes both a mobile robot and a server, and is implemented through the interaction between the mobile robot and the server. The method includes the following steps:
[0055] Step 202: Obtain an obstacle map with topological paths.
[0056] The obstacle map can be a static obstacle map, used to display the distribution of stationary obstacles within the moving scene. The obstacle map with topological paths can be a static obstacle map with topological paths, used to display: the distribution of each path for the mobile robot to traverse within the moving scene, and the distribution of stationary obstacles on both sides of each path. For ease of explanation, the path formed by the various paths for the mobile robot to traverse within the moving scene is referred to as a topological path. For example, Figure 3 A static obstacle map is shown. Figure 4 A static obstacle map with topological paths is shown.
[0057] It should be noted that the above static obstacle map is only an example. The obstacle map can also be a dynamic obstacle map, or a map that displays both static and dynamic obstacles. This application does not limit this.
[0058] In some embodiments, the mobile robot is equipped with a depth camera, which can capture images of the moving scene and generate an obstacle map based on the captured images. After obtaining the obstacle map, a topological path can be determined based on the roads contained in the obstacle map.
[0059] Step 204: According to the preset differential length, the roads corresponding to the topological path are segmented on the obstacle map to obtain multiple differential units.
[0060] The differential length can be flexibly set according to the actual situation. For example, the differential length can be set to 0.15m, and in other embodiments it can also be 0.20m. There is no limitation here.
[0061] In some embodiments, the roads corresponding to the topological path on the obstacle map can be understood as the roads contained in the topological path on the obstacle map. The mobile robot can divide the roads contained in the topological path according to a preset differential length to obtain multiple differential units. For example, Figure 5 An example of multiple differential units obtained by the segmentation process is shown.
[0062] Step 206: Based on the differential length and the width of each differential unit, search from the first direction of the topological path to obtain multiple first key points on the topological path, and search from the second direction of the topological path to obtain multiple second key points on the topological path.
[0063] Based on the segmentation of roads corresponding to the topological path, the intersection points of differential units satisfying specific conditions can be searched from the first direction of the topological path based on the differential length and the width of each differential unit, and the searched intersection points are used as the first key points. Similarly, based on the differential length and the width of each differential unit, the intersection points of differential units satisfying specific conditions can be searched from the second direction of the topological path, and the searched intersection points are used as the second key points.
[0064] Step 208: Determine the width variation key points based on multiple first key points and multiple second key points.
[0065] In some embodiments, after obtaining multiple first keypoints, multiple road segments obtained by dividing the topological path by the multiple first keypoints can be acquired. Adjacent road segments with the same width are merged, that is, the first keypoints between adjacent road segments with the same width are deleted, and the remaining first keypoints are used as the first target keypoints. Similarly, after obtaining multiple second keypoints, multiple road segments obtained by dividing the topological path by the multiple second keypoints can be acquired. Adjacent road segments with the same width are merged, that is, the second keypoints between adjacent road segments with the same width are deleted, and the remaining second keypoints are used as the second target keypoints.
[0066] In some embodiments, based on obtaining multiple first target key points and multiple second target key points, corresponding first target key points and second target key points are selected from them, and the road width at the first target key point and the road width at the second target key point are obtained. Based on the obtained two road widths, the final width change key point is determined.
[0067] In the aforementioned method for extracting key points of road width changes, after obtaining an obstacle map with a topological path, the road corresponding to the topological path is segmented on the obstacle map according to a preset differential length, resulting in multiple differential units. Using small-scale differential units as search units, key points of width changes that are difficult to identify can be identified. Based on the differential length and the width of each differential unit, a search is performed from the first direction of the topological path to obtain multiple first key points on the topological path. A search is performed from the second direction of the topological path to obtain multiple second key points on the topological path. Based on the multiple first and multiple second key points, the key points of width changes are determined. By searching for key points from two opposite directions, the final position of the key points of width changes is located based on the key points searched in these two directions. This method can fill in and correct key points that were not searched in one direction or erroneous key points, improving the accuracy of the finally determined key points of width changes. Compared with the method of manually marking key points, this method greatly improves the extraction efficiency.
[0068] In some embodiments, the step of searching from a first direction of the topological path based on the differential length and the width of each differential unit to obtain multiple first key points on the topological path includes: taking the first differential unit in the first direction as the search reference unit; for each differential unit after the search reference unit, obtaining the width difference between the current differential unit and the search reference unit; if the width difference satisfies a first relationship with a preset width change threshold, obtaining the length and value of all differential units between the current differential unit and the search reference unit; if the length and value satisfy a second relationship with a preset length threshold, taking the intersection point between the current differential unit and the next differential unit as the first key point, and taking the next differential unit as the search reference unit, repeating the above search process to obtain multiple first key points.
[0069] The first and second directions can be opposite directions. The width variation threshold and length threshold can be flexibly set according to actual conditions. The first relationship can be that the width difference is greater than the preset width variation threshold, and the second relationship can be that the sum of the lengths is greater than the preset length threshold.
[0070] In some embodiments, when searching from the first direction, for each differential unit after the search reference unit, if the first relationship is not satisfied between the width difference and the preset width change threshold, the current differential unit is merged into the previous road segment, and the next differential unit along the first direction is taken as the current differential unit, and the above process is repeated.
[0071] In some embodiments, when searching from the first direction, for each differential unit after the search reference unit, if the length and value do not satisfy the second relationship with the preset length threshold, the current differential unit is merged into the previous road segment, and the next differential unit along the first direction is taken as the current differential unit, and the above process is repeated.
[0072] For example, Figure 6 This shows that multiple first key points were obtained by searching from the first direction. Figure 6 The number next to the key point indicates the road width at that key point. Figure 6 The search results shown are merely an example and do not constitute a limitation on the embodiments of this application.
[0073] The following example illustrates this:
[0074] Figure 7 As an example diagram of the topological path, this topological path can be segmented, and the resulting differential units can be numbered sequentially along the first direction, such as... Figure 7As shown, the topology path is divided into 9 differential units. The first differential unit along the first direction can be used as the search reference unit, that is, the differential unit numbered 1 is used as the search reference unit. The width of the differential unit numbered 2 is compared with the width of the differential unit numbered 1, and the difference between the two is obtained. Since the difference between the two is 0, which is less than the preset width change threshold, the differential unit numbered 2 is merged with the differential unit numbered 1 to obtain road segment 12. In the same way, the width of the differential unit numbered 3 is compared with the width of the differential unit numbered 1, and the difference between the two is obtained. Since the difference between the two is 0, which is less than the preset width change threshold, the differential unit numbered 3 is merged with the previous road segment 12 to obtain road segment 123. Using the same processing method, the width of differential unit number 4 is compared with the width of differential unit number 1 to obtain the difference between the two. Assuming that the difference is greater than the preset width change threshold, the length and value of all differential units between differential unit number 4 and differential unit number 1 (differential unit number 1, differential unit number 2, differential unit number 3, and differential unit number 4, a total of four differential units) are further obtained. Assuming that the length and value are greater than the preset length threshold, the intersection point between differential unit number 4 and differential unit number 5 is taken as the first key point, and differential unit number 4 is merged with the previous road segment 123 to obtain road segment 1234, and differential unit number 5 is taken as the search reference unit. Using the same processing method, the width of differential unit numbered 6 is compared with the width of differential unit numbered 5, and the difference between the two is obtained. Since the difference is 0, which is less than the preset width change threshold, differential unit numbered 6 is merged with differential unit numbered 5 to obtain road segment 56. Similarly, the width of differential unit numbered 7 is compared with the width of differential unit numbered 5, and the difference between the two is obtained. Assuming the difference is greater than the preset width change threshold, the length sum of all differential units between differential unit numbered 7 and differential unit numbered 5 (three differential units in total: differential unit numbered 5, differential unit numbered 6, and differential unit numbered 7) is further obtained. Assuming this length sum is less than the preset length threshold, differential unit numbered 7 is merged with the previous road segment 56 to obtain road segment 567.Using the same processing method, the width of differential unit numbered 8 is compared with the width of differential unit numbered 5 to obtain the difference between the two. Assuming that the difference is greater than the preset width change threshold, the length and value of all differential units between differential unit numbered 8 and differential unit numbered 5 (differential unit numbered 5, differential unit numbered 6, differential unit numbered 7, and differential unit numbered 8, a total of four differential units) are further obtained. Assuming that the length and value is greater than the preset length threshold, the intersection point between differential unit numbered 8 and differential unit numbered 9 is taken as the first key point, and differential unit numbered 8 is merged with the previous road segment 567 to obtain road segment 5678, and differential unit numbered 9 is taken as the search reference unit. Since the differential unit numbered 9 is the last differential unit, there are no key points after the differential unit numbered 9. Thus, we can obtain three first key points and three road segments, which are: road segments 1, 2, 3, and 4, road segments 5, 6, 7, and 8, and road segment 9.
[0075] In some embodiments, after searching in the first direction, multiple first key points and multiple road segments divided by the multiple first key points can be obtained. For the last road segment, it can be determined whether the length of the previous road segment is greater than twice a preset length threshold. If it is greater, a road segment of a certain length is taken from the previous road segment and merged with the last road segment. If it is not greater, the last road segment is directly merged with the previous road segment. For example, Figure 8 The upper and middle images show the last road segment before the merging process. Figure 8 The lower half of the image shows the final road segment after the merging process.
[0076] In the above embodiment, when searching in the first direction, for a certain differential cell, if the width difference between the differential cell and the search reference cell is greater than a preset width change threshold, and the sum of the lengths of all differential cells between the differential cell and the search reference cell is greater than a preset length threshold, then the boundary point between the current differential cell and the next differential cell is taken as the first key point. This ensures that the extracted key points are points with large width changes, and the distance between two adjacent key points is not too close, making the road segment length obtained based on key point segmentation reasonable and improving the rationality of width change key points.
[0077] In some embodiments, the step of searching from a second direction of the topological path to obtain multiple second key points on the topological path includes: taking the first differential unit in the second direction as the search reference unit; for each differential unit after the search reference unit, obtaining the width difference between the current differential unit and the search reference unit; if the width difference satisfies a first relationship with a preset width change threshold, obtaining the length sum of all differential units between the current differential unit and the search reference unit; if the length sum satisfies a second relationship with a preset length threshold, taking the intersection point between the next differential unit after the current differential unit as the second key point, and taking the next differential unit as the search reference unit, repeating the above search process to obtain multiple second key points.
[0078] Similarly, the width change threshold and length threshold used when searching from the second direction can also be flexibly set according to the actual situation. The first relationship can be that the width difference is greater than the preset width change threshold, and the second relationship can be that the length sum is greater than the preset length threshold.
[0079] In some embodiments, when searching from the second direction, for each differential unit after the search reference unit, if the first relationship is not satisfied between the width difference and the preset width change threshold, the current differential unit is merged into the previous road segment, and the next differential unit along the second direction is taken as the current differential unit, and the above process is repeated.
[0080] In some embodiments, when searching from the second direction, for each differential unit after the search reference unit, if the length and value do not satisfy the second relationship with the preset length threshold, the current differential unit is merged into the previous road segment, and the next differential unit along the second direction is taken as the current differential unit, and the above process is repeated.
[0081] Understandably, the specific method of searching from the second direction is similar to that from the first direction, and this application will not provide further examples or details here. For instance, Figure 9 The diagram shows key points obtained from searches in two directions, where solid points represent the first key points obtained from the first direction and hollow points represent the second key points obtained from the second direction.
[0082] In the above embodiments, similar to the first direction, when searching in the second direction, for a certain differential cell, if the width difference between the differential cell and the search reference cell is greater than a preset width change threshold, and the sum of the lengths of all differential cells between the differential cell and the search reference cell is greater than a preset length threshold, then the intersection point between the current differential cell and the next differential cell is taken as the second key point. This ensures that the extracted key points are points with large width changes, and the distance between two adjacent key points is not too close, making the road segment length obtained based on key point segmentation reasonable and improving the rationality of width change key points.
[0083] In some embodiments, the step of determining width change key points based on multiple first key points and multiple second key points includes: filtering multiple first key points based on the width of multiple road segments divided by multiple first key points to obtain multiple first target key points; filtering multiple second key points based on the width of multiple road segments divided by multiple second key points to obtain multiple second target key points; and determining width change key points based on multiple first target key points and multiple second target key points.
[0084] In some embodiments, for each road segment divided by multiple first key points, the minimum width of the road segment can be obtained and used as the width of the road segment; adjacent road segments with the same width among the multiple road segments can be merged, and based on the merging result, multiple first target key points can be obtained from the multiple first key points.
[0085] In this process, after obtaining the width of each road segment divided by multiple first key points, if two adjacent road segments have the same width, these two road segments can be merged. That is, the key points between these two road segments are deleted. After the above deletion process, the remaining first key points can be used as the first target key points.
[0086] The following example illustrates this:
[0087] Figure 10 An example of a topology path is shown, such as Figure 10 As shown, this topological path can be divided into 10 differential units, assuming... Figure 10The direction indicated in the text is the first direction. Assuming that searching along the first direction identifies the intersection between differential units numbered 2 and 3 as a first keypoint, the intersection between differential units numbered 5 and 6 as a first keypoint, and the intersection between differential units numbered 8 and 9 as a first keypoint, for a total of three first keypoints, the topology path is divided into four segments by these three keypoints: segment 12, segment 345, segment 678, and segment 910. For segment 12, the minimum width of this segment is the width of differential unit numbered 1. Assuming the width of differential unit numbered 1 is 1 pixel, then the width of segment 12 is determined to be 1 pixel. For segment 345, the minimum width of this segment is the width of the differential unit numbered 3 (or 4). Assuming the width of differential unit numbered 3 (or 4) is 2 pixels, then the width of segment 345 is determined to be 2 pixels. For segment 678, the minimum width of this segment is the width of the differential unit numbered 7 (or 8). Assuming the width of differential unit numbered 7 (or 8) is 2 pixels, then the width of segment 678 is determined to be 2 pixels. For segment 910, the minimum width of this segment is the width of the differential unit numbered 10. Assuming the width of differential unit numbered 10 is 1 pixel, then the width of segment 910 is determined to be 1 pixel. Since the width of both road segment 345 and road segment 678 is 2 pixels, these two road segments will be merged. That is, the first key point between the differential unit numbered 5 and the differential unit numbered 6 will be deleted, and the remaining two first key points will be used as the first target key points.
[0088] Similarly, for each road segment divided by multiple second key points, the minimum width of that road segment can be obtained and used as the width of that road segment. Adjacent road segments with the same width among the multiple road segments can be merged. Based on the merging result, multiple second target key points can be obtained from the multiple second key points. For example, similar to the processing method of the first key points, after obtaining the width of each road segment divided by multiple second key points, if two adjacent road segments have the same width, these two road segments can be merged, that is, the key points between these two road segments can be deleted. The remaining second key points after the above deletion process can all be used as second target key points.
[0089] In some embodiments, when multiple first target key points and multiple second target key points are obtained, corresponding first target key points and second target key points are selected from them, and the road width at the first target key point and the road width at the second target key point are obtained. Based on the obtained two road widths, the final width change key point is determined.
[0090] In the above embodiments, considering that whether a mobile robot can pass mainly depends on the narrowest part of the road segment, if the narrowest part can be passed, then the road segment is feasible. Therefore, in determining the width of a road segment, this embodiment of the application represents the width of the entire road segment by the width of the narrowest part. Furthermore, after obtaining the width of each road segment, the widths of two adjacent road segments are compared. If the widths are the same, the two road segments are merged, and the key points between the two road segments are deleted. This removes key points that are not accurately represented by the width change, making the final road change key points more accurate and reasonable.
[0091] In some embodiments, the step of determining width change key points based on a plurality of first target key points and a plurality of second target key points includes: finding corresponding first target key points and second target key points from the plurality of first target key points and a plurality of second target key points; determining a first position weight of the found first target key points and a second position weight of the found second target key points based on the road width at the found first target key points and the road width at the found second target key points; and determining the corresponding width change key points based on the first position weight and the second position weight.
[0092] In some embodiments, based on obtaining multiple first target key points by searching from a first direction and multiple second target key points by searching from a second direction, corresponding first target key points and second target key points can be found among the multiple first target key points and multiple second target key points. For example, the multiple first target key points and multiple second target key points can be marked with different colors on the topological path, and the two closest points of each color can be regarded as corresponding first target key points and second target key points.
[0093] In some embodiments, after finding corresponding first and second target key points, the first road width at the first target key point and the second road width at the second target key point can be obtained. The first and second road widths can be added together to obtain a sum. The ratio between the first road width and the sum is used as the position weight of the first target key point, i.e., the first position weight, and the ratio between the second road width and the sum is used as the position of the second target key point, i.e., the second position weight. The distance between the first and second target key points can be obtained. Based on the first and second position weights, key points for road width changes between the first and second target key points are determined.
[0094] In some embodiments, the maximum value can be found between the first position weight and the second position weight. The distance between the first target key point and the second target key point is multiplied by the maximum value to obtain the target distance for the key point to move. The key point with the narrower road width is determined between the first target key point and the second target key point. The position of this key point after moving the target distance towards another key point is determined as the width change key point. For example, see... Figure 11 As shown, solid dots are the first target key points, hollow dots are the second target key points, and dots filled with dashed lines are the final determined width change key points. Figure 12 This is a schematic diagram of the width change key points determined by the method of the embodiments of this application. The numbers next to the width change key points represent the road width at the width change key points.
[0095] In the above embodiments, key points are searched from the first direction of the topological path and from the second direction of the topological path. After key points are found in both directions, corresponding key points are found. Based on the road width at the corresponding key points, the positions of the key points are corrected to determine the final width change key points. This method of searching from two directions can find key points that cannot be found in a single direction, avoiding the omission of key points caused by a single-direction search and improving the accuracy of the extracted width change key points.
[0096] In some embodiments, a method for extracting key points of road width changes is provided. Taking the method being executed by a mobile robot as an example, the method includes:
[0097] Obtain an obstacle map with topological paths; divide the roads corresponding to the topological paths on the obstacle map according to the preset differential length to obtain multiple differential units.
[0098] The first differential unit in the first direction is taken as the search reference unit. For each differential unit after the search reference unit, the width difference between the current differential unit and the search reference unit is obtained. If the width difference satisfies the first relationship with the preset width change threshold, the length and value of all differential units between the current differential unit and the search reference unit are obtained. If the length and value satisfy the second relationship with the preset length threshold, the intersection point between the current differential unit and the next differential unit is taken as the first key point, and the next differential unit is taken as the search reference unit. The above search process is repeated to obtain multiple first key points.
[0099] The first differential unit in the second direction is taken as the search reference unit. For each differential unit after the search reference unit, the width difference between the current differential unit and the search reference unit is obtained. If the width difference satisfies the first relationship with the preset width change threshold, the length and value of all differential units between the current differential unit and the search reference unit are obtained. If the length and value satisfy the second relationship with the preset length threshold, the intersection point between the current differential unit and the next differential unit is taken as the second key point, and the next differential unit is taken as the search reference unit. The above search process is repeated to obtain multiple second key points.
[0100] For each road segment divided by multiple first key points, the minimum width of the road segment is obtained and used as the width of the road segment. Adjacent road segments with the same width are merged. Based on the merging result, multiple first target key points are obtained from the multiple first key points. Based on the width of each of the multiple road segments divided by multiple second key points, multiple second key points are filtered to obtain multiple second target key points.
[0101] From multiple first target key points and multiple second target key points, find corresponding first target key points and second target key points; based on the road width at the found first target key points and the road width at the found second target key points, determine the first position weight of the found first target key points and the second position weight of the found second target key points; based on the first position weight and the second position weight, determine the corresponding width change key points.
[0102] In the aforementioned method for extracting key points of road width changes, after obtaining an obstacle map with a topological path, the road corresponding to the topological path is segmented on the obstacle map according to a preset differential length, resulting in multiple differential units. Using small-scale differential units as search units, key points of width changes that are difficult to identify can be identified. Based on the differential length and the width of each differential unit, a search is performed from the first direction of the topological path to obtain multiple first key points on the topological path. A search is performed from the second direction of the topological path to obtain multiple second key points on the topological path. Based on the multiple first and multiple second key points, the key points of width changes are determined. By searching for key points from two opposite directions, the final position of the key points of width changes is located based on the key points searched in these two directions. This method can fill in and correct key points that were not searched in one direction or erroneous key points, improving the accuracy of the finally determined key points of width changes. Compared with the method of manually marking key points, this method greatly improves the extraction efficiency.
[0103] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0104] Based on the same inventive concept, this application also provides a road width change key point extraction device for implementing the road width change key point extraction method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations of one or more road width change key point extraction device embodiments provided below can be found in the limitations of the road width change key point extraction method described above, and will not be repeated here.
[0105] In one embodiment, such as Figure 13 As shown, a device for extracting key points of road width variation is provided, comprising:
[0106] The acquisition module is used to acquire an obstacle map with topological paths;
[0107] Differential units are used to divide the roads corresponding to the topological path on the obstacle map according to a preset differential length, resulting in multiple differential units.
[0108] The search unit is used to search from the first direction of the topological path based on the differential length and the width of each differential unit to obtain multiple first key points on the topological path, and to search from the second direction of the topological path to obtain multiple second key points on the topological path.
[0109] The determination module is used to determine the width variation key points based on multiple first key points and multiple second key points.
[0110] In some embodiments, the search unit is specifically configured to: take the first differential unit in the first direction as the search reference unit; for each differential unit after the search reference unit, obtain the width difference between the current differential unit and the search reference unit; if the width difference satisfies a first relationship with a preset width change threshold, obtain the length and value of all differential units between the current differential unit and the search reference unit; if the length and value satisfy a second relationship with a preset length threshold, take the intersection point between the current differential unit and the next differential unit as the first key point, and take the next differential unit as the search reference unit, repeat the above search process to obtain multiple first key points.
[0111] In some embodiments, the search unit is specifically configured to: take the first differential unit in the second direction as the search reference unit; for each differential unit after the search reference unit, obtain the width difference between the current differential unit and the search reference unit; if the width difference satisfies a first relationship with a preset width change threshold, obtain the length and value of all differential units between the current differential unit and the search reference unit; if the length and value satisfy a second relationship with a preset length threshold, take the intersection point between the next differential unit after the current differential unit as the second key point, and take the next differential unit as the search reference unit, repeat the above search process to obtain multiple second key points.
[0112] In some embodiments, the first relationship includes: the difference is greater than a preset width change threshold; the second relationship includes: the length of the current differential unit and the next differential unit after merging is greater than or equal to a preset length threshold.
[0113] In some embodiments, the determining module is specifically used to: filter multiple first key points based on the width of each of multiple road segments divided by multiple first key points to obtain multiple first target key points; filter multiple second key points based on the width of each of multiple road segments divided by multiple second key points to obtain multiple second target key points; and determine width change key points based on the multiple first target key points and the multiple second target key points.
[0114] In some embodiments, the determining module is specifically used to: for each road segment divided by multiple first key points, obtain the minimum width of the road segment, and use the minimum width as the width of the road segment; merge adjacent road segments with the same width among the multiple road segments, and based on the merging result, filter out multiple first target key points from the multiple first key points.
[0115] In some embodiments, the determining module is specifically configured to: find corresponding first target key points and second target key points from a plurality of first target key points and a plurality of second target key points; determine a first position weight of the found first target key points and a second position weight of the found second target key points based on the road width at the found first target key points and the road width at the found second target key points; and determine the corresponding width change key points based on the first position weight and the second position weight.
[0116] Each module in the aforementioned road width change key point extraction device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0117] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 14 As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computational and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a method for extracting key points of road width variations.
[0118] Those skilled in the art will understand that Figure 14 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0119] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0120] Obtain an obstacle map with topological paths;
[0121] According to the preset differential length, the roads corresponding to the topological path are segmented on the obstacle map to obtain multiple differential units;
[0122] Based on the differential length and the width of each differential unit, a search is performed from the first direction of the topological path to obtain multiple first key points on the topological path, and a search is performed from the second direction of the topological path to obtain multiple second key points on the topological path.
[0123] Based on multiple first key points and multiple second key points, determine the width variation key points.
[0124] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0125] The first differential unit in the first direction is taken as the search reference unit. For each differential unit after the search reference unit, the width difference between the current differential unit and the search reference unit is obtained. If the width difference satisfies the first relationship with the preset width change threshold, the length and value of all differential units between the current differential unit and the search reference unit are obtained. If the length and value satisfy the second relationship with the preset length threshold, the intersection point between the current differential unit and the next differential unit is taken as the first key point, and the next differential unit is taken as the search reference unit. The above search process is repeated to obtain multiple first key points.
[0126] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0127] The first differential unit in the second direction is taken as the search reference unit. For each differential unit after the search reference unit, the width difference between the current differential unit and the search reference unit is obtained. If the width difference satisfies the first relationship with the preset width change threshold, the length and value of all differential units between the current differential unit and the search reference unit are obtained. If the length and value satisfy the second relationship with the preset length threshold, the intersection point between the current differential unit and the next differential unit is taken as the second key point, and the next differential unit is taken as the search reference unit. The above search process is repeated to obtain multiple second key points.
[0128] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0129] The first relationship includes: the difference is greater than the preset width change threshold; the second relationship includes: the length of the current differential unit and the next differential unit after merging is greater than or equal to the preset length threshold.
[0130] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0131] Based on the widths of multiple road segments divided by multiple first key points, multiple first key points are filtered to obtain multiple first target key points; based on the widths of multiple road segments divided by multiple second key points, multiple second key points are filtered to obtain multiple second target key points; based on the multiple first target key points and the multiple second target key points, width change key points are determined.
[0132] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0133] For each road segment divided by multiple first key points, the minimum width of the road segment is obtained and used as the width of the road segment; adjacent road segments with the same width among multiple road segments are merged, and based on the merging result, multiple first target key points are selected from multiple first key points.
[0134] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0135] From multiple first target key points and multiple second target key points, find corresponding first target key points and second target key points; based on the road width at the found first target key points and the road width at the found second target key points, determine the first position weight of the found first target key points and the second position weight of the found second target key points; based on the first position weight and the second position weight, determine the corresponding width change key points.
[0136] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0137] Obtain an obstacle map with topological paths;
[0138] According to the preset differential length, the roads corresponding to the topological path are segmented on the obstacle map to obtain multiple differential units;
[0139] Based on the differential length and the width of each differential unit, a search is performed from the first direction of the topological path to obtain multiple first key points on the topological path, and a search is performed from the second direction of the topological path to obtain multiple second key points on the topological path.
[0140] Based on multiple first key points and multiple second key points, determine the width variation key points.
[0141] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0142] The first differential unit in the first direction is taken as the search reference unit. For each differential unit after the search reference unit, the width difference between the current differential unit and the search reference unit is obtained. If the width difference satisfies the first relationship with the preset width change threshold, the length and value of all differential units between the current differential unit and the search reference unit are obtained. If the length and value satisfy the second relationship with the preset length threshold, the intersection point between the current differential unit and the next differential unit is taken as the first key point, and the next differential unit is taken as the search reference unit. The above search process is repeated to obtain multiple first key points.
[0143] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0144] The first differential unit in the second direction is taken as the search reference unit. For each differential unit after the search reference unit, the width difference between the current differential unit and the search reference unit is obtained. If the width difference satisfies the first relationship with the preset width change threshold, the length and value of all differential units between the current differential unit and the search reference unit are obtained. If the length and value satisfy the second relationship with the preset length threshold, the intersection point between the current differential unit and the next differential unit is taken as the second key point, and the next differential unit is taken as the search reference unit. The above search process is repeated to obtain multiple second key points.
[0145] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0146] The first relationship includes: the difference is greater than the preset width change threshold; the second relationship includes: the length of the current differential unit and the next differential unit after merging is greater than or equal to the preset length threshold.
[0147] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0148] Based on the widths of multiple road segments divided by multiple first key points, multiple first key points are filtered to obtain multiple first target key points; based on the widths of multiple road segments divided by multiple second key points, multiple second key points are filtered to obtain multiple second target key points; based on the multiple first target key points and the multiple second target key points, width change key points are determined.
[0149] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0150] For each road segment divided by multiple first key points, the minimum width of the road segment is obtained and used as the width of the road segment; adjacent road segments with the same width among multiple road segments are merged, and based on the merging result, multiple first target key points are selected from multiple first key points.
[0151] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0152] From multiple first target key points and multiple second target key points, find corresponding first target key points and second target key points; based on the road width at the found first target key points and the road width at the found second target key points, determine the first position weight of the found first target key points and the second position weight of the found second target key points; based on the first position weight and the second position weight, determine the corresponding width change key points.
[0153] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:
[0154] Obtain an obstacle map with topological paths;
[0155] According to the preset differential length, the roads corresponding to the topological path are segmented on the obstacle map to obtain multiple differential units;
[0156] Based on the differential length and the width of each differential unit, a search is performed from the first direction of the topological path to obtain multiple first key points on the topological path, and a search is performed from the second direction of the topological path to obtain multiple second key points on the topological path.
[0157] Based on multiple first key points and multiple second key points, determine the width variation key points.
[0158] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0159] The first differential unit in the first direction is taken as the search reference unit. For each differential unit after the search reference unit, the width difference between the current differential unit and the search reference unit is obtained. If the width difference satisfies the first relationship with the preset width change threshold, the length and value of all differential units between the current differential unit and the search reference unit are obtained. If the length and value satisfy the second relationship with the preset length threshold, the intersection point between the current differential unit and the next differential unit is taken as the first key point, and the next differential unit is taken as the search reference unit. The above search process is repeated to obtain multiple first key points.
[0160] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0161] The first differential unit in the second direction is taken as the search reference unit. For each differential unit after the search reference unit, the width difference between the current differential unit and the search reference unit is obtained. If the width difference satisfies the first relationship with the preset width change threshold, the length and value of all differential units between the current differential unit and the search reference unit are obtained. If the length and value satisfy the second relationship with the preset length threshold, the intersection point between the current differential unit and the next differential unit is taken as the second key point, and the next differential unit is taken as the search reference unit. The above search process is repeated to obtain multiple second key points.
[0162] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0163] The first relationship includes: the difference is greater than the preset width change threshold; the second relationship includes: the length of the current differential unit and the next differential unit after merging is greater than or equal to the preset length threshold.
[0164] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0165] Based on the widths of multiple road segments divided by multiple first key points, multiple first key points are filtered to obtain multiple first target key points; based on the widths of multiple road segments divided by multiple second key points, multiple second key points are filtered to obtain multiple second target key points; based on the multiple first target key points and the multiple second target key points, width change key points are determined.
[0166] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0167] For each road segment divided by multiple first key points, the minimum width of the road segment is obtained and used as the width of the road segment; adjacent road segments with the same width among multiple road segments are merged, and based on the merging result, multiple first target key points are selected from multiple first key points.
[0168] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0169] From multiple first target key points and multiple second target key points, find corresponding first target key points and second target key points; based on the road width at the found first target key points and the road width at the found second target key points, determine the first position weight of the found first target key points and the second position weight of the found second target key points; based on the first position weight and the second position weight, determine the corresponding width change key points.
[0170] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0171] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0172] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for extracting a road width change key point, characterized by, The method comprises: obtaining an obstacle map with a topological path; segmenting a road corresponding to the topological path on the obstacle map according to a preset differential length to obtain a plurality of differential units; searching from a first direction of the topological path based on the differential length and the width of each differential unit to obtain a plurality of first key points on the topological path, and searching from a second direction of the topological path to obtain a plurality of second key points on the topological path; determining a width change key point based on the plurality of first key points and the plurality of second key points; the searching from the first direction of the topological path based on the differential length and the width of each differential unit to obtain the plurality of first key points comprises: taking a first differential unit in the first direction as a search reference unit, for each differential unit after the search reference unit, obtaining a width difference value between the current differential unit and the search reference unit, in a case where a first relationship is met between the width difference value and a preset width change threshold value, obtaining a length sum value of all differential units between the current differential unit and the search reference unit, in a case where a second relationship is met between the length sum value and a preset length threshold value, taking an intersection point between the current differential unit and a subsequent differential unit as a first key point, and taking the subsequent differential unit as the search reference unit, and repeating the above search process to obtain a plurality of first key points.
2. The method of claim 1, wherein, the searching from the second direction of the topological path to obtain the plurality of second key points comprises: taking a first differential unit in the second direction as a search reference unit, for each differential unit after the search reference unit, obtaining a width difference value between the current differential unit and the search reference unit, in a case where a first relationship is met between the width difference value and a preset width change threshold value, obtaining a length sum value of all differential units between the current differential unit and the search reference unit, in a case where a second relationship is met between the length sum value and a preset length threshold value, taking an intersection point between the current differential unit and a subsequent differential unit as a second key point, and taking the subsequent differential unit as the search reference unit, and repeating the above search process to obtain a plurality of second key points.
3. The method according to claim 1 or 2, characterized in that, The first relationship comprises that the difference value is greater than the preset width change threshold value; and the second relationship comprises that the length of the current differential unit and the subsequent differential unit after merging is greater than or equal to the preset length threshold value.
4. The method according to any one of claims 1-2, characterized in that, the determining the width change key point based on the plurality of first key points and the plurality of second key points comprises: screening the plurality of first key points based on the width of each road segment divided by the plurality of first key points to obtain a plurality of first target key points; screening the plurality of second key points based on the width of each road segment divided by the plurality of second key points to obtain a plurality of second target key points; and determining the width change key point based on the plurality of first target key points and the plurality of second target key points. Determine a width change key point based on the plurality of first target key points and the plurality of second target key points.
5. The method of claim 4, wherein, The screening of the plurality of first key points based on the width of each road segment divided by the plurality of first key points to obtain a plurality of first target key points comprises: For each road segment divided by the plurality of first key points, obtain the minimum width of the road segment, and take the minimum width as the width of the road segment; Merge adjacent road segments with the same width in the plurality of road segments, and screen a plurality of first target key points from the plurality of first key points based on the merging result.
6. The method of claim 4, wherein, The determination of the width change key point based on the plurality of first target key points and the plurality of second target key points comprises: Find the first target key point and the second target key point corresponding to each other from the plurality of first target key points and the plurality of second target key points; Determine the first position weight of the first target key point and the second position weight of the second target key point according to the road width at the first target key point and the road width at the second target key point found; Determine the corresponding width change key point based on the first position weight and the second position weight.
7. A road width change key point extraction apparatus characterized by comprising: The device comprises: An acquisition module is configured to acquire an obstacle map with a topological path; A differential unit is configured to divide the road corresponding to the topological path on the obstacle map according to a preset differential length to obtain a plurality of differential units; A search unit is configured to search from a first direction of the topological path based on the differential length and the width of each differential unit to obtain a plurality of first key points on the topological path, and search from a second direction of the topological path to obtain a plurality of second key points on the topological path; A determination module is configured to determine a width change key point based on the plurality of first key points and the plurality of second key points; The search unit is specifically configured to: Take the first differential unit in the first direction as a search reference unit, for each differential unit after the search reference unit, obtain the width difference between the current differential unit and the search reference unit, in the case that the width difference and a preset width change threshold satisfy a first relationship, obtain the length sum of all differential units between the current differential unit and the search reference unit, in the case that the length sum and a preset length threshold satisfy a second relationship, take the junction point between the current differential unit and the next differential unit as a first key point, and take the next differential unit as a search reference unit, and repeat the above search process to obtain a plurality of first key points.
8. The apparatus of claim 7, wherein, The search unit is specifically configured to: The first differential unit in the second direction is taken as a search reference unit, for each differential unit after the search reference unit, a width difference value between the current differential unit and the search reference unit is obtained, in the case that a first relationship is met between the width difference value and a preset width change threshold value, a length sum value of all differential units between the current differential unit and the search reference unit is obtained, in the case that a second relationship is met between the length sum value and a preset length threshold value, a junction point between the current differential unit and a subsequent differential unit is taken as a second key point, and the subsequent differential unit is taken as the search reference unit, the above search process is repeatedly executed, and a plurality of second key points are obtained. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-8 when the computer program is executed by the processor. The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 6.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 6.
Citation Information
Patent Citations
Method and device for displaying road segments and method of providing a map data base
CN102564442A
High-Definition Map Building Method and Apparatus
US20210293564A1