A fitting curve determination method and device, electronic equipment and storage medium
By constructing and adjusting the degree-of-freedom parameters of the fitted curve, the problem of curve fitting being unsuitable in existing technologies is solved, and smooth and accurate curve connection is achieved in scenarios where the endpoints are necessary points, thereby improving the fitting accuracy.
Patent Information
- Application Number
- CN202211186545.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-27
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2042-09-27
AI Technical Summary
Existing curve fitting methods for 3D point cloud data are not suitable for scenarios where two adjacent lines must pass through the same adjacent point, and the fitted curves are coarse.
By acquiring the endpoint data of the point clusters of the line segments to be connected, candidate fitting curves are constructed. Based on the preset degree of freedom parameters and the direction vector and distance data of the endpoint group, the degree of freedom parameters are adjusted until the preset termination conditions are met, and the target fitting curve is determined.
It achieves smooth and accurate connection of fitted curves in scenarios where endpoints are mandatory points, improving the accuracy and consistency of curve fitting.
Smart Images

Figure CN115577514B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent driving, and in particular to a fitting curve determination method and device, electronic equipment and a storage medium. BACKGROUND
[0002] In recent years, with the rapid development of intelligent driving technology, three-dimensional point cloud data that is rich, high-precision and can reflect the real scene can be provided for high-precision map production and updating through sensors such as laser radars, thereby promoting the rapid development of high-precision map production and updating.
[0003] However, the expression mode of three-dimensional point cloud data has poor topological properties and has much redundant data. In this regard, a multi-point fitting curve mode can be used to reduce the degree of redundancy of point cloud data and accurately describe the geometric structure of the object surface. The existing linear fitting of three-dimensional points mainly ignores the z coordinate of the three-dimensional points, and only fits the (x, y) coordinates of the three-dimensional points, which is not suitable for a scenario in which two adjacent lines must pass through the same adjacent point, and the fitted curve is rough. SUMMARY
[0004] In order to solve the problems that the existing curve fitting method is not suitable for a scenario in which two adjacent lines must pass through the same adjacent point and the fitted curve is rough, the present application provides a fitting curve determination method, device, electronic equipment and storage medium:
[0005] According to a first aspect of the present application, a fitting curve determination method is provided, comprising:
[0006] obtaining terminal point data of a terminal point in a first to-be-connected line segment point cluster and starting point data of a starting point in a second to-be-connected line segment point cluster, determining a direction vector of an end point group based on the terminal point data and the starting point data, the end point group comprising the terminal point and the starting point, and the first to-be-connected line segment point cluster being point cloud data of a road collected by a radar;
[0007] obtaining labeled position data of each point in a to-be-fitted line segment point cluster and distance data of each point from the terminal point; the to-be-fitted line segment point cluster is located between the first to-be-connected line segment point cluster and the second to-be-connected line segment point cluster, and the to-be-fitted line segment point cluster comprises the end point group;
[0008] based on a preset degree of freedom parameter, the labeled position data of the end point group, the direction vector of the end point group and the distance data of the end point group, constructing a candidate fitting curve;
[0009] based on the candidate fitting curve and the distance data of each point, determining predicted position data of each point, adjusting the preset degree of freedom parameter according to the error between the labeled position data and the predicted position data of each point, until a preset end condition is met to end the adjustment, and obtaining a target degree of freedom parameter;
[0010] determine a target fitting curve of the to-be-fitted line segment point cluster based on the target degree-of-freedom parameter; the target fitting curve is used to connect the first to-be-connected line segment point cluster and the second to-be-connected line segment point cluster.
[0011] According to a second aspect of the present application, a fitting curve determination apparatus is provided, comprising:
[0012] The first obtaining module is configured to obtain end point data of an end point in the first to-be-connected line segment point cluster and start point data of a start point in the second to-be-connected line segment point cluster, and determine a direction vector of an end point group based on the end point data and the start point data, the end point group comprising the end point and the start point;
[0013] The second obtaining module is configured to obtain label position data of each point in the to-be-fitted line segment point cluster and distance data of each point from the end point; the to-be-fitted line segment point cluster is located between the first to-be-connected line segment point cluster and the second to-be-connected line segment point cluster, the to-be-fitted line segment point cluster comprising the end point group, and the first to-be-connected line segment point cluster being point cloud data of a road collected by a radar;
[0014] The constructing module is configured to construct a candidate fitting curve based on a preset degree-of-freedom parameter, the label position data of the end point group, the direction vector of the end point group, and the distance data of the end point group;
[0015] The adjusting module is configured to determine predicted position data of each point based on the candidate fitting curve and the distance data of each point, adjust the preset degree-of-freedom parameter according to an error between the label position data and the predicted position data of each point, and end the adjustment until a preset ending condition is met, to obtain a target degree-of-freedom parameter;
[0016] The determining module is configured to determine a target fitting curve of the to-be-fitted line segment point cluster based on the target degree-of-freedom parameter; the target fitting curve is used to connect the first to-be-connected line segment point cluster and the second to-be-connected line segment point cluster.
[0017] In another aspect, the adjusting module is configured to determine difference data between the label position data and the predicted position data of each point;
[0018] The preset degree-of-freedom parameter is adjusted according to a sum of squares of the difference data of the plurality of points, and the adjustment is ended until a preset ending condition is met, to obtain a target degree-of-freedom parameter.
[0019] In another aspect, the constructing module comprises:
[0020] The processing submodule is configured to take a parameterized cubic polynomial as a curve fitting model, and perform partial derivation on the curve fitting model to obtain a curve direction fitting model; an independent variable of the curve fitting model is distance data of a point in the to-be-fitted line segment point cluster from the end point;
[0021] The first determining sub-module is configured to determine a first parameter expression of the curve fitting model based on the annotated position data of the endpoint group and the distance data of the endpoint group.
[0022] The adjusting sub-module is configured to adjust the direction vector of the endpoint group based on a preset degree of freedom parameter to obtain an adjusted direction vector of the endpoint group.
[0023] The second determining sub-module is configured to determine a second parameter expression of the curve fitting model based on the adjusted direction vector of the endpoint group and the distance data of the endpoint group.
[0024] The third determining sub-module is configured to determine a plurality of parameters of the candidate fitting curve based on the first parameter expression and the second parameter expression to obtain the candidate fitting curve.
[0025] In another aspect, the first determining sub-module is configured to substitute the annotated position data of the terminal point in the endpoint group and the distance data of the terminal point into the curve fitting model to obtain a first parameter sub-expression of the curve fitting model.
[0026] The annotated position data of the starting point in the endpoint group and the distance data of the starting point are substituted into the curve fitting model to obtain a second parameter sub-expression of the curve fitting model.
[0027] The first parameter sub-expression and the second parameter sub-expression are integrated to obtain the first parameter expression of the curve fitting model.
[0028] In another aspect, the preset degree of freedom parameter includes a first preset degree of freedom parameter and a second preset degree of freedom parameter, and the direction vectors of the endpoint group are unit vectors.
[0029] The adjusting sub-module is configured to adjust the direction vector of the terminal point in the endpoint group based on the first preset degree of freedom parameter to obtain a first adjusted direction vector of the terminal point.
[0030] The direction vector of the starting point in the endpoint group is adjusted based on the second preset degree of freedom parameter to obtain a second adjusted direction vector of the starting point.
[0031] The first adjusted direction vector and the second adjusted direction vector are integrated to obtain the adjusted direction vector of the endpoint group.
[0032] In another aspect, the second determining sub-module is configured to substitute the first adjusted direction vector and the distance data of the terminal point into the curve direction model to obtain a third parameter sub-expression of the curve fitting model.
[0033] The second adjusted direction vector and the distance data of the starting point are substituted into the curve direction model to obtain a fourth parameter sub-expression of the curve fitting model.
[0034] The third parameter sub-expression and the fourth parameter sub-expression are integrated to obtain a second parameter expression of the curve fitting model.
[0035] According to a third aspect of the present application, an electronic device is provided, which includes a processor and a memory, and the memory stores at least one instruction or at least one program, which is loaded and executed by the processor to implement the curve fitting determination method of the first aspect of the present application.
[0036] According to a fourth aspect of the present application, a computer storage medium is provided, which stores at least one instruction or at least one program, which is loaded and executed by the processor to implement the curve fitting determination method of the first aspect of the present application.
[0037] According to a fifth aspect of the present application, a computer program product is provided, which includes at least one instruction or at least one program, which is loaded and executed by the processor to implement the curve fitting determination method of the first aspect of the present application.
[0038] The curve fitting determination method, device, electronic device and storage medium provided by the embodiments of the present application have the following technical effects:
[0039] By obtaining end point data of an end point in a first to-be-connected line segment point cluster and start point data of a start point in a second to-be-connected line segment point cluster, a direction vector of an end point group is determined based on the end point data and the start point data, the end point group includes the end point and the start point, and the first to-be-connected line segment point cluster is point cloud data of a road collected by a radar; label position data of each point in a to-be-fitted line segment point cluster and distance data of each point from the end point are obtained; the to-be-fitted line segment point cluster is located between the first to-be-connected line segment point cluster and the second to-be-connected line segment point cluster, and the to-be-fitted line segment point cluster includes the end point group; based on a preset degree of freedom parameter, the label position data of the end point group, the direction vector of the end point group and the distance data of the end point group, a candidate fitting curve is constructed; based on the candidate fitting curve and the distance data of each point, prediction position data of each point is determined, the preset degree of freedom parameter is adjusted according to an error between the label position data and the prediction position data of each point, and the adjustment is ended until a preset ending condition is met, to obtain a target degree of freedom parameter; based on the target degree of freedom parameter, a target fitting curve of the to-be-fitted line segment point cluster is determined; and the target fitting curve is used to connect the first to-be-connected line segment point cluster and the second to-be-connected line segment point cluster. According to the embodiments of the present application, for a scene in which an end point is a must-pass point, curve fitting is performed by using the constraint of the end point direction vector and the position of each point in the to-be-fitted line segment point cluster and the adjustment of the degree of freedom parameter, so that the fitting curve can fit the to-be-fitted line segment point cluster, and the connection can be smooth and accurate. BRIEF DESCRIPTION OF DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, and the advantages thereof, the following will briefly introduce the drawings needed in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 is a schematic diagram of an application environment provided by an embodiment of the present application;
[0042] Figure 2 is a flowchart of a fitting curve determination method provided by an embodiment of the present application;
[0043] Figure 3 is a scene diagram of a fitting curve provided by an embodiment of the present application;
[0044] Figure 4 is another scene diagram of a fitting curve provided by an embodiment of the present application;
[0045] Figure 5 is a target fitting curve diagram of a point cluster of a line segment to be fitted provided by an embodiment of the present application;
[0046] Figure 6 is a structural diagram of another fitting curve determination device provided by an embodiment of the present application
[0047] Figure 7 is a hardware structure diagram of an electronic device for implementing the fitting curve determination method provided by an embodiment of the present application. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solutions and advantages of the present application clearer, the following will further describe the embodiments of the present application in combination with the drawings. Obviously, the described embodiments are only one of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort belong to the scope of protection of the present application.
[0049] The term “embodiment” as used herein refers to a specific feature, structure, or characteristic that can be included in at least one implementation of the present application. In the description of the embodiments of the present application, it should be understood that the terms “first”, “second”, and “third” and the like are merely used to describe purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with “first”, “second”, and “third” and the like can be explicitly or implicitly included one or more of the features. Moreover, the terms “first”, “second”, and “third” and the like are used to distinguish similar objects, and do not necessarily be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms “include”, “have” and “be” and any variations thereof are intended to cover non-exclusive inclusion.
[0050] It can be understood that in the specific embodiments of the present application, related data such as position data and direction vectors are involved, and when the above embodiments of the present application are applied to specific products or technologies, the user's permission or consent is required, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0051] The embodiments of the present application can be applied to various scenarios, including but not limited to intelligent traffic systems, intelligent vehicle-road cooperative systems, etc.
[0052] Among them, the intelligent traffic system (Intelligent Traffic System, ITS) is also called intelligent transportation system (Intelligent Transportation System), which is to effectively integrate advanced science and technology (information technology, computer technology, data communication technology, sensor technology, electronic control technology, automatic control theory, operations research, artificial intelligence, etc.) in transportation, service control and vehicle manufacturing, and strengthen the connection between vehicles, roads and users, so as to form a comprehensive transportation system that ensures safety, improves efficiency, improves environment and saves energy.
[0053] Intelligent Vehicle Infrastructure Cooperative Systems (IVICS), referred to as vehicle infrastructure cooperative systems, is a development direction of intelligent transportation systems (ITS). The vehicle infrastructure cooperative system is to use advanced wireless communication and new generation Internet technologies to implement dynamic real-time information interaction between vehicles and roads in all directions, and to carry out vehicle active safety control and road cooperative management on the basis of full-time and space dynamic traffic information collection and fusion, fully realize the effective cooperation of man, vehicle and road, ensure traffic safety and improve traffic efficiency, so as to form a safe, efficient and environmentally friendly road traffic system.
[0054] Please refer to Figure 1 , Figure 1 is a schematic diagram of an application environment provided by an embodiment of the present application, which can include a radar 10 and a server 20. The radar 10 and the server 20 can be directly or indirectly connected through wired or wireless communication.
[0055] In some possible embodiments, the radar 10 can send point cloud data to the server 20, and the server can provide a service of determining a fitting curve. The server finds the first and last two points in the point cluster of the to-be-fitted line segment of the point cloud data as the necessary end points, then substitutes all the remaining points into the curve fitting model, constructs a least squares residual model, and iteratively optimizes the degrees of freedom coefficients of the curve fitting model several times to make the residual below a threshold value, and obtains the optimal curve fitting effect.
[0056] The terminal 10 can be a sensor such as a laser radar. The server 20 can be an independent physical server, a service cluster or a distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud service, cloud database, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, content delivery network (CDN), and big data and artificial intelligence platform. Among them, the server can include a network communication unit, a processor, a memory and the like.
[0057] In some possible embodiments, the radar 10 and the server 20 can be node devices in a blockchain system, capable of sharing the acquired and generated information to other node devices in the blockchain system, realizing information sharing between multiple node devices. The multiple node devices in the blockchain system can be configured with the same blockchain, which is composed of multiple blocks, and the adjacent blocks have an association relationship, so that when the data in any block is tampered with, it can be detected through the next block, thereby avoiding the data in the blockchain being tampered with, and ensuring the security and reliability of the data in the blockchain.
[0058] The following introduces a specific embodiment of a curve fitting method provided in the present application, Figure 2 is a flowchart of a curve fitting method provided in an embodiment of the present application. The present specification provides method operation steps as shown in the embodiments or flowcharts, but more or fewer operation steps can be included based on conventional or non-inventive labor. The order of steps listed in the embodiments is only one of many execution orders, and does not represent the only execution order. In actual execution, the method order shown in the embodiments or the drawings can be executed in sequence or in parallel (for example, in a parallel processor or multi-thread processing environment).
[0059] Specifically as Figure 2 shown, the curve fitting method can include:
[0060] S201: Obtain end point data of an end point in a first to-be-connected line segment point cluster and start point data of a start point in a second to-be-connected line segment point cluster, and determine a direction vector of an end point group based on the end point data and the start point data.
[0061] In an embodiment of the present application, the end point group can include an end point of the first to-be-connected line segment point cluster and a start point of the second to-be-connected line segment point cluster, and the first to-be-connected line segment point cluster and the second to-be-connected line segment point cluster can be point cloud data of a road collected by a radar. Figure 3 is a scene diagram of a curve fitting method provided in an embodiment of the present application. The units of the coordinates and distances of the point cloud data involved can be meters. Three-dimensional points P1(x1, y1, z1) and P2(x2, y2, z2) correspond to planar points A(x1, y1) and B(x2, y2), respectively. The curve in front of the planar point A is L1, and the curve behind the planar point B is L2. In actual applications, L1 can be a curve corresponding to the first to-be-connected line segment point cluster, and L2 can be a curve corresponding to the second to-be-connected line segment point cluster. Since the adjacency topological relationship of the points in the point cloud data of the road collected by the radar corresponds to the storage order, the first and last points in the storage can be selected as the necessary end points for curve fitting. For example, point A can be taken as the end point of the first to-be-connected line segment point cluster, and point B can be taken as the start point of the second to-be-connected line segment point cluster. According to the direction requirement of the front and rear adjacent lines, the direction vector of point A can be V1(x3, y3), and the direction vector of point B can be V2(x4, y4), where V1 and V2 can be unit vectors.
[0062] S203: Obtain labeled position data of each point in the to-be-fitted line segment point cluster and distance data of each point from the end point.
[0063] In this embodiment of the application, the cluster of line segments to be fitted can be located between the first cluster of line segments to be connected and the second cluster of line segments to be connected. The cluster of line segments to be fitted can include an endpoint group, that is, the cluster of line segments to be fitted can include the end point of the first cluster of line segments to be connected and the start point of the second cluster of line segments to be connected. Figure 3 As shown, points A, B, and the points in between can form a sequence point set P, which is the cluster of points on the line segment to be fitted. Simultaneously, the labeled position data p of each point in the sequence point set can be obtained. n (x n ,y n ), and the distance data t between each point and the endpoint in the first cluster of points of the line segment to be connected. n In the first cluster of points to be connected, the distance between the endpoint and the endpoint is 0, and the distance between the starting point and the endpoint in the second cluster of points to be connected is... Distance data t between each point and the endpoint n ∈[0,T].
[0064] S205: Construct candidate fitting curves based on preset degree-of-freedom parameters, labeled position data of endpoint groups, direction vectors of endpoint groups, and distance data of endpoint groups.
[0065] Figure 4 This is a schematic diagram of another scenario for fitting a curve provided in this application embodiment. In this scenario, one x-coordinate corresponds to multiple y-coordinates, and a typical curve fitting model cannot be adapted to this scenario. Therefore, a parameterized cubic polynomial can be used as the curve fitting model, and a partial derivative can be performed on this curve fitting model to obtain a curve direction fitting model. The independent variable of the curve fitting model is the distance data between the midpoint and the endpoint of the cluster of points on the line segment to be fitted. Specifically, equation (1) can be used as the curve fitting model, and a first partial derivative can be performed on it to obtain the curve direction fitting model shown in equation (2):
[0066]
[0067]
[0068] Among them, A1, B1, C1, D1, A2, B2, C2, and D2 can represent the parameters of the curve fitting model.
[0069] Then, based on the annotated position data of the endpoint group and the distance data of the endpoint group, a first parameter expression of the curve fitting model can be determined. Based on a preset degree of freedom parameter, the direction vector of the endpoint group is adjusted to obtain an adjusted direction vector of the endpoint group. Meanwhile, based on the adjusted direction vector of the endpoint group and the distance data of the endpoint group, a second parameter expression of the curve fitting model can be determined. Then, based on the first parameter expression and the second parameter expression, a plurality of parameters of the candidate fitting curve can be determined to obtain the candidate fitting curve. By using the parameterized cubic polynomial, on the one hand, the curve fitting of a sufficient number of sequence points can be met, and on the other hand, the problem of one x coordinate corresponding to multiple y coordinates can be solved.
[0070] In some possible implementation manners, based on Figure 3 As shown in the scenario, the points in the point cluster to be fitted need to be fitted by using the curve fitting model, therefore, the fitting curve must pass through the point A (x1, y1) and the point B (x2, y2), and the forward directions at the point A and the point B are V1 (x3, y3) and V2 (x4, y4) respectively. Specifically, the annotated position data of the terminal in the endpoint group and the distance data of the terminal are substituted into the curve fitting model to obtain a first parameter sub-expression of the curve fitting model, as formula (3). And the annotated position data of the starting point in the endpoint group and the distance data of the starting point are substituted into the curve fitting model to obtain a second parameter sub-expression of the curve fitting model, as formula (4). Then, the first parameter sub-expression and the second parameter sub-expression are integrated to obtain a first parameter expression of the curve fitting model.
[0071]
[0072]
[0073] Since the direction vector V1 of the point A and the direction vector V2 of the point B are both unit vectors, as formula (5), in order to improve the fitting generalization ability of the fitting curve, a degree of freedom parameter can be preset to change the length of the direction vector at the point A and the point B.
[0074] In some possible implementation manners, the preset degree of freedom parameter can include a first preset degree of freedom parameter Dr1 and a second preset degree of freedom parameter Dr2, where the first preset degree of freedom parameter Dr1>0, the second preset degree of freedom parameter Dr2>0, and Dr1 and Dr2 can both be unknown numbers. In the implementation process, based on the first preset degree of freedom parameter, the direction vector of the terminal in the endpoint group is adjusted to obtain a first adjusted direction vector of the terminal, and based on the second preset degree of freedom parameter, the direction vector of the starting point in the endpoint group is adjusted to obtain a second adjusted direction vector of the starting point, and then the first adjusted direction vector and the second adjusted direction vector can be integrated to obtain an adjusted direction vector of the endpoint group, as formula (6).
[0075] In some possible implementation manners, after the adjustment direction vectors of the end point group, i.e., the first adjustment direction vector and the second adjustment direction vector, are obtained, the first adjustment direction vector and the distance data of the end point in the first to-be-fitted line segment point cluster can be substituted into the curve direction model to obtain a third parameter sub-expression of the curve fitting model, as formula (7). The second adjustment direction and the distance data of the start point in the second to-be-fitted line segment point cluster can be substituted into the curve direction model to obtain a fourth parameter sub-expression of the curve fitting model, as formula (8). Then, the third parameter sub-expression and the fourth parameter sub-expression can be integrated to obtain a second parameter expression of the curve fitting model.
[0076]
[0077]
[0078]
[0079]
[0080] After the first parameter expression and the second parameter expression, i.e., formulas (3), (4), (7), and (8), are obtained, the specific values or algebraic expressions of the plurality of parameters of the candidate fitting curve can be determined, as formulas (3), (7), (9), and (10).
[0081]
[0082]
[0083] S207: Based on the candidate fitting curve and the distance data of each point, predicted position data of each point is determined, a preset degree of freedom parameter is adjusted according to an error between the labeled position data and the predicted position data of each point, until a preset ending condition is met to end the adjustment, and a target degree of freedom parameter is obtained.
[0084] In the embodiment of the present application, after the specific values or algebraic expressions of the plurality of parameters of the candidate fitting curve are determined, the distance data t n of each point n in the to-be-fitted line segment point cluster and the end point in the first to-be-connected line segment point cluster can be substituted into the candidate fitting curve to determine the predicted position data p n ’(x n ’,y n ’ of each point in the to-be-fitted line segment point cluster, as formula (11). Then, the difference data loss n, and the preset degree-of-freedom parameter can be adjusted according to the square sum of the difference value data of the plurality of points until a preset ending condition is met to end the adjustment, and the target degree-of-freedom parameter is obtained.
[0085]
[0086] loss n = Δx n 2 + Δy n 2 = (x n - x n ' 2 + (y n - y n ' 2 (12)
[0087] In some possible embodiments, since the first preset degree-of-freedom parameter Dr1 and the second preset degree-of-freedom parameter Dr2 are unknown, B1, C1, D1, B2, C2, and D2 are indefinite values, and the predicted position data of each point in the to-be-fitted line segment point cluster is also an indefinite value. Therefore, the first preset degree-of-freedom parameter Dr1 and the second preset degree-of-freedom parameter Dr2 can be taken as iterative elements, and the least square method can be used for iterative optimization. Specifically, the sum loss all of the difference value data corresponding to the points other than the end point groups in the to-be-fitted line segment point cluster is determined, as shown in formula (13), to perform iterative optimization on the iterative elements Dr1 and Dr2, and when loss all is less than a preset threshold or a preset number of iterations is reached, the iteration is stopped, and the final determined values of the iterative elements Dr1 and Dr2, that is, the target degree-of-freedom parameters, are obtained.
[0088] loss all = loss1+ loss2+...+ loss n (13)
[0089] S209: determining a target fitting curve of the to-be-fitted line segment point cluster based on the target degree-of-freedom parameter; the target fitting curve is used to connect the first to-be-connected line segment point cluster and the second to-be-connected line segment point cluster.
[0090] In the embodiments of the present application, after the target degree-of-freedom parameter is obtained, the specific values of A1, B1, C1, D1, A2, B2, C2, and D2 can be obtained according to formulas (3), (7), (9), and (10), and the target fitting curve corresponding to the to-be-fitted line segment point cluster can be obtained based on formula (1). Figure 5 is a schematic diagram of a target fitting curve of a to-be-fitted line segment point cluster provided by the embodiments of the present application.
[0091] The method for determining a fitting curve provided in the embodiments of the present application can be used for the scenario in which an end point is a must-pass point, and can perform curve fitting by using the constraint of the end point direction vector and the position of each point in the point cluster of the line segment to be fitted and adjusting the degree of freedom parameter, so that the fitting curve can be fitted to the point cluster of the line segment to be fitted, and the connection can be smooth and accurate.
[0092] The text processing device provided in the embodiments of the present application, Figure 6 is a structural schematic diagram of a device for determining a fitting curve provided in the embodiments of the present application, as Figure 6 indicated, the device for determining a fitting curve can include:
[0093] The first acquisition module 601 is configured to acquire end point data of an end point in a first point cluster of a line segment to be connected and start point data of a start point in a second point cluster of a line segment to be connected, determine a direction vector of an end point group based on the end point data and the start point data, and the end point group includes the end point and the start point.
[0094] The second acquisition module 603 is configured to acquire labeled position data of each point in a point cluster of a line segment to be fitted and distance data of each point from the end point, and the point cluster of the line segment to be fitted is located between the first point cluster of the line segment to be connected and the second point cluster of the line segment to be connected, the point cluster of the line segment to be fitted includes the end point group, and the first point cluster of the line segment to be connected is point cloud data of a road collected by a radar.
[0095] The construction module 605 is configured to construct a candidate fitting curve based on a preset degree of freedom parameter, labeled position data of the end point group, the direction vector of the end point group, and distance data of the end point group.
[0096] The adjustment module 607 is configured to determine predicted position data of each point based on the candidate fitting curve and the distance data of each point, adjust the preset degree of freedom parameter according to an error between the labeled position data and the predicted position data of each point, and end the adjustment until a preset ending condition is met, to obtain a target degree of freedom parameter.
[0097] The determination module 609 is configured to determine a target fitting curve of the point cluster of the line segment to be fitted based on the target degree of freedom parameter, and the target fitting curve is used to connect the first point cluster of the line segment to be connected and the second point cluster of the line segment to be connected.
[0098] In some possible implementation manners, the adjustment module 607 is configured to determine difference value data of the labeled position data and the predicted position data of each point.
[0099] The preset degree of freedom parameter is adjusted according to a square sum of the difference value data of the plurality of points, and the adjustment is ended until the preset ending condition is met, to obtain the target degree of freedom parameter.
[0100] In some possible implementation manners, the construction module 605 includes:
[0101] The processing submodule is configured to fit a parameterized cubic polynomial as a curve fitting model, and perform partial derivation on the curve fitting model to obtain a curve direction fitting model; the independent variable of the curve fitting model is distance data of a point cluster in a line segment to be fitted.
[0102] The first determining submodule is configured to determine a first parameter expression of the curve fitting model based on the labeled position data of the endpoint group and the distance data of the endpoint group.
[0103] The adjusting submodule is configured to adjust a direction vector of the endpoint group based on a preset degree of freedom parameter to obtain an adjusted direction vector of the endpoint group.
[0104] The second determining submodule is configured to determine a second parameter expression of the curve fitting model based on the adjusted direction vector of the endpoint group and the distance data of the endpoint group.
[0105] The third determining submodule is configured to determine a plurality of parameters of the candidate fitting curve based on the first parameter expression and the second parameter expression to obtain the candidate fitting curve.
[0106] In some possible implementation manners, the first determining submodule is configured to substitute the labeled position data of the endpoint and the distance data of the endpoint in the endpoint group into the curve fitting model to obtain a first parameter sub-expression of the curve fitting model.
[0107] The labeled position data of the starting point and the distance data of the starting point in the endpoint group are substituted into the curve fitting model to obtain a second parameter sub-expression of the curve fitting model.
[0108] The first parameter sub-expression and the second parameter sub-expression are integrated to obtain the first parameter expression of the curve fitting model.
[0109] In some possible implementation manners, the preset degree of freedom parameter includes a first preset degree of freedom parameter and a second preset degree of freedom parameter, and the direction vectors of the endpoint group are unit vectors.
[0110] The adjusting submodule is configured to adjust the direction vector of the endpoint in the endpoint group based on the first preset degree of freedom parameter to obtain a first adjusted direction vector of the endpoint.
[0111] The direction vector of the starting point in the endpoint group is adjusted based on the second preset degree of freedom parameter to obtain a second adjusted direction vector of the starting point.
[0112] The first adjusted direction vector and the second adjusted direction vector are integrated to obtain the adjusted direction vector of the endpoint group.
[0113] In some possible implementation manners, the second determining submodule is configured to substitute the first adjusted direction vector and the distance data of the endpoint into the curve direction model to obtain a third parameter sub-expression of the curve fitting model.
[0114] The second adjustment direction vector and the distance data of the starting point are substituted into the curve direction model to obtain a fourth parameter sub-expression of the curve fitting model;
[0115] The third parameter sub-expression and the fourth parameter sub-expression are integrated to obtain a second parameter expression of the curve fitting model.
[0116] The device and the method embodiment in the application embodiment are based on the same application concept.
[0117] The application embodiment provides an electronic device, which comprises a processor and a memory, and the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the determination method of the fitting curve provided in the above method embodiment.
[0118] Figure 7 is a hardware structure schematic diagram of an electronic device for implementing the determination method of the fitting curve provided in the application embodiment, and the electronic device can participate in constituting or containing the determination device of the fitting curve provided in the application embodiment. As shown in Figure 7 , the electronic device can include one or more (in the figure, 701a, 701b are used to show) processors 701 (the processor 701 can include but is not limited to a microprocessor 701 MCU or a programmable logic device FPGA and other processing devices), a memory 703 for storing data, and a transmission device 705 for communication function. In addition, it can also include a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which can be included as one of the ports of the I / O interface), a network interface and / or a power supply. Those skilled in the art can understand that Figure 7 The structure shown is only schematic, which does not limit the structure of the above-mentioned electronic device. For example, the electronic device can also include more or fewer components than Figure 7 , or have a different configuration from Figure 7 .
[0119] It should be noted that the one or more processors 701 and / or other data processing circuits described above can be referred to as "data processing circuits" in the application. The data processing circuit can be embodied in whole or in part as software, hardware, firmware or any other combination. In addition, the data processing circuit can be a single independent processing module, or all or part of any one of the other elements combined into the electronic device (or mobile device). As referred to in the application embodiment, the data processing circuit serves as a processor 701 control (for example, the selection of the variable resistance terminal path connected with the interface).
[0120] The memory 703 can be used to store software programs of application software and modules, such as program instructions / data storage device corresponding to the fitting curve determination method in the embodiments of the present application, and the processor 701 implements the functions of each application and data processing, i.e., implements the fitting curve determination method described above, by running the software programs and modules stored in the memory 703. The memory 703 can include a high-speed random access memory, and can also include a non-volatile random access memory 703, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories 703. In some possible embodiments, the memory 703 can further include a memory 703 disposed remotely with respect to the processor, and these remote memories 703 can be connected to the electronic device through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0121] The transmission device 705 is configured to receive or send data via a network. Specific examples of the above-mentioned network can include a wireless network provided by a communication provider of the electronic device. In one example, the transmission device 705 includes a network interface controller (NIC) that can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 705 can be a radio frequency (RF) module configured to communicate with the Internet in a wireless manner.
[0122] The display can be, for example, a liquid crystal display (LCD) in the form of a touch screen, which can enable a user to interact with the user interface of the electronic device (or mobile device).
[0123] The embodiments of the present application provide a computer-readable storage medium, which can be arranged in an electronic device to save at least one instruction or at least one program for implementing the fitting curve determination method in the method embodiments. The at least one instruction or the at least one program is loaded and executed by the processor to implement the fitting curve determination method provided by the above-mentioned method embodiments.
[0124] Optionally, in the present embodiment, the above-mentioned storage medium can be located in at least one of a plurality of network servers of a computer network. Optionally, in the present embodiment, the above-mentioned storage medium can include but is not limited to a variety of media capable of storing program codes, such as a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0125] It should be noted that the above-mentioned order of the embodiments of the present application is only for description, and does not represent the advantages and disadvantages of the embodiments, and the above-mentioned description of the specification is for a specific embodiment, and other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be executed in different orders in different embodiments and can achieve the expected results. In addition, the processes depicted in the drawings do not necessarily require a specific order or connection order to achieve the desired results, and in some embodiments, multiple tasks can be processed in parallel or it can be advantageous.
[0126] Each of the embodiments in the specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the difference from other embodiments. Especially, for the embodiments of the device and the electronic equipment, since it is based on the similar method embodiment, the description is relatively simple, and the relevant part can be referred to the part of the method embodiment.
[0127] The above is the preferred embodiment of the present application, it should be noted that for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, which are considered to be within the scope of protection of the present application.
Claims
1. A method for determining a fitted curve, characterized in that, include: Obtain the endpoint data of the endpoint in the first cluster of line segments to be connected and the starting data of the starting point in the second cluster of line segments to be connected. Determine the direction vector of the endpoint group based on the endpoint data and the starting point data. The endpoint group includes the endpoint and the starting point. The first cluster of line segments to be connected is point cloud data of the road collected by radar. Obtain the labeled position data of each point in the cluster of line segments to be fitted and the distance data of each point to the endpoint; the cluster of line segments to be fitted is located between the first cluster of line segments to be connected and the second cluster of line segments to be connected, and the cluster of line segments to be fitted includes the endpoint group; Candidate fitting curves are constructed based on preset degree-of-freedom parameters, the labeled position data of the endpoint group, the direction vector of the endpoint group, and the distance data of the endpoint group; Based on the candidate fitting curve and the distance data of each point, the predicted position data of each point is determined. The preset degree of freedom parameters are adjusted according to the error between the labeled position data and the predicted position data of each point until the preset termination condition is met, and the adjustment ends to obtain the target degree of freedom parameters. The target fitting curve of the cluster of line segment points to be fitted is determined based on the target degree of freedom parameters. The target fitting curve is used to connect the first cluster of line segments to be connected and the second cluster of line segments to be connected. The process of constructing candidate fitting curves based on preset degree-of-freedom parameters, the labeled position data of the endpoint group, the direction vector of the endpoint group, and the distance data of the endpoint group includes: A parameterized cubic polynomial is used as a curve fitting model, and the curve fitting model is subjected to partial derivative processing to obtain a curve direction fitting model; the independent variable of the curve fitting model is the distance data between the midpoint of the cluster of points of the line segment to be fitted and the endpoint. Based on the labeled location data of the endpoint group and the distance data of the endpoint group, the first parameter expression of the curve fitting model is determined; The direction vector of the endpoint group is adjusted based on the preset degree-of-freedom parameters to obtain the adjustment direction vector of the endpoint group; Based on the adjustment direction vector of the endpoint group and the distance data of the endpoint group, the second parameter expression of the curve fitting model is determined; Based on the first parameter expression and the second parameter expression, multiple parameters of the candidate fitting curve are determined to obtain the candidate fitting curve.
2. The method according to claim 1, characterized in that, The step of adjusting the preset degree-of-freedom parameters based on the error between the labeled location data and the predicted location data for each point until a preset termination condition is met to end the adjustment, thereby obtaining the target degree-of-freedom parameters, includes: Determine the difference between the labeled location data and the predicted location data for each point; The preset degree-of-freedom parameters are adjusted based on the sum of squares of the difference data from multiple points until the preset termination condition is met, thereby obtaining the target degree-of-freedom parameters.
3. The method according to claim 1, characterized in that, The step of determining the first parameter expression of the curve fitting model based on the labeled position data and distance data of the endpoint group includes: Substitute the labeled position data of the endpoint and the distance data of the endpoint in the endpoint group into the curve fitting model to obtain the first parameter sub-expression of the curve fitting model; Substitute the labeled position data of the starting point and the distance data of the starting point in the endpoint group into the curve fitting model to obtain the second parameter sub-expression of the curve fitting model; The first parameter sub-expression and the second parameter sub-expression are integrated to obtain the first parameter expression of the curve fitting model.
4. The method according to claim 1, characterized in that, The preset degree-of-freedom parameters include a first preset degree-of-freedom parameter and a second preset degree-of-freedom parameter, and the direction vectors of the endpoint groups are all unit vectors; The step of adjusting the direction vector of the endpoint group based on the preset degree-of-freedom parameters to obtain the adjusted direction vector of the endpoint group includes: Based on the first preset degree of freedom parameter, the direction vector of the endpoint in the endpoint group is adjusted to obtain the first adjusted direction vector of the endpoint; Based on the second preset degree of freedom parameter, the direction vector of the starting point in the endpoint group is adjusted to obtain the second adjusted direction vector of the starting point; The first adjustment direction vector and the second adjustment direction vector are integrated to obtain the adjustment direction vector of the endpoint group.
5. The method according to claim 4, characterized in that, The determination of the second parameter expression of the curve fitting model based on the adjustment direction vector of the endpoint group and the distance data of the endpoint group includes: Substituting the distance data of the first adjustment direction vector and the endpoint into the curve direction model, the third parameter sub-expression of the curve fitting model is obtained; Substituting the distance data between the second adjustment direction vector and the starting point into the curve direction model, the fourth parameter sub-expression of the curve fitting model is obtained; The third parameter sub-expression and the fourth parameter sub-expression are integrated to obtain the second parameter expression of the curve fitting model.
6. A device for determining a fitted curve, characterized in that, include: The first acquisition module is used to acquire the endpoint data of the endpoint in the first cluster of line segments to be connected and the starting data of the starting point in the second cluster of line segments to be connected, and to determine the direction vector of the endpoint group based on the endpoint data and the starting point data, wherein the endpoint group includes the endpoint and the starting point; The second acquisition module is used to acquire the labeled position data of each point in the cluster of points of the line segment to be fitted, as well as the distance data between each point and the endpoint; The line segment point cluster to be fitted is located between the first line segment point cluster to be connected and the second line segment point cluster to be connected. The line segment point cluster to be fitted includes the endpoint group. The first line segment point cluster to be connected is the point cloud data of the road collected by radar. The construction module is used to construct candidate fitting curves based on preset degree-of-freedom parameters, the labeled position data of the endpoint group, the direction vector of the endpoint group, and the distance data of the endpoint group; The adjustment module is used to determine the predicted position data of each point based on the candidate fitting curve and the distance data of each point, and adjust the preset degree of freedom parameters according to the error between the labeled position data and the predicted position data of each point until the preset termination condition is met to end the adjustment and obtain the target degree of freedom parameters. The determination module is used to determine the target fitting curve of the cluster of line segment points to be fitted based on the target degree of freedom parameters; The target fitting curve is used to connect the first cluster of line segments to be connected and the second cluster of line segments to be connected. The building module includes: The processing submodule is used to take the parameterized cubic polynomial as the curve fitting model, and perform partial derivative processing on the curve fitting model to obtain the curve direction fitting model; the independent variable of the curve fitting model is the distance data between the midpoint of the cluster of points of the line segment to be fitted and the endpoint. The first determining submodule is used to determine the first parameter expression of the curve fitting model based on the labeled position data of the endpoint group and the distance data of the endpoint group; The adjustment submodule is used to adjust the direction vector of the endpoint group based on the preset degree-of-freedom parameters to obtain the adjustment direction vector of the endpoint group; The second determining submodule is used to determine the second parameter expression of the curve fitting model based on the adjustment direction vector of the endpoint group and the distance data of the endpoint group; The third determining submodule is used to determine multiple parameters of the candidate fitting curve based on the first parameter expression and the second parameter expression, thereby obtaining the candidate fitting curve.
7. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the method for determining the fitted curve as described in any one of claims 1-5.
8. A computer storage medium, characterized in that, The storage medium stores at least one instruction or at least one program, which is loaded and executed by a processor to implement the method for determining the fitting curve as described in any one of claims 1-5.
9. A computer program product, characterized in that, The computer program product includes at least one instruction or at least one program segment, which is loaded and executed by a processor to implement the method for determining the fitted curve as described in any one of claims 1-5.
Citation Information
Patent Citations
Unmanned road characteristic parameter estimation method
CN109635672A
Driving area detection method, device and equipment
CN114842450A