Lane width measurement method, device and equipment
By drawing cutting lines on the lane and calculating the lane width at the cutting point, the problems of low accuracy and large error in the prior art are solved, and a higher precision lane width measurement is achieved, which is suitable for complex lane situations.
Patent Information
- Application Number
- CN202110060850.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-18
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2041-01-18
AI Technical Summary
The prior art cannot effectively measure the lane width at any point on the lane under complex conditions, and the measurement accuracy is low, especially when the edge line end points on both sides of the lane are not perpendicular to the lane center line, the error is relatively large.
By drawing a cutting line on the lane, cutting the target lane into two parts, obtaining the cutting point coordinates on the cut center line or lane edge line, and then calculate the lane width value based on the coordinates of the cutting point and the position information of the lane edge line.
It improves the accuracy of lane width measurement, avoids measurement errors caused by inconsistent lane scribe direction and driving direction, and reduces the error that only depends on the distance between the two points on the lane edge line, and is suitable for complex situations such as lanes with gradient width.
Smart Images

Figure CN114812548B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of high-precision map technology, and in particular to a lane width measurement method, device and equipment. Background Art
[0002] With the widespread application of high-precision maps, the information of various elements in the map is becoming richer and richer, and the accuracy is getting higher and higher. Generally speaking, a passable road will have one or more lanes. High-precision maps provide lane dividing lines (i.e. lane edges) that separate different lanes to simulate the lane centerline of the vehicle's driving route, while the lane width represents the lateral distance between the left and right sidelines of each lane, or the sum of the distances from the lane centerline to the sidelines on both sides. Lane width information has gradually become one of the indispensable elements in high-precision maps.
[0003] Since the lane width represents the width between the lane edges on both sides of the lane, the lane width is usually calculated by taking the geometric coordinates of the end points (first point or last point) of the lane edges on both sides of the lane and calculating the distance between the two points.
[0004] However, the actual road conditions are more complicated. In many cases, the width of a lane is not constant, but gradually changes. When the line connecting the endpoints of the lane sidelines is not perpendicular to the lane centerline, in this scenario, using the distance between the two points as the calculation result will result in errors, and the greater the angle between the endpoint line and the perpendicular line of the lane centerline, the greater the error; and when there is a lane sideline with a marking direction opposite to the driving direction of the lane, the endpoint selection will be wrong, resulting in an error in the calculation result. Therefore, the existing technology cannot measure the lane width at any point on the lane in complex situations, and the accuracy of measuring the lane width is low. Summary of the invention
[0005] The embodiments of the present application provide a lane width measurement method, device and equipment to overcome the problem that the prior art cannot measure the lane width at any point on the lane under complex conditions and the accuracy of measuring the lane width is low.
[0006] In a first aspect, an embodiment of the present application provides a lane width measurement method, including:
[0007] Acquire position information of lane edges on both sides of a target lane before cutting, wherein the target lane is a lane with a gradually changing width;
[0008] Obtaining the coordinates of a cutting point on the center line of the target lane after cutting or on any lane edge line;
[0009] According to the coordinates of the cutting point and the position information of the two lane edge lines, a lane width value of the target lane corresponding to the cutting point is obtained.
[0010] In a second aspect, an embodiment of the present application provides a lane width measurement device, including:
[0011] A position acquisition module, used to acquire position information of lane edges on both sides of a target lane before cutting, wherein the target lane is a lane with a gradually changing width;
[0012] A cutting point acquisition module, used to obtain the coordinates of the cutting point on the center line of the target lane after cutting or on any of the lane edges;
[0013] The measuring module is used to obtain the lane width value of the target lane corresponding to the cutting point according to the coordinates of the cutting point and the position information of the two lane edges.
[0014] In a third aspect, an embodiment of the present application provides a lane width measurement device, including: at least one processor and a memory;
[0015] The memory stores computer-executable instructions;
[0016] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the lane width measurement method as described in the first aspect and various possible designs of the first aspect.
[0017] The lane width measurement method, device and equipment provided in this embodiment first obtain the position information of the lane edge lines on both sides of the target lane before cutting, where the target lane has a gradually changing width; then the center line is divided by a cutting line to obtain the coordinates of the cutting point on the center line of the target lane after cutting, and then the width value of the target lane is obtained according to the coordinates of the cutting point and the position information of the two lane edge lines. The measurement accuracy is high, and the problem of measurement error caused by the inconsistency between the lane marking direction and the driving direction on the lane is avoided, and the problem of error in the calculation result caused by only using the distance between two points on the lane edge line as the calculation result is avoided. It is suitable for width measurement at any point in complex situations such as lanes with gradually changing widths. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0019] Figure 1 A schematic diagram of a scenario of a lane width measurement method provided in an embodiment of the present application;
[0020] Figure 2 A schematic diagram of a process flow of a lane width measurement method provided in an embodiment of the present application;
[0021] Figure 3 A schematic flow chart of a lane width measurement method provided in yet another embodiment of the present application;
[0022] Figure 4 A schematic diagram of a scenario of a lane width measurement method provided by another embodiment of the present application;
[0023] Figure 5 A schematic diagram of the structure of a lane width measurement device provided in an embodiment of the present application;
[0024] Figure 6 A schematic diagram of the structure of the lane width measurement device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0026] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0027] At present, the lane width is usually calculated by taking the geometric coordinates of the endpoints (first or last points) of the lane edge lines on both sides of the lane and calculating the distance between the two points. However, the actual road conditions are more complicated. In many cases, the width of a lane is not constant, but gradual. When the line connecting the endpoints of the lane edge lines on both sides is not perpendicular to the lane centerline, in this scenario, using the distance between the two points as the calculation result will have errors, and the greater the angle between the endpoint line and the perpendicular line of the lane centerline, the greater the error; and when there is a lane edge line whose marking direction is opposite to the driving direction of the lane, the endpoint selection will be wrong, resulting in an incorrect calculation result. Therefore, the existing technology cannot measure the lane width at any point on the lane in complex situations, and the accuracy of measuring the lane width is low. Therefore, in response to the above problems, the technical concept of the present application is to cut the lane through any cutting line and calculate the lane width at the cutting point, that is, the lane width at the end point of the first lane and the starting point of the second lane after cutting. First, the geometric coordinates of the cutting point on the center line of the lane can be obtained, and then the sum of the vertical distances from the cutting point on the center line to the lane edge lines on both sides of the lane are used as the lane width at the cutting point. The measurement accuracy is high, which avoids the problem of measurement errors caused by the inconsistency between the lane marking direction and the driving direction on the lane, and also avoids the problem of errors in the calculation result by only using the distance between two points on the lane edge line. It is suitable for width measurement at any point in complex situations such as lanes with gradually changing widths.
[0028] In practical applications, see Figure 1 As shown, Figure 1 A schematic diagram of a scene of a lane width measurement method provided for an embodiment of the present application. The measurement method proposed in the present application utilizes data from a high-precision map, and first obtains the location of the lane of the gradually varying width to be measured, that is, the location of the target lane, including the location information of the lane sidelines on both sides of the target lane, such as the coordinates of each point on the lane sidelines. Then the target lane is cut by a cutting line, and it is cut into two lanes, such as lane 1 and lane 2, and the centerline of the target lane is also divided into two sub-centerlines, such as OE and OF, where O is the cutting point. Since the marking direction of the target lane is known, the marking direction of the target lane is the marking direction of the centerline of the target lane. Therefore, in order to measure the lane width at the cutting point on the target lane, the coordinates of the cutting point on the centerline of the target lane after cutting can be obtained, and then the distance from the cutting point to the lane sidelines on both sides (i.e., the vertical distance from the point to the line: D1, D2) is calculated. The sum of the distances (D1+D2) is the lane width value at the cutting point, where the cutting point is the position point of the lane sidelines on both sides of the cutting, and where the cutting is considered to be the cutting point. Since the parameter used in the calculation is the cutting point on the center line of the target lane and is independent of the driving direction of the lane, it avoids the situation where the lane edge on one side is the lane edge shared by two lanes, resulting in incorrect calculation results.
[0029] The technical solution of the present application is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0030] Figure 2 A schematic flow chart of a lane width measurement method provided in an embodiment of the present application, the method may include:
[0031] S101. Acquire position information of lane edges on both sides of a target lane before cutting, wherein the target lane is a lane with a gradually changing width.
[0032] In this embodiment, the execution subject may be a lane width measurement device, such as a server. In the process of compiling high-precision map data, when a lane with a gradually changing width is cut into two lanes for some reason, it is necessary to calculate the lane width at the cut, that is, the lane width at the end of the first lane and the start of the second lane after the cut.
[0033] Among them, the lane width measurement method can be applied to the width measurement of a lane with a gradually changing width, by obtaining the position information of the lane edges on both sides of the target lane from a high-precision map before cutting the target lane.
[0034] Specifically, since the high-precision map may cut a lane with a gradient width for some reason during the compilation process, and the lane width at each point cannot be provided during the source data collection and production process, generally only the lane width at certain specific locations will be provided, such as the starting and ending points of the lane. Therefore, the position information of the lane edge lines on both sides of the target lane before cutting and the straight line equation of each lane edge line can be determined based on the provided starting and ending points, the lane width value at the starting position, and the lane width value at the end position.
[0035] S102: Obtain the coordinates of a cutting point on the center line of the target lane after cutting or on any lane edge line.
[0036] In this embodiment, the cutting point on the center line of the lane is used to calculate the lane width value at the lane line cutting point, without considering whether the lane marking direction is consistent with the lane driving direction.
[0037] Before obtaining the coordinates of the cutting points, the target lane needs to be cut first. The cutting methods may include at least the following two:
[0038] Method 1: cutting the target lane according to a preset ratio.
[0039] In this embodiment, the lane is cut according to the percentage of the cut position in the entire lane. In this way, the geometry of the center lines of the two lanes after cutting can be obtained by first using the cut ratio and the original lane center geometry line (for example, using the Line_Substring function provided by SpatiaLite to obtain the result), and then taking the first lane (for example Figure 1 The end coordinates of lane 1) in the figure are the coordinates of the cutting point at the center line of the lane. The geometry here refers to the linear geometry composed of multiple point coordinates.
[0040] In a possible design, how to cut the target lane according to a preset ratio, that is, the specific implementation process of method 1, can be achieved through the following steps:
[0041] Step b1, obtaining the position information of the center line of the target lane.
[0042] Step b2: cutting the center line of the target lane into two sub-center lines according to the preset ratio based on the position information of the center line.
[0043] In this embodiment, combined with Figure 1 As shown, the percentage of the center line of the cutting point to the center line of the entire lane (i.e., the center line of the target lane) is provided, that is, the ratio of OE or OF to EF. Usually, due to changes in the attributes of the road or lane, such as changes in the road grade, changes in the lane's access restriction information, changes in the number and type of lane edges, etc., it is necessary to cut the road or lane at point O (here, point O can be considered as the cutting point). The change information and the ratio of the change position are usually provided by the source data.
[0044] How to obtain the coordinates of the cutting points according to the cutting method 1 can be achieved through the following steps:
[0045] According to the marking direction corresponding to the center line of the target lane, the end point coordinates of the first sub-center line of the two sub-center lines are obtained.
[0046] The end point coordinates are the coordinates of the cutting point.
[0047] In this embodiment, the geometry of the two lane center lines EO and OF after cutting is calculated using the cutting ratio and the geometry of the original lane center line EF using the Line_Substring function provided by SpatiaLite, and then the end point coordinates of the first lane center line EO (starting from the line direction corresponding to the center line of the target lane, the first center line that appears, i.e., the first sub-center line) are taken as the coordinates of the cutting point. Since OE or OF accounts for the ratio of EF and the geometry of EF is known (i.e., the linear geometry EF composed of multiple point coordinates), the coordinates of point O can be obtained.
[0048] Method 2: Cut the target lane according to the preset cutting line
[0049] In this embodiment, the geometric shape of the cutting line is known, and the intersection of the cutting line and the original lane centerline is calculated, which is the coordinate of the cutting point on the lane centerline.
[0050] In a possible design, how to cut the target lane according to the preset cutting line, that is, the specific implementation process of method 2 can be achieved through the following steps:
[0051] Step c1, obtaining the position information of the preset cutting line.
[0052] Step c2: cutting the target lane according to the position information of the preset cutting line to obtain two sub-lanes.
[0053] Wherein, the center line of the target lane intersects with the preset cutting line, and the intersection point is the cutting point.
[0054] In this embodiment, by providing the geometry of the cutting line ( Figure 1 For example, a map usually has a square-like grid line for compiling and storing map data in blocks. When the grid line intersects the lane, an intersection point O is generated with the lane center line. The intersection point O is the cutting point.
[0055] Specifically, using the position information of the preset cutting line, the target lane can be cut into two sub-lanes, namely lane 1 and lane 2. At this time, the cutting line and the center line of the target lane generate an intersection O.
[0056] How to obtain the coordinates of the cutting points according to the cutting method 2 can be achieved through the following steps:
[0057] Step d1, obtaining the position information of the center line of the target lane.
[0058] Step d2, calculating the straight line equation of the center line of the target lane according to the position information of the center line of the target lane;
[0059] Step d3: Calculate the linear equation of the preset cutting line according to the position information of the preset cutting line.
[0060] Step d4, calculating the coordinates of the cutting point according to the straight line equation of the center line of the target lane and the straight line equation of the preset cutting line.
[0061] In this embodiment, the intersection function in the SpatiaLite library can be used to calculate the intersection of the cutting line and the lane centerline EF, that is, to obtain the coordinates of the cutting point O. Specifically, the linear equation of EF can be determined based on the known geometric shape of EF, and then the linear equation of the cutting line can be determined based on the geometric shape of the preset cutting line. Since EF intersects the cutting line, the coordinates of the intersection O, that is, the coordinates of the cutting point, can be calculated.
[0062] Specifically, see Figure 3 As shown, Figure 3 A flow chart of a lane width measurement method provided for another embodiment of the present application. In this embodiment, first, a lane with a gradually varying width, i.e., the target lane, is cut. The cutting method can be proportional cutting, and the geometric shape of the center line after cutting is calculated to obtain the cutting point on the center line of the lane (i.e., the center line of the target lane); or the cutting can be performed according to the cutting line, and the intersection of the cutting line and the center line of the lane is calculated to obtain the cutting point on the center line of the lane. Then, by obtaining the complete left and right side lines (such as AB and CD) before the lane is cut, the distances from the cutting point to the two side lines are calculated and added according to the calculated cutting point to complete the lane width value at the cutting point.
[0063] S103: Obtain a lane width value of the target lane corresponding to the cutting point according to the coordinates of the cutting point and the position information of the two lane edges.
[0064] The lane width value can be calculated in the following two ways:
[0065] Method 3: The cutting point is on the center line.
[0066] The lane width value of the target lane corresponding to the cutting point is obtained according to the coordinates of the cutting point and the position information of the two lane edges, which can be achieved by the following steps:
[0067] Step 11: Calculate the vertical distance from the cutting point to each lane edge line according to the coordinates of the cutting point and the position information of the two lane edge lines.
[0068] Step 12: Add the vertical distances from the cutting point to each lane edge to obtain the lane width value of the target lane corresponding to the cutting point.
[0069] In this embodiment, the vertical distances from the cutting point to the complete lane edge line on the left side of the lane before cutting and the complete lane edge line on the right side of the lane are calculated respectively, and the sum of the two is the lane width at the cutting point.
[0070] In a possible design, how to calculate the distance from the cutting point to each lane edge can be achieved by the following steps:
[0071] Step a1: Calculate the straight line equation of each lane edge line according to the position information of the two lane edge lines.
[0072] Step a2: Calculate the vertical distance from the cutting point to each lane edge line according to the coordinates of the cutting point and the straight line equation of each lane edge line.
[0073] In this embodiment, combined with Figure 1 As shown in the figure, the original geometric shapes of the left and right side lines (i.e., lane side lines) of the target lane before cutting, i.e., the geometric shape lines of AB and CD, are obtained, and then the straight-line distances D1 and D2 from point O to AB and CD are calculated respectively by using the Distance function in the SpatiaLite library, where D1+D2 is the lane width value at the cutting point. The cutting line here can be found in Figure 1 Shown by the dashed line.
[0074] Therefore, this embodiment can be applied to the lane width at any point on the lane in complex situations such as lanes with gradually changing widths, and the sum of the vertical distances from the cutting point on the center line to the two lane edges is used as the width value of the measured lane width, with high measurement accuracy.
[0075] Method 4: The cutting point is on the lane edge.
[0076] The lane width value of the target lane corresponding to the cutting point is obtained according to the coordinates of the cutting point and the position information of the two lane edges, which can be achieved by the following steps:
[0077] According to the coordinates of the cutting point and the position information of another lane edge line on the two sides except the lane edge line where the cutting point is located, the vertical distance from the cutting point to another lane edge line on the two sides except the lane edge line where the cutting point is located is calculated.
[0078] Among them, the vertical distance from the cutting point to another lane edge line of the lane lines on both sides except the lane edge line where the cutting point is located is the lane width value.
[0079] For example, see Figure 4 As shown, Figure 4 A schematic diagram of a lane width measurement method provided in another embodiment of the present application. P is the cutting point. For example, point P is a point on the sideline AB. The straight-line distance from point P to the complete sideline CD on the other side of the lane before cutting is calculated. This value is the lane width value at the cutting point, where the marking direction of the lane sideline is consistent with the lane's passing direction. This method only needs to calculate the distance from the point to the line once, which can reduce the amount of calculation.
[0080] Specifically, the lane width value at the cutting position can be calculated by obtaining the cutting point P on the lane edge line (the calculation method is similar to obtaining the cutting point on the lane center line), and then calculating the straight-line distance from point P to the complete edge line CD on the other side of the lane before cutting. This value is the lane width value at the cutting position. It should be noted that the marking direction of the lane edge line is consistent with the lane's passing direction.
[0081] The lane width measurement method provided in this embodiment first obtains the position information of the lane edge lines on both sides of the target lane before cutting, where the target lane has a gradient width; then the center line is divided by a cutting line to obtain the coordinates of the cutting point on the center line of the target lane after cutting, and then the vertical distance from the cutting point to each lane edge line is calculated according to the coordinates of the cutting point and the position information of the two lane edge lines, and the distance from the point to the two lane edge lines is calculated by using the coordinates on the center line, and then the sum of the distances is used as the width value of the target lane. The measurement accuracy is high, and the problem of measurement error caused by the inconsistency between the lane marking direction and the driving direction on the lane is avoided, and the problem of error in the calculation result caused by only using the distance between two points on the lane edge line as the calculation result is avoided. The method is suitable for width measurement at any point in complex situations such as lanes with gradient widths.
[0082] In this application, the lane width can be calculated by using the distance between the cutting point of the lane centerline and the complete lane edgeline before cutting; the lane width can also be calculated by using the distance between the cutting point of the lane edgeline and the complete lane edgeline before cutting. For example, the application scenario is when a lane with a gradually varying width is cut, the lane width calculation method at the cutting point. If the lane is not cut, but the width value of the lane at a certain point needs to be calculated, the lane width measurement method provided by this application can also be adopted, wherein when it is not cut, the coordinates of the first point (or the last point) of the centerline of the lane can be regarded as the cutting point. Or if the source data does not provide the lane width and needs to be calculated by itself during data compilation, the lane width measurement method provided by this application can also be used.
[0083] Therefore, the present application can solve the problem of lane width calculation errors caused by the fact that the end point connection line of the lane side lines is not perpendicular to the lane center line in the traditional simple algorithm; it can also solve the problem of lane width calculation errors caused by the fact that the marking direction of the lane side lines is opposite to the driving direction of the lane in the traditional simple algorithm.
[0084] In order to implement the lane width measurement method, this embodiment provides a lane width measurement device. Figure 5 , Figure 5A schematic diagram of the structure of a lane width measurement device provided in an embodiment of the present application; the lane width measurement device 50 comprises: a position acquisition module 501, a cutting point acquisition module 502, and a measurement module 503; the position acquisition module 501 is used to obtain the position information of the lane edges on both sides of the target lane before cutting, and the target lane is a lane with a gradually varying width; the cutting point acquisition module 502 is used to obtain the coordinates of the cutting point on the center line of the target lane after cutting or on any of the lane edges; the measurement module 503 is used to obtain the lane width value of the target lane corresponding to the cutting point according to the coordinates of the cutting point and the position information of the two lane edges.
[0085] In this embodiment, a position acquisition module 501, a cutting point acquisition module 502, and a measurement module 503 are set to obtain the position information of the lane edge lines on both sides of the target lane before cutting, where the target lane has a gradient width; then the center line is divided by a cutting line to obtain the coordinates of the cutting point on the center line of the target lane after cutting, and then the width value of the target lane is obtained according to the coordinates of the cutting point and the position information of the two lane edge lines. The measurement accuracy is high, and the problem of measurement error caused by the inconsistency between the lane marking direction and the driving direction on the lane is avoided, and the problem of error in the calculation result caused by only using the distance between two points on the lane edge line as the calculation result is avoided. It is suitable for width measurement at any point in complex situations such as lanes with gradient widths.
[0086] The device provided in this embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be repeated here.
[0087] In a possible design, the measurement module is specifically used to: when the cutting point is on the center line, calculate the vertical distance from the cutting point to each of the lane edges according to the coordinates of the cutting point and the position information of the two lane edges; add the vertical distances from the cutting point to each of the lane edges to obtain the lane width value of the target lane corresponding to the cutting point.
[0088] In a possible design, the measurement module is specifically used to: when the cutting point is on any lane edge line, calculate the vertical distance from the cutting point to the other lane edge line among the lane lines on both sides except the lane edge line where the cutting point is located, based on the coordinates of the cutting point and the position information of the other lane edge line among the lane lines on both sides except the lane edge line where the cutting point is located; wherein the vertical distance from the cutting point to the other lane edge line among the lane lines on both sides except the lane edge line where the cutting point is located is the lane width value.
[0089] In a possible design, the device may further include: a cutting module; a cutting module, used to cut the target lane according to a preset ratio or cut the target lane according to a preset cutting line.
[0090] In a possible design, the cutting module is specifically used to: obtain the position information of the center line of the target lane; and cut the center line of the target lane into two sub-center lines according to the preset ratio based on the position information of the center line.
[0091] In a possible design, the cutting point acquisition module is specifically used to: obtain the end point coordinates of the first sub-center line of the two sub-center lines according to the marking direction corresponding to the center line of the target lane; wherein the end point coordinates are the coordinates of the cutting point.
[0092] In a possible design, the cutting module is further specifically used to: obtain the position information of a preset cutting line; cut the target lane according to the position information of the preset cutting line to obtain two sub-lanes; wherein the center line of the target lane intersects with the preset cutting line, and the intersection point is the cutting point.
[0093] In a possible design, the cutting point acquisition module is also specifically used to: obtain the position information of the center line of the target lane; calculate the straight line equation of the center line of the target lane based on the position information of the center line of the target lane; calculate the straight line equation of the preset cutting line based on the position information of the preset cutting line; calculate the coordinates of the cutting point based on the straight line equation of the center line of the target lane and the straight line equation of the preset cutting line.
[0094] In one possible design, the measurement module is specifically used to: calculate the straight line equation of each lane edge line based on the position information of the two lane edge lines; calculate the vertical distance from the cutting point to each lane edge line based on the coordinates of the cutting point and the straight line equation of each lane edge line.
[0095] In order to implement the lane width measurement method, this embodiment provides a lane width measurement device. Figure 6 This is a schematic diagram of the structure of the lane width measurement device provided in the embodiment of the present application. Figure 6 As shown, the lane width measurement device 60 of this embodiment includes: a processor 601 and a memory 602; wherein the memory 602 is used to store computer-executable instructions; the processor 601 is used to execute the computer-executable instructions stored in the memory to implement the various steps performed in the above embodiment. For details, please refer to the relevant description in the above method embodiment.
[0096] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the lane width measurement method as described above is implemented.
[0097] An embodiment of the present application also provides a computer program product, including a computer program, which implements the lane width measurement method as described above when executed by a processor.
[0098] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms. In addition, each functional module in each embodiment of the present application can be integrated into a processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The unit composed of the above modules can be implemented in the form of hardware or in the form of hardware plus software functional units.
[0099] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present application. It should be understood that the above-mentioned processor can be a central processing unit (English: Central Processing Unit, referred to as: CPU), or other general-purpose processors, digital signal processors (English: Digital Signal Processor, referred to as: DSP), application-specific integrated circuits (English: Application Specific Integrated Circuit, referred to as: ASIC), etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the invention can be directly embodied as a hardware processor to be executed, or the hardware and software modules in the processor can be combined and executed.
[0100] The memory may include high-speed RAM memory, and may also include non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a disk or an optical disk, etc. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus. The above-mentioned storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a disk or an optical disk. The storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0101] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic device or a main control device.
[0102] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0103] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A lane width measurement method, characterized in that: include: Acquire position information of lane edges on both sides of a target lane before cutting, wherein the target lane is a lane with a gradually changing width; Acquire the coordinates of a cutting point of the center line of the target lane after cutting, wherein the cutting point is determined according to a preset ratio of cutting the center line of the target lane or a preset cutting line of cutting the target lane; According to the coordinates of the cutting point and the position information of the two lane edges, the lane width value corresponding to the target lane at the cutting point is obtained, including: Calculate the vertical distance from the cutting point to each lane edge according to the coordinates of the cutting point and the position information of the two lane edge lines; The vertical distance from the cutting point to each lane edge is added to obtain the lane width value of the target lane corresponding to the cutting point.
2. The method according to claim 1, characterized in that Before obtaining the coordinates of the cutting point of the target lane on the center line after cutting, the method further includes: The target lane is cut according to the preset ratio or the target lane is cut according to a preset cutting line.
3. The method according to claim 2, characterized in that The step of cutting the target lane according to the preset cutting line includes: Acquiring the position information of the preset cutting line; According to the position information of the preset cutting line, the target lane is cut to obtain two sub-lanes; Wherein, the center line of the target lane intersects with the preset cutting line, and the intersection point is the cutting point.
4. The method according to claim 3, characterized in that The step of obtaining the coordinates of the cutting point on the center line of the target lane after cutting includes: Obtaining the position information of the center line of the target lane; Calculating a straight line equation of the center line of the target lane according to the position information of the center line of the target lane; Calculating the linear equation of the preset cutting line according to the position information of the preset cutting line; The coordinates of the cutting point are calculated according to the straight line equation of the center line of the target lane and the straight line equation of the preset cutting line.
5. The method according to claim 2, characterized in that: The step of cutting the target lane according to the preset ratio includes: Obtaining the position information of the center line of the target lane; According to the position information of the center line, the center line of the target lane is cut into two sub-center lines according to the preset ratio; Accordingly, obtaining the coordinates of the cutting point on the center line of the target lane after cutting includes: According to the marking direction corresponding to the center line of the target lane, obtaining the end point coordinates of the first sub-center line of the two sub-center lines; The end point coordinates are the coordinates of the cutting point.
6. The method according to any one of claims 1 to 5, characterized in that: The step of calculating the vertical distance from the cutting point to each lane edge line according to the coordinates of the cutting point and the position information of the two lane edge lines comprises: Calculating the straight line equation of each lane edge line according to the position information of the two lane edge lines; According to the coordinates of the cutting point and the straight line equation of each lane edge line, the vertical distance from the cutting point to each lane edge line is calculated.
7. A lane width measuring device, characterized in that: include: A position acquisition module, used to acquire position information of lane edges on both sides of a target lane before cutting, wherein the target lane is a lane with a gradually changing width; A cutting point acquisition module, used to acquire the coordinates of a cutting point on the center line of the target lane after cutting, wherein the cutting point is determined according to a preset ratio of the center line of the target lane or a preset cutting line of the target lane; A measuring module, used for obtaining a lane width value of the target lane corresponding to the cutting point according to the coordinates of the cutting point and the position information of the two lane edges, including: calculating a vertical distance from the cutting point to each lane edge according to the coordinates of the cutting point and the position information of the two lane edges; The vertical distance from the cutting point to each lane edge is added to obtain the lane width value of the target lane corresponding to the cutting point.
8. A lane width measuring device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the lane width measurement method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Lane width calculation method and apparatus
CN107798855A
Abrupt change center line smoothing method and device based on high-precision map, and storage medium
CN109064877A