Ranging curve drawing method and vehicle

By converting the rectangular coordinate system to the polar coordinate system and using the coordinate parameters in the polar coordinate system to draw Bézier curves, the problem of high computational resource consumption in traditional distance measurement curve drawing methods is solved, achieving more efficient distance measurement curve display and better visual effects.

WO2026114391A1PCT designated stage Publication Date: 2026-06-04GREAT WALL MOTOR CO LTD

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
GREAT WALL MOTOR CO LTD
Filing Date
2025-11-28
Publication Date
2026-06-04

AI Technical Summary

Technical Problem

Traditional methods for drawing distance measurement curves consume a lot of computational resources, leading to a decrease in the overall performance of the vehicle and problems such as drawing delay and insufficient accuracy.

Method used

By converting the Cartesian coordinate system around the vehicle to a polar coordinate system, and using the coordinate parameters in the polar coordinate system to draw Bézier curves, the consumption of computing resources is reduced. A multi-terminal Bézier curve connection method is adopted to improve display accuracy and smoothness.

Benefits of technology

It reduces the computational resource consumption when drawing distance measurement curves, reduces latency, improves the display accuracy and smoothness of distance measurement curves, and enhances vehicle-side performance and real-time performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025138640_04062026_PF_FP_ABST
    Figure CN2025138640_04062026_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a ranging curve drawing method and a vehicle. The method comprises: acquiring ranging data collected by a vehicle ranging sensor; performing data processing on the ranging data to obtain a first coordinate point set of obstacles around a vehicle in a pre-constructed Cartesian coordinate system; converting each first coordinate point in the first coordinate point set from the Cartesian coordinate system to a polar coordinate system to obtain a second coordinate point set; on the basis of the second coordinate point set, determining curve parameters used for drawing a Bézier curve; and on the basis of the curve parameters, drawing a Bézier curve corresponding to the ranging data. That is, the curve parameters are directly determined by means of the coordinate values of the obstacles in the polar coordinate system, to control the drawing of the Bézier curve, thereby avoiding drawing of the Bézier curve by means of loop iteration in a conventional drawing process. The present application reduces the consumption of computing resources during Bézier curve drawing, and reduces the computational burden of a vehicle-side image processor and the number of drawing calls, thereby improving the vehicle-side performance.
Need to check novelty before this filing date? Find Prior Art

Description

Distance measurement curve drawing method and vehicle

[0001] This application claims priority to Chinese Patent Application No. 2024117397661, filed on November 29, 2024, entitled “Method and Vehicle for Drawing Distance Curves”, the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of data processing technology, and in particular to a method for drawing distance measurement curves and a vehicle. Background Technology

[0003] With the development of automotive electronics and intelligence, distance sensors have become an indispensable part of modern cars, such as radar sensors and infrared sensors. These sensors can continuously scan the environment around the vehicle, detect other vehicles, pedestrians, obstacles, etc., and provide real-time distance and speed information. To enable drivers to intuitively understand this information, the car's instrument system needs to convert distance data into a visualized distance curve. This information usually needs to be displayed graphically on screens such as the instrument panel, center console, and head-up display (HUD) so that users can quickly understand the environmental situation. However, traditional distance curves require a lot of computing resources to draw, leading to a decrease in overall vehicle performance. Summary of the Invention

[0004] In view of this, the purpose of this application is to propose a method and vehicle for drawing distance measurement curves, so as to solve the problem of high computational resource consumption in existing distance measurement curve drawing methods.

[0005] To achieve the above objectives, the first aspect of this application provides a method for drawing a distance measurement curve, comprising:

[0006] Acquire distance measurement data collected by the vehicle's distance measurement sensor;

[0007] Data processing is performed on the ranging data to obtain the first set of coordinate points of obstacles around the vehicle in a pre-constructed Cartesian coordinate system;

[0008] Transform each first coordinate point in the first coordinate point set from the rectangular coordinate system to the polar coordinate system to obtain the second coordinate point set;

[0009] The curve parameters used to draw the Bézier curve are determined based on the second set of coordinate points;

[0010] Draw the Bézier curve corresponding to the distance measurement data based on the curve parameters.

[0011] Optionally, each first coordinate point in the first set of coordinate points is transformed from the rectangular coordinate system to the polar coordinate system to obtain the second set of coordinate points, including:

[0012] For each drawing partition, a pre-constructed Cartesian coordinate system is transformed into a polar coordinate system with a first preset range of radians through coordinate transformation; wherein, the drawing partition is obtained by pre-dividing the area around the vehicle;

[0013] The total number of ranging sensors within the plotted area is counted, and a second preset range is determined based on the first preset range and the total number. The radian range of the polar coordinate system is then transformed into the second preset range.

[0014] Each first coordinate point in the first set of coordinate points is mapped from the rectangular coordinate system to the polar coordinate system with a second preset range of radians to obtain the second set of coordinate points.

[0015] Optionally, a second preset range is determined based on the first preset range and the total quantity, including:

[0016] The product of the first preset range and the total number is used as the third preset range;

[0017] The second preset range is obtained by quotienting the third preset range with the value of π.

[0018] Optionally, the curve parameters include a set of control points and auxiliary parameters; the curve parameters used to draw the Bézier curve are determined based on the second set of coordinate points, including:

[0019] Select any unit region in the drawing partition as the target unit region, and select the second coordinate point corresponding to the target unit region from the second coordinate set as the target coordinate point; wherein, the unit region is obtained by dividing the drawing partition according to the total number of ranging sensors in the drawing partition, and the drawing partition is obtained by pre-dividing the area around the vehicle;

[0020] Select the second coordinate point corresponding to the unit region adjacent to one side of the target unit region from the second coordinate set as the first auxiliary coordinate point, and select the second coordinate point corresponding to the unit region adjacent to the other side of the target unit region from the second coordinate set as the second auxiliary coordinate point;

[0021] The set of control points is determined based on the target coordinate point, the first auxiliary coordinate point, and the second auxiliary coordinate point;

[0022] Auxiliary parameters are determined based on the set of control points.

[0023] Optionally, the second coordinate point corresponding to the target unit region is selected from the second coordinate set as the target coordinate point, including:

[0024] Select the integer part of the second coordinate point corresponding to the target unit region from the second coordinate set as the target coordinate point.

[0025] Optionally, a Bézier curve can be plotted based on the curve parameters, including:

[0026] Draw the Bézier curve of the target unit region based on the control point set and auxiliary parameters;

[0027] Connect the Bézier curves corresponding to all unit regions to generate the Bézier curves for drawing the partition;

[0028] Connect the Bézier curves of all plotted partitions to generate the Bézier curves corresponding to the distance measurement data.

[0029] Optionally, a set of control points is determined based on the target coordinate point, the first auxiliary coordinate point, and the second auxiliary coordinate point, including:

[0030] The first endpoint is determined based on the target coordinate point and the first auxiliary coordinate point. The first insertion point is determined based on the first endpoint and the target coordinate point. The first endpoint, the first insertion point, and the target coordinate point are merged into the first subset.

[0031] The second endpoint is determined based on the target coordinate point and the second auxiliary coordinate point. The second insertion point is determined based on the second endpoint and the target coordinate point. The target coordinate point, the second insertion point and the second endpoint are merged into the second subset.

[0032] The first subset and the second subset are merged to form the control point set.

[0033] Optionally, the auxiliary parameters include a first auxiliary parameter and a second auxiliary parameter; the auxiliary parameters are determined based on the set of control points, including:

[0034] Determine the first line segment based on the first endpoint and the first insertion point, and randomly select a point on the first line segment as the first target auxiliary parameter point;

[0035] Determine the first radian of the first target auxiliary parameter point in the polar coordinate system;

