Multistage vehicle position coordinate conversion method and system based on polar coordinate system

By adopting a multi-level vehicle position coordinate transformation method based on polar coordinates, the problem of complex visual positioning calibration under roadside view is solved, and high-precision, automated vehicle positioning is achieved. It is applicable to scenarios such as dense urban areas and tunnels, and meets the real-time requirements of traffic monitoring.

CN121746487APending Publication Date: 2026-03-27SOUTHWEST JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-24
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing visual positioning and calibration methods from the roadside perspective are complex and difficult to implement in actual engineering. Furthermore, their positioning accuracy is not high under low light, strong light, or extreme weather conditions, and they lack adaptability to dynamic environments.

Method used

A multi-level vehicle position coordinate transformation method based on polar coordinate system is adopted, including calibration stage and coordinate transformation stage. By obtaining the latitude and longitude, AutoCAD and pixel coordinates of known control points, a polar coordinate system is established, and a vehicle latitude and longitude positioning mapping map is generated through multi-level transformation such as affine transformation and perspective transformation.

Benefits of technology

It achieves highly automated coordinate transformation, reduces engineering implementation difficulty, improves positioning accuracy, reduces the average positioning error to 0.299m, optimizes the error standard deviation by 13.8%, has a wide range of applications, and meets the real-time requirements of traffic monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121746487A_ABST
    Figure CN121746487A_ABST
Patent Text Reader

Abstract

The invention discloses a multistage vehicle position coordinate conversion method and system based on a polar coordinate system. A calibration stage mainly comprises the steps of converting latitude and longitude coordinates into polar coordinates, converting the polar coordinates into Cartesian coordinates and then converting the Cartesian coordinates into AutoCAD coordinates, establishing a projection coordinate system, converting the AutoCAD coordinates into projection coordinates, and converting the projection coordinates into pixel coordinates; generating a vehicle longitude and latitude positioning mapping map based on the calibrated intermediate coordinate conversion mapping relation and rule from the longitude and latitude coordinates to the final pixel coordinates; in the coordinate conversion stage, on the basis of the vehicle longitude and latitude positioning mapping map, the pixel coordinates of the vehicle to be positioned are subjected to inverse transformation to obtain the longitude and latitude coordinates of the vehicle to be positioned. On the basis of the polar coordinate system, a set of complete coordinate transformation is achieved, the mapping relation between the pixel coordinates on the monitoring image and the projection coordinates on the actual road is established and stored in the mapping map, rapid mapping of the coordinates can be achieved, and then accurate relative positioning of the vehicle is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicle positioning technology, specifically to a multi-level vehicle position coordinate transformation method and system based on polar coordinates. Background Technology

[0002] With the rapid development of technologies such as autonomous driving, intelligent transportation systems, virtual reality, and digital twins, various traffic big data monitoring platforms are being applied to traffic management departments. Therefore, real-time vehicle location perception has become a core requirement for traffic management and monitoring platforms, making high-precision vehicle positioning methods a key technology. Vehicle positioning methods include two aspects: first, distance positioning in environmental perception, representing the relative coordinates of a vehicle within a local area (usually referring to the detection range of environmental perception equipment); and second, geographic location measurement in the Global Navigation Satellite System, representing the latitude and longitude coordinates of a vehicle within a global area (usually referring to the Earth's surface), i.e., absolute coordinates.

[0003] Currently, distance positioning in environmental perception can be categorized into various methods based on the type of sensor used: radar positioning, visual positioning, and multi-sensor fusion positioning. Each method has its own advantages and disadvantages, while visual positioning, as a rapidly developing positioning technology in recent years, possesses irreplaceable advantages compared to other technologies, leading to its increasingly widespread application.

[0004] However, visual positioning also faces many challenges in practical engineering applications. For example, the calibration methods are complex or have low accuracy, performance may degrade under low light, strong light, or extreme weather conditions, and its adaptability to dynamic environments needs further optimization. In view of the aforementioned challenges and technical shortcomings of visual positioning, the purpose of this invention is to explore a new visual positioning calibration method applied to roadside views, in order to solve the problems of complex processes and difficulties in practical engineering implementation of existing roadside view calibration methods, and to further improve the positioning accuracy of vision-based vehicle positioning technology. Summary of the Invention

[0005] This invention provides a multi-level vehicle position coordinate transformation method based on polar coordinates to solve the problems of complex process and difficult practical engineering implementation of existing roadside view calibration methods.

[0006] According to the first aspect, one embodiment provides a multi-level vehicle position coordinate transformation method based on a polar coordinate system, the method including a calibration stage and a coordinate transformation stage; The calibration phase includes: Obtain the latitude and longitude coordinates, AutoCAD coordinates, and pixel coordinates of at least four known control points within the target monitoring area; Establish a polar coordinate system and convert the latitude and longitude coordinates of the known control points into polar coordinates; Convert the polar coordinates of the known control points to Cartesian coordinates, and then combine them with the AutoCAD coordinates of the known control points to obtain the coordinate transformation mapping relationship from Cartesian coordinates to AutoCAD coordinates through affine transformation; Establish a projected coordinate system, convert the AutoCAD coordinates of the known control points into projected coordinates, and obtain the coordinate transformation mapping relationship from AutoCAD coordinates to projected coordinates through affine transformation; Based on the known projection coordinates and pixel coordinates of the control points, the coordinate transformation mapping relationship from projection coordinates to pixel coordinates is obtained through perspective transformation; Based on the intermediate coordinate transformation mapping relationship and rules from latitude and longitude coordinates to final pixel coordinates obtained from calibration, a vehicle latitude and longitude positioning mapping map is generated. The coordinate transformation stage includes: Obtain the pixel coordinates of the vehicle to be located within the target monitoring area. Based on the vehicle latitude and longitude positioning mapping map, obtain the latitude and longitude coordinates of the vehicle to be located by inverse transformation of the pixel coordinates of the vehicle to be located.

[0007] According to a second aspect, one embodiment provides a multi-level vehicle position coordinate transformation system based on a polar coordinate system, the system comprising: The data acquisition module is used to acquire the latitude and longitude coordinates, AutoCAD coordinates, and pixel coordinates of at least four known control points within the target monitoring area; The polar coordinate transformation module is used to establish a polar coordinate system and convert the latitude and longitude coordinates of known control points into polar coordinates. The AutoCAD coordinate transformation module is used to convert the polar coordinates of known control points to Cartesian coordinates. Then, combined with the AutoCAD coordinates of the known control points, an affine transformation is used to obtain the coordinate transformation mapping relationship from Cartesian coordinates to AutoCAD coordinates. The projected coordinate transformation module is used to establish a projected coordinate system, convert the AutoCAD coordinates of known control points into projected coordinates, and obtain the coordinate transformation mapping relationship from AutoCAD coordinates to projected coordinates through affine transformation; The pixel coordinate transformation module is used to obtain the coordinate transformation mapping relationship from the projected coordinates to the pixel coordinates based on the known control point's projected coordinates and pixel coordinates through perspective transformation; The positioning mapping map generation module is used to generate a vehicle latitude and longitude positioning mapping map based on the intermediate coordinate transformation mapping relationship and rules from latitude and longitude coordinates to final pixel coordinates obtained by calibration. The vehicle positioning module is used to obtain the pixel coordinates of the vehicle to be located within the target monitoring area. Based on the vehicle latitude and longitude positioning mapping map, the pixel coordinates of the vehicle to be located are transformed inversely to obtain the latitude and longitude coordinates of the vehicle to be located.

[0008] This invention provides a multi-level vehicle position coordinate transformation method and system based on polar coordinates, which has the following advantages: 1. High degree of automation: The polar coordinate system and projected coordinate system are automatically constructed using latitude and longitude coordinates, eliminating the need for manual calibration and reducing the difficulty of engineering implementation; 2. High conversion accuracy: By adopting a multi-level optimal conversion method, the average positioning error on 171 test points is reduced to 0.299m, which is 8.28% lower than the traditional method, and the error standard deviation is optimized by 13.8%. 3. Wide range of applicable scenarios: It does not rely on GPS signals and can still work stably in dense urban areas, tunnels and other scenarios; 4. High computational efficiency: The core conversion uses matrix operations, and the edge computing devices can process data in real time, meeting the real-time requirements of traffic monitoring. Attached Figure Description

[0009] Figure 1 A flowchart provided for one embodiment of the present invention; Figure 2 A detailed implementation flowchart is provided for one embodiment of the present invention; Figure 3 A perspective transformation diagram from projection coordinates to pixel coordinates provided in one embodiment of the present invention; Figure 4 Two-dimensional coordinate transformation diagram of four effective methods provided in one embodiment of the present invention; Figure 5 Two-dimensional coordinate transformation diagram of four poorly performing methods provided in one embodiment of the present invention; Figure 6 A three-dimensional coordinate transformation diagram of eight coordinate transformation methods provided in one embodiment of the present invention; Figure 7 The conversion error at each point of the first four better-performing methods provided in one embodiment of the present invention; Figure 8 The conversion error at each point of the latter four less effective methods provided in one embodiment of the present invention; Figure 9 Error depth maps of the first four conversion methods provided in one embodiment of the present invention; Figure 10 Error depth map of the latter four conversion methods provided in one embodiment of the present invention; Figure 11 Error analysis of the first four conversion methods provided in one embodiment of the present invention; Figure 12 The error comparison between the model provided in this paper and existing methods in an embodiment of the present invention is shown in (a) as the original error and (b) as the smoothed error. Figure 13 AutoCAD perspective error depth map of the model (a) and the existing method (b) provided in an embodiment of the present invention; Figure 14 The roadside view error depth map shows the model (left) and the existing method (right) provided for an embodiment of the present invention. Detailed Implementation

[0010] The present invention will now be described in further detail with reference to specific embodiments and accompanying drawings. Similar elements in different embodiments are referred to by associated similar element reference numerals. In the following embodiments, many details are described to facilitate a better understanding of the invention. However, those skilled in the art will readily recognize that some features may be omitted in different situations, or may be replaced by other elements, materials, or methods. In some cases, certain operations related to the present invention are not shown or described in the specification. This is to avoid obscuring the core parts of the invention with excessive description. For those skilled in the art, detailed description of these related operations is not necessary; they can fully understand the related operations based on the description in the specification and general technical knowledge in the art.

[0011] The first embodiment of this invention provides a multi-level vehicle position coordinate transformation method based on polar coordinates, which will be described below in conjunction with... Figure 1 and Figure 2 Please provide a detailed explanation.

[0012] In practical applications, this method is primarily used in roadside surveillance cameras and edge computing devices. Roadside surveillance cameras can obtain images or video data of corresponding road sections or intersections needed by traffic control personnel. Edge computing devices can also utilize these traffic scene images or video data, combining computer vision and deep learning technologies, to extract useful information such as object detection data and vehicle trajectory data using object detection models. Then, combined with cloud-based instructions, the pixel coordinate information in the vehicle trajectory data is converted into the relative position coordinates of the vehicles.

[0013] This method model is based on polar coordinates, implementing a complete coordinate transformation to establish a mapping relationship between pixel coordinates on the monitoring image and projected coordinates on the actual road, and storing this mapping in a mapping atlas. This enables rapid coordinate mapping, thereby achieving precise relative positioning of the vehicle. The overall process is as follows: Figure 2 As shown.

[0014] The multi-level vehicle position coordinate transformation method based on polar coordinates consists of two main parts: the calibration part before coordinate transformation and the coordinate transformation part. The core part of the coordinate transformation model is the calibration part before coordinate transformation.

[0015] 1. Calibration stage: The calibration process has four steps: converting latitude and longitude coordinates to polar coordinates, converting polar coordinates to Cartesian coordinates and then to AutoCAD coordinates, establishing a projected coordinate system and converting AutoCAD coordinates to projected coordinates, and converting projected coordinates to pixel coordinates. Details are as follows: like Figure 1 As shown, in step S100, the latitude and longitude coordinates, AutoCAD coordinates, and pixel coordinates of at least four known control points within the target monitoring area are obtained.

[0016] In this embodiment, the coordinate transformation model requires several (greater than or equal to 4) known points as control points for calibration, and the latitude and longitude coordinates, pixel coordinates and AutoCAD coordinates of the control points are used as existing conditions for input.

[0017] like Figure 1 As shown, in step S200, a polar coordinate system is established, and the latitude and longitude coordinates of the known control points are converted into polar coordinates.

[0018] In this embodiment, the origin position and true north direction are determined based on the known latitude and longitude coordinates, as well as the distances from each control point to the origin, thereby establishing a polar coordinate system. The pole of the polar coordinate system is the origin determined by the latitude and longitude coordinates, and the polar axis points to true north determined by the latitude and longitude coordinates, realizing the conversion from latitude and longitude coordinates to polar coordinates.

[0019] Latitude and longitude coordinates are a coordinate system based on the Earth's surface, used to uniquely identify any location on Earth. It consists of two values: longitude and latitude. Latitude represents a point's position relative to the Earth's equator, ranging from 0 to 1. (Equator) to 90 (North Pole or South Pole), the Northern Hemisphere is represented by North Latitude (N), and the Southern Hemisphere by South Latitude (S); Longitude indicates the east-west position of a point relative to the Prime Meridian, ranging from 0... (Prime Meridian) to 180 Longitude is defined as east (E) and west (W). While latitude and longitude coordinates themselves do not inherently possess directionality, they can be used to describe the directionality or relative positional relationships of locations on Earth. For example, the latitude and longitude of two points can be used to calculate the azimuth between them (i.e., the direction from one point to another).

[0020] (1) Calculate the azimuth angle from latitude and longitude coordinates Azimuth is the angle measured by rotating counterclockwise from a reference direction (usually due north) to the target direction. The azimuth range is 0... To 360 Therefore, based on the principles of spherical geometry and geodesy, the azimuth angle can be calculated using latitude and longitude coordinates to find true north as a reference direction. Thus, on a small scale, when establishing a polar coordinate system, a natural, fixed, and easily calculated polar axis direction can be obtained, and the polar angle is the counterclockwise transformation value corresponding to the azimuth angle, which makes the coordinate system more flexible and practical.

[0021] In the process of converting latitude and longitude coordinates to polar coordinates, given two latitude and longitude coordinates, the latitude and longitude of the starting point A( , ), latitude and longitude of the endpoint B ( , ),in and Latitude and The longitude is given, and the unit is radians. The azimuth from point A to point B can be calculated using formula (1):

[0022] in: It is the difference in longitude between two points; It is a two-parameter arctangent function that returns the angle value in the correct quadrant. Calculation results It is usually expressed in radians, which can be converted to degrees, as shown in formula (2):

[0023] If the result is negative, add 360. Ensure the angle range is 0. To 360 If the azimuth of the termination point This indicates that the endpoint is located due north of the starting point. By comparing the azimuth of any endpoint, the offset angle of the endpoint relative to due north can be determined. From this, the azimuth of all control points can be calculated and then converted into polar angles.

[0024] (2) Calculate the polar radius from latitude and longitude coordinates In addition to calculating the polar angles of each control point, the polar radius must also be calculated from the latitude and longitude coordinates. The polar radius is another key parameter describing the position of a point in the polar coordinate system. It represents the distance from the point to the pole, and the unit is usually consistent with the unit of the coordinate system, such as meters or centimeters.

[0025] The Vincenty formula is used to calculate the true distance from each control point to the pole, in meters. These true distances can be used as the polar radius of these control points. The Vincenty formula is a high-precision algorithm for calculating the geographic distance between two points (the shortest distance along the Earth's ellipsoid, i.e., the geodetic distance). It can be based on WGS-84 or CGCS2000. Both of these ellipsoidal models are not simple spherical models, thus providing a more accurate description of geographic distance and direction. This paper chooses the CGCS2000 ellipsoidal model, which is better suited for China: [The text abruptly ends here, likely due to an incomplete sentence or missing information.] a Take 6,378,137.0 meters, minor axis radius b Take 6356752.31414 meters, flattening Pick .

[0026] Vincenty's formula consists of two parts: one is the iterative calculation angle. The difference (adjustment value for the longitude difference between two points), and secondly, using the final Calculate the distance and direction of the geodetic line. The specific formula is as follows.

[0027] Geographical latitude and Convert to planning latitude U And calculate the longitude difference between the two points. L See formula (3):

[0028] in It is the latitude of a point, the naturalized latitude. U Used to eliminate the effect of flattening in ellipsoidal models. Iterative calculations are then performed to adjust... The value is maintained until a certain precision is met (e.g., less than 10). -12 (absolute value difference) The initial value is L In each iteration, the following formulas (4) to (6) are used to update the settings. : a. The formula for calculating intermediate variables is as follows:

[0029] in, It is the geocentric angle, used to describe the actual angular distance between two points; and It is the tilt angle used to calculate the geographic path; It is the midpoint cosine of the geocentric angle, used to correct the path length.

[0030] b. Correction factor C The calculation formula is shown in equation (7):

[0031] c. Update The calculation formula is shown in equation (8): (8) In iterative calculations, the accuracy is poor. It will continuously adjust, at which point a convergence condition is needed to calculate and determine whether convergence has occurred. In this formula, The difference between the old and new values ​​is less than a certain minimum value (this method sets the precision for determining convergence to 10). -12 When the calculation is considered to have converged, the iteration can be stopped, as shown in formula (9): (9) To simplify complex calculations, Vincenty's formula introduces two important coefficients. A and B They are based on the flattening of the ellipsoid. f Correction coefficients for relevant parameters. A It is the main coefficient used to adjust the length of the geodesic line. B It is a secondary coefficient used to correct the arc length, as shown in formula (10):

[0032] Among them, auxiliary parameters It is an intermediate variable used to calculate the coefficient of the geodesic line length. A and B , a and b These are the major and minor axes of the ellipsoid, respectively.

[0033] Correction amount It is used to adjust the error part in the actual distance calculation. It corrects the geocentric angle and path length through multiple approximations to make the result more accurate. Its formula is shown in (11):

[0034] The final geographical distance between the two points (the arc length along the ellipsoid) can be calculated using formula (12): (12) (3) Select the origin of the polar coordinate system and calculate its coordinates. When choosing the origin (i.e., the pole) of the polar coordinate system, there are several options: Option 1 is to calculate the latitude and longitude coordinates of the midpoint of the base of the quadrilateral area enclosed by the control points; Option 2 is to directly select one of the two base control points as the origin; and Option 3 is to add a known condition—the latitude and longitude coordinates of the camera—as the origin. Option 2 is excluded because it would place all control points on one side of the polar axis, resulting in an asymmetrical distribution of points and significantly impacting subsequent coordinate transformations and visualization. Option 3, while giving the polar coordinate system a more concrete physical meaning (control points are all relative to the camera's position, better reflecting human perception of traffic scenes), is also excluded because it's difficult to measure the latitude and longitude of the point where the camera is perpendicular to the ground on the road in practical applications. Option 1, although involving an additional calculation, uses the midpoint of the base as the origin, ensuring the symmetry of the control points, better reflecting human perception of traffic scenes, and without increasing the complexity of practical applications. Therefore, Option 1 is ultimately chosen.

[0035] Calculating the latitude and longitude of the midpoint of the base of a quadrilateral region requires a conversion between latitude / longitude coordinates and three-dimensional Cartesian coordinates. This paper still chooses the CGCS2000 ellipsoid model, with a major axis radius of... a Take 6,378,137.0 meters, minor axis radius b Take 6356752.31414 meters, flattening f Pick First eccentricity square Pick 0.006694380023. Therefore, for latitude... ,longitude For latitude and longitude coordinates, the formulas for calculating its three-dimensional Cartesian coordinates are shown in (13) and (14):

[0036] in, N This represents the radius of curvature of the ellipsoid at a given latitude. The latitude and longitude coordinates of the two control points on the base are converted to three-dimensional Cartesian coordinates. X 1, Y 1, Z 1) and ( X 2, Y 2, Z 2) Then, use the midpoint formula in spherical geometry to calculate the latitude and longitude of the midpoint between the two points, as shown in formula (15):

[0037] Next, the midpoint vector is normalized to a unit vector, that is, the midpoint vector is scaled to the unit sphere, and the normalized midpoint coordinates are obtained, as shown in formulas (16) and (17):

[0038] Finally, the normalized 3D coordinates are converted back to latitude and longitude, with the latitude of the midpoint as the coordinate. and longitude Calculated using formula (18): (18) After calculating the formulas in the above three parts, the polar coordinates of the poles, polar axes, and control points of the polar coordinate system can be obtained, realizing the conversion from latitude and longitude coordinates to polar coordinates. Table 1 shows the algorithm implementation process for converting latitude and longitude coordinates to polar coordinates: Table 1. Algorithm implementation process for converting latitude and longitude coordinates to polar coordinates.

[0039] like Figure 1 As shown, in step S300, the polar coordinates of the known control points are converted to Cartesian coordinates, and then combined with the AutoCAD coordinates of the known control points, the coordinate transformation mapping relationship from Cartesian coordinates to AutoCAD coordinates is obtained through affine transformation.

[0040] The second step in coordinate transformation is to convert polar coordinates to AutoCAD coordinates. Converting polar coordinates to Cartesian coordinates first, and then mapping them to the AutoCAD coordinate system, is an efficient and universal method. Cartesian coordinates facilitate geometric transformations (such as translation, rotation, scaling, etc.), and AutoCAD uses a model based on Cartesian coordinates, with all graphic positioning and drawing based on them. Because polar coordinates are difficult to align with AutoCAD's coordinate system, direct manipulation in polar coordinates can lead to inconsistencies. Cartesian coordinates, however, seamlessly integrate with AutoCAD's World Coordinate System (WCS) and User Coordinate System (UCS), avoiding the errors and computational difficulties that can arise from complex operations in polar coordinates. This approach simplifies the process and better aligns with AutoCAD's mathematical logic and practical application needs.

[0041] The conversion between polar coordinates and Cartesian coordinates is performed using formulas (19) and (20).

[0042]

[0043] in,( r , θ )and( x , y ) represent polar coordinates and Cartesian coordinates, respectively.

[0044] When converting from Cartesian coordinates to AutoCAD coordinates, this study selected eight coordinate transformation methods: affine transformation, linear polynomial transformation, quadratic polynomial transformation, cubic polynomial transformation, Gaussian radial basis function interpolation transformation, polynomial radial basis function interpolation transformation, bilinear transformation, and thin plate spline transformation. The aim was to examine whether the conversion from Cartesian coordinates to AutoCAD coordinates is linear or nonlinear, and which transformation has the highest accuracy.

[0045] Table 2. Algorithm implementation process for converting polar coordinates to AutoCAD coordinates.

[0046] Affine transformation is a planar geometric transformation that, in two-dimensional space, takes a point ( x , y The new point (x', y') obtained through affine transformation can be represented as (21):

[0047] in, It is a 2×2 matrix that describes linear transformations such as rotation, scaling, and shearing; This is a translation vector used to translate the position of a coordinate point. To represent translation as a matrix algorithm, homogeneous coordinates can be used for consistency. (Two-dimensional coordinates...) x , y Expanded to homogeneous coordinates x , y ,1), An affine transformation can be represented as a 3×3 matrix:

[0048] like Figure 1 As shown, in step S400, a projected coordinate system is established, the AutoCAD coordinates of the known control points are converted into projected coordinates, and the coordinate transformation mapping relationship from AutoCAD coordinates to projected coordinates is obtained through affine transformation.

[0049] In this embodiment, to obtain a simple and intuitive relative position coordinate of the vehicle, a projected coordinate system needs to be established. Using the previously determined origin as the origin of the projected coordinate system, the centroid of the area enclosed by the control points is found. The line connecting the origin to the centroid is taken as the positive y-axis of the projected coordinate system, and the positive x-axis is determined according to the right-hand rule. Then, the projected coordinates of each control point are calculated, and an affine transformation is used to convert the AutoCAD coordinates of the control points to the projected coordinates.

[0050] Establish a projected coordinate system and convert AutoCAD coordinates to projected coordinates: The third step in coordinate transformation is establishing a projected coordinate system. A projected coordinate system is a coordinate system that maps points in three-dimensional space to a two-dimensional plane based on the camera's viewpoint. It is specifically used to describe the relative positions in a road scene. The projected coordinate system centers on the road environment, and its origin is usually set as the projection point of the camera onto the road surface, or another reference point on the road surface (such as a calibration point). The positive y-axis usually extends along the centerline of the road, or forms a small angle with the centerline, and is used to represent positional information along the road. The positive x-axis is perpendicular to the y-axis and usually points to the left or right side of the road, used to represent lateral offset.

[0051] Projected coordinates are highly intuitive and can concisely describe the positional relationships of vehicles, pedestrians, or other targets on the road in traffic scenarios. Their coordinate values ​​can directly reflect the actual distance on the road surface, in meters. This facilitates matching with road infrastructure (such as lane lines) and traffic algorithms, providing a distance parameter basis for various traffic algorithms (such as vehicle speed statistics, road segment density, and lane departure detection).

[0052] The origin is typically the vertical projection point of the camera onto the road. However, considering the practical needs of this research model, the vertical projection point of the camera onto the road is not easily found on-site. Therefore, the origin is set as another reference point. Taking into account that the origin in the previous step of the coordinate transformation was the midpoint of the bottom edge of the area enclosed by the control points, the origin of the projected coordinate system follows the origin from the previous step. To facilitate quick and non-manual calibration of the positive y-axis direction, the median of the area enclosed by the control points is chosen as the y-axis in this model; that is, the ray direction from the origin to the midpoint of the top edge of the area is the positive y-axis direction. In a convex quadrilateral, the median is parallel to both sides, which effectively represents the directional trend of the area enclosed by the control points. It also coincides with or maintains a small angle with the actual road centerline, facilitating the representation of the central route or average position and distance calculation. The positive y-axis is rotated 90 degrees clockwise. That is, the positive direction of the x-axis.

[0053] Calculate the midpoint of the base of the area enclosed by the control points using the midpoint coordinate formula. and the midpoint of the top edge The formula is shown in (23):

[0054] Then calculate the basis vectors of the new coordinate system, the new... y The axial direction is from the midpoint Pointing to the midpoint The direction vector, denoted as Its unit vector is shown in formula (24):

[0055] in, New x The axial direction is y Rotate the axis 90 degrees clockwise The unit vector is obtained as shown in formula (25):

[0056] Next, we transform the original coordinate system to the new coordinate system, setting the origin as the midpoint of the bottom edge. For any point Its vector relative to the origin is Then the coordinates in the new coordinate system are as shown in formula (26):

[0057] Finally, the AutoCAD coordinates are converted to projected coordinates. Both AutoCAD coordinates and projected coordinates belong to Cartesian coordinates, and the conversion between them is also a linear transformation on a two-dimensional plane. Therefore, based on the conclusion drawn from the comparison of several coordinate transformation methods in "converting polar coordinates to AutoCAD coordinates" in this embodiment, the affine transformation method is selected.

[0058] Table 3. Algorithm Implementation Process for Converting AutoCAD Coordinates to Projected Coordinates

[0059] like Figure 1 As shown, in step S500, based on the known projection coordinates and pixel coordinates of the control points, a coordinate transformation mapping relationship from projection coordinates to pixel coordinates is obtained through perspective transformation.

[0060] In this embodiment, after obtaining the projection coordinates of the control points, a perspective transformation method is used to convert the projection coordinates to known pixel coordinates.

[0061] Projected coordinates converted to pixel coordinates: The fourth step of coordinate transformation is converting projected coordinates to pixel coordinates. In this step, points in 3D space need to be mapped to a 2D plane (the pixel plane on the monitor screen). Therefore, perspective transformation is used to establish a perspective projection matrix to achieve the coordinate transformation, such as... Figure 3 As shown. The three-dimensional space at this point is not equivalent to the projected coordinate system, but since the road surface is assumed to be a plane, i.e., the vertical coordinate... Therefore, this three-dimensional space A coordinate system in a plane is called a projected coordinate system; a coordinate system in three-dimensional space... shaft and The axes are the projection coordinate system's axes. shaft and axis.

[0062] Based on the above assumptions, the 3D depth information of the perspective projection transformation can be fixed (i.e., all points lie on the same plane). This replaces the perspective projection transformation, which projects 3D points onto a 2D plane, with a homography transformation, which maps 2D points from one plane to another, while preserving projection distortions (e.g., a rectangle becomes a trapezoid). In this case, the homography transformation can accurately replace the effect of perspective projection; that is, perspective projection transformation is a specific form of homography transformation. Both can simulate perspective effects and are used in image correction, planar projection, and stereo calibration. Therefore, from an implementation perspective, homography transformation is a 2D version of perspective projection transformation.

[0063] The implementation of perspective projection transformation typically involves the following steps: First, determine the coordinates of corresponding points in the source and target images; then, calculate the perspective projection matrix using these corresponding points; finally, apply this matrix to the source image to obtain the transformed image. At least four sets of corresponding points are required when calculating the perspective transformation matrix because perspective transformation is a transformation with 8 degrees of freedom, and each set of corresponding points provides two equations.

[0064] For any pixel coordinate (x, y) in the roadside view image, it can be transformed into the corresponding actual coordinate (X, Y, Z) on the actual road plane through the perspective transformation matrix. The relationship between the two satisfies formula (27):

[0065] Where parameters , , , Linear transformations (rotation, scaling, shearing) within the control plane; parameters , Controls translation in the x and y directions; parameters , It controls perspective distortion, that is, it controls the "nearer is larger, farther is smaller" principle, tilt, and the transition between affine and perspective in an image; parameters It is the scaling factor of perspective projection. Transforming equation (27) yields equation (28):

[0066] Since this model only requires the coordinates of the actual road plane, therefore let , At the same time, set the scaling factor The actual coordinates can be obtained. The calculation formula for ) is as follows (29):

[0067] Expanding equations (28) and (29) yields the case for a single point, as shown in equation (30):

[0068] Eight equations can be derived from four points. Solve for the eight unknowns in the perspective transformation matrix. ,..., The solution to the equation is shown in equation (31):

[0069] Table 4 shows the algorithm implementation process for converting projected coordinates to pixel coordinates.

[0070] like Figure 1 As shown, in step S600, a vehicle latitude and longitude positioning mapping map is generated based on the intermediate coordinate transformation mapping relationship and rules obtained from calibration from latitude and longitude coordinates to final pixel coordinates.

[0071] In this embodiment, the calibration process before coordinate transformation is completed in four steps. During the coordinate transformation stage, the inverse transformation of the coordinate transformation in the calibration stage is required, with the goal of obtaining the projected coordinates from the pixel coordinates. To verify the accuracy of the coordinate transformation, a large number of test points were collected for verification testing. 2. Coordinate transformation stage: like Figure 1 As shown, in step S700, the pixel coordinates of the vehicle to be located within the target monitoring area are obtained. Based on the vehicle latitude and longitude positioning mapping map, the pixel coordinates of the vehicle to be located are transformed inversely to obtain the latitude and longitude coordinates of the vehicle to be located.

[0072] The model in this paper completes the calibration process after going through four steps: "converting latitude and longitude coordinates to polar coordinates," "converting polar coordinates to AutoCAD coordinates," "establishing a projected coordinate system and converting AutoCAD coordinates to projected coordinates," and "converting projected coordinates to pixel coordinates." The mapping relationship is then saved as a vehicle projected positioning map. By reading the projected positioning map, coordinate transformation from pixel coordinates to projected coordinates can be quickly achieved.

[0073] Verification example: 1. Data Introduction The dataset used in this research model mainly consists of three parts: pixel coordinates of control points and test points from a roadside perspective, CAD coordinates of control points and test points from AutoCAD software, and latitude and longitude coordinates of control points and test points acquired through a high-precision RTK (Real-Time Kinematic) device. These data collectively form the foundation for model research and validation. Specifically, the pixel coordinates from the roadside perspective reflect the location information in the image and are the basis of image measurement; the CAD coordinates from AutoCAD provide high-precision two-dimensional geometric reference information based on design drawings; and the latitude and longitude coordinates acquired by the RTK device represent high-precision geographic location data in the real world, supporting the geospatial transformation and calibration of the model.

[0074] This study used 171 control and test points, encompassing various typical point distributions. These points not only cover the main features of the target area but also ensure diversity and representativeness under different locations and distributions. The data set consisting of all points was divided into two parts, used for model calibration and coordinate transformation accuracy testing, respectively. The calibration phase primarily involved adjusting and optimizing model parameters using control point data to ensure the model accurately reflects the geometric relationships between different coordinate systems. The testing phase utilized test point data to comprehensively evaluate the model's transformation accuracy and analyze its applicability and stability. By integrating pixel coordinates, CAD coordinates, and latitude and longitude coordinates, the research model not only achieves accurate mapping between imagery and reality but also provides reliable technical support for the fusion and correction of multi-source data in engineering applications.

[0075] 1.1 Introduction to Roadside View Data For data acquisition from the roadside perspective, high-resolution surveillance cameras, also known as high-definition network cameras, are first installed on monitoring poles along the roadside. These are one of the main devices used for vehicle positioning. The network camera used in this study is a Hikvision general-purpose network camera, with a maximum resolution of 1920×1080@25fps. At this resolution, it can output real-time images, balancing performance and cost-effectiveness. It is suitable for installation in most road sections for real-time road monitoring and has a wide range of applications.

[0076] The surveillance cameras are located not far from the starting point of the test track road, facing the end of the road. Their monitoring range includes the entire test track road and both sides, providing real-time traffic monitoring. The surveillance images transmitted from the cameras provide the pixel coordinates of 171 points, including control points and test points. These 171 pixel coordinates were collected using image processing tools and entered into the database as a roadside view dataset, as shown in Table 5.

[0077] Table 5 Pixel coordinates in the dataset

[0078] 1.2 Introduction to AutoCAD Data There are two ways to collect data from the AutoCAD perspective: First, if you have obtained the AutoCAD construction drawings of the relevant road section, you can find obvious landmarks on the construction drawings as control points and take their AutoCAD coordinates for model calibration. Second, if you do not have the AutoCAD construction drawings of the relevant road section, you can use a drone to take a bird's-eye view of the road section, place it in AutoCAD, scale it to a suitable scale, and find obvious landmarks as control points and take their AutoCAD coordinates for model calibration.

[0079] In this study, the model used a drone to capture bird's-eye view images to collect AutoCAD coordinates in this scenario. First, the drone was flown to an altitude of 120m above the ground (the maximum flight altitude at the test site was 120m) to minimize the impact of lens distortion on image quality. Second, AutoCAD coordinates were collected for 171 control and test points in the bird's-eye view images. The data for each point is shown in Table 6.

[0080] Table 6. CAD coordinates and (intermediate) projected coordinates in the dataset

[0081] 1.3 Introduction to Latitude and Longitude Coordinate Data For the test and control points mentioned in the first two sections, their latitude and longitude coordinates were collected using a high-precision RTK (Real-Time Kinematic) device. A high-precision RTK device is a high-precision satellite positioning technology. RTK technology is based on the Global Navigation Satellite System (GNSS) and corrects satellite positioning errors in real time using differential algorithms. Its greatest advantage is that it can achieve centimeter-level high-precision positioning, while the error of traditional GNSS positioning is approximately several meters. The data for each point are shown in Table 7.

[0082] Table 7 Latitude and longitude coordinates in the dataset

[0083] Meanwhile, after converting these points from latitude and longitude coordinates to polar coordinates, the data for each point are shown in Table 8.

[0084] Table 8 Polar coordinates in the dataset

[0085] 2. Model Accuracy Validation and Comparison The main equipment used for accuracy verification of the model in this study is also a Hikvision general-purpose network camera. Real-time monitoring of the entire test field section forms the basis for the verification of the entire positioning model.

[0086] 2.1 Comparison of Polar Coordinate to AutoCAD Coordinate Conversion Methods The accuracy of eight coordinate transformation methods was compared: First, using the latitude and longitude coordinates of 171 points in the database, the latitude and longitude coordinates were converted to polar coordinates, and then the polar coordinates were converted to Cartesian coordinates. Second, using each of the eight methods, a mapping relationship between the Cartesian coordinate system and the AutoCAD coordinate system was established based on the same control point coordinates. The transformation of the X and Y direction components of the coordinate points was analyzed through two-dimensional and three-dimensional coordinate transformation diagrams, allowing for a clearer observation of the data transformation characteristics and distribution patterns, and a direct comparison of the transformation effects.

[0087] Through analysis Figure 4 and Figure 5 The two sets of two-dimensional coordinate transformation diagrams are shown in the figure, and their three-dimensional coordinate transformation diagrams are further analyzed as follows. Figure 6 Generally speaking, the relationship between polar coordinates converted to Cartesian coordinates and AutoCAD coordinates is more of a linear transformation than a complex high-order nonlinear transformation. Low-complexity linear models such as affine transformations and first-order polynomial transformations should be preferred.

[0088] Then, input the two coordinate systems of the control points, and use each of the eight transformation methods to convert the polar coordinates to AutoCAD coordinates. Next, use 171 points, including the control points, as test points to verify the conversion accuracy of the eight methods, and plot the coordinate conversion error for each point, as shown below. Figure 7 and Figure 8 As shown. Furthermore, by plotting a road surface error color depth map, the error distribution of the coordinate transformation across the entire road surface can be seen more intuitively, such as... Figure 9 and Figure 10 As shown.

[0089] Next, we need to statistically analyze the errors of the eight coordinate transformation methods, and calculate the median, mean, standard deviation, and variance of the errors, as shown in Table 11: Table 11 Error statistics for eight transformation methods (unit: m)

[0090] According to the data in the table, the Gaussian radial basis function transformation method has the smallest average error at 0.113m, and its variance and standard deviation are also relatively small (0.009m and 0.095m, respectively), indicating that the error of this method is concentrated and relatively stable. The affine transformation method has the smallest variance and standard deviation, at 0.008m and 0.087m, respectively, and its average error is also small, though slightly larger than the Gaussian radial basis function transformation method. The values ​​of the terms in the first-order polynomial transformation fall between the two, while the values ​​of the terms in the bilinear transformation are slightly larger than the previous three. Among all methods, the cubic polynomial method has the largest error, with an average value as high as 80.699m, and its variance and standard deviation are also much higher than other methods, indicating that this method has extremely large error fluctuations and is not suitable for use. The thin-plate spline method has the second largest error, with an average value of 30.252m. The errors of the quadratic polynomial and polynomial radial basis function methods are not as large, but they are still not within an acceptable range.

[0091] Draw a diagram of the violin, and further analyze the advantages and disadvantages of the first four methods, such as... Figure 11 As shown: In terms of the concentration of error distribution, the affine transformation, first-order polynomial transformation, and Gaussian radial basis function transformation exhibit relatively concentrated error distributions with smaller box plot ranges, indicating relatively stable errors with minimal fluctuations. Among these, the Gaussian radial basis function transformation performs best. Comparing the mean and median of the errors (blue line (mean) and red line (median) in the violin plot), the first three methods also outperform bilinear methods, with the Gaussian radial basis function transformation showing the best performance.

[0092] From the applicability analysis of the four methods, the Gaussian radial basis function is a nonlinear method with the highest computational complexity. With large datasets, it significantly increases computation time and resource consumption, and requires adjustment of additional parameters. Affine transformations require only matrix operations, making them the most efficient, simple to implement, and with stable error performance; their parameters have practical physical meaning. In contrast, the parameters of the linear polynomial method lack physical meaning, increasing complexity in model debugging and practical applications. The bilinear method exhibits significant and difficult-to-control errors in coordinate transformation scenarios.

[0093] In summary, compared with first-order polynomial transformation, Gaussian radial basis function transformation, and bilinear transformation, the affine transformation method has smaller and more stable errors, the highest efficiency, is simple to implement, and has good applicability. Therefore, it is the preferred method in this study model and is applied to the conversion step from polar coordinates to AutoCAD coordinates.

[0094] 2.2 Comparison of overall conversion accuracy with existing conversion models This section verifies the overall transformation accuracy of a multi-level coordinate transformation method based on polar coordinates and compares its transformation accuracy with existing visual positioning methods of the same type. The transformation error results for each test point are as follows: Figure 12As shown in Figure (a), the original error value trend for each test point is illustrated, and Figure (b) shows the error value trend after smoothing the line into a curve. In Figure (a), the original error value trend shows that, compared to existing coordinate transformation methods, the overall error of the coordinate transformation method used in this paper's model is reduced. The error value at most test points is lower than that of existing methods, while a small number of error values ​​are higher, but still within acceptable limits. In Figure (b), the trend after smoothing the error values ​​shows that the error value of the proposed model method is not only lower but also controlled within a relatively stable range with small fluctuations. Its average error is 0.299m, lower than the 0.326m of existing methods; its standard deviation is 0.156m, lower than the 0.181m of existing methods. Compared to existing methods, the average error value of the proposed model method is reduced by 8.28%, and the standard deviation is reduced by 13.8%.

[0095] The coordinate transformation error values ​​of each test point are converted into error depth values. Then, the planar position distribution of all test points is drawn in AutoCAD to create an error depth map from the AutoCAD perspective. Figure 13 As shown. Similarly, the actual road surface locations of all test points are then plotted on the pixel plane, and an error depth map between the pixel plane view and the roadside view is created, as shown. Figure 14 As shown in the two figures, it is very clear that compared with existing methods, the model method in this paper significantly reduces the area of ​​the red region, i.e., the area with large errors and outliers, and has better transformation accuracy. In addition, in terms of the difficulty of implementing coordinate transformation methods, existing methods require manually establishing the road surface projection coordinate system, and the accuracy is easily affected by human operation errors, making it difficult to implement in large-scale applications.

[0096] The model method in this paper takes polar coordinates as its core. By using latitude and longitude coordinates, an existing and highly accurate geographic coordinate system, the inherent directional property of latitude and longitude coordinates is transferred to the polar coordinate system. This automatically realizes the establishment of the projected coordinate system and the solution of the mapping relationship between various coordinate systems. It can quickly and conveniently realize the conversion from pixel coordinates to projected coordinates and complete the visual positioning of road projected coordinates from the roadside perspective.

[0097] 3. Summary This embodiment proposes a multi-level vehicle position coordinate transformation framework based on polar coordinates from a roadside perspective, focusing on solving the nonlinear mapping problem between pixel coordinates and road projection coordinates. By constructing a multi-level transformation model with polar coordinates as the core, a chain-like transformation process of latitude and longitude coordinates, polar coordinates, Cartesian coordinates, AutoCAD coordinates, projection coordinates, and pixel coordinates is realized. Experimental verification shows that when using polar coordinates as the core coordinate system and affine transformation as the core transformation method, the average positioning error of the entire model on 171 test points is reduced to 0.299m, which is 8.28% lower than the traditional method, and the error standard deviation is optimized by 13.8%. At the same time, by introducing a polar radius calculation strategy based on Vincenty's formula and an automatic generation mechanism for the median projection coordinate system, manual calibration errors are effectively avoided, and the area of ​​outlier regions in the error depth map is greatly reduced.

[0098] Corresponding to the above-disclosed method for multi-level vehicle position coordinate transformation based on polar coordinates, this invention also discloses a multi-level vehicle position coordinate transformation system based on polar coordinates, which specifically includes: The data acquisition module is used to acquire the latitude and longitude coordinates, AutoCAD coordinates, and pixel coordinates of at least four known control points within the target monitoring area; The polar coordinate transformation module is used to establish a polar coordinate system and convert the latitude and longitude coordinates of known control points into polar coordinates. The AutoCAD coordinate transformation module is used to convert the polar coordinates of known control points to Cartesian coordinates. Then, combined with the AutoCAD coordinates of the known control points, an affine transformation is used to obtain the coordinate transformation mapping relationship from Cartesian coordinates to AutoCAD coordinates. The projected coordinate transformation module is used to establish a projected coordinate system, convert the AutoCAD coordinates of known control points into projected coordinates, and obtain the coordinate transformation mapping relationship from AutoCAD coordinates to projected coordinates through affine transformation; The pixel coordinate transformation module is used to obtain the coordinate transformation mapping relationship from the projected coordinates to the pixel coordinates based on the known control point's projected coordinates and pixel coordinates through perspective transformation; The positioning mapping map generation module is used to generate a vehicle latitude and longitude positioning mapping map based on the intermediate coordinate transformation mapping relationship and rules from latitude and longitude coordinates to final pixel coordinates obtained by calibration. The vehicle positioning module is used to obtain the pixel coordinates of the vehicle to be located within the target monitoring area. Based on the vehicle latitude and longitude positioning mapping map, the pixel coordinates of the vehicle to be located are transformed inversely to obtain the latitude and longitude coordinates of the vehicle to be located.

[0099] It should be noted that for a detailed description of a multi-level vehicle position coordinate transformation system based on polar coordinates provided in the embodiments of the present invention, please refer to the relevant description of a multi-level vehicle position coordinate transformation method based on polar coordinates provided in the embodiments of the present invention, which will not be repeated here.

[0100] In addition, embodiments of the present invention also provide an electronic device, the device comprising: a processor and a memory; the memory being used to store one or more program instructions; the processor being used to execute one or more program instructions to perform the steps of a multi-level vehicle position coordinate transformation method based on a polar coordinate system as described in any of the preceding embodiments.

[0101] In addition, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of a multi-level vehicle position coordinate transformation method based on a polar coordinate system as described in any of the preceding embodiments.

[0102] The above examples illustrate the present invention only to aid in understanding it and are not intended to limit the scope of the invention. Those skilled in the art can make various simple deductions, modifications, or substitutions based on the principles of this invention.

Claims

1. A multi-level vehicle position coordinate transformation method based on polar coordinates, characterized in that, The method includes a calibration stage and a coordinate transformation stage; The calibration phase includes: Obtain the latitude and longitude coordinates, AutoCAD coordinates, and pixel coordinates of at least four known control points within the target monitoring area; Establish a polar coordinate system and convert the latitude and longitude coordinates of the known control points into polar coordinates; Convert the polar coordinates of the known control points to Cartesian coordinates, and then combine them with the AutoCAD coordinates of the known control points to obtain the coordinate transformation mapping relationship from Cartesian coordinates to AutoCAD coordinates through affine transformation; Establish a projected coordinate system, convert the AutoCAD coordinates of the known control points into projected coordinates, and obtain the coordinate transformation mapping relationship from AutoCAD coordinates to projected coordinates through affine transformation; Based on the known projection coordinates and pixel coordinates of the control points, the coordinate transformation mapping relationship from projection coordinates to pixel coordinates is obtained through perspective transformation; Based on the intermediate coordinate transformation mapping relationship and rules from latitude and longitude coordinates to final pixel coordinates obtained from calibration, a vehicle latitude and longitude positioning mapping map is generated. The coordinate transformation stage includes: Obtain the pixel coordinates of the vehicle to be located within the target monitoring area. Based on the vehicle latitude and longitude positioning mapping map, obtain the latitude and longitude coordinates of the vehicle to be located by inverse transformation of the pixel coordinates of the vehicle to be located.

2. The multi-level vehicle position coordinate transformation method based on polar coordinates as described in claim 1, characterized in that, Obtain the latitude and longitude coordinates, AutoCAD coordinates, and pixel coordinates of at least four known control points within the target monitoring area, specifically including: High-precision RTK equipment is used to collect latitude and longitude coordinates, which include latitude and longitude. Obtain aerial views from drones or road construction drawings, and obtain AutoCAD coordinates through image scaling, calibration, and coordinate extraction; capture road images using input roadside cameras, and extract the pixel positions of control points in the image using image processing tools to obtain pixel coordinates, with the upper left corner of the image as the origin, the horizontal axis as the x-axis, and the vertical axis as the y-axis.

3. The multi-level vehicle position coordinate transformation method based on polar coordinates as described in claim 1, characterized in that, Establishing a polar coordinate system specifically includes: Determining the poles of a polar coordinate system includes: Input a list of known control point latitude and longitude coordinates; If the mode parameter mode=1, the latitude and longitude coordinates of the first control point in the control point list are selected as the pole. If the mode parameter mode=2, the midpoint of the bottom edge of the area enclosed by the control points is selected as the pole. First, the latitude and longitude coordinates of the two control points on the bottom edge are converted into three-dimensional Cartesian coordinates. Then, the midpoint of the three-dimensional Cartesian coordinates of the two control points is calculated. Finally, the normalized three-dimensional Cartesian coordinates of the midpoint are converted into latitude and longitude coordinates to obtain the latitude and longitude coordinates of the pole. Determine the polar axis of the polar coordinate system: Choose the due north direction as the polar axis.

4. The multi-level vehicle position coordinate transformation method based on polar coordinates as described in claim 3, characterized in that, Converting the latitude and longitude coordinates of known control points to polar coordinates specifically includes: Calculation of polar coordinates of control points, including polar angle and polar radius calculation; The calculation of the polar radius of the control points includes: calculating the spherical distance from each control point to the pole based on the Vincenty formula; The calculation of the polar angle of the control point includes: Convert the latitude and longitude of the pole (lat1, lon1) and the current control point (lat2, lon2) into radians to obtain (lat1_rad, lon1_rad) and (lat2_rad, lon2_rad), where lat1_rad is the latitude radian value of the pole, lon1_rad is the longitude radian value of the pole, lat2_rad is the latitude radian value of the current control point, and lon2_rad is the longitude radian value of the current control point. Calculate the longitude difference between the pole and the current control point based on the longitude radian value: dlon = lon1_rad - lon2_rad; The intermediate parameters x and y are calculated using the following formula: x = cos(lat2_rad) * sin(dlon), y=cos(lat1_rad)*sin(lat2_rad)-sin(lat1_rad)*cos(lat2_rad)*cos(dlon); Calculate the azimuth in radians: theta = atan2(x,y); Convert the azimuth angle theta to an angle and normalize it to [0, 360) to obtain the polar angle angle, which is calculated as angle = (degrees(theta) + 360) % 360.

5. The multi-level vehicle position coordinate transformation method based on polar coordinates as described in claim 1, characterized in that, Convert the polar coordinates of the known control points to Cartesian coordinates, and then, combining this with the AutoCAD coordinates of the known control points, use affine transformation to obtain the coordinate transformation mapping relationship from Cartesian coordinates to AutoCAD coordinates. Specifically, this includes: Convert the polar coordinates (r, θ) of the control point to two-dimensional Cartesian coordinates (x, y) using the formulas x = r × cos(θ) and y = r × sin(θ). The two-dimensional Cartesian coordinates are mapped to AutoCAD coordinates. A system of linear equations is constructed based on the two-dimensional Cartesian coordinates and AutoCAD coordinates of the control points to solve for the affine transformation coefficients. The affine transformation coefficients are solved using the least squares method to obtain the affine transformation matrix H1.

6. The multi-level vehicle position coordinate transformation method based on polar coordinates as described in claim 1, characterized in that, Establishing a projected coordinate system specifically includes: The origin of the projected coordinate system is the AutoCAD coordinate corresponding to the pole of the polar coordinate system. The positive direction of the y-axis is the direction from the origin to the midpoint of the top edge of the area enclosed by the control points. The positive direction of the x-axis is the positive direction of the y-axis rotated 90° clockwise.

7. The multi-level vehicle position coordinate transformation method based on polar coordinates as described in claim 6, characterized in that, Convert the AutoCAD coordinates of known control points to projected coordinates, and obtain the coordinate transformation mapping relationship from AutoCAD coordinates to projected coordinates through affine transformation, specifically including: Based on the constructed projected coordinate system, the AutoCAD coordinates of the control points are transformed into the projected coordinate system to obtain the projected coordinates; Map AutoCAD coordinates to projected coordinates, and construct a system of linear equations based on the AutoCAD coordinates and projected coordinates of the control points to solve for the affine transformation coefficients; The affine transformation coefficients are solved using the least squares method to obtain the affine transformation matrix H2.

8. The multi-level vehicle position coordinate transformation method based on polar coordinates as described in claim 1, characterized in that, Based on the known projected coordinates and pixel coordinates of the control points, a coordinate transformation mapping relationship from projected coordinates to pixel coordinates is obtained through perspective transformation, specifically including: The projection coordinates are mapped to pixel coordinates. Based on the projection coordinates and pixel coordinates of the control points, a perspective transformation equation is constructed, and the perspective transformation matrix M is obtained by solving it. Generate the coordinates (u,v) of all pixels within the entire monitored image range, and convert them to homogeneous coordinates to obtain an array of homogeneous coordinates for all pixels; Perform matrix multiplication between the perspective transformation matrix M and the homogeneous coordinate array of all pixels to obtain the homogeneous representation of the projected coordinates of all pixels. Each pixel coordinate (u,v) is associated with its corresponding projected coordinate (x,y) to form a coordinate mapping array of dimension (H,W,2), where H is the length of the first dimension of the array, corresponding to the image height; W is the length of the second dimension of the array, corresponding to the image width; and 2 is the length of the third dimension of the array, corresponding to the x and y components of the projected coordinates. The corresponding array is the global mapping relationship from the projected coordinates to the pixel coordinates.

9. A multi-level vehicle position coordinate transformation system based on polar coordinates, characterized in that, The system includes: The data acquisition module is used to acquire the latitude and longitude coordinates, AutoCAD coordinates, and pixel coordinates of at least four known control points within the target monitoring area; The polar coordinate transformation module is used to establish a polar coordinate system and convert the latitude and longitude coordinates of known control points into polar coordinates. The AutoCAD coordinate transformation module is used to convert the polar coordinates of known control points to Cartesian coordinates. Then, combined with the AutoCAD coordinates of the known control points, an affine transformation is used to obtain the coordinate transformation mapping relationship from Cartesian coordinates to AutoCAD coordinates. The projected coordinate transformation module is used to establish a projected coordinate system, convert the AutoCAD coordinates of known control points into projected coordinates, and obtain the coordinate transformation mapping relationship from AutoCAD coordinates to projected coordinates through affine transformation; The pixel coordinate transformation module is used to obtain the coordinate transformation mapping relationship from the projected coordinates to the pixel coordinates based on the known control point's projected coordinates and pixel coordinates through perspective transformation; The positioning mapping map generation module is used to generate a vehicle latitude and longitude positioning mapping map based on the intermediate coordinate transformation mapping relationship and rules from latitude and longitude coordinates to final pixel coordinates obtained by calibration. The vehicle positioning module is used to obtain the pixel coordinates of the vehicle to be located within the target monitoring area. Based on the vehicle latitude and longitude positioning mapping map, the pixel coordinates of the vehicle to be located are transformed inversely to obtain the latitude and longitude coordinates of the vehicle to be located.

10. An electronic device, characterized in that, The device includes: a processor and a memory; The memory is used to store one or more program instructions; The processor is configured to run one or more program instructions to perform the steps of a multi-level vehicle position coordinate transformation method based on a polar coordinate system as described in any one of claims 1 to 8.