Radar-based curve drawing method, device, electronic device and storage medium
The starting point and end point of the bend are obtained through radar, and the Bezier curve drawing method is used to solve the problem that the existing technology cannot accurately draw bends, realize the precise drawing of bends and the coordination of road line types, and improve traffic safety .
Patent Information
- Application Number
- CN202010689128.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-17
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2040-07-17
AI Technical Summary
The existing drawing methods cannot accurately draw curves, resulting in inconsistent road lines and increasing the risk of traffic accidents.
Using a radar-based method, the Bezier curve drawing method is used to obtain the starting point and end point of the bend, and the control points are added to make the Bezier curve move in line with the bend on the map, and the Bezier curve is used as the Bezier curve. Points form perpendicular lines, determine the coordinate points of the lane line, and achieve accurate drawing of curves.
Accurate drawing of curves is achieved, the coordination of road lines is ensured, and traffic safety is improved.
Smart Images

Figure CN111986286B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the drawing of a curve, and in particular to an intelligent method for drawing a curve. Background Art
[0002] In recent years, with the rapid development of social economy and the continuous improvement of people's living standards, the process of motorization in my country has been accelerating. With the increase in the number of cars, the increase in traffic volume and the increase in driving speed, road traffic accidents have been increasing year by year, especially the frequent occurrence of major and vicious traffic accidents, which has caused huge losses to people's lives, property and the national economy.
[0003] There is a close relationship between the driving of cars and the drawing of road lines. The road line type is formed by the combination of curves and straight lines. Whether the road line type is coordinated has a great impact on road traffic safety and smoothness. A large number of traffic accidents are caused by unsafe road conditions or road environments, and unsafe road conditions are related to whether the road line type is coordinated. Especially when it comes to curves, the risk of accidents is relatively high, so the impact of road line type on traffic safety cannot be ignored.
[0004] Currently, when using radar to draw straight lanes, you only need to know the lane length, lane width and lane center point. The lane line can be generated by connecting the four points. However, this method often cannot accurately draw curves.
[0005] Bezier curve is a mathematical curve used in two-dimensional graphics applications. In a two-dimensional coordinate system, a curve consists of a starting point, an ending point, and a control point (multiple). The curvature (degree of curvature) of the curve can be changed by moving the starting / ending points. By moving the control points, the curve moves evenly while the starting and ending points are locked, and the shape of the Bezier curve changes. Summary of the invention
[0006] The present invention aims to provide a radar-based curve drawing method to solve the technical problem that the existing drawing methods cannot accurately draw curves.
[0007] To achieve the above object, the present invention proposes the following technical solutions:
[0008] A radar-based curve drawing method.
[0009] Get a map of where the bend is;
[0010] Draw the curves one by one, and the drawing method of each curve is as follows:
[0011] Draw a Bezier curve with the starting point and the end point of the lane as the starting point and the end point respectively, add several control points between the starting point and the end point, and adjust the control points so that the direction of the Bezier curve is consistent with the direction of the curve on the map;
[0012] Perpendicular lines are drawn from the lines connecting all two adjacent points on the Bezier curve, where each perpendicular line has one of its endpoints as a foot, and the same point has only one foot. Two coordinate points are determined on each perpendicular line at a distance D / 2 from the foot of the perpendicular, where D is the preset lane width.
[0013] The coordinates of the points on the Bezier curve and the coordinate points on both sides of the Bezier curve are obtained, so that a center line can be drawn on the road according to the coordinates of the points on the Bezier curve and lane lines can be formed by connecting the coordinate points on both sides of the Bezier curve.
[0014] Furthermore, in the present invention, the starting point and the end point of the curve detected by the radar are obtained, wherein the starting point is the midpoint of a lane at one end and the edge of the curve in the driving direction, and the end point is the midpoint of the lane at the other end in the driving direction;
[0015] Use the above starting point and end point as the starting point and end point of the first drawn curve.
[0016] Furthermore, in the present invention, the starting point and the end point of each curve other than the first drawn curve are obtained by:
[0017] A new starting point is determined at a position D away from the starting point on a vertical line where the starting point of an adjacent and completed curve is located, and a new end point is determined at a position D away from the end point on a vertical line where the end point of the adjacent and completed curve is located, wherein the new starting point and the new end point are located on the same side relative to the Bezier curve of the completed curve; the new starting point and the new end point are respectively the starting point and the ending point of the Bezier curve of the currently drawn curve.
[0018] Furthermore, in the present invention, control points of the Bezier curve in the first drawn curve are added manually.
[0019] Furthermore, in the present invention, the control points of the Bezier curves in each of the curves other than the first drawn curve are obtained by:
[0020] A line is formed between every two points on a Bezier curve of an adjacent and completed curve, and the line is translated along its own perpendicular direction by a distance D to form a new line, and the intersection of the two new lines is used as a new control point.
[0021] Furthermore, in the present invention, points on the lane line between the same adjacent curves are fitted to form a lane line between the adjacent curves.
[0022] Furthermore, in the present invention, the method is performed in a radar coordinate system; the control points are adjusted so that the direction of the Bezier curve avoids obstacles in the radar image.
[0023] Furthermore, in the present invention, the origin of the radar coordinate system is used as the starting point of the first drawn curve, and a point on the coordinate axis of the radar coordinate system is used as the end point of the first drawn curve.
[0024] Another aspect of the present invention provides a radar-based curve drawing device, comprising:
[0025] A map acquisition module is used to obtain a map where a curve is located;
[0026] The curve drawing module is used to draw curves one by one, wherein each curve drawing module includes a Bezier curve drawing module and a vertical line drawing module, wherein:
[0027] The Bezier curve drawing module draws the Bezier curve with the starting point and the end point of the lane as the starting point and the end point respectively, adds several control points between the starting point and the end point, and adjusts the control points so that the direction of the Bezier curve is consistent with the direction of the curve on the map;
[0028] The vertical line drawing module draws vertical lines by connecting all two adjacent points on the Bezier curve, wherein each vertical line takes one of the endpoints as the foot of the vertical line, and the same point has only one foot of the vertical line; two coordinate points are determined at a distance D / 2 from the foot of the vertical line on each vertical line, where D is the preset lane width;
[0029] The coordinate point acquisition module is used to obtain the coordinates of the points on the Bezier curve and the coordinate points on both sides of the Bezier curve, so that the center line can be drawn on the road according to the coordinates of the points on the Bezier curve and the lane lines can be formed by connecting the coordinate points on both sides of the Bezier curve.
[0030] Another aspect of the present invention provides an electronic device, including a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the above method by executing the computer instructions.
[0031] Another aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the above method.
[0032] Beneficial effects:
[0033] It can be seen from the above technical scheme that the technical scheme of the present invention provides a radar-based curve drawing method, which obtains the overall outline of the curve through radar, and then determines the starting point and end point of the first drawn curve as the endpoints of the Bezier curve of the curve, and then adds control points, and adjusts the control points to make the direction of the Bezier curve consistent with the direction of the road on the map, and then moves the points on the Bezier curve in the vertical direction by half the lane width to form points on the lane line, and then connects the corresponding points on the lane line to form a lane line; the control points of the remaining lanes form a line with every two points on the Bezier curve of the previously completed curve, and the line is translated along its own vertical direction by a lane width to form a new line, and the intersection of the two new lines is used as a new control point, and then the current curve and subsequent curves are drawn in the same way as the first drawn curve.
[0034] The curve drawn by the above method can achieve precise direction control through control points, and can provide clear coordinates for each point on the curve to ensure the accuracy of the curve line position on the actual road.
[0035] It should be appreciated that all combinations of the foregoing concepts, as well as additional concepts described in greater detail below, may be considered to be part of the inventive subject matter of the present disclosure, provided such concepts are not mutually inconsistent.
[0036] The foregoing and other aspects, embodiments and features of the present invention can be more fully understood from the following description in conjunction with the accompanying drawings. Other additional aspects of the present invention, such as the features and / or beneficial effects of the exemplary embodiments, will be apparent from the following description or learned from the practice of the specific embodiments according to the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The drawings are not intended to be drawn to scale. In the drawings, each identical or nearly identical component shown in various figures may be represented by the same reference numeral. For clarity, not every component is labeled in every figure. Embodiments of various aspects of the present invention will now be described by way of example and with reference to the accompanying drawings, in which:
[0038] Figure 1 It is a schematic diagram of the process of the present invention;
[0039] Figure 2 It is a schematic diagram of the device module of the present invention;
[0040] Figure 3 A schematic diagram of the first curved road drawn in the present invention;
[0041] Figure 4 This is a schematic diagram of obtaining control points of the second drawn curve in the present invention. DETAILED DESCRIPTION
[0042] In order to better understand the technical content of the present invention, specific embodiments are given and described as follows in conjunction with the accompanying drawings.
[0043] Various aspects of the present invention are described in this disclosure with reference to the accompanying drawings, in which many illustrative embodiments are shown. The embodiments of the present disclosure are not necessarily intended to include all aspects of the present invention. It should be understood that the various concepts and embodiments introduced above, as well as those described in more detail below, can be implemented in any of many ways, because the concepts and embodiments disclosed by the present invention are not limited to any implementation. In addition, some aspects disclosed by the present invention can be used alone or in any appropriate combination with other aspects disclosed by the present invention.
[0044] A specific embodiment of the present invention is a scientific curve drawing method proposed to address the problem that when drawing a curve, the curve is an arc and the drawing process greatly relies on the experience of the on-site drawing personnel, resulting in unevenness between lanes, thereby bringing about the problem of affecting driving safety. By using this method, the specific coordinates of the drawing points can be accurately obtained, and the arc drawing is completed according to the specific coordinates so that the drawn curve is evenly distributed, which is beneficial to ensuring driving safety.
[0045] The core of the method of the present invention is to rely on Bezier curves to form precise control of the direction of the curve through the control points of the curve, and then expand it by relying on mathematical translation and other relationships to achieve the drawing of multiple lanes.
[0046] The implementation of the present invention requires the use of radar scanning technology and electronic maps. The radar scanning technology is used to obtain the boundary points of the actual road, which serve as the boundaries of the curves and also provide the coordinates of the necessary points. The electronic map can provide a reference for the direction of the road, making the drawing more accurate.
[0047] Embodiment 1,
[0048] like Figure 1 As shown, a radar-based curve drawing method in a specific embodiment of the present invention includes the following steps:
[0049] S101. Obtain a map of the curve. The map can show the direction of the entire road and can be used as a reference for drawing the curve later. In addition, referring to the road distribution in the map, adjust the actual irradiation direction of the radar so that the curve to be calibrated falls within the irradiation range of the radar. The location of the radar can be calibrated according to the longitude and latitude information in the map coordinate system, and the longitude and latitude information also provides the specific location coordinates of each location point obtained later.
[0050] S102, drawing curves one by one, wherein the method for drawing each curve is as follows:
[0051] S1021, draw a Bezier curve with the starting point and the end point of the lane as the starting point and the end point respectively, add several control points between the starting point and the end point, and adjust the control points so that the direction of the Bezier curve is consistent with the direction of the curve on the map. Thus, the obtained Bezier curve is used as the center line of the curve. Figure 3 As shown, point A and point B are the starting point and end point of one of the Bezier curves, respectively. The Bezier curve has several points, such as point C and point D in the figure.
[0052] S1022. Draw perpendicular lines from the lines connecting all two adjacent points on the Bezier curve, wherein each perpendicular line has one of its endpoints as a foot, and the same point has only one foot; determine two coordinate points on each perpendicular line at a distance D / 2 from the foot, where D is the preset lane width. Figure 3 As shown, on the Bezier curve, there is a point H between points CD. A perpendicular line passing through point H is made from the line connecting point H and point D, and two coordinate points C' and D' are determined at a distance of D / 2 from the foot of the perpendicular. Referring to the above method, the above operation is repeated with each point between the starting point and the end point on the Bezier curve. For example, a perpendicular line passing through point B is made from the line segment between point B and its adjacent point, and the corresponding points E and F can be obtained. In this way, each perpendicular line made passes through a point closer to point B, until the line segment between point A and its adjacent point makes perpendicular lines passing through the two end points of the line segment, and points E1 and F1 are obtained on the perpendicular line passing through point A.
[0053] S103, obtaining the coordinates of the points on the Bezier curve and the coordinates of the points on both sides of the Bezier curve, so as to draw a center line on the road according to the coordinates of the points on the Bezier curve and to connect the coordinates of the points on both sides of the Bezier curve to form a lane line. Figure 3 As shown, the specific coordinate points can be calculated based on the distance between points in the radar coordinate system and the angle θ between the line segment and the coordinate axis. The coordinate points on the left and right sides of the Bezier curve are smoothly connected to obtain the lane line.
[0054] In the above method, the first lane to be drawn must be selected first, and the positions of the starting point and the end point of the lane are particularly important. In the embodiment of the present invention, since the radar can detect the edge position of the lane, and the number of lanes and the width D of each lane are preset, the positions of the two end points of the center line of the edgemost lane are calculated, that is, the starting point and the end point of the curve detected by the radar are determined, the starting point is one end in the driving direction of the curve and the midpoint of the edgemost lane, and the end point is the midpoint of the lane at the other end in the driving direction, and the starting point and the end point are used as the starting point and the end point of the first drawn curve.
[0055] In other embodiments, the starting point and the end point of other lanes may be arbitrarily selected as the first drawn lane. The Bezier curve of the lane can be formed by finding the starting point and the end point of the corresponding lane by referring to the above method.
[0056] Secondly, control points of the Bezier curve in the first drawn curve are added manually. The density of adding can be determined as needed. The higher the density, the more precise the control.
[0057] The start and end points of each curve other than the first drawn curve are obtained as follows:
[0058] A new starting point is determined at a position D away from the starting point on a vertical line where the starting point of an adjacent and completed curve is located, and a new end point is determined at a position D away from the end point on a vertical line where the end point of the adjacent and completed curve is located, wherein the new starting point and the new end point are located on the same side relative to the Bezier curve of the completed curve; the new starting point and the new end point are respectively the starting point and the ending point of the Bezier curve of the currently drawn curve.
[0059] like Figure 4 As shown, the left edge of the curve is the first lane drawn, point A is moved to the right along the direction of E1F1 by a distance of D to the position A' as the starting point of the second lane drawn, and point B is moved to the right along the direction of EF by a distance of D to the position B' as the end point of the second lane drawn.
[0060] Furthermore, the control points of the Bezier curves in each of the curves other than the first drawn curve are obtained in the following manner:
[0061] A line is formed between every two points on a Bezier curve of an adjacent and completed curve, and the line is translated along its own perpendicular direction by a distance D to form a new line, and the intersection of the two new lines is used as a new control point.
[0062] like Figure 4 As shown, in the first drawn lane, any two points on the Bezier curve form connecting lines L1 and L2, L1 and L2 have an intersection G, L1 and L2 are respectively translated by a distance D along their own perpendicular direction to the direction of the next curve to be drawn, and L1' and L2' and the intersection H between the two are obtained, thereby forming a control point H of the next curve to be drawn. Referring to the above method, multiple control points are formed, thereby obtaining a new Bezier curve, and referring to the first drawn lane before, the second drawn lane is formed.
[0063] Furthermore, in the embodiment of the present invention, since the lane lines between adjacent curves are formed twice, for example Figure 4Points F1 and E are formed by the first drawn lane, and points F1' and E' are formed by the second drawn lane, so it is necessary to fit the points on the lane line between the same adjacent curves to form a lane line between the adjacent curves.
[0064] More preferably, the method is performed in the radar coordinate system; the radar can simultaneously scan obstacles in the actual road into the system, so the control points need to be adjusted so that the direction of the Bezier curve avoids obstacles in the radar map. As a result, the adjusted Bezier curve and the formed lane can better avoid obstacles on site, making the lane drawing accurate and safe.
[0065] Furthermore, in the embodiment of the present invention, since geometric knowledge is used, for the convenience of calculation, Figure 3 and Figure 4 As shown, the origin of the radar coordinate system is used as the starting point of the first drawn curve, and a point on the coordinate axis of the radar coordinate system is used as the end point of the first drawn curve.
[0066] Embodiment 2,
[0067] like Figure 2 As shown, this embodiment provides a radar-based curve drawing device, including
[0068] The map acquisition module is used to obtain the map where the curve is located.
[0069] The curve drawing module is used to draw curves one by one. The drawing method of each curve is as follows:
[0070] Draw a Bezier curve with the starting point and end point of the lane as the starting point and end point respectively, add several control points between the starting point and the end point, and adjust the control points to make the direction of the Bezier curve consistent with the direction of the curve on the map.
[0071] Perpendicular lines are drawn from the lines connecting all two adjacent points on the Bezier curve, where each perpendicular line has one of its endpoints as the foot of the perpendicular, and the same point has only one foot of the perpendicular; two coordinate points are determined on each perpendicular line at a distance D / 2 from the foot of the perpendicular, where D is the preset lane width.
[0072] The coordinate point acquisition module is used to obtain the coordinates of the points on the Bezier curve and the coordinate points on both sides of the Bezier curve, so that the center line can be drawn on the road according to the coordinates of the points on the Bezier curve and the lane lines can be formed by connecting the coordinate points on both sides of the Bezier curve.
[0073] Embodiment 3,
[0074] Another embodiment of the present invention discloses an electronic device, including a memory and a processor, wherein the memory and the processor are communicatively connected to each other, for example, via a bus or other means, and computer instructions are stored in the memory. The processor executes the radar-based curve drawing method by executing the computer instructions.
[0075] The processor is preferably, but not limited to, a central processing unit (CPU). For example, the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.
[0076] As a non-volatile computer-readable storage medium, the memory can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to a radar-based curve drawing method in an embodiment of the present invention. The processor executes various functional applications and data processing of the processor by running the non-volatile software programs, instructions and modules stored in the memory, thereby realizing a radar-based curve drawing method in the above method embodiment.
[0077] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data created by the processor, etc. In addition, the memory is preferably but not limited to a high-speed random access memory, for example, it may also be a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may also optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0078] Those skilled in the art can understand that the implementation of all or part of the processes in the above-mentioned embodiments can be completed by instructing related hardware through a computer program, which can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.
[0079] Although the present invention has been disclosed as above with preferred embodiments, it is not intended to limit the present invention. A person with ordinary knowledge in the technical field to which the present invention belongs may make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be determined by the definition of the claims.
Claims
1. A radar-based curve drawing method, characterized in that: Get a map of where the bend is; According to the road distribution in the map, adjust the actual irradiation direction of the radar so that the curve to be calibrated falls within the irradiation range of the radar; The radar location is calibrated according to the latitude and longitude information in the map coordinate system, and curves are drawn one by one in the radar coordinate system. The method of drawing each curve is as follows: Draw a Bezier curve with the starting point and the end point of the lane as the starting point and the end point respectively, add several control points between the starting point and the end point, and adjust the control points so that the direction of the Bezier curve is consistent with the direction of the curve on the map; Among them, according to the boundary point of the actual road detected by the radar as the edge position of the lane, as well as the preset number of lanes and the width of each lane, the positions of the two end points of the center line of the edgemost lane are calculated to obtain the starting point and end point of the curve detected by the radar, the starting point is one end in the driving direction of the curve and the midpoint of the edgemost lane, the starting point is located at the origin of the radar coordinate system, the end point is the midpoint of the lane at the other end in the driving direction, the end point is located on the coordinate axis of the radar coordinate system, and the starting point and end point are used as the starting point and end point of the first drawn curve; The starting point and the end point of each other curve except the first drawn curve are obtained in the following manner: a new starting point is determined at a position D away from the starting point on a vertical line where the starting point of an adjacent and completed curve is located, and a new end point is determined at a position D away from the end point on a vertical line where the end point of the adjacent and completed curve is located, wherein the new starting point and the new end point are located on the same side relative to the Bezier curve of the completed curve; the new starting point and the new end point are respectively the starting point and the end point of the Bezier curve of the currently drawn curve; Perpendicular lines are drawn from the lines connecting all two adjacent points on the Bezier curve, where each perpendicular line has one of its endpoints as a foot, and the same point has only one foot. Two coordinate points are determined on each perpendicular line at a distance D / 2 from the foot of the perpendicular, where D is the preset lane width. The coordinates of the points on the Bezier curve and the coordinate points on both sides of the Bezier curve are obtained, so that a center line can be drawn on the road according to the coordinates of the points on the Bezier curve and lane lines can be formed by connecting the coordinate points on both sides of the Bezier curve; the coordinate points are calculated according to the distance between the points in the radar coordinate system and the angle θ between the line segment and the coordinate axis; the coordinates of each of the coordinate points are calibrated with the longitude and latitude information in the map coordinate system.
2. The radar-based curve drawing method according to claim 1, characterized in that: For the first drawn bezier curve the control points are added manually.
3. The radar-based curve drawing method according to claim 1, characterized in that: The control points of the Bezier curve in each curve other than the first one drawn are obtained as follows: A line is formed between every two points on a Bezier curve of an adjacent and completed curve, and the line is translated along its own perpendicular direction by a distance D to form a new line, and the intersection of the two new lines is used as a new control point.
4. The radar-based curve drawing method according to claim 1, characterized in that: Fit the points on the lane line between the same adjacent curves to form a lane line between the adjacent curves.
5. The radar-based curve drawing method according to claim 1, characterized in that: Adjust the control points so that the direction of the Bezier curve avoids obstacles in the radar map.
6. An electronic device, characterized in that: The invention comprises a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method according to any one of claims 1 to 5 by executing the computer instructions.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute any one of the methods of claims 1-5.
Citation Information
Patent Citations
Method and device for drawing parallel curves
CN103390283A
Guiding line generation method and guiding line generation device
CN106441312A
Cited By
Radar trajectory-based equipment angle deviation detection and correction method and device, equipment and medium
CN122506502A