[0036] Extract the first decimal part of the first radian; if the first decimal part is greater than a preset threshold, process the first decimal part according to a first preset processing rule to obtain a first auxiliary parameter; if the first decimal part is less than or equal to the preset threshold, process the first decimal part according to a second preset processing rule to obtain a first auxiliary parameter.

[0037] Determine the second line segment based on the target coordinate point and the second insertion point, and randomly select a point on the second line segment as the auxiliary parameter point of the second target.

[0038] Determine the second radian of the auxiliary parameter point of the second target in the polar coordinate system;

[0039] Extract the second decimal part of the second radian. If the second decimal part is greater than a preset threshold, process the second decimal part according to the first preset processing rule to obtain the second auxiliary parameter. If the second decimal part is less than or equal to the preset threshold, process the second decimal part according to the second preset processing rule to obtain the second auxiliary parameter.

[0040] Optionally, the first preset processing rule is expressed by the following formula:

[0041] First auxiliary parameter = (first decimal part - 0.5) / 0.5;

[0042] The second preset processing rule is expressed by the following formula:

[0043] First auxiliary parameter = first decimal part / 0.5.

[0044] Optionally, the method also includes:

[0045] The display color of each first coordinate point in the first coordinate point set is determined according to the preset display color rules;

[0046] The Bézier curve is colored according to the display color of each first coordinate point;

[0047] Displays the colored Bézier curves.

[0048] Optionally, the display color of each first coordinate point in the first coordinate point set is determined according to a preset display color rule, including:

[0049] The display color of each first coordinate point is determined based on the distance between the first coordinate point and the origin of the rectangular coordinate system.

[0050] Optionally, the display color of each first coordinate point is determined based on the distance between the first coordinate point and the origin of the rectangular coordinate system, including:

[0051] In response to the distance between the first coordinate point and the origin being within a first preset range, the display color of the first coordinate point is determined to be the first color;

[0052] In response to the distance between the first coordinate point and the origin being within a second preset range, the display color of the first coordinate point is determined to be the second color;

[0053] In response to the distance between the first coordinate point and the origin being within a third preset range, the display color of the first coordinate point is determined to be the third color;

[0054] Among them, the value of the second preset range is greater than the value of the first preset range, and the value of the third preset range is greater than the value of the second preset range.

[0055] Optionally, the origin of the Cartesian coordinate system is determined based on the positions of all distance sensors within the plotted area.

[0056] Optionally, the second set of coordinate points is stored in an array.

[0057] A second aspect of this application provides a vehicle comprising:

[0058] Memory, used to store executable program code;

[0059] A processor is used to call and run executable program code from memory, causing the vehicle to perform the method described in the first aspect.

[0060] As can be seen from the above, the distance measurement curve drawing method and vehicle provided in this application include acquiring distance measurement data collected by the vehicle's distance measurement sensor, processing the distance measurement data to obtain a first set of coordinate points of obstacles around the vehicle in a pre-constructed rectangular coordinate system, providing a data foundation for subsequent distance measurement curve drawing. Each first coordinate point in the first set of coordinate points is transformed from the rectangular coordinate system to the polar coordinate system to obtain a second set of coordinate points. Based on the second set of coordinate points, curve parameters for drawing the Bézier curve are determined, and the Bézier curve corresponding to the distance measurement data is drawn based on the curve parameters. After coordinate transformation, the coordinate values ​​in the rectangular coordinate system are converted to coordinate values ​​in the polar coordinate system. Since the coordinate parameters in the polar coordinate system include the polar radius ρ and polar angle θ, compared to the coordinate parameters (x, y) in the rectangular coordinate system, the polar radius ρ and polar angle θ can more intuitively represent the coordinate changes of obstacles in the arc area around the vehicle (such as the area corresponding to the front and rear of the vehicle). If the coordinate parameters in the rectangular coordinate system are used directly, the angle needs to be indirectly calculated based on the coordinate parameters in the rectangular coordinate system, increasing the computational load. Through the coordinate transformation described in this application, curve parameters can be directly determined using the coordinate values ​​of obstacles in the polar coordinate system, thereby controlling the drawing of Bézier curves and reducing computational resource consumption. Furthermore, compared to the traditional drawing process which requires setting a step size and performing iterative calculations according to that step size to obtain the Bézier curve, this application introduces a coordinate system when drawing Bézier curves, and the numerical changes within that system are continuous. Therefore, there is no need to set a step size or perform iterative calculations. This is equivalent to using the natural changes in coordinates within the polar coordinate system to control the drawing of the Bézier curve, thus reducing the consumption of computational resources during the Bézier curve drawing process, decreasing the computational burden on the vehicle's image processor and the number of drawing calls, thereby improving vehicle performance. Attached Figure Description

[0061] To more clearly illustrate the technical solutions in this application or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0062] Figure 1 is a flowchart illustrating the distance measurement curve drawing method according to an embodiment of this application;

[0063] Figure 2 is a schematic diagram of drawing partitions according to an embodiment of this application;

[0064] Figure 3 is a partially enlarged schematic diagram of area A in Figure 2 of an embodiment of this application;

[0065] Figure 4 is a schematic diagram of the Bézier curves in the unit region of an embodiment of this application;

[0066] Figure 5 is a schematic diagram of the ranging curve of an embodiment of this application;

[0067] Figure 6 is a schematic diagram of the distance measurement curve plotting device according to an embodiment of this application;

[0068] Figure 7 is a schematic diagram of the hardware structure of the electronic device according to an embodiment of this application. Detailed Implementation

[0069] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.

[0070] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this application should have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms "first," "second," and similar terms used in the embodiments of this application do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are only used to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0071] As described in the background section, Bézier curves are typically used for visualizing distance measurement data. Drawing Bézier curves provides a smooth distance measurement curve, helping users quickly and intuitively understand obstacle information around the vehicle. However, traditional distance measurement curve drawing often involves CPU-based calculation of the Bézier curve point set. When drawing the Bézier curve, a suitable step size needs to be selected, such as 0.01 or 0.001, as the step size determines the density of points on the Bézier curve. Then, a loop is used, starting at t=0 and increasing with the selected step size until t=1. In each iteration, the corresponding points on the Bézier curve are calculated, i.e., the Bézier curve is drawn using a cyclic iterative method. If the Bézier curve needs to be displayed on a high-resolution screen, the step size needs to be less than 0.001 to ensure display quality. This cyclic iterative calculation method consumes significant CPU computing resources.

[0072] This traditional drawing method often has the following drawbacks:

[0073] 1. Computational resource consumption: Traditional methods for drawing distance measurement curves may require a large amount of computational resources, especially when dealing with complex Bézier curves, which consumes a lot of CPU resources and leads to a decrease in CPU performance.

[0074] 2. Plotting delay: If the data processing and plotting process is not efficient enough, it may cause a delay in the displayed ranging curve, affecting real-time performance;

[0075] 3. Display accuracy: In some cases, the accuracy of the distance measurement curve may be insufficient, and it may not be able to accurately reflect small distance changes or fast-moving objects.

[0076] 4. Visual effects: Some drawing methods may not be visually smooth enough, which may lead to a misunderstanding of the curve by the driver.

[0077] To address the aforementioned shortcomings, this application proposes a ranging curve drawing method that directly controls the drawing of Bézier curves by utilizing the natural changes in coordinates, avoiding the use of iterative methods. This significantly reduces the computational resource consumption on the vehicle side during ranging curve drawing, lowers the latency of the ranging curve, and improves vehicle-side performance. Regional subdivision improves the display accuracy of the ranging curve. The use of multi-terminal Bézier curve connections further enhances the smoothness of the curve, making the radar curve more fluid and easier to understand. By converting the Cartesian coordinate system to a polar coordinate system, the coordinate parameters in the polar coordinate system can intuitively represent the position of obstacles in the arc-shaped area around the vehicle, avoiding the computational overhead of calculating angles from coordinate values ​​in the Cartesian coordinate system, thus further improving the drawing speed of the Bézier curve. This application's solution performs calculations on the GPU, which is more efficient at processing graphics algorithms than the CPU. Especially when ranging data changes, the GPU's response speed is significantly faster than the CPU's. Using the GPU for calculations is more suitable for scenarios requiring real-time rendering and high performance, such as vehicle-side ranging curve display scenarios.

[0078] The embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0079] This application proposes a radar curve plotting method, applied to a vehicle-side controller, referring to Figure 1, which includes the following steps:

[0080] Step 102: Obtain the ranging data collected by the vehicle ranging sensor.

[0081] Specifically, this embodiment can be applied to a graphics processing unit (GPU) in a vehicle-mounted controller. The vehicle-mounted controller can be a cockpit domain controller (Head Unit), an autonomous driving domain controller, or a body domain controller, or any controller with graphics rendering capabilities. This embodiment does not limit the physical location of the GPU within the domain controller; it can be an embedded GPU integrated into the domain controller's SoC (System on a Chip) or a separately configured dedicated graphics card. The GPU can convert ranging data into visualized graphics and output them to display devices such as the instrument panel, central control screen, and HUD.

[0082] Distance data is collected through distance-measuring sensors installed in the vehicle. These sensors include radar sensors, infrared sensors, and laser sensors, among others. Taking radar sensors as an example, vehicle radar typically includes forward-facing radar, side radar, rear-facing radar, lidar, and ultrasonic radar. Forward-facing radar is usually located in the front bumper or grille and is used to detect vehicles, pedestrians, obstacles, and road conditions ahead. Side radar is installed in the front and rear wheel arches, side skirts, or rearview mirrors and is used to detect obstacles on both sides of the vehicle. Rear-facing radar is usually installed in the rear bumper and detects vehicles, pedestrians, and obstacles behind the vehicle. The layout and type of these radars are designed according to the different functions of the vehicle and the needs of driving scenarios to ensure that the vehicle can drive and park safely and effectively in various environments. Distance data reflects the distance between the vehicle body and surrounding obstacles.

[0083] Step 104: Process the ranging data to obtain the first set of coordinate points of obstacles around the vehicle in a pre-constructed Cartesian coordinate system.

[0084] Specifically, a Cartesian coordinate system is pre-constructed, with its origin located on the vehicle body. Data processing transforms the ranging data into a first set of coordinate points within the Cartesian coordinate system; that is, each ranging point in the data is mapped to a coordinate point in the Cartesian coordinate system. Each first coordinate point in this set represents the coordinates of an obstacle in the Cartesian coordinate system. This first set contains the position coordinates of all obstacles in the area surrounding the vehicle. It should be noted that the visualized ranging curve reflects the position of obstacles relatively close to the vehicle, such as obstacles within 150cm of the vehicle body.

[0085] Due to the different positions of the ranging sensors mounted on the vehicle body, this application divides the area around the vehicle into four drawing zones for ease of drawing: the front zone, the rear zone, the left zone, and the right zone. The front and rear zones are arc-shaped areas. Correspondingly, a Cartesian coordinate system is constructed within each drawing zone. The origin of each Cartesian coordinate system is determined based on the positions of all ranging sensors within the zone, with the origin located at the center of all ranging sensors and on the vehicle body. This method of constructing Cartesian coordinates takes into account the distribution of ranging sensors throughout the drawing zone, making the determined obstacle positions more reasonable and facilitating subsequent calculations. Figure 2 shows a schematic diagram of the drawing zones. As shown in Figure 2, the area around the vehicle includes four drawing zones: zone A, zone B, zone C, and zone D. Each drawing zone contains a Cartesian coordinate system. To further conserve computational resources, only the first and second quadrants are extracted from each Cartesian coordinate system. The coordinates of obstacles within the drawing area can be encompassed by the first and second quadrants; therefore, the third and fourth quadrants can be discarded, reducing computational resource consumption. For example, points a and b in area A represent the positions of obstacles in the Cartesian coordinate system.

[0086] Step 106: Transform each first coordinate point in the first coordinate point set from the rectangular coordinate system to the polar coordinate system to obtain the second coordinate point set.

[0087] Referring to Figure 2, in areas A and B, the detection area of ​​each ranging sensor is a fan-shaped region with an arc. Within each drawing zone, the zone is divided according to the number of ranging sensors, with each sensor corresponding to one area, denoted as a unit region. By subdividing the drawing zone based on the total number of ranging sensors, multiple unit regions are obtained, ensuring that the Bézier curve accurately reflects the distance data of obstacles around the vehicle, thus improving the display accuracy of the ranging curve. In Figure 2, area A is divided into 6 unit regions. Since each unit region is divided according to angles, and the polar angle θ in the coordinate parameters (ρ, θ) of the polar coordinate system more intuitively represents the angle change, while the coordinate parameters (x, y) of the rectangular coordinate system require further calculation to obtain the angle value in the rectangular coordinate system, polar coordinates are more suitable for curve drawing in these two areas (A and B). Similarly, multiple unit regions can be divided in other drawing areas as well. Since the third and fourth quadrants of the rectangular coordinate system were discarded in step 104, the initial radian range of the polar coordinate system is 0 to π when converting to the polar coordinate system. Then, the first coordinate point in each set of first coordinate points is converted to the polar coordinate system to obtain the second set of coordinate points.

[0088] Step 108: Determine the curve parameters used to draw the Bézier curve based on the second set of coordinate points.

[0089] Specifically, the Bézier curve drawn in this embodiment can be a second-order Bézier curve or a higher-order Bézier curve. The Bézier curve is drawn based on control points and auxiliary parameters. By determining the positions of the control points, the Bézier curve is generated using the auxiliary parameters. Taking a second-order Bézier curve as an example, the number of control points is three. Appropriate second coordinate points are selected from the set of second coordinate points, and three control points are determined based on these second coordinate points to draw the second-order Bézier curve. After the control points are determined, auxiliary parameters can be selected based on them. These auxiliary parameters are numbers defined in the interval [0,1].

[0090] Step 110: Draw the Bézier curve corresponding to the distance measurement data based on the curve parameters.

[0091] Specifically, after determining the control points and auxiliary parameters, varying the auxiliary parameters within the [0,1] interval will generate multiple points. Connecting these points forms a Bézier curve. The method of generating Bézier curves based on control points and auxiliary parameters is a standard practice in this field and will not be elaborated upon further here.

[0092] Based on steps 102 to 110 above, this embodiment provides a method for drawing distance measurement curves and a vehicle. The method includes acquiring distance measurement data collected by the vehicle's distance measurement sensor, processing the distance measurement data to obtain a first set of coordinate points of obstacles around the vehicle in a pre-constructed rectangular coordinate system, providing a data foundation for subsequent distance measurement curve drawing. Each first coordinate point in the first set of coordinate points is transformed from the rectangular coordinate system to the polar coordinate system to obtain a second set of coordinate points. The curve parameters for drawing the Bézier curve are determined based on the second set of coordinate points, and the Bézier curve corresponding to the distance measurement data is drawn based on the curve parameters. After coordinate transformation, the coordinate values ​​in the rectangular coordinate system are converted into coordinate values ​​in the polar coordinate system. Since the coordinate parameters in the polar coordinate system include the polar radius ρ and the polar angle θ, compared with the coordinate parameters (x, y) in the rectangular coordinate system, the polar radius ρ and the polar angle θ can more intuitively represent the coordinate changes of obstacles in the arc area around the vehicle (such as the area corresponding to the front and rear of the vehicle). If the coordinate parameters in the rectangular coordinate system are used directly, the angle needs to be indirectly calculated based on the coordinate parameters in the rectangular coordinate system, which increases the amount of calculation. The coordinate transformation described in this application allows for the direct determination of curve parameters using the coordinate values ​​of obstacles in the polar coordinate system, thereby controlling the drawing of Bézier curves and reducing computational resource consumption. Furthermore, compared to traditional drawing processes that require setting a step size and iterative calculations based on that step size to obtain the Bézier curve, the coordinate system used in this application features continuous numerical changes, eliminating the need for setting a step size or iterative calculations. This effectively utilizes the natural changes in coordinates within the polar coordinate system to control the drawing of Bézier curves, thus reducing computational resource consumption during the drawing process, decreasing the computational burden on the vehicle's image processor and the number of drawing calls, and ultimately improving vehicle performance.

[0093] Furthermore, the method of this application is also applicable to vehicle instrument systems with higher real-time requirements, enabling faster startup speeds. The method of this application is also easily integrated with 3D scenes; by adding a z-axis number to the generated vehicle Bezier curve, a 3D scene display effect can be obtained, providing users with richer and more intuitive driving assistance information.

[0094] In the process of converting from a rectangular coordinate system to a polar coordinate system, in order to draw the Bézier curves sequentially, the radian range of the polar coordinate system needs to match the variation range [0,1] of the auxiliary parameters of the Bézier curves. Therefore, during the coordinate system conversion process, it is necessary to perform a reasonable conversion process on the radian range of the polar coordinate system. The following specific examples illustrate the method for determining the second set of coordinate points in the polar coordinate system.

[0095] In some embodiments, each first coordinate point in the first set of coordinate points is transformed from a rectangular coordinate system to a polar coordinate system to obtain a second set of coordinate points, including:

[0096] For each drawing partition, a pre-constructed Cartesian coordinate system is transformed into a polar coordinate system with a first preset range of radians through coordinate transformation; wherein, the drawing partition is obtained by pre-dividing the area around the vehicle;

[0097] The total number of ranging sensors within the plotted area is counted, and a second preset range is determined based on the first preset range and the total number. The radian range of the polar coordinate system is then transformed into the second preset range.

[0098] Each first coordinate point in the first set of coordinate points is mapped from the rectangular coordinate system to the polar coordinate system with a second preset range of radians to obtain the second set of coordinate points.

[0099] Specifically, as in the aforementioned embodiment, the rectangular coordinate system retains only the portion where the y-axis coordinate is positive. After conversion to the polar coordinate system, the radian range of the polar coordinate system is 0 to π (i.e., the first preset range). Since the drawing process is partitioned, that is, drawn within each unit area, and the auxiliary parameters of the Bézier curve vary within the range of [0,1], it is necessary to appropriately transform the radian range of the polar coordinate system to match the numerical range of the auxiliary parameters. The total number of ranging sensors in each drawing partition is determined, and the second preset range is determined based on the total number of ranging sensors and the first preset range.

[0100] Furthermore, a second preset range is determined based on the first preset range and the total quantity, including:

[0101] The product of the first preset range and the total number is used as the third preset range;

[0102] The second preset range is obtained by quotienting the third preset range with the value of π.

[0103] For example, the total number of ranging sensors within the drawing partition is N, and the first preset range is 0 to π. Multiplying the first preset range by N yields the third preset range 0 to Nπ. The third preset range is then divided by π to obtain the second preset range 0 to N. Correspondingly, in polar coordinates, taking region A in Figure 2 as an example, region A is divided into 6 unit regions, A1 to A6. The radian range of each unit region is 0 to 1, 1 to 2, 2 to 3, 3 to 4, 4 to 5, and 5 to 6 respectively, with each unit region having a radian range span of 1. By transforming the radian range in the polar coordinate system, the radian range span of each unit region is made to be 1. When drawing Bézier curves in each unit region, it is equivalent to the radian change of each unit region changing from 0 to 1, which matches the range of auxiliary parameters [0,1] in the Bézier curve, allowing the auxiliary parameters to be associated with polar coordinates. Because the radian variation is continuous within each unit region in polar coordinates, the auxiliary parameters also change continuously with the radian variation. Therefore, there's no need to set a step size; the Bézier curve is drawn using an iterative method based on the step size, significantly reducing the computational resource consumption for curve drawing. Furthermore, when drawing Bézier curves in polar coordinates, since the polar angle θ is the data representing the angle, there's no need to calculate the angle value separately, further reducing the amount of data computation compared to rectangular coordinates.

[0104] Each first coordinate point in the first coordinate set is mapped to a polar coordinate system with a second preset radian range, resulting in a second coordinate point set. This coordinate system transformation achieves the transformation of obstacle coordinate points. By associating the parameters required for drawing the Bézier curve with the polar coordinate system, it's equivalent to directly calculating points on the Bézier curve through changes in coordinates within the polar coordinate system. This results in high computational efficiency, reducing computational resource consumption and lowering the rendering latency of the Bézier curve, providing users with real-time and accurate visualized distance measurement curves.

[0105] Since Bézier curves are drawn based on curve parameters, if you want to draw a Bézier curve based on a second set of coordinate points, you first need to determine the curve parameters based on that second set of coordinate points. The following specific example describes how to determine the curve parameters of a Bézier curve based on a second set of coordinate points.

[0106] In some embodiments, the curve parameters include a set of control points and auxiliary parameters; determining the curve parameters for drawing the Bézier curve based on the second set of coordinate points includes:

[0107] Select any unit region in the drawing partition as the target unit region, and select the second coordinate point corresponding to the target unit region from the second coordinate set as the target coordinate point; wherein, the unit region is obtained by dividing the drawing partition according to the total number of ranging sensors in the drawing partition, and the drawing partition is obtained by pre-dividing the area around the vehicle;

[0108] Select the second coordinate point corresponding to the unit region adjacent to one side of the target unit region from the second coordinate set as the first auxiliary coordinate point, and select the second coordinate point corresponding to the unit region adjacent to the other side of the target unit region from the second coordinate set as the second auxiliary coordinate point;

[0109] The set of control points is determined based on the target coordinate point, the first auxiliary coordinate point, and the second auxiliary coordinate point;

[0110] Auxiliary parameters are determined based on the set of control points.

[0111] Specifically, the second coordinate set includes the detection data from each ranging sensor in the vehicle. The calculated second coordinate set can be pre-stored in an array. When drawing the Bézier curve, the corresponding second coordinate points can be extracted from the array. This array storage method significantly improves the reading speed of the second coordinate points. When extracting the second coordinate points, the GPU's built-in function `floor` can be used to round the data, that is, extract the coordinate points stored at the integer index positions in the array. The GPU's built-in function is hardware-optimized, providing higher computational efficiency than custom shaders, further reducing performance consumption.

[0112] Figure 3 shows a magnified view of area A in Figure 2. As shown in Figure 3, for each unit region in area A, one unit region is arbitrarily selected as the target unit region, and obstacle detection points in the target unit region are selected from the second coordinate set. For example, the target unit region is A3, and the corresponding obstacle detection point is Y3. At this time, the unit regions adjacent to the target unit region A3 are A2 and A4. The obstacle detection point Y2 (first auxiliary coordinate point) corresponding to unit region A2 is extracted from the second coordinate set, and the obstacle detection point Y4 (second auxiliary coordinate point) corresponding to unit region A4 is extracted from the second coordinate set.

[0113] Furthermore, a set of control points is determined based on the target coordinates, the first auxiliary coordinates, and the second auxiliary coordinates, including:

[0114] The first endpoint is determined based on the target coordinate point and the first auxiliary coordinate point. The first insertion point is determined based on the first endpoint and the target coordinate point. The first endpoint, the first insertion point, and the target coordinate point are merged into the first subset.

[0115] The second endpoint is determined based on the target coordinate point and the second auxiliary coordinate point. The second insertion point is determined based on the second endpoint and the target coordinate point. The target coordinate point, the second insertion point and the second endpoint are merged into the second subset.

[0116] The first subset and the second subset are merged to form the control point set.

[0117] Specifically, when drawing Bézier curves in the target cell region, to ensure that fault detection points appear on the Bézier curves and that the curves accurately reflect their locations, the Bézier curves in the target cell region are drawn in two segments. The fault detection point is used as the endpoint of the first segment and simultaneously as the starting point of the second segment, which is the connection point between the two segments. As shown in Figure 3, the fault detection point in the target cell region A3 is the target coordinate point Y3. Between Y3 and Y2, point Z1 is taken as the first endpoint (i.e., the ratio between line segment Y3Z1 and line segment Z1Y2). The first endpoint Z1 is also the starting point of the first segment of the Bézier curve, and the target coordinate point Y3 is the endpoint of the first segment. Point X1 is taken between the first endpoint Z1 and the target coordinate point Y3 as the first insertion point. At this point, the first endpoint Z1, the target coordinate point Y3, and the first insertion point X1 constitute the three control points that determine the first segment of the Bézier curve, which are then combined to form the first subset.

[0118] Similarly, between Y3 and Y4, point Z2 is selected as the second endpoint according to a certain ratio (that is, the ratio between line segment Y3Z2 and line segment Z3Y4). The second endpoint Z2 is also the end point of the second Bézier curve, and the target coordinate point Y3 is the starting point of the second Bézier curve. The selection ratio of points Z2 and Z1 is the same. Point X2 is selected as the second insertion point between the second endpoint Z2 and the target coordinate point Y3. At this point, the target coordinate point Y3, the second insertion point X2, and the second endpoint Z2 constitute the three control points that determine the second Bézier curve, which are combined to form the second subset. The first subset and the second subset serve as the control point set corresponding to the target unit region.

[0119] This application uses second-order Bézier curve drawing as an example. If it is necessary to improve the smoothness of the Bézier curve, a higher-order Bézier curve can be drawn. The drawing method is similar to that of second-order Bézier curve drawing, simply by increasing the number of control points in the control point set. The method for determining the control points is the same as in this application and will not be elaborated further. In addition, if the number of ranging sensors installed in the vehicle is small, the smoothness of the ranging curve can also be increased by drawing a higher-order Bézier curve. A G1 continuous (also known as tangent continuous) visual effect is provided, making the ranging curve smoother and easier to understand. By increasing the order of the Bézier curve, G2 continuous (also known as curvature continuous) can be achieved, enhancing the smoothness and aesthetics of the ranging curve. By reasonably setting the endpoints and insertion points, multiple data points for drawing the Bézier curve are determined. By connecting multiple data points, the direction of the Bézier curve is determined, achieving precise segmented drawing of the Bézier curve in the target unit area. This ensures that fault detection points detected by the ranging sensor are reflected on the Bézier curve, increasing the accuracy of the Bézier curve and providing users with an accurate visualization of ranging data.

[0120] After determining the set of control points, auxiliary parameters can be selected based on the line segments formed between different control points. As the auxiliary parameters change from one end of the line segment to the other, a Bézier curve is generated. Using the same method, the set of control points and auxiliary parameters corresponding to each unit area can be determined, providing a data foundation for drawing the ranging curve. This embodiment presents a method for determining curve parameters based on a second coordinate set, which is equivalent to associating the curve parameters with obstacle detection points detected by the ranging sensor. Therefore, a Bézier curve can be generated based on the curve parameters, achieving the goal of drawing Bézier curves through the natural changes of coordinates. Compared to traditional Bézier curve drawing methods, this method saves the steps of setting the step size and iterative calculation according to the step size, greatly reducing the consumption of computational resources. Furthermore, in the method of this embodiment, the data points in the second coordinate set represent the actual coordinate values ​​of obstacles. Drawing Bézier parameters based on the second coordinate set ensures that the generated Bézier curve reflects the real obstacle detection points, guaranteeing the accuracy of the ranging curve and providing users with realistic and reliable visual ranging display data.

[0121] After determining the set of control points through the above embodiments, it is also necessary to determine auxiliary parameters to jointly complete the drawing of the Bézier curve. The following specific embodiments illustrate how to determine the auxiliary parameters based on the set of control points.

[0122] In some embodiments, the auxiliary parameters include a first auxiliary parameter and a second auxiliary parameter; determining the auxiliary parameters based on the set of control points includes:

[0123] Determine the first line segment based on the first endpoint and the first insertion point, and randomly select a point on the first line segment as the first target auxiliary parameter point;

[0124] Determine the first radian of the first target auxiliary parameter point in the polar coordinate system;

[0125] Extract the first decimal part of the first radian; if the first decimal part is greater than a preset threshold, process the first decimal part according to a first preset processing rule to obtain a first auxiliary parameter; if the first decimal part is less than or equal to the preset threshold, process the first decimal part according to a second preset processing rule to obtain a first auxiliary parameter.

[0126] Determine the second line segment based on the target coordinate point and the second insertion point, and randomly select a point on the second line segment as the auxiliary parameter point of the second target.

[0127] Determine the second radian of the auxiliary parameter point of the second target in the polar coordinate system;

[0128] Extract the second decimal part of the second radian. If the second decimal part is greater than a preset threshold, process the second decimal part according to the first preset processing rule to obtain the second auxiliary parameter. If the second decimal part is less than or equal to the preset threshold, process the second decimal part according to the second preset processing rule to obtain the second auxiliary parameter.

[0129] Specifically, there are multiple first and second auxiliary parameters. The first auxiliary parameter is determined using control points within the first subset. As shown in Figure 3, a line segment Z1X1 is formed between the first endpoint Z1 and the first insertion point X1. The first auxiliary parameter starts from the first endpoint Z1 and gradually moves to the first insertion point X1. A point is arbitrarily selected on the first line segment Z1X1 as the first target auxiliary parameter point. This point has corresponding polar coordinate values ​​in the polar coordinate system, including the polar radius and polar angle. The polar angle (i.e., the first radian) of the first target auxiliary parameter point is determined. At this point, the range of the first radian is not within the [0,1] range defined by the auxiliary parameter. To convert the value of the first radian to the [0,1] range, it needs to be processed. Specifically, the fract function is used to extract the decimal part of the first radian (i.e., the first fractional part). If the first fractional part is greater than a preset threshold, it is processed according to the first preset processing rule: First auxiliary parameter = (first fractional part - 0.5) / 0.5. For example, if the first radian value is 2.7, the extracted first decimal part is 0.7, which is greater than the preset threshold of 0.5. Therefore, the first auxiliary parameter = (0.7 - 0.5) / 0.5 = 0.1. Here, the fract function is a built-in function of the GPU.

[0130] If the first decimal part is less than or equal to a preset threshold, it is processed according to the second preset processing rule: First auxiliary parameter = First decimal part / 0.5. For example, the preset threshold is 0.5. If the first radian value is 2.4, the extracted first decimal part is 0.4, which is less than the preset threshold of 0.5, so the first auxiliary parameter = 0.4 / 0.5 = 0.2. Based on the above method, within the first line segment Z1 X1, starting from the first endpoint Z1, moving towards the first insertion point X1, multiple first target auxiliary parameter points are selected sequentially, and the first auxiliary parameter corresponding to each first target auxiliary parameter point is calculated.

[0131] Similarly, when determining the second auxiliary parameter, it is necessary to use the control points in the second subset for determination. As shown in Figure 3, a line segment Z2X2 is formed between the second endpoint Z2 and the second insertion point X2. The second auxiliary parameter starts from the target coordinate point Z2 and gradually moves to the second endpoint X2. A point is arbitrarily selected as the second target auxiliary parameter point in the second line segment Z2X2. The second target auxiliary parameter point has corresponding polar coordinate values ​​in the polar coordinate system, including the polar radius and polar angle. The polar angle (i.e., the second radian) of the second target auxiliary parameter point is determined. At this time, the range of the second radian is not within the [0,1] range defined by the auxiliary parameter. In order to convert the value of the first radian to the [0,1] range, the second radian needs to be processed. The specific method is to use the fract function to extract the decimal part of the second radian (i.e., the second decimal part). If the second decimal part is greater than a preset threshold, it is processed according to the first preset processing rule: Second auxiliary parameter = (second decimal part - 0.5) / 0.5. For example, if the first radian value is 2.7, the extracted first decimal part is 0.7, which is greater than the preset threshold of 0.5, and the first auxiliary parameter = (0.7-0.5) / 0.5 = 0.1.

[0132] If the second decimal part is less than or equal to a preset threshold, it is processed according to the second preset processing rule: Second auxiliary parameter = Second decimal part / 0.5. For example, the preset threshold is 0.5. If the first radian value is 2.4, the extracted first decimal part is 0.4, which is less than the preset threshold of 0.5, so the first auxiliary parameter = 0.4 / 0.5 = 0.2. Based on the above method, within the second line segment Z2X2, starting from the second endpoint Z2, moving towards the second insertion point X2, multiple second target auxiliary parameter points are selected sequentially, and the second auxiliary parameter corresponding to each second target auxiliary parameter point is calculated.

[0133] The method in this embodiment transforms the values ​​of the extracted first and second target auxiliary parameter points within the [0,1] range in each unit region through processing according to preset rules, thus satisfying the definition range of the auxiliary parameters. This provides a data foundation for subsequent Bézier curve plotting, ensuring the successful completion of the Bézier curve plotting.

[0134] After determining the control point set and auxiliary parameters through the aforementioned embodiments, the Bézier curve can be drawn in segments. Then, the Bézier curves connecting the segments can be used to draw the overall curve. The following describes the method of drawing Bézier curves through specific embodiments.

[0135] In some embodiments, plotting a Bézier curve based on curve parameters includes:

[0136] Draw the Bézier curve of the target unit region based on the control point set and auxiliary parameters;

[0137] Connect the Bézier curves corresponding to all unit regions to generate the Bézier curves for drawing the partition;

[0138] Connect the Bézier curves of all plotted partitions to generate the Bézier curves corresponding to the distance measurement data.

[0139] Specifically, based on the control point set and auxiliary parameters, two Bézier curves can be drawn within the target unit area. These two Bézier curves are then connected to form the corresponding Bézier curve for the target unit area. Next, the Bézier curves of all unit areas within each drawing partition are connected to form the Bézier curve for that partition. Finally, the Bézier curves of all drawing partitions are connected to form the complete Bézier curve corresponding to the ranging data. To successfully connect the Bézier curves of different drawing partitions, it is necessary to ensure that the partition range is the same within each drawing partition; that is, the distance values ​​corresponding to the closest and furthest points from the vehicle in each drawing partition must be the same.

[0140] Furthermore, the method for drawing the two Bézier curves for the target cell region is as follows:

[0141] The equation of the first Bézier curve is:

[0142] bezier1=V1*P11+V2*P12+V3*P13

[0143] Here, V1, V2, and V3 are the parameters corresponding to the first Bézier curve, which can be determined based on the first auxiliary parameter t1. V1 = (1 - t1) 2 V2 = 2 * t1 * (1 - t1), V3 = t1 2t1 is the first auxiliary parameter. P11 is the starting point of the first Bézier curve segment, i.e., the first endpoint Z1, P12 is the first insertion point X1, and P13 is the ending point of the first Bézier curve segment, i.e., the target coordinate point Y3. Figure 4 shows a schematic diagram of the Bézier curve in the unit region. bezier1 is a point on the first Bézier curve segment. With the change of t1, multiple bezier1s can be determined, generating the complete first Bézier curve Q1 as shown in Figure 4.

[0144] The equation of the curve corresponding to the second Bézier curve is:

[0145] bezier2=W1*P21+W2*P22+W3*P23

[0146] Where W1, W2, and W3 are the parameters corresponding to the second Bézier curve, which can be determined based on the second auxiliary parameter. W1 = (1-t2) 2 W2 = 2 * t2 * (1 - t2), W3 = t2 2 t2 is the second auxiliary parameter. P21 is the starting point of the second Bézier curve, i.e., the target coordinate point Y3. P22 is the second insertion point X2, and P23 is the ending point of the second Bézier curve, i.e., the second endpoint Z2. bezier2 is a point on the second Bézier curve. With the change of t2, multiple bezier2s can be determined, generating the complete second Bézier curve Q2 as shown in Figure 4.

[0147] As can be seen from the solution in this embodiment, the complete Bézier curve corresponding to the ranging data is obtained by connecting multiple Bézier curves. Under the premise that the accuracy of each Bézier curve is determined, the accuracy of the complete Bézier curve is also guaranteed accordingly, which improves the drawing accuracy of the ranging curve and can reflect small distance changes or fast-moving objects around the vehicle, making it convenient for users to accurately understand the obstacle information in the environment around the vehicle.

[0148] After determining the Bézier curve corresponding to the ranging data, it is also necessary to visualize the Bézier curve for users to view. The visualization should prompt users to pay attention to the safety around the vehicle. The specific visualization method is described in the following examples.

[0149] In some embodiments, the method further includes:

[0150] The display color of each first coordinate point in the first coordinate point set is determined according to the preset display color rules;

[0151] The Bézier curve is colored according to the display color of each first coordinate point;

[0152] Displays the colored Bézier curves.

[0153] Specifically, after determining the first coordinate point, the display color of each first coordinate point can be determined based on its distance from the origin. The correspondence between distance and display color can be pre-defined and stored in a relationship table.

[0154] When determining the display color of the first coordinate point, in response to the distance between the first coordinate point and the origin being within a first preset range, the display color of the first coordinate point is determined to be the first color; in response to the distance between the first coordinate point and the origin being within a second preset range, the display color of the first coordinate point is determined to be the second color; in response to the distance between the first coordinate point and the origin being within a third preset range, the display color of the first coordinate point is determined to be the third color; wherein, the value of the second preset range is greater than the value of the first preset range, and the value of the third preset range is greater than the value of the second preset range.

[0155] For example, when the distance is greater than 0 and less than 40cm (first preset range), the display color is red (first color); when the distance is greater than or equal to 40cm and less than 80cm (second preset range), the display color is yellow (second color); when the distance is greater than or equal to 80cm and less than 150cm (third preset range), the display color is green (third color); and no display is required when the distance exceeds 150cm. After determining the basic colors, interpolation methods can be used to determine the transition colors between the basic colors, such as the transition color between red and yellow, and the transition color between yellow and green. By determining the basic colors and transition colors in advance, the color of the Bézier curve can be directly determined by querying a relational table when performing Bézier curve coloring, saving the computing resources consumed by real-time calculation of display colors, further reducing the computing power consumption of distance measurement curve drawing, and reducing the latency of distance measurement curve drawing.

[0156] Since the Bézier curve corresponding to the ranging curve is composed of multiple Bézier curve segments, there may be cases where different segments have different colors. To improve the aesthetics of the display, a color gradient can be implemented between different segments, which can be achieved using the `mix` function. The specific method of color gradient can be determined according to actual needs, and this embodiment does not impose specific limitations. Furthermore, the ranging curve corresponding to areas without ranging data is empty. Figure 5 shows a schematic diagram of the ranging curve. As shown in Figure 5, the ranging curve can also be discontinuous, drawn based on the actual data detected by the ranging sensor. When displaying the colored Bézier curve on the vehicle-mounted screen, the display ratio of the Bézier curve needs to be scaled according to the screen size to ensure comprehensiveness and aesthetics of the display.

[0157] It should be noted that Bézier curves can be drawn using shaders. Shaders include vertex shaders and fragment shaders. The vertex shader calculates coordinate values, while the fragment shader calculates the points on the Bézier curve, the gradient colors, and the coloring of the Bézier curve based on the coordinate values. Drawing Bézier curves using shaders is a conventional technique in this field and will not be described in detail in this embodiment.

[0158] The method described in this embodiment can display the drawn distance measurement curves on the vehicle screen in real time. Users can intuitively view obstacle information in the environment around the vehicle. The different colors of the distance measurement curves can intuitively indicate the distance of obstacles around the vehicle, providing a reference for vehicle driving and improving driving safety.

[0159] It should be noted that the method in this embodiment can be executed by a single device, such as a computer or server. The method can also be applied in a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method in this embodiment, and the multiple devices will interact with each other to complete the method described.

[0160] It should be noted that the above description describes some embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the above embodiments and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0161] Based on the same inventive concept, corresponding to any of the above embodiments, this application also provides a distance measurement curve drawing device.

[0162] Referring to Figure 6, the distance measurement curve plotting device includes:

[0163] The acquisition module 502 is configured to acquire ranging data collected by the vehicle ranging sensor;

[0164] The processing module 504 is configured to process the ranging data to obtain the first set of coordinate points of obstacles around the vehicle in a pre-constructed Cartesian coordinate system.

[0165] The conversion module 506 is configured to convert each first coordinate point in the first coordinate point set from the rectangular coordinate system to the polar coordinate system to obtain the second coordinate point set.

[0166] The determination module 508 is configured to determine the curve parameters used to draw the Bézier curve based on the second set of coordinate points;

[0167] The drawing module 510 is configured to draw the Bézier curve corresponding to the distance measurement data based on the curve parameters.

[0168] In some embodiments, the conversion module 506 is further configured to convert a Cartesian coordinate system pre-built within each drawing partition into a polar coordinate system with a first preset range of radians through coordinate transformation; wherein the drawing partition is obtained by pre-dividing the area around the vehicle;

[0169] The total number of ranging sensors within the plotted area is counted, and a second preset range is determined based on the first preset range and the total number. The radian range of the polar coordinate system is then transformed into the second preset range.

[0170] Map each first coordinate point in the first set of coordinate points from the Cartesian coordinate system to a polar coordinate system with a second preset range in radians to obtain the second set of coordinate points.

[0171] In some embodiments, the conversion module 506 is further configured to use the product of the first preset range and the total number as the third preset range;

[0172] The second preset range is obtained by quotienting the third preset range with the value of π.

[0173] In some embodiments, the determining module 508 is further configured to select any unit region in the drawing partition as the target unit region, and select the second coordinate point corresponding to the target unit region from the second coordinate set as the target coordinate point; wherein, the unit region is obtained by dividing the drawing partition according to the total number of ranging sensors in the drawing partition, and the drawing partition is obtained by pre-dividing the area around the vehicle;

[0174] Select the second coordinate point corresponding to the unit region adjacent to one side of the target unit region from the second coordinate set as the first auxiliary coordinate point, and select the second coordinate point corresponding to the unit region adjacent to the other side of the target unit region from the second coordinate set as the second auxiliary coordinate point;

[0175] The set of control points is determined based on the target coordinate point, the first auxiliary coordinate point, and the second auxiliary coordinate point;

[0176] Auxiliary parameters are determined based on the set of control points.

[0177] In some embodiments, the determining module 508 is further configured to select the integer part of the second coordinate point corresponding to the target unit region from the second coordinate set as the target coordinate point.

[0178] In some embodiments, the drawing module 510 is further configured to draw a Bézier curve of the target cell region based on the set of control points and auxiliary parameters;

[0179] Connect the Bézier curves corresponding to all unit regions to generate the Bézier curves for drawing the partition;

[0180] Connect the Bézier curves of all plotted partitions to generate the Bézier curves corresponding to the distance measurement data.

[0181] In some embodiments, the determining module 508 is further configured to determine a first endpoint based on the target coordinate point and a first auxiliary coordinate point, determine a first insertion point based on the first endpoint and the target coordinate point, and merge the first endpoint, the first insertion point and the target coordinate point as a first subset;

[0182] The second endpoint is determined based on the target coordinate point and the second auxiliary coordinate point. The second insertion point is determined based on the second endpoint and the target coordinate point. The target coordinate point, the second insertion point and the second endpoint are merged into the second subset.

[0183] The first subset and the second subset are merged to form the control point set.

[0184] In some embodiments, the determining module 508 is further configured to include a first auxiliary parameter and a second auxiliary parameter as auxiliary parameters; determine a first line segment based on the first endpoint and the first insertion point, and arbitrarily select a point on the first line segment as a first target auxiliary parameter point;

[0185] Determine the first radian of the first target auxiliary parameter point in the polar coordinate system;

[0186] Extract the first decimal part of the first radian; if the first decimal part is greater than a preset threshold, process the first decimal part according to a first preset processing rule to obtain a first auxiliary parameter; if the first decimal part is less than or equal to the preset threshold, process the first decimal part according to a second preset processing rule to obtain a first auxiliary parameter.

[0187] Determine the second line segment based on the target coordinate point and the second insertion point, and randomly select a point on the second line segment as the auxiliary parameter point of the second target.

[0188] Determine the second radian of the auxiliary parameter point of the second target in the polar coordinate system;

[0189] Extract the second decimal part of the second radian. If the second decimal part is greater than a preset threshold, process the second decimal part according to the first preset processing rule to obtain the second auxiliary parameter. If the second decimal part is less than or equal to the preset threshold, process the second decimal part according to the second preset processing rule to obtain the second auxiliary parameter.

[0190] In some embodiments, the first preset processing rule is expressed by the following formula: First auxiliary parameter = (First decimal part - 0.5) / 0.5; the second preset processing rule is expressed by the following formula: First auxiliary parameter = First decimal part / 0.5. In some embodiments, a coloring module is further included, configured to determine the display color of each first coordinate point in the first coordinate point set according to a preset display color rule;

[0191] The Bézier curve is colored according to the display color of each first coordinate point;

[0192] Displays a colored Bézier curve. In some embodiments, the coloring module is further configured to determine the display color of each first coordinate point based on the distance between the first coordinate point and the origin of the Cartesian coordinate system.

[0193] In some embodiments, the coloring module is further configured to determine the display color of the first coordinate point as the first color in response to the distance between the first coordinate point and the origin within a first preset range;

[0194] In response to the distance between the first coordinate point and the origin being within a second preset range, the display color of the first coordinate point is determined to be the second color;

[0195] In response to the distance between the first coordinate point and the origin being within a third preset range, the display color of the first coordinate point is determined to be the third color;

[0196] Among them, the value of the second preset range is greater than the value of the first preset range, and the value of the third preset range is greater than the value of the second preset range.

[0197] In some embodiments, the origin of the Cartesian coordinate system is determined based on the positions of all ranging sensors within the drawing partition.

[0198] In some embodiments, the second set of coordinate points is stored in an array.

[0199] For ease of description, the above devices are described in terms of function, divided into various modules. Of course, in implementing this application, the functions of each module can be implemented in one or more software and / or hardware.

[0200] The apparatus described above is used to implement the corresponding distance curve drawing method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0201] Based on the same inventive concept, corresponding to any of the above embodiments, this application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the ranging curve drawing method of any of the above embodiments.

[0202] Figure 7 shows a more specific hardware structure diagram of an electronic device provided in this embodiment. The device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, memory 1020, input / output interface 1030, and communication interface 1040 are interconnected internally via the bus 1050.

[0203] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0204] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.

[0205] The input / output interface 1030 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.

[0206] The communication interface 1040 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0207] Bus 1050 includes a pathway for transmitting information between various components of the device, such as processor 1010, memory 1020, input / output interface 1030, and communication interface 1040.

[0208] It should be noted that although the above-described device only shows the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.

[0209] The electronic devices described above are used to implement the corresponding distance measurement curve drawing methods in any of the foregoing embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0210] Based on the same inventive concept, corresponding to any of the above embodiments, this application also provides a non-transitory computer-readable storage medium that stores computer instructions for causing a computer to execute the distance measurement curve drawing method as described in any of the above embodiments.

[0211] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0212] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute the distance measurement curve drawing method of any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0213] Based on the same concept, corresponding to any of the above embodiments, this application also provides a computer program product, including computer program instructions. When the computer program instructions are run on a computer, they cause the computer to perform the method as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0214] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this application is limited to these examples; under the concept of this application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the embodiments of this application as described above, which are not provided in detail for the sake of brevity.

[0215] Additionally, to simplify the description and discussion, and to avoid obscuring the embodiments of this application, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring the embodiments of this application, and this also takes into account the fact that the details of the implementation of these block diagram apparatuses are highly dependent on the platform on which the embodiments of this application will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuits) have been set forth to describe exemplary embodiments of this application, it will be apparent to those skilled in the art that the embodiments of this application can be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0216] Although this application has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.

[0217] The embodiments of this application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of this application. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the embodiments of this application should be included within the protection scope of this application.

Claims

1. A ranging curve plotting method, characterized by, The method comprises: obtaining ranging data collected by a vehicle ranging sensor; performing data processing on the ranging data to obtain a first coordinate point set of obstacles around the vehicle in a pre-constructed rectangular coordinate system; converting each first coordinate point in the first coordinate point set from the rectangular coordinate system to a polar coordinate system to obtain a second coordinate point set; determining curve parameters for drawing a Bezier curve according to the second coordinate point set; drawing a Bezier curve corresponding to the ranging data according to the curve parameters.

2. The method of claim 1, wherein, Converting each first coordinate point in the first coordinate point set from the rectangular coordinate system to a polar coordinate system to obtain a second coordinate point set comprises: for a rectangular coordinate system pre-constructed in each drawing partition, converting the rectangular coordinate system to a polar coordinate system with a first preset range of radian through coordinate transformation; wherein the drawing partition is obtained by pre-dividing the area around the vehicle; counting the total number of ranging sensors in the drawing partition, determining a second preset range according to the first preset range and the total number, and transforming the radian range of the polar coordinate system to the second preset range; mapping each first coordinate point in the first coordinate point set from the rectangular coordinate system to a polar coordinate system with a radian range of the second preset range to obtain the second coordinate point set.

3. The method of claim 2, wherein, Determining a second preset range according to the first preset range and the total number comprises: taking the product of the first preset range and the total number as a third preset range; performing quotient value processing on the third preset range and the value of π to obtain the second preset range.

4. The method of claim 1, wherein, The curve parameters include a control point set and an auxiliary parameter; determining the curve parameters for drawing a Bezier curve according to the second coordinate point set comprises: selecting any unit region in the drawing partition as a target unit region, and selecting a second coordinate point corresponding to the target unit region from the second coordinate set as a target coordinate point; wherein the unit region is obtained by dividing the drawing partition according to the total number of ranging sensors in the drawing partition, and the drawing partition is obtained by pre-dividing the area around the vehicle; selecting a second coordinate point corresponding to a unit region adjacent to one side of the target unit region from the second coordinate set as a first auxiliary coordinate point, and selecting a second coordinate point corresponding to a unit region adjacent to the other side of the target unit region from the second coordinate set as a second auxiliary coordinate point; determining the control point set according to the target coordinate point, the first auxiliary coordinate point, and the second auxiliary coordinate point; determining the auxiliary parameter according to the control point set.

5. The method of claim 4, wherein, Selecting a second coordinate point corresponding to a target unit region from a second coordinate set as a target coordinate point comprises: selecting the integer part of the second coordinate point corresponding to the target unit region from the second coordinate set as the target coordinate point.

6. The method of claim 4, wherein, Drawing a Bezier curve according to the curve parameters comprises: drawing a Bezier curve of the target unit region according to the control point set and the auxiliary parameter; connecting the Bezier curves corresponding to all unit regions to generate a Bezier curve of the drawing partition; Bezier curves connecting all the drawing partitions generate the Bezier curve corresponding to the ranging data.

7. The method of claim 4, wherein, The control point set is determined according to the target coordinate point, the first auxiliary coordinate point and the second auxiliary coordinate point, and includes: A first end point is determined according to the target coordinate point and the first auxiliary coordinate point, a first insertion point is determined according to the first end point and the target coordinate point, and the first end point, the first insertion point and the target coordinate point are combined as a first sub-set; A second end point is determined according to the target coordinate point and the second auxiliary coordinate point, a second insertion point is determined according to the second end point and the target coordinate point, and the target coordinate point, the second insertion point and the second end point are combined as a second sub-set; The first sub-set and the second sub-set are combined as the control point set.

8. The method of claim 7, wherein, The auxiliary parameters include a first auxiliary parameter and a second auxiliary parameter, and the auxiliary parameters are determined according to the control point set, and include: A first line segment is determined according to the first end point and the first insertion point, and an optional point on the first line segment is taken as a first target auxiliary parameter point; A first radian of the first target auxiliary parameter point in the polar coordinate system is determined; A first decimal part of the first radian is extracted, the first auxiliary parameter is obtained by processing the first decimal part according to a first preset processing rule in response to the first decimal part being greater than a preset threshold, and the first auxiliary parameter is obtained by processing the first decimal part according to a second preset processing rule in response to the first decimal part being less than or equal to the preset threshold; A second line segment is determined according to the target coordinate point and the second insertion point, and an optional point on the second line segment is taken as a second target auxiliary parameter point; A second radian of the second target auxiliary parameter point in the polar coordinate system is determined; A second decimal part of the second radian is extracted, the second auxiliary parameter is obtained by processing the second decimal part according to the first preset processing rule in response to the second decimal part being greater than the preset threshold, and the second auxiliary parameter is obtained by processing the second decimal part according to the second preset processing rule in response to the second decimal part being less than or equal to the preset threshold.

9. The method of claim 8, wherein The first preset processing rule is represented by the following formula: The first auxiliary parameter = (the first decimal part - 0.5) / 0.5; The second preset processing rule is represented by the following formula: The first auxiliary parameter = the first decimal part / 0.

5.

10. The method of claim 1, wherein, The method further includes: Display colors of each first coordinate point in the first coordinate point set are determined according to a preset display color rule; The Bezier curve is colored according to the display colors of each first coordinate point; The colored Bezier curve is displayed.

11. The method of claim 10, wherein, Display colors of each first coordinate point in the first coordinate point set are determined according to a preset color display rule, and include: The display color of each first coordinate point is determined according to the distance between the first coordinate point and the origin of the rectangular coordinate system.

12. The method of claim 11, wherein, The display color of each first coordinate point in the first coordinate point set is determined according to a preset display color rule, and the display color of each first coordinate point in the first coordinate point set is determined according to a preset display color rule, comprising: In response to the distance between the first coordinate point and the origin being within a first preset range, the display color of the first coordinate point is determined to be a first color; in response to the distance between the first coordinate point and the origin being within a second preset range, the display color of the first coordinate point is determined to be a second color; in response to the distance between the first coordinate point and the origin being within a third preset range, the display color of the first coordinate point is determined to be a third color; wherein the numerical value of the second preset range is greater than the numerical value of the first preset range, and the numerical value of the third preset range is greater than the numerical value of the second preset range.

13. The method of claim 2, wherein, The origin of the rectangular coordinate system is determined according to the positions of all ranging sensors in the drawing partition.

14. The method of claim 1, wherein, The second coordinate point set is stored in an array.

15. A vehicle characterized by comprising: The vehicle comprises: a memory for storing executable program code; a processor for calling and running the executable program code from the memory, so that the vehicle executes the method according to any one of claims 1 to 14.