A method, device, equipment and medium for extracting the connection line of road cones
Through a clustering grouping method based on the principle of linear fitting error and the principle of the largest number of matches, combined with boundary fitting test, the problem of high error detection rate of cone barrel boundary extraction in the existing technology is solved, and high-precision cone barrel line boundary extraction is achieved.
Patent Information
- Application Number
- CN202211510946.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-29
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2042-11-29
AI Technical Summary
The existing discrete boundary extraction method has a high error detection rate, making it difficult to accurately extract the connecting boundary of road cone barrels.
By obtaining the coordinate data of the cone bucket, clustering and grouping is performed based on the principle of linear fitting error and the principle of the maximum number of matches, and multiple groups are obtained through multiple iteration optimization. Then, boundary fitting test is performed on the inner boundary of the extracted cone barrel to improve the extraction accuracy.
Accurate clustering and boundary extraction of cone barrel connection boundaries is achieved, the detection accuracy of road traveling boundaries is improved, and the error detection rate is reduced, providing a basis for subsequent lane line output, driving area calculation and vehicle control decisions.
Smart Images

Figure CN115817533B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of automotive intelligent applications, and particularly to a method, device, equipment, and medium for extracting the connection line of road cones. Background Art
[0002] Road boundary information is important reference information in the autonomous driving system, which can provide necessary reference for autonomous driving planning and control decisions and plays an important role in driving safety. Road boundaries include various insurmountable boundaries such as curbs, fences, and cones. Among them, as a discrete object, cones cannot be directly detected as a continuous boundary. They must be reasonably grouped before boundary extraction. However, the distribution of cones is not always along the road direction or in a straight line. Existing discrete boundary extraction methods mostly rely on simple grouping strategies based on position, which are prone to false detection of boundaries. Therefore, it is necessary to provide a method, device, equipment, and medium for extracting the connection line of road cones to improve the accuracy of cone boundary extraction and reduce the false detection rate. Summary of the Invention
[0003] In view of the above-mentioned disadvantages of the prior art, the present invention provides a method, device, equipment, and medium for extracting the connection line of road cones to solve the technical problem of the relatively high false detection rate of existing discrete boundary extraction methods.
[0004] The present invention provides a method for extracting the connection line of road cones, including:
[0005] Obtaining the coordinate data of the cones, where the coordinate data of the cones is obtained by the sensing module acquiring the position information of the cones relative to the vehicle and converting the position information into VCS coordinates through camera parameters;
[0006] Clustering all the cones according to the coordinate data of the cones and obtaining multiple groups; wherein, the multiple groups are clustered based on the principle of linear fitting error and the principle of the largest number of matches, and are obtained through multiple iterations and optimizations;
[0007] Extracting the inner boundary of the cones according to the multiple groups;
[0008] Performing boundary fitting inspection on the extracted inner boundary of the cones.
[0009] In an embodiment of the method for extracting the connection line of road cones of the present invention, the method based on the principle of linear fitting error and the principle of the largest number of matches and through multiple iterations and optimizations includes:
[0010] S21. Arranging all the cones from near to far according to the distance from the coordinates of all the cones to the origin of the VCS coordinates;
[0011] S22. Using the cone closest to the origin of the VCS coordinates as the starting point and the adjacent subsequent cone as the ending point to construct an initial fitting line;
[0012] S23. Calculate the lateral distance error of the coordinates of subsequent adjacent cone barrels with respect to the current fitted line, and determine whether the current cone barrel belongs to the current group according to the lateral distance error; if it belongs to the current group, add it to the current group and update the fitted line.
[0013] S24. Repeat step S23 until all the remaining subsequent cone barrels are traversed to complete the clustering grouping for this time.
[0014] S25. Then, construct an initial fitted line with other cone barrels as the starting point and the adjacent subsequent cone barrels as the ending point in turn; and repeat steps S23 to S24 until all the cone barrels are traversed to obtain multiple groups.
[0015] S26. Compare the number of cone barrels in each group, and retain the group with the largest number of matching cone barrels as the final grouping result for this round.
[0016] S27. Construct an initial fitted line with the relatively close ungrouped cone barrels as the starting point and the subsequent ungrouped cone barrels as the ending point in turn, and repeat steps S23 to S26 until all the cone barrels are grouped, thereby completing the entire clustering grouping and obtaining multiple groups.
[0017] In an embodiment of the method for extracting the connection line of road cone barrels of the present invention, calculating the lateral distance error of the coordinates of subsequent adjacent cone barrels with respect to the current fitted line and determining whether the current cone barrel belongs to the current group includes:
[0018] Judge whether the lateral distance error is less than a set threshold. If it is less than the set threshold, judge that the current cone barrel belongs to the current group; if it is greater than or equal to the set threshold, judge that the current cone barrel does not belong to the current group.
[0019] In an embodiment of the method for extracting the connection line of road cone barrels of the present invention, extracting the inner boundary of the cone barrels according to the multiple groups includes:
[0020] Perform filtering processing on the multiple groups to obtain multiple standby groups.
[0021] Calculate the lateral average distance of each standby group from the origin of the VCS coordinates.
[0022] Divide the multiple standby groups into a left-side group and a right-side group according to the positive or negative of the lateral average distance.
[0023] Compare and filter all the groups in the left-side group in pairs and circularly to obtain the left-side boundary group; compare and filter all the groups in the right-side group in pairs and circularly to obtain the right-side boundary group.
[0024] In an embodiment of the method for extracting the connection line of road cone barrels of the present invention, all the groups within the left grouping are cyclically compared and filtered pairwise to obtain the left boundary grouping; all the groups within the right grouping are cyclically compared and filtered pairwise to obtain the right boundary grouping, including:
[0025] Compare all the groups within the corresponding side grouping pairwise, and determine whether there is an overlap between the two groups in the vehicle body forward direction. If there is an overlap, delete the group with a larger absolute value of the lateral average distance from the VCS coordinate origin; if there is no overlap, delete the group with a farther starting point distance from the origin; repeat this step until only one group remains in the boundary grouping, and output this group of cone barrels as the boundary grouping.
[0026] In an embodiment of the method for extracting the connection line of road cone barrels of the present invention, determining whether there is an overlap between two groups in the vehicle body forward direction includes: If the starting vertical coordinate x istart and the ending vertical coordinate x iend of one group and the starting vertical coordinate x jstart and the ending vertical coordinate x jend of the other group satisfy x istart >x jstart and x istart <x jend ; or satisfy x jstart >x istart and x jstart <x iend , it is determined that there is an overlap between the two groups in the vehicle body traveling direction.
[0027] In an embodiment of the method for extracting the connection line of road cone barrels of the present invention, the boundary fitting test for the inner boundary of the extracted cone barrels includes:
[0028] Perform fitting on the obtained left boundary grouping and right boundary grouping respectively;
[0029] According to the positive and negative of the horizontal coordinates, divide all the cone barrels into two sets, the left and the right, and calculate the proportion of the number of cone barrels in the left boundary grouping and the right boundary grouping to the number of all cone barrels in the corresponding side set respectively;
[0030] If the proportion is less than the set threshold, it is determined that the current fitting result is unreliable, and the current boundary is removed; if it is greater than or equal to the set threshold, it is determined that the current fitting result is reliable, and the current boundary grouping is retained.
[0031] In an embodiment of the method for extracting the connection line of road cone barrels of the present invention, after the boundary fitting test for the inner boundary of the extracted cone barrels, it further includes:
[0032] Output the final grouping result and the curve fitting result as the current cone barrel connection line boundary to the downstream module.
[0033] The present invention also provides a device for extracting the connection line of road cones, including: a cone coordinate acquisition module, a clustering and grouping module, a boundary extraction module, and a fitting and verification module. The cone coordinate acquisition module is used to acquire the coordinate data of the cones. The coordinate data of the cones is obtained by the sensing module acquiring the position information of the cones relative to the vehicle and converting the position information into VCS coordinates through camera parameters. The clustering and grouping module is used to cluster all the cones according to the coordinate data of the cones and obtain multiple groups. Among them, the multiple groups are clustered based on the principle of linear fitting error and the principle of the largest number of matches, and are obtained through multiple iterations of optimization. The boundary extraction module extracts the inner boundary of the cones according to the multiple groups. The fitting and verification module performs boundary fitting verification on the extracted inner boundary of the cones.
[0034] The present invention also provides an electronic device, which includes: one or more processors and a storage device. The storage device is used to store one or more programs. When the one or more programs are executed by the one or more processors, the electronic device realizes the method for extracting the connection line of road cones described in any one of the above.
[0035] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by the processor of the computer, the computer executes the method for extracting the connection line of road cones described in any one of the above.
[0036] Advantages of the present invention: In the method for extracting the connection line of road cones proposed by the present invention, the cone grouping is clustered based on the principle of linear fitting error and the principle of the largest number of matches, and is obtained through multiple iterations of optimization, which can realize accurate clustering of the connection line boundary of the cones and accurate boundary extraction. In the present invention, the extracted results are tested and filtered, which improves the detection accuracy of the drivable boundary of the road, reduces the false detection rate, and provides a basis for subsequent lane line output, drivable area calculation, and vehicle motion control decision-making.
[0037] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit this application. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The accompanying drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with this application, and are used together with the specification to explain the principles of this application. Obviously, the accompanying drawings in the following description are only some embodiments of this application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts. In the drawings:
[0039] Figure 1 is a schematic diagram of the implementation environment of the method for extracting the connection line of road cones shown in an exemplary embodiment of this application;
[0040] Figure 2 is a flowchart of a method for extracting the connection line of road cones shown in an exemplary embodiment of the present application;
[0041] Figure 3 is Figure 2 a flowchart of step S2 in the exemplary embodiment shown in an exemplary embodiment;
[0042] Figure 4 is Figure 2 a logic diagram of step S2 in the exemplary embodiment shown in an exemplary embodiment;
[0043] Figure 5 is Figure 2 a flowchart of step S3 in the exemplary embodiment shown in an exemplary embodiment;
[0044] Figure 6 is Figure 2 a logic diagram of step S3 in the exemplary embodiment shown in an exemplary embodiment;
[0045] Figure 7 is Figure 2 a flowchart of step S4 in the exemplary embodiment shown in an exemplary embodiment;
[0046] Figure 8 is Figure 2 a logic diagram of step S4 in the exemplary embodiment shown in an exemplary embodiment;
[0047] Figure 9 is a schematic structural diagram of a device for extracting the connection line of road cones shown in an exemplary embodiment of the present application;
[0048] Figure 10 shows a schematic structural diagram of a computer system of an electronic device suitable for implementing the embodiments of the present application. Detailed implementation manners
[0049] The following will describe the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific implementation manners. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for explaining the present invention, rather than for limiting the protection scope of the present invention.
[0050] It should be noted that the illustrations provided in the following embodiments only schematically illustrate the basic concept of the present invention. Therefore, only the components related to the present invention are shown in the drawings, rather than being drawn according to the number, shape, and size of the components in actual implementation. The types, quantities, and proportions of the components in actual implementation can be arbitrarily changed, and the component layout type may also be more complex.
[0051] In the following description, a large number of details are explored to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.
[0052] The present invention first provides a method for extracting the connection line of road cones. This method can achieve accurate clustering of the cone connection line boundary and accurate boundary extraction. At the same time, the results of the extraction are tested and filtered in this method, improving the detection accuracy of the drivable boundary of the road and reducing the false detection rate, and can solve the technical problem of the relatively high false detection rate of the existing discrete boundary extraction method.
[0053] Please refer to Figure 1 , Figure 1 is a schematic diagram of the implementation environment of the method for extracting the connection line of road cones shown in an exemplary embodiment of the present application. The embodiments of the present disclosure are applied in the application scenarios of assisted driving or autonomous driving. An autonomous driving system 102 and a sensing module 103 are configured on the vehicle 101 for assisted driving or autonomous driving, and the in-vehicle autonomous driving system 102 and the sensing module 103 are electrically connected. The sensing module 103 is used to collect images of the environment where the vehicle 101 is located at the current moment to obtain relevant information about the cones, and the autonomous driving system 102 is used to obtain the images and perform 3D scene reconstruction. Among them, the sensing module 103 may include multiple cameras, each camera is set at different positions of the vehicle 101, and the total viewing angle range of several cameras covers the 360° environment range around the vehicle. For example, taking a 6-camera system as an example, the 6 cameras are respectively set at the front end, left front end, right front end, right rear end, left rear end, and rear end of the vehicle. Images of their respective perspectives are collected at each moment, such as the front view image, left front view image, right front view image, right rear view image, left rear view image, and rear view image, and the collection ranges of the 6 cameras cover all areas around the vehicle.
[0054] Please refer to Figure 2 , Figure 2 is a flowchart of the method for extracting the connection line of road cones shown in an exemplary embodiment of the present application. Based on the above implementation environment, the present invention provides a method for extracting the connection line of road cones, including:
[0055] S1. Obtain the coordinate data of the cone. The coordinate data of the cone is obtained by the perception module acquiring the position information of the cone relative to the vehicle and converting the position information into VCS coordinates through camera parameters.
[0056] The VCS (Vertical Coordinate Systems) coordinate system. The origin of this VCS coordinate system can be the center of the rear axle of the vehicle. The VCS coordinate system can include two types, namely VCS coordinate system 1 and VCS coordinate system 2. For VCS coordinate system 1: The X-axis direction is the direction pointed by the right hand facing the front of the vehicle, the Y-axis direction is the forward direction of the vehicle, and the Z-axis direction is perpendicular to the ground and points towards the roof. For VCS coordinate system 2: The X-axis direction is the forward direction of the vehicle, the Y-axis direction is the direction pointed by the left hand facing the front of the vehicle, and the Z-axis direction is perpendicular to the ground and points towards the roof. In the embodiments of the present application, VCS coordinate system 2 is adopted, that is, the X-axis direction is the forward direction of the vehicle, the Y-axis direction is the direction pointed by the left hand facing the front of the vehicle, and the Z-axis direction is perpendicular to the ground and points towards the roof.
[0057] The cone coordinates are based on the pixel positions of the cones acquired by the front-end perception module, and are input as perception results after being converted into VCS coordinates through camera parameters. In application scenarios such as assisted driving or autonomous driving, the front-end perception module can be set on the vehicle. Usually, the front-end perception module includes multiple cameras. The multiple cameras can be arranged around the vehicle and face the surroundings of the vehicle. The multiple cameras are at a certain distance from the ground to collect images of the surrounding environment of the vehicle. The actual number of cameras included in the front-end perception module can be determined according to the actual situation to ensure that all environments in front of the vehicle can be covered. In addition, since the vehicle has a VCS coordinate system and the cameras in the front-end perception module have camera coordinate systems, when setting multiple cameras for the vehicle, a process of pre-calibrating the VCS coordinate system and the camera coordinate system can also be included. In this way, the position relationship between the vehicle and the cameras in the perception module can be determined. After the position relationship is determined, the VCS coordinate system coordinates (x, y) of all cones in front can be obtained based on existing image recognition technologies.
[0058] S2. Cluster all the cones according to the coordinate data of the cones and obtain multiple groups; wherein, the multiple groups are clustered based on the principle of linear fitting error and the principle of the largest number of matches, and are obtained through multiple iterative optimizations.
[0059] Please refer to Figure 3 and Figure 4 , Figure 3 is Figure 2 The flowchart of step S2 in the exemplary embodiment shown in Figure 4 is Figure 2The logic diagram of step S2 in the illustrated embodiment in an exemplary embodiment. In an embodiment of the method for extracting the connection line of road cones of the present invention, it is performed based on the principle of linear fitting error and the principle of the largest number of matches, and includes multiple iterations for optimization:
[0060] S21. Arrange all the cones from near to far according to the distances from the coordinates of all the cones to the origin of the VCS coordinates.
[0061] In this step, the cone targets obtained in step S1 are arranged from near to far according to the distances to the origin of the coordinates, and all are marked as ungrouped. The calculation method of the distance d from the cone to the origin of the coordinates is;
[0062]
[0063] where x and y are the longitudinal and lateral coordinates of each cone. By judging the magnitude of the d value, all the cones are sorted.
[0064] S22. Taking the cone closest to the origin of the VCS coordinates of the cone as the starting point and the adjacent subsequent cone as the ending point, construct an initial fitting line.
[0065] When creating a new group for the first time, according to the sorting, taking the first cone as the starting point and the second cone as the ending point, establish an initial group, and initialize a fitting line y - b = k(x - a). If the coordinates of the starting-point cone are (x 1 , y 1 ), and the coordinates of the ending-point cone are (x 2 , y 2 ), then the coefficients of the initialized fitting line equation are:
[0066]
[0067] b = y 1
[0068] a = x 1
[0069] S23. Calculate the lateral distance error of the coordinates of the subsequent adjacent cones with respect to the current fitting line, and judge whether the current cone belongs to the current group according to the lateral distance error; if it belongs to the current group, add it to the current group and update the fitting line. First, judge whether the lateral distance error is less than a set first threshold. If it is less than the set first threshold, then judge that the current cone belongs to the current group; if it is greater than or equal to the set first threshold, then judge that the current cone does not belong to the current group. Specifically, if the coordinates of the added cone are (x i , y i ), then its lateral distance error with respect to the current group is:
[0070] y error= |y i - k(x i - a) + b|
[0071] If the current horizontal distance error y error is less than the distance threshold y thres , it is determined that the current cone belongs to this group, add it to the current group, and update the fitting line coefficients using least squares fitting. If the distance error is greater than the threshold, it is not added to the current group.
[0072] S24. Sequentially repeat step S23 for subsequent cones until all remaining subsequent cones are traversed, complete the current clustering grouping, and save the current group.
[0073] S25. Then, respectively construct initial fitting lines with other cones as the starting points and adjacent subsequent cones as the ending points; and respectively repeat steps S23 to S24 until all cones are traversed, obtaining multiple groups. It should be noted that the other cones here refer to all cones that have not been used as starting points for fitting. In this process, steps S23 to S24 are sequentially repeated with each other cone as the starting point. For example, initialize the meshing line with cone i and cone i + 1, repeat steps S23 to S24, and then initialize the meshing line with cone i + 1 and cone i + 2, repeat steps S23 to S24 until one traversal is completed with each cone as the starting point, thereby obtaining multiple groups.
[0074] S26. Compare the number of cones in each group, retain the group with the largest number of matching cones as the final grouping result of this round, mark the cones in this group as grouped, and mark the remaining cones as ungrouped. In this process, clustering errors caused by an outlier starting cone can be avoided, and a more accurate clustering result can be obtained.
[0075] S27. Sequentially construct initial fitting lines with the closer ungrouped cones as the starting points and subsequent ungrouped cones as the ending points, repeat steps S23 to S26 until all cones are grouped, thereby completing the entire clustering grouping and obtaining multiple groups. Through multiple iterative optimizations and comparisons, the multiple groups obtained all have high accuracy, laying a foundation for the accuracy of subsequent boundary extraction.
[0076] S3. Extract the inner boundary of the cones according to the multiple groups.
[0077] Please refer to Figure 5 Figure 5 Yes Figure 2 is the flowchart of step S3 in the exemplary embodiment shown in Figure 6 Yes Figure 2The logical diagram of step S3 in the illustrated embodiment in an exemplary embodiment. In an embodiment of the method for extracting the connection line of road cone barrels of the present invention, extracting the inner boundary of the cone barrels according to the multiple groups includes:
[0078] S31. Filter the multiple groups to obtain multiple spare groups. During the filtering process, invalid groups can be removed. For example, groups with the number of cone barrels less than or equal to 2 are deleted and / or if the number of cone barrels in a group is less than 4 and the product of the ordinates of the starting point and the ending point is negative, it means that the group straddles the lane and is deleted as a false detection.
[0079] S32. Calculate the horizontal average distance of each spare group from the VCS coordinate origin. Let the horizontal average distance of each group be y avg , and the calculation method is:
[0080]
[0081] where N is the number of cone barrels in the group, and y i is the horizontal coordinate of the cone barrel.
[0082] S33. According to the positive or negative of the horizontal average distance, divide the multiple spare groups into a left group and a right group. During this process, the groups with a positive horizontal average distance are put into the left group GroupsLeft, and the groups with a negative horizontal average distance are put into the right group GroupsRight.
[0083] S34. Compare and filter all the groups in the left group in pairs in a cyclic manner to obtain the left boundary group. Compare and filter all the groups in the right group in pairs in a cyclic manner to obtain the right boundary group.
[0084] In an embodiment of the method for extracting the connection line of road cone barrels of the present invention, comparing and filtering all the groups in the left group GroupsLeft in pairs in a cyclic manner to obtain the left boundary group includes: comparing all the groups in the left group GroupsLeft in pairs, and determining whether there is an overlap between the two groups in the vehicle body forward direction. If there is an overlap, delete the group with the larger absolute value of the horizontal average distance from the VCS coordinate origin; if there is no overlap, delete the group with the starting point farther from the origin; repeat this step until only one group remains in the left boundary group, and output the group of cone barrels as the left boundary group.
[0085] In an embodiment of the method for extracting the connection line of road cones of the present invention, all the groups within the right - hand grouping GroupsRight are compared and filtered in pairs cyclically to obtain the right - hand boundary grouping, which includes: comparing all the groups within the right - hand grouping GroupsRight in pairs, and determining whether there is an overlap between the two groups in the vehicle - advancing direction. If there is an overlap, the group with a larger absolute value of the lateral average distance from the VCS coordinate origin is deleted; if there is no overlap, the group with a farther starting - point distance from the origin is deleted; repeat this step until only one group remains within the right - hand boundary grouping, and output this group of cones as the right - hand boundary grouping.
[0086] It should be noted that, in the process of extracting the above - mentioned left - hand boundary grouping and right - hand boundary grouping, the method of comparing all the groups in pairs and determining whether there is an overlap between the two groups in the vehicle - advancing direction can adopt any method in the existing data - processing field that can determine whether two groups overlap. In an embodiment of the method for extracting the connection line of road cones of the present invention, let any two compared groups be G i and G j . First, determining whether there is an overlap between the two in the X - direction includes: if the starting - point ordinate x i and the ending - point ordinate x istart of G iend and the starting - point ordinate x j and the ending - point ordinate x jstart of G jend satisfy x istart >x jstart and x istart <x jend ; or satisfy x jstart >x istart and x jstart <x iend , then it is determined that there is an overlap between the two groups in the vehicle - traveling direction.
[0087] S4. Conduct a boundary - fitting test on the extracted inner boundary of the cones. Please refer to Figure 7 , Figure 7 is Figure 2 the flowchart of step S4 in an exemplary embodiment in the embodiment shown. Figure 8 is Figure 2 the logic diagram of step S4 in an exemplary embodiment in the embodiment shown. In an embodiment of the method for extracting the connection line of road cones of the present invention, conducting a boundary - fitting test on the extracted inner boundary of the cones includes:
[0088] S41. Fit the obtained left boundary group and right boundary group respectively. It should be noted that the order of fitting the left boundary group and the right boundary group is not limited. It can first fit the left boundary group and then the right boundary group, or first fit the right boundary group and then the left boundary group. The fitting method is polynomial least squares fitting, and a cubic curve model is adopted.
[0089] S42. According to the positive and negative of the horizontal coordinates, divide all the cone barrels into two sets, the left and the right, and calculate the proportion of the number of cone barrels in the left boundary group and the right boundary group to the number of all cone barrels in the corresponding side set respectively. Divide all the cone barrels obtained in step S1 into left and right parts according to the positive and negative of the Y coordinate. The cone barrels with positive Y coordinate are in the left set, and the cone barrels with negative Y coordinate are in the right set, and calculate the number of cone barrels Z 1 on the left and the number of cone barrels R 1 on the right; Let the number of cone barrels in the left boundary group be Z 2 , and the number of cone barrels in the right boundary group be R 2 , then through Z 2 / Z 1 obtain the proportion of the number of cone barrels in the left boundary group to the number of all cone barrels in the left set; then through R 2 / R 1 obtain the proportion of the number of cone barrels in the left boundary group to the number of all cone barrels in the left set.
[0090] S43. If the proportion is less than the set second threshold, it is determined that the current fitting result is unreliable and the current boundary is removed; if it is greater than or equal to the set second threshold, it is determined that the current fitting result is reliable and the current boundary group is retained. The set second threshold in this embodiment can be set according to experience or obtained by summarizing historical data. Preferably, in this embodiment, the second threshold is set to 0.3, and this threshold range has high universality. If Z 2 / Z 1 is less than 0.3, it is determined that the current left fitting result is unreliable and the current left boundary is removed. If R 2 / R 1 is less than 0.3, it is determined that the current left fitting result is unreliable and the current left boundary is removed. It should be noted that in this process, if no appropriate boundary line is obtained, the vehicle motion control will regard the cone barrels as obstacles and will perform further processing on the obstacles.
[0091] Please refer to FIG. 2. In an embodiment of the method for extracting the connection line of road cone barrels of the present invention, after performing boundary fitting inspection on the extracted inner boundary of the cone barrels, it further includes:
[0092] S5. Output the final grouping result and the curve fitting result, and output them as the boundary of the current cone connection line to the downstream module, so as to provide a basis for subsequent lane line output, drivable area calculation and vehicle motion control decision-making.
[0093] Please refer to Figure 9 , Figure 9 which is a schematic structural diagram of a road cone connection line extraction device shown in an exemplary embodiment of the present application. The present invention also provides a road cone connection line extraction device, including: a cone coordinate acquisition module 100, a clustering and grouping module 200, a boundary extraction module 300, and a fitting and verification module 400. The cone coordinate acquisition module 100 is used to acquire the coordinate data of the cones. The coordinate data of the cones is obtained by the perception module acquiring the position information of the cones relative to the vehicle and converting the position information into VCS coordinates through camera parameters. The clustering and grouping module 200 is used to cluster all the cones according to the coordinate data of the cones and obtain multiple groups. Among them, the multiple groups are clustered based on the principle of linear fitting error and the principle of the largest number of matches, and are obtained through multiple iterations and optimizations. The boundary extraction module 300 extracts the inner boundaries of the cones according to the multiple groups. The fitting and verification module 400 performs boundary fitting verification on the extracted inner boundaries of the cones.
[0094] It should be noted that the above-mentioned road cone connection line extraction method and device provided by the above embodiments belong to the same concept. The specific ways in which each module performs operations have been described in detail in the method embodiments, and will not be repeated here. In practical applications, the road cone connection line extraction device provided by the above embodiments can, according to needs, allocate the above functions to different functional modules, that is, divide the internal structure of the device into different functional modules to complete all or part of the functions described above. This is not limited here either.
[0095] The embodiments of the present application also provide an electronic device, including: one or more processors; a storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the electronic device realizes the model testing method provided in each of the above embodiments.
[0096] Figure 10 shows a schematic structural diagram of a computer system of an electronic device suitable for implementing the embodiments of the present application. It should be noted that Figure 10 the computer system 1000 of the electronic device shown is only an example and should not bring any limitations to the functions and usage scope of the embodiments of the present application.
[0097] Such as Figure 10As shown, the computer system 1000 includes a Central Processing Unit (CPU) 1001, which can perform various appropriate actions and processes according to the program stored in the Read-Only Memory (ROM) 1002 or the program loaded from the storage section 1008 into the Random Access Memory (RAM) 1003, such as executing the method described in the above embodiments. In the RAM 1003, various programs and data required for system operation are also stored. The CPU 1001, ROM 1002, and RAM 1003 are connected to each other via a bus 1004. An Input / Output (I / O) interface 1005 is also connected to the bus 1004.
[0098] The following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including, for example, a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), etc. and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed so that a computer program read from it can be installed into the storage section 1008 as needed.
[0099] Specifically, according to the embodiments of the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments of the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication section 1009, and / or installed from the removable medium 1011. When the computer program is executed by the Central Processing Unit (CPU) 1001, various functions defined in the system of the present application are executed.
[0100] It should be noted that the computer-readable medium shown in the embodiments of the present application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable computer program. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted by any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0101] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. Among them, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the above module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order from that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0102] The units involved in the embodiments described in this application can be implemented in software or in hardware, and the described units can also be provided in a processor. Among them, the names of these units do not, in some cases, constitute a limitation on the units themselves.
[0103] On the other hand, this application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor of the computer, the computer is caused to execute the model testing method as described above. The computer-readable storage medium may be included in the electronic device described in the above embodiments, or may exist alone without being assembled into the electronic device.
[0104] In the method for extracting the connection lines of road cones proposed by the present invention, the cone grouping is clustered based on the principle of linear fitting error and the principle of the largest number of matches, and is obtained through multiple iterative optimizations, which can achieve accurate clustering of the boundaries of the cone connection lines and accurate boundary extraction. In the present invention, the extracted results are inspected and filtered, which improves the detection accuracy of the drivable boundaries of the road, reduces the false detection rate, and provides a basis for subsequent lane line output, drivable area calculation, and vehicle motion control decision-making.
[0105] The above embodiments are only used to exemplarily illustrate the principles and effects of the present invention, rather than to limit the present invention. Any person familiar with this technology can modify or change the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or changes made by those with ordinary knowledge in the technical field without departing from the spirit and technical idea disclosed by the present invention should still be covered by the claims of the present invention.
Claims
1. A method for extracting the connection line of road cones, characterized in that, comprising: Obtaining the coordinate data of the cones, where the coordinate data of the cones is obtained by the sensing module to obtain the position information of the cones relative to the vehicle, and converting the position information into VCS coordinates through camera parameters; Clustering all the cones according to the coordinate data of the cones, and obtaining multiple groups; the multiple groups are clustered based on the principle of straight line fitting error and the principle of the largest number of matches, and are obtained through multiple iterative optimizations; Extracting the inner boundary of the cones according to the multiple groups; Conducting boundary fitting inspection on the extracted inner boundary of the cones; Among them, the multiple groups are clustered based on the principle of straight line fitting error and the principle of the largest number of matches, and are obtained through multiple iterative optimizations, including: S21. Arrange all the cones from near to far according to the distance from the coordinates of all the cones to the origin of the VCS coordinates; S22. Taking the cone closest to the origin of the VCS coordinates of the cone as the starting point and the adjacent subsequent cone as the end point, construct an initial fitting line; S23. Calculate the lateral distance error of the coordinates of the subsequent adjacent cones with respect to the current fitting line, and judge whether the current cone belongs to the current group according to the lateral distance error; if it belongs to the current group, add it to the current group and update the fitting line; S24. Repeat step S23 until all the remaining subsequent cones are traversed to complete the current clustering grouping; S25. Then, taking other cones as the starting point and the adjacent subsequent cones as the end point in turn, construct an initial fitting line; and repeat steps S23 to S24 until all the cones are traversed to obtain multiple groups; S26. Compare the number of cones in each group, and retain the group with the largest number of matching cones as the final grouping result of this round; S27. Taking the relatively close ungrouped cones as the starting point and the subsequent ungrouped cones as the end point in turn to construct an initial fitting line, and repeat steps S23 to S26 until all the cones are grouped, so as to complete the entire clustering grouping and obtain multiple groups.
2. The method for extracting the connection line of road cones according to claim 1, characterized in that, Calculating the lateral distance error of the coordinates of the subsequent adjacent cones with respect to the current fitting line, and judging whether the current cone belongs to the current group according to the lateral distance error includes: Judging whether the lateral distance error is less than a set threshold. If it is less than the set threshold, it is judged that the current cone belongs to the current group; if it is greater than or equal to the set threshold, it is judged that the current cone does not belong to the current group.
3. The method for extracting the connection line of road cones according to claim 1, characterized in that, Extracting the inner boundary of the cones according to the multiple groups includes: Conducting filtering processing on the multiple groups to obtain multiple standby groups; Calculating the lateral average distance of each standby group from the origin of the VCS coordinates; Dividing the multiple standby groups into a left group and a right group according to the positive and negative of the lateral average distance; Circularly comparing and filtering all the groups in the left group pairwise to obtain the left boundary group; circularly comparing and filtering all the groups in the right group pairwise to obtain the right boundary group.
4. The method for extracting the connection line of road cone barrels according to claim 3, characterized in that, circularly comparing and filtering all pairs of groups within the left group to obtain the left boundary group; circularly comparing and filtering all pairs of groups within the right group to obtain the right boundary group, including: comparing all pairs of groups within the corresponding side group, and judging whether there is an overlap between the two groups in the vehicle forward direction. If there is an overlap, delete the group with a larger absolute value of the lateral average distance from the VCS coordinate origin; if there is no overlap, delete the group with a farther starting point distance from the origin; repeat this step until only one group remains in the boundary group, and output this group of cone barrels as the boundary group.
5. The method for extracting the connection line of road cone barrels according to claim 4, characterized in that, Determining whether there is an overlap between two groups in the vehicle body's forward direction includes: If the starting vertical coordinate of one group and the ending vertical coordinate and the starting vertical coordinate of the other group and the ending vertical coordinate meet ; or meet , it is determined that there is an overlap between the two groups in the vehicle body's traveling direction.
6. The method for extracting the connection line of road cone barrels according to claim 3, characterized in that, performing boundary fitting inspection on the inner boundary of the extracted cone barrels includes: respectively fitting the obtained left boundary group and right boundary group; dividing all cone barrels into two sets, left and right, according to the positive and negative of the horizontal coordinates, and respectively calculating the proportion of the number of cone barrels in the left boundary group and the right boundary group to the number of all cone barrels in the corresponding side set; if the proportion is less than the set threshold, determine that the current fitting result is unreliable and remove the current boundary; if it is greater than or equal to the set threshold, determine that the current fitting result is reliable and retain the current boundary group.
7. A device for extracting the connection line of road cone barrels, characterized in that, comprising: a cone barrel coordinate acquisition module for acquiring the coordinate data of the cone barrels, where the coordinate data of the cone barrels is obtained by the sensing module acquiring the position information of the cone barrels relative to the vehicle and converting the position information into VCS coordinates through camera parameters; a clustering and grouping module for clustering all cone barrels according to the coordinate data of the cone barrels and obtaining multiple groups; the multiple groups are clustered based on the principle of linear fitting error and the principle of the largest number of matches, and are obtained through multiple iterations of optimization; a boundary extraction module for extracting the inner boundary of the cone barrels according to the multiple groups; a fitting inspection module for performing boundary fitting inspection on the inner boundary of the extracted cone barrels; wherein, the multiple groups are clustered based on the principle of linear fitting error and the principle of the largest number of matches, and are obtained through multiple iterations of optimization, including: S21. Arranging all cone barrels from near to far according to the distance from all cone barrel coordinates to the VCS coordinate origin; S22. Taking the cone barrel closest to the VCS coordinate origin of the cone barrel as the starting point and the adjacent subsequent cone barrel as the end point to construct an initial fitting line; S23. Calculating the lateral distance error of the subsequent adjacent cone barrel coordinates with respect to the current fitting line, and judging whether the current cone barrel belongs to the current group according to the lateral distance error; if it belongs to the current group, add it to the current group and update the fitting line; S24. Repeating step S23 until all the remaining subsequent cone barrels are traversed to complete the current clustering and grouping. S25. Then, taking other cones as starting points and adjacent subsequent cones as ending points in sequence, construct initial fitting lines; and repeat steps S23 to S24 until all cones are traversed to obtain multiple groups. S26. Compare the number of cones in each group, and retain the group with the largest number of matching cones as the final grouping result for this round. S27. Taking the relatively close ungrouped cones as starting points and subsequent ungrouped cones as ending points in sequence to construct initial fitting lines, and repeat steps S23 to S26 until all cones are grouped, thereby completing the entire clustering grouping and obtaining multiple groups.
8. An electronic device characterized in that the electronic device includes: one or more processors; a storage device for storing one or more programs, which when executed by the one or more processors, cause the electronic device to implement the road cone connection extraction method according to any one of claims 1 to 6.
9. A computer-readable storage medium characterized in that a computer program is stored thereon, which when executed by a processor of a computer, causes the computer to execute the road cone connection extraction method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Direct network routing method and system including cross-dimensional links
CN107094116A
Lane marking grouping method based on adaptive K-Means
CN107273935A