Vehicle positioning method and system based on segmented affine transformation
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-24
- Publication Date
- 2026-03-27
Smart Images

Figure CN121746486A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle positioning technology, and specifically to a vehicle positioning method and system based on piecewise affine transformation. Background Technology
[0002] In Intelligent Transportation Systems (ITS), converting pixel coordinates from the perspective of roadside cameras into latitude and longitude coordinates is of significant necessity and importance.
[0003] First, pixel coordinates are positions within an image plane, such as the x and y values of a point captured by a camera in an image. Latitude and longitude, on the other hand, are geographic coordinates, representing actual geographical locations. In roadside camera traffic monitoring, the camera may cover intersections or road sections, detecting vehicles, pedestrians, etc. Knowing only pixel coordinates—for example, detecting a car at a certain position in an image—but not its actual location, may be insufficient for traffic management. For instance, a traffic management system might need to know the vehicle's specific latitude and longitude to track its route or to fuse data with other sensors. Furthermore, the specific application scenarios within an ITS (Infrastructure Management System) must be considered. For example, in a vehicle-to-infrastructure (V2I) system, the roadside unit needs to send the detected vehicle locations to the vehicles to help autonomous vehicles locate themselves; in this case, latitude and longitude are universal coordinates and more useful than pixel coordinates. Also, regarding data sharing, different systems may use different coordinate systems; latitude and longitude, as standard geographic coordinates, facilitate data exchange and collaboration between different departments and systems. For example, traffic management centers, navigation service providers, and autonomous vehicles all require unified geographic coordinates. In traffic incident handling, accurate geographic location helps emergency services reach the scene quickly. In terms of safety, precise latitude and longitude coordinates can help locate accident or violation vehicles more accurately, improving the efficiency of law enforcement and emergency response. For example, electronic police systems need to know the actual location of vehicles to record the specific location of violations.
[0004] The foundation for achieving the above functions lies in the coordinate transformation from pixel coordinates to latitude and longitude coordinates. In intelligent transportation systems, the transformation from pixel coordinates to latitude and longitude coordinates requires multiple coordinate transformation procedures, with the process from AutoCAD coordinates (Cartesian coordinates) to latitude and longitude coordinates being particularly crucial. Affine transformation plays a vital role in this transformation process.
[0005] Affine transformations offer advantages such as high computational efficiency and simple implementation, making them particularly suitable for real-time traffic monitoring and vehicle-to-infrastructure (V2I) systems. For autonomous vehicles and traffic management centers, quickly and accurately acquiring the geographic location data of vehicles and pedestrians is fundamental for real-time decision-making and emergency response. However, currently, there is no optimized affine transformation-based AutoCAD coordinate to latitude / longitude coordinate conversion scheme for intelligent transportation scenarios. Existing technologies either fail to adequately consider the impact of roadside camera installation posture and shooting angle on coordinate mapping, or suffer from insufficient conversion accuracy and poor adaptability. This results in low efficiency and large errors in the pixel-to-latitude / longitude coordinate conversion process, failing to meet the high-precision positioning requirements of V2I and real-time law enforcement scenarios. Therefore, there is an urgent need for an efficient, accurate, and adaptable coordinate transformation method for intelligent transportation applications, especially optimizing the implementation of affine transformations from AutoCAD coordinates to latitude / longitude coordinates, to address the pain points of existing technologies and support the functional implementation and upgrade of intelligent transportation systems. Summary of the Invention
[0006] This invention provides a vehicle positioning method based on piecewise affine transformation to solve the problems of low efficiency and large error in the conversion process from pixel coordinates to latitude and longitude coordinates in the prior art, which cannot meet the high-precision positioning requirements of scenarios such as vehicle-road cooperation and real-time law enforcement.
[0007] According to the first aspect, one embodiment provides a vehicle positioning method based on piecewise affine transformation, 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 road monitoring area; Based on the latitude and longitude coordinates and AutoCAD coordinates of the known control points, several virtual control points are generated, and the known control points and virtual control points are combined to form a control point set; The control point set is triangulated using Delaunay triangulation, and piecewise affine transformation is performed within each Delaunay triangle to obtain the coordinate transformation mapping relationship from latitude and longitude coordinates to AutoCAD coordinates. Based on the known AutoCAD coordinates and pixel coordinates of the control points, the coordinate transformation mapping relationship from AutoCAD coordinates to pixel coordinates is obtained by using the perspective transformation method optimized by weighted least squares. Based on the coordinate transformation mapping relationship from latitude and longitude coordinates to AutoCAD coordinates and from AutoCAD coordinates to pixel coordinates obtained from the calibration, a vehicle latitude and longitude positioning mapping map is obtained. 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.
[0008] Furthermore, based on the known latitude and longitude coordinates and AutoCAD coordinates of the control points, several virtual control points are generated, specifically including: Several virtual control points are generated by using methods such as edge midpoints, diagonal intersections, or bilinear interpolation to generate control point meshes.
[0009] Furthermore, the control point set is subjected to Delaunay triangulation, and piecewise affine transformation is performed within each Delaunay triangle to obtain the coordinate transformation mapping relationship from latitude and longitude coordinates to AutoCAD coordinates, specifically including: For the correspondence of three points in each Delaunay triangle, construct a 3×3 secondary coordinate matrix G and a 3×2 target point matrix C, and substitute them into the following formula:
[0010] Among them, the secondary coordinate matrix G is constructed from the latitude and longitude coordinates of the triangle vertices, the target point matrix C is constructed from the AutoCAD coordinates corresponding to the triangle vertices; M is the intermediate transformation matrix; The formula for obtaining the intermediate transformation matrix M by transformation is:
[0011] Transpose matrix M to obtain the final affine transformation matrix A:
[0012] This enables the mapping from homogeneous coordinates to target coordinates.
[0013] Furthermore, based on the known AutoCAD coordinates and pixel coordinates of the control points, a perspective transformation method optimized by weighted least squares is used to obtain the coordinate transformation mapping relationship from AutoCAD coordinates to pixel coordinates, specifically including: Based on known control points, a three-level control point set is formed, and differentiated weights are assigned to control points at each level. The perspective transformation matrix is solved by weighted least squares method, and the global mapping relationship from AutoCAD coordinates to pixel coordinates is calculated.
[0014] Furthermore, based on the known control points, a three-level control point set is formed, and differentiated weights are assigned to each level of control points, specifically including: The known control points are used as primary control points; the coordinates of the diagonal intersection points are obtained using the known control points and are used as secondary control points; then, using the principle of cross ratio invariance of perspective transformation, the coordinates of the midpoints of the four line segments are obtained in two ways and are used as tertiary control points; thus, a set of three levels of control points is formed, and different weight coefficients are assigned to the three different levels of control points.
[0015] Furthermore, the perspective transformation matrix is solved using the weighted least squares method, and the global mapping relationship from AutoCAD coordinates to pixel coordinates is calculated, specifically including: Based on the pixel coordinates, AutoCAD coordinates and corresponding weight coefficients of all control points in the three-level control point set, two rows of equations are constructed for each control point and integrated into an overdetermined system of equations with dimension (2N,9), where N is the number of control points. The solution vector corresponding to the minimum singular value is solved by singular value decomposition. The solution vector is reshaped into a 3×3 matrix and normalized by the third row and third column elements to obtain the perspective transformation matrix H. The grid generation function generates all pixel coordinates (u,v) within the entire monitored image range, and transforms the pixel coordinates (u,v) into homogeneous coordinates. The homogeneous coordinates are then multiplied by the perspective transformation matrix H to obtain the homogeneous AutoCAD coordinates. Divide the first two dimensions of the homogeneous AutoCAD coordinates by the third component w′ to obtain the non-homogeneous AutoCAD coordinates, which is to restore the AutoCAD coordinates (x,y) in the two-dimensional rectangular coordinate system. Each pixel coordinate (u,v) is associated with its corresponding AutoCAD 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 AutoCAD coordinate. The corresponding array is the global mapping relationship from AutoCAD coordinates to pixel coordinates.
[0016] Furthermore, for each control point, two rows of equations are constructed and integrated into an overdetermined system of equations of dimension (2N,9), specifically including: Construct two-line equations: [-x*w, -y*w, -1*w, 0, 0, 0, u*x*w, u*y*w, u*w], [0, 0, 0, -x*w, -y*w,-1*w, v*x*w, v*y*w, v*w] in: x is the horizontal coordinate value of the control point in AutoCAD coordinates; y is the vertical coordinate value of the control point in AutoCAD coordinates; u represents the column coordinate value in the pixel coordinates of the control point; v is the row coordinate value in the pixel coordinates of the control point; w is the weight coefficient corresponding to the control point.
[0017] Furthermore, obtain the latitude and longitude coordinates, AutoCAD coordinates, and pixel coordinates of at least four known control points within the target road monitoring area, specifically including: High-precision RTK equipment is used to collect latitude and longitude coordinates, which include latitude and longitude. Acquire aerial views from drones or road construction drawings, and obtain AutoCAD coordinates through image scaling, calibration, and coordinate extraction; The road image is captured by the input roadside camera, and the pixel position of the control point in the image is extracted by the image processing tool to obtain the pixel coordinates. The pixel coordinates are taken 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.
[0018] Furthermore, the control point set is subjected to Delaunay triangulation, and piecewise affine transformation is performed within each Delaunay triangle to obtain the coordinate transformation mapping relationship from latitude and longitude coordinates to AutoCAD coordinates, specifically including: The Delaunay triangulation satisfies the "empty circle property", that is, the circumcircle of any triangle does not contain any control points other than the three vertices.
[0019] According to a second aspect, one embodiment provides a vehicle positioning system based on piecewise affine transformation, 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 road monitoring area; The virtual point generation module is used to generate several virtual control points based on the latitude and longitude coordinates and AutoCAD coordinates of known control points, and to combine the known control points and virtual control points into a control point set; The affine transformation module is used to perform Delaunay triangulation on the control point set, and to perform piecewise affine transformation within each Delaunay triangle to obtain the coordinate transformation mapping relationship from latitude and longitude coordinates to AutoCAD coordinates. The perspective transformation module is used to obtain the coordinate transformation mapping relationship from AutoCAD coordinates to pixel coordinates based on the known AutoCAD coordinates and pixel coordinates of the control points, using the weighted least squares optimized perspective transformation method. The latitude and longitude positioning map generation module is used to integrate the coordinate transformation mapping relationship from latitude and longitude coordinates to AutoCAD coordinates and the coordinate transformation mapping relationship from AutoCAD coordinates to pixel coordinates obtained by calibration to obtain the vehicle latitude and longitude positioning map. The vehicle positioning module is used to obtain the pixel coordinates of the vehicle to be located within the target monitoring area, and to obtain the latitude and longitude coordinates of the vehicle to be located by inverse transformation based on the vehicle latitude and longitude positioning mapping map.
[0020] According to a third aspect, one embodiment provides an electronic device, the device comprising: 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 vehicle positioning method based on piecewise affine transformation as described in any of the preceding claims.
[0021] According to a fourth aspect, one embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of a vehicle positioning method based on piecewise affine transformation as described in any of the preceding claims.
[0022] This invention provides a vehicle positioning method and system based on piecewise affine transformation, which has the following advantages: 1. High positioning accuracy: Piecewise affine transformation is achieved through Delaunay triangulation, which transforms the global nonlinear mapping into a local linear mapping, effectively reducing edge region errors. The transformation error between virtual control points and internal sampling points is stabilized within 1cm. The perspective transformation optimized by weighted least squares suppresses outlier interference through differentiated weights, with an average error as low as 0.29m, which is 3.3%-12.1% lower than traditional methods. The overall positioning average error can be controlled within 0.35m. 2. High stability: The "empty circle property" of Delaunay triangulation avoids the generation of slender triangles, ensuring the reliability of the mapping relationship in each region; the differentiated weight design strengthens the constraint effect of high reliability control points, reduces error propagation, and reduces the error in high deformation areas such as road edges by more than 0.2m; 3. Excellent real-time performance: The location map is constructed offline during the calibration stage. During the coordinate transformation stage, only the map needs to be read and the inverse transformation operation needs to be performed. There is no need to repeatedly solve the matrix. The processing latency can be down to the microsecond level, which meets the low latency requirements of vehicle-road cooperation and real-time monitoring. 4. Wide adaptability: It does not rely on complex geodetic reference parameters and only requires 4 known control points to complete the calibration. It is suitable for roadside camera deployment scenarios at different intersections and road sections, and is compatible with multiple image resolutions such as 1920×1080. 5. High scalability: The generation method of virtual control points supports flexible selection, and the density of control points can be adjusted according to the actual needs of the scenario to further optimize positioning accuracy. Attached Figure Description
[0023] Figure 1 A flowchart illustrating a vehicle positioning method based on piecewise affine transformation, provided as an embodiment of the present invention; Figure 2 A flowchart illustrating a specific implementation of a vehicle positioning method based on piecewise affine transformation, as provided in one embodiment of the present invention; Figure 3 This is a perspective transformation diagram of AutoCAD coordinates to pixel coordinates in a vehicle positioning method based on piecewise affine transformation provided in an embodiment of the present invention. Figure 4 This invention provides a Delaunay triangle region subdivision and quadrilateral global region contour map in a vehicle positioning method based on piecewise affine transformation, as an embodiment of the present invention. Figure 5 The transformation accuracy of two affine transformations for virtual grid points in a vehicle positioning method based on piecewise affine transformation provided in one embodiment of the present invention; Figure 6 The transformation accuracy of two affine transformations for sampling points inside a triangle is provided in a vehicle positioning method based on piecewise affine transformation in one embodiment of the present invention. Figure 7 A depth map of the conversion error of two affine transformations for actual test points in a vehicle positioning method based on piecewise affine transformation provided in an embodiment of the present invention; Figure 8 The distribution diagram of 4, 5, and 9 control points of perspective transformation in a vehicle positioning method based on piecewise affine transformation provided in an embodiment of the present invention; Figure 9 A comparison of the errors of four perspective transformation methods in a vehicle positioning method based on piecewise affine transformation provided in an embodiment of the present invention; Figure 10 A comparison of the smoothed error between the proposed model and existing methods in a vehicle positioning method based on piecewise affine transformation provided in an embodiment of the present invention; Figure 11In an embodiment of the present invention, a vehicle positioning method based on piecewise affine transformation is provided, in which the proposed model (a) and the existing method are compared using AutoCAD viewpoint error depth maps (b). Figure 12 The image shows the roadside view error depth map between the proposed model (left) and the existing method (right) in a vehicle positioning method based on piecewise affine transformation provided in an embodiment of the present invention. Detailed Implementation
[0024] 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.
[0025] Furthermore, the features, operations, or characteristics described in the specification can be combined in any suitable manner to form various embodiments. At the same time, the steps or actions in the method description can be rearranged or adjusted in a manner obvious to those skilled in the art. Therefore, the various orders in the specification and drawings are only for the clear description of a particular embodiment and do not imply a necessary order, unless otherwise stated that a particular order must be followed.
[0026] The first embodiment of this invention provides a vehicle positioning method based on piecewise affine transformation. In practical applications, this method is mainly used in roadside surveillance cameras and edge computing devices. Based on Cartesian and latitude / longitude coordinates, and combining Delaunay triangulation and piecewise affine transformation with weighted least squares optimization perspective transformation, a complete coordinate transformation is achieved. This establishes a mapping relationship between pixel coordinates on the surveillance image and latitude / longitude coordinates on the actual road, and stores it in a mapping map. This enables rapid coordinate mapping, thereby achieving precise relative vehicle positioning. The following section will further elaborate on this method. Figure 1 and Figure 2 Please provide a detailed explanation.
[0027] The vehicle localization method based on piecewise affine transformation is divided into two main parts: the calibration stage before coordinate transformation and the coordinate transformation stage. The core part is the calibration stage before coordinate transformation.
[0028] 1. Calibration stage: The coordinate transformation model requires at least four 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 input conditions. Specifically: 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 road monitoring area are obtained.
[0029] The multi-source dataset used in this embodiment contains three core data types: pixel coordinates from the roadside view, CAD coordinates from AutoCAD, and latitude and longitude coordinates acquired by RTK, which together construct the basic framework of the spatial mapping model. Among them, pixel coordinates form the basis of image measurement, CAD coordinates provide a two-dimensional geometric reference, and RTK coordinates provide a centimeter-level positioning reference for geospatial transformation.
[0030] like Figure 1 As shown, in step S200, several virtual control points are generated based on the latitude and longitude coordinates and AutoCAD coordinates of the known control points, and the known control points and virtual control points are combined to form a control point set.
[0031] In this embodiment, based on the known latitude and longitude coordinates and AutoCAD coordinates of the control points, a control point grid is generated using the method of generating control point grids by edge midpoint, diagonal intersection, or bilinear interpolation, and several virtual control points are added. The known control points and the virtual control points form a control point set.
[0032] like Figure 1 As shown, in step S300, the control point set is triangulated using Delaunay triangulation, and a piecewise affine transformation is performed within each Delaunay triangle to obtain the coordinate transformation mapping relationship from latitude and longitude coordinates to AutoCAD coordinates.
[0033] In this embodiment, the piecewise affine transformation method for Delaunay triangulation optimization is as follows: The first step in the entire calibration process is Delaunay triangulation and piecewise affine transformation. This process involves constructing a two-dimensional spatial mesh, performing spatial triangulation, and solving local affine transformations starting from given control points.
[0034] First, virtual control points need to be added. Given the latitude and longitude coordinates of four control points and their AutoCAD coordinates, a uniformly distributed two-dimensional grid is constructed using bilinear interpolation to obtain several grid points, i.e., virtual control points. Specifically, the number of sampling points in the horizontal and vertical directions is determined using the Euclidean distance of the region boundary, and interpolation parameters are generated uniformly within the parameter interval [0,1]. For each pair of parameter values, the bilinear interpolation formula is applied to the CAD coordinates and latitude and longitude coordinates to obtain grid point coordinates that are continuous and smoothly transitioned on the corresponding plane.
[0035] Assume the function values of the four control points are as follows: , , , For any parameter The interpolation formula is formula (1):
[0036] Bilinear interpolation can obtain more constraint information, making triangulation and local affine transformation possible. Then, Delaunay triangulation is performed to divide the original control points and virtual control points into several triangles. For any triangle in the triangulation, its circumcircle does not contain any other points (i.e., the "empty circle" property). This triangulation helps to ensure that the generated triangles have good shapes and avoids the appearance of overly thin triangles.
[0037] Finally, a piecewise affine transformation, also called a local affine transformation, is performed. For the correspondence of the three points in each Delaunay triangle, a 3×3 second-order coordinate matrix is constructed. G and a 3×2 target point matrix C Substituting into formula (2), we obtain formula (3):
[0038] The final affine transformation matrix is given by formula (4), thus realizing the mapping from homogeneous coordinates to target coordinates:
[0039] Table 1. Algorithm implementation process for Delaunay triangulation and piecewise affine transformation.
[0040] like Figure 1 As shown, in step S400, based on the known AutoCAD coordinates and pixel coordinates of the control points, the coordinate transformation mapping relationship from AutoCAD coordinates to pixel coordinates is obtained by using the perspective transformation method optimized by weighted least squares.
[0041] In this embodiment, the perspective transformation method of weighted least squares optimization is as follows: The second step in the entire calibration process is the conversion of the original control points from AutoCAD coordinates to pixel coordinates. The core idea of this process is to use perspective transformation to establish a mapping relationship between the AutoCAD coordinate system and the pixel coordinate system, such as... Figure 3 As shown, coordinate transformation is achieved through the following steps.
[0042] First, calculate the perspective transformation matrix. 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. For any pixel coordinate in the roadside view image (… x , y All of these can be converted into their actual coordinates on the actual road plane using a perspective transformation matrix. X , Y , Z The relationship between the two satisfies:
[0043] in M For perspective matrix, parameters , , , Linear transformations (rotation, scaling, shearing) within the control plane; parameters , control x and y Translation in direction; 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 for perspective projection.
[0044] Then, input the AutoCAD coordinates and corresponding pixel coordinates of the known control points. Using the known control points, calculate the coordinates of the diagonal intersection point; this intersection point serves as the secondary control point. Next, utilizing the principle of cross-ratio invariance in perspective transformation, calculate the coordinates of the midpoints of the four line segments in two ways, serving as the tertiary control points. Using weighted least squares, assign different weight coefficients to control points of different levels. Then, find the linear mapping relationship from pixel coordinates to AutoCAD coordinates through the perspective transformation matrix, ensuring that each pixel coordinate is correctly mapped to its corresponding AutoCAD coordinate.
[0045] Next, all pixel coordinates are generated. A grid generation function is used to generate the coordinates of all pixels within the entire monitored image area, covering the height and width of the entire image. The generated pixel coordinates are in the format (…). u , v Arranged in the format of ), where u Represents column coordinates. v These represent row coordinates. By stacking these coordinates and converting them into homogeneous coordinates, we prepare for subsequent perspective transformations.
[0046] Finally, a perspective transformation needs to be performed. The pixel coordinates are converted to homogeneous coordinates (adding one dimension), and the perspective transformation matrix calculated earlier is used. M A coordinate transformation is performed, converting the coordinates to those in the AutoCAD coordinate system through matrix operations. Finally, the result is converted into non-homogeneous coordinates and reshaped to obtain a CAD coordinate array with the same dimensions as the original image.
[0047] Table 2. Algorithm implementation process of perspective transformation method for weighted least squares optimization.
[0048] like Figure 1 As shown, in step S500, based on the coordinate transformation mapping relationship from latitude and longitude coordinates to AutoCAD coordinates and the coordinate transformation mapping relationship from AutoCAD coordinates to pixel coordinates obtained by calibration, a vehicle latitude and longitude positioning mapping map is obtained.
[0049] This embodiment completes the calibration process after two steps: "piecewise affine transformation optimized by Delaunay triangulation" and "perspective transformation optimized by weighted least squares". The mapping relationship is then saved as a vehicle latitude and longitude positioning map. By reading the latitude and longitude positioning map, coordinate transformation from pixel coordinates to latitude and longitude coordinates can be quickly achieved.
[0050] 2. Coordinate Transformation Stage In this stage, the inverse transformation of each calibration stage is performed to convert pixel coordinates into latitude and longitude coordinates. Specifically: like Figure 1 As shown, in step S600, 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.
[0051] Verification example: 1. Data Introduction This embodiment selects 171 control points and test points to cover typical features of the target area, including representative samples with different locations and distribution types. The dataset is divided into two subsets: model calibration and accuracy testing. In the calibration stage, coordinate system transformation parameters are optimized using control points, while in the testing stage, independent test points are used to evaluate the model's transformation accuracy and stability. The data for each point are shown in Tables 3 and 4. By fusing three types of coordinate data, this model achieves high-precision mapping between image space and physical space, providing reliable technical support for collaborative processing of multi-source data in the engineering field.
[0052] Table 3. Pixel coordinates and CAD coordinates in multi-source datasets
[0053] Table 4. Latitude and longitude coordinates in the multi-source dataset
[0054] 2. Model accuracy verification and comparison: The main device used for accuracy verification of the model in this study is a Hikvision general-purpose network camera with a maximum resolution of 1920×1080@25fps. It provides a panoramic view of the test site from the roadside perspective and forms the basis for the verification of the entire positioning model.
[0055] 2.1 Comparison of methods for converting latitude and longitude coordinates to AutoCAD coordinates In the calibration process of this research model, the first step of the coordinate transformation procedure is to convert latitude and longitude coordinates to AutoCAD coordinates. In the "Piecewise Affine Transformation Method Based on Delaunay Triangulation Optimization" in this embodiment, the model uses a piecewise affine transformation based on Delaunay triangulation. Compared with common global affine transformations, the piecewise affine transformation based on Delaunay triangulation does not require global assumptions and has higher local adaptability and accuracy. By dividing the coordinate system into multiple triangular regions, the local transformation can more accurately fit the actual coordinate relationship, especially when the control points are unevenly distributed or have large deformations, effectively reducing errors. The accuracy of these two coordinate transformation methods was compared in the experiment.
[0056] The data sources for comparing the accuracy of these two coordinate transformation methods include three aspects: First, based on the original four control points, 168 virtual grid points are generated in the AutoCAD coordinate system and latitude and longitude coordinate system using bilinear interpolation; second, 7 internal sampling points are selected in each triangle, resulting in 1722 internal sampling points; and third, the actual set of test points collected, totaling 171 test points.
[0057] Next, we conducted an experimental comparison between piecewise affine transformations based on Delaunay triangulation and common global affine transformations.
[0058] On one hand, for piecewise affine transformations based on Delaunay triangulation, after generating virtual mesh points within the area enclosed by control points, Delaunay triangulation is used to divide these mesh points into 246 triangles, ensuring that the generated triangles satisfy the Delaunay condition. This reduces the occurrence of elongated triangles and effectively improves the accuracy of the affine transformation. Then, piecewise affine transformations are performed within each triangle, ensuring that the transformation of common edges of the triangles remains smooth. On the other hand, for common global affine transformations, the global affine transformation matrix is directly calculated using four control points. For example... Figure 4 As shown.
[0059] Finally, the accuracy of two affine transformations was verified, including three aspects: the accuracy of virtual grid point transformation, the accuracy of triangle interior sampling point transformation, and the accuracy of actual test point transformation. The following are the verification comparison results of the three aspects of accuracy.
[0060] like Figure 5 For the coordinate transformation of virtual grid points, Figure 5 (a) is a piecewise affine transformation based on Delaunay triangulation. Figure 5 (b) is a conventional global affine transformation. As can be seen from the figure, there is a significant difference in the accuracy of the two affine transformations. The transformation error of the piecewise affine transformation is always stable within 1 cm, and the overall error value is close to zero. However, although the global affine transformation has a smaller error in the central region, there is a significant error gradient at the edge of the region (especially at the four corners), with the maximum error reaching 10 cm, which is two orders of magnitude greater than that in the central region.
[0061] like Figure 6 This demonstrates the result of the coordinate transformation of the sampling points inside the triangle. Figure 6 (a) is a piecewise affine transformation based on Delaunay triangulation. Figure 6 (b) shows a conventional global affine transformation. The figure also shows a significant difference in accuracy between the two affine transformations: the transformation error of the piecewise affine transformation remains within 1 cm, and the overall error value is close to zero; the global affine transformation has a smaller error in the central region, but the error gradient changes significantly in the four corner regions, which can be clearly observed through the change in color depth, with the maximum error reaching 10 cm.
[0062] like Figure 7 As shown, the affine accuracy results based on actual test points are presented. Figure 7 (a) and (b) are error distribution diagrams for piecewise affine transformation and global affine transformation, respectively.
[0063] The piecewise affine transformation based on Delaunay triangulation generally exhibits a smooth error distribution, but significant errors remain in certain regions, particularly at the lower edge. The maximum error occurs in the lower left of the image, reaching approximately 20 cm. Furthermore, the average error of the piecewise affine transformation is 15 cm, with a standard deviation of 6 cm, indicating that the method maintains relatively stable accuracy overall, although the error distribution is relatively concentrated.
[0064] The error of the global affine transformation exhibits a relatively obvious gradient variation, especially in the lower center and lower left regions of the graph, where the error variation is larger. The maximum error value reaches 31 cm, indicating that the global affine transformation matrix has poor applicability in this region. In addition, the average error of the global affine transformation is 17 cm, and the standard deviation is 8 cm, indicating that the error of this method is higher than that of the other method, and there are large fluctuations in some regions.
[0065] The piecewise affine transformation based on Delaunay triangulation decomposes the space into Delaunay triangular subdomains for independent affine transformations. While maintaining coordinate continuity, it overcomes the error propagation problem of global transformations. Its local adaptive characteristics ensure that the error gradient in the deformed region remains stable at the centimeter level, achieving an average accuracy improvement of 11.7% and a maximum accuracy improvement of 32.2% compared to global affine transformations. Therefore, this method exhibits superior smoothness and stability in complex spatial deformation scenarios.
[0066] 2.2 Comparison of AutoCAD coordinate to pixel coordinate conversion methods In the calibration process of this research model, the second step of the coordinate transformation process is to convert AutoCAD coordinates to pixel coordinates. In the "Weighted Least Squares Optimized Perspective Transformation Method" of this embodiment, the model uses a perspective transformation method based on weighted least squares. Compared with common perspective transformation methods, this method first uses plane geometry to solve for the coordinates of the intersection point of the diagonals of the area enclosed by four known control points (i.e., primary control points), including AutoCAD coordinates and pixel coordinates. This intersection point is used as a secondary control point relative to the known control points. Then, using the principle of cross ratio invariance of perspective transformation, the coordinates of the midpoints of four line segments are solved for. These four line segments are the lines connecting the diagonal intersection point to the four known control points, and these four intersection points are used as tertiary control points.
[0067] To verify the transformation accuracy of the perspective transformation method based on weighted least squares, this method is compared with conventional perspective transformation methods using 4 control points, 5 control points (including secondary control points), and 9 control points (including secondary and tertiary control points, and using the RANSAC method). The data source for the accuracy comparison of coordinate transformation methods in this section is a set of test points collected from actual roads, totaling 171 test points.
[0068] As a classic algorithm in robust parameter estimation, RANSAC effectively solves the robust modeling problem in noisy observation datasets through iterative sampling and model validation mechanisms. In computer vision, this method is widely used in projective geometry computation tasks, particularly in spatial coordinate transformation modeling between two-dimensional images. RANSAC achieves optimal estimation of the homography matrix by selecting the optimal set of interior points. When significant outliers exist in the input feature matching pairs, the RANSAC algorithm can gradually converge to the optimal geometric transformation parameters that satisfy the maximum consensus set based on a probability sampling strategy.
[0069] Weighted least squares (WLS) is a commonly used method in the field of projection transformation parameter estimation. It assigns different weights to each control point, constructs a heteroscedasticity error model, and models data differences. It is suitable for scenarios with a large number of matching points and prior knowledge of data reliability. Compared to the equal weight assumption of traditional least squares and the binary interior point discrimination mechanism of RANSAC, WLS, through a continuous weight allocation function, achieves progressive noise suppression while maintaining effective sample utilization, thus obtaining more accurate and stable perspective transformation results.
[0070] In the perspective transformation process, the conventional four-control-point perspective transformation method directly calculates the perspective transformation matrix by solving a system of linear equations. Based on the four control points, the diagonal intersection points are added as secondary control points. The overdetermined equations are solved using the least squares method, and the perspective transformation matrix is estimated using five control points. Based on the five control points, four line segment midpoints are added as tertiary control points. The RANSAC algorithm is used to estimate the perspective transformation matrix, filtering out interior points and removing exterior points, thus obtaining a robust perspective transformation matrix. Finally, keeping the number of control points unchanged at nine, the RANSAC method is replaced with a weighted least squares method. Different weights are assigned to the first, second, and third level control points, as shown in Table 5. This approach leverages the control role of different levels of control points while reducing the error influence of lower-level control points, resulting in a better perspective transformation matrix. Figure 8 As shown.
[0071] Table 5 Weighting coefficients for control points at different levels
[0072] After calculating the perspective transformation matrix using four different methods, the inverse perspective transformation matrix is obtained. The pixel coordinates of all test points are converted to AutoCAD coordinates, compared with the original AutoCAD coordinates, and the coordinate transformation error is calculated and analyzed.
[0073] Figure 9 The figure shows a comparison of coordinate transformation errors for four perspective transformation methods. Figure 9 (a) represents the original error. Figure 9 (b) Error after LOESS smoothing. Comparing several methods, the perspective transformation method based on weighted least squares is more advantageous. At most test points, the error curve obtained by this method is lower or smoother than other methods, indicating that its overall error is smaller; the error after LOESS smoothing... Figure 9 As observed in (b), this method exhibits a relatively smaller fluctuation range and a more uniform and stable trend. Weighted least squares assigns different weights to different control points, effectively reducing the impact of outliers on the overall estimation, minimizing error spikes, and enhancing its anti-interference capabilities. Furthermore, the average errors of the four methods—4-point perspective, 5-point perspective, 9-point perspective (RANSAC), and 9-point perspective (weighted least squares)—are 0.30 m, 0.31 m, 0.33 m, and 0.29 m, respectively. The 9-point perspective (weighted least squares) method reduces the average error by 3.3%, 6.4%, and 12.1% compared to the other three methods, respectively. In conclusion, the perspective transformation method based on weighted least squares is chosen as the implementation method for the second step of the research model in this chapter.
[0074] 2.3 Comparison of overall conversion accuracy with existing conversion models This embodiment completes the calibration process after two steps: "piecewise affine transformation optimized by Delaunay triangulation" and "perspective transformation optimized by weighted least squares". The mapping relationship is then saved as a vehicle latitude and longitude positioning map. By reading the latitude and longitude positioning map, coordinate transformation from pixel coordinates to latitude and longitude coordinates can be quickly achieved.
[0075] This section verifies the overall conversion accuracy of the visual positioning method based on piecewise affine transformation from a roadside perspective, and compares the conversion accuracy with existing visual positioning methods of the same type, which are "absolute position positioning methods on geodetic coordinate systems".
[0076] First, the data source for overall conversion accuracy verification and comparison is the dataset in the "Data Introduction" section, used by both methods. The dataset contains 171 test points collected from actual roads, including three coordinate types: pixel coordinates, AutoCAD coordinates, and latitude / longitude coordinates. Then, the same three coordinate types for four control points are input into both models, and their respective coordinate transformation methods are used to solve the mapping relationship from pixel coordinates to latitude / longitude coordinates. This mapping relationship is then saved as a latitude / longitude positioning map. Finally, the latitude / longitude positioning map is read, and the accuracy is verified using data from the test point set.
[0077] Error comparison results are as follows Figure 10 As shown, Figure 10 The image shows the error curve after smoothing. Data shows that the coordinate transformation model proposed in this study exhibits significant advantages in error control. After applying LOESS filtering to the error data, as shown... Figure 10 The stability characteristics of this model are more significant. Quantitative analysis shows that the average error of this model is 0.331 m, a 9.8% reduction compared to the 0.367 m of existing methods; the standard deviation of the error decreases from 0.25 m to 0.135 m, a reduction of 46%. This improvement in stability has significant engineering value for high-precision positioning systems, effectively avoiding the risk of system instability caused by sudden error changes.
[0078] The coordinate transformation error values of each test point are converted into error depth values and plotted on the AutoCAD plane and pixel plane to visualize the spatial mapping error analysis results, such as... Figures 11 to 12 As shown in the two figures, it is very clear that existing methods form a continuous high error band on the left side of the near end of the test road (i.e., the left edge area of the road). However, the model method in this paper reduces the error in the same area by more than 0.2 m through regional processing and multi-control point calibration mechanism, which significantly reduces the area of the red area (especially the dark red area) and significantly improves the spatial mapping accuracy.
[0079] The statistical analysis of the results shows that, compared with existing transformation methods, the model method in this chapter first constructs a triangular mesh space based on Delaunay triangulation, then establishes a local linear mapping relationship through piecewise affine transformation, and finally adopts a perspective transformation method based on weighted least squares. This effectively suppresses error propagation and achieves accurate mapping from pixel coordinates to latitude and longitude coordinates. At the same time, it overcomes the problem of unit longitude variation in existing methods. Lon and change per unit latitude The complex calculation steps and error accumulation issues of lat have led to the efficient and accurate realization of visual positioning of latitude and longitude coordinates from the roadside perspective.
[0080] 3. Summary To address the need for converting pixel coordinates to geographic coordinates from a roadside perspective, this invention proposes a vehicle localization method based on piecewise affine transformation. By integrating Delaunay triangulation and weighted least squares optimization, a multi-level spatial mapping framework is constructed: First, based on virtual control points and a triangulation strategy, high-precision local affine transformation is achieved, effectively suppressing the local incompatibility problem of traditional global affine transformation; second, a hierarchical perspective transformation method is proposed, which significantly improves coordinate transformation robustness while maintaining computational efficiency by assigning differentiated weights to different control points.
[0081] Through systematic experimental verification, this method outperforms existing technologies in both accuracy and stability. Quantitative analysis shows that the average coordinate mapping error is reduced to 0.331 m, an improvement of 9.8% compared to existing methods, and the error dispersion distribution is optimized from 0.25 m to 0.135 m. Visualized error depth maps further demonstrate that this method reduces the coverage of high-error areas (>0.6 m) by 80.4%, especially in deformation-sensitive areas such as road edges, where positioning accuracy is improved by 31.1%. These research findings provide theoretical support and technical implementation pathways for high-precision positioning in intelligent transportation systems.
[0082] Corresponding to the vehicle positioning method based on piecewise affine transformation disclosed above, this invention also discloses a vehicle positioning system based on piecewise affine transformation, 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 road monitoring area; The virtual point generation module is used to generate several virtual control points based on the latitude and longitude coordinates and AutoCAD coordinates of known control points, and to combine the known control points and virtual control points into a control point set; The affine transformation module is used to perform Delaunay triangulation on the control point set, and to perform piecewise affine transformation within each Delaunay triangle to obtain the coordinate transformation mapping relationship from latitude and longitude coordinates to AutoCAD coordinates. The perspective transformation module is used to obtain the coordinate transformation mapping relationship from AutoCAD coordinates to pixel coordinates based on the known AutoCAD coordinates and pixel coordinates of the control points, using the weighted least squares optimized perspective transformation method. The latitude and longitude positioning map generation module is used to integrate the coordinate transformation mapping relationship from latitude and longitude coordinates to AutoCAD coordinates and the coordinate transformation mapping relationship from AutoCAD coordinates to pixel coordinates obtained by calibration to obtain the vehicle latitude and longitude positioning map. The vehicle positioning module is used to obtain the pixel coordinates of the vehicle to be located within the target monitoring area, and to obtain the latitude and longitude coordinates of the vehicle to be located by inverse transformation based on the vehicle latitude and longitude positioning mapping map.
[0083] It should be noted that for a detailed description of the vehicle positioning system based on piecewise affine transformation provided in the embodiments of the present invention, please refer to the relevant description of the vehicle positioning method based on piecewise affine transformation provided in the embodiments of the present invention, which will not be repeated here.
[0084] 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 vehicle positioning method based on piecewise affine transformation as described in any of the preceding embodiments.
[0085] It should be noted that for a detailed description of an electronic device provided in the embodiments of the present invention, please refer to the relevant description of a vehicle positioning method based on piecewise affine transformation provided in the embodiments of this application, which will not be repeated here.
[0086] 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 vehicle positioning method based on piecewise affine transformation as described in any of the preceding claims.
[0087] It should be noted that for a detailed description of the computer-readable storage medium provided in the embodiments of the present invention, please refer to the relevant description of the vehicle positioning method based on piecewise affine transformation provided in the embodiments of this application, which will not be repeated here.
[0088] Those skilled in the art will understand that all or part of the functions of the various methods in the above embodiments can be implemented by hardware or by computer programs. When all or part of the functions in the above embodiments are implemented by computer programs, the program can be stored in a computer-readable storage medium, which may include: read-only memory, random access memory, disk, optical disk, hard disk, etc., and the program is executed by a computer to achieve the above functions. For example, the program can be stored in the memory of a device, and when the program in the memory is executed by the processor, all or part of the above functions can be achieved. In addition, when all or part of the functions in the above embodiments are implemented by computer programs, the program can also be stored in a server, another computer, disk, optical disk, flash drive, or external hard drive, etc., and can be downloaded or copied to the memory of a local device, or the system of the local device can be updated. When the program in the memory is executed by the processor, all or part of the functions in the above embodiments can be achieved.
[0089] 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 vehicle localization method based on piecewise affine transformation, 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 road monitoring area; Based on the latitude and longitude coordinates and AutoCAD coordinates of the known control points, several virtual control points are generated, and the known control points and virtual control points are combined to form a control point set; The control point set is triangulated using Delaunay triangulation, and piecewise affine transformation is performed within each Delaunay triangle to obtain the coordinate transformation mapping relationship from latitude and longitude coordinates to AutoCAD coordinates. Based on the known AutoCAD coordinates and pixel coordinates of the control points, the coordinate transformation mapping relationship from AutoCAD coordinates to pixel coordinates is obtained by using the perspective transformation method optimized by weighted least squares. Based on the coordinate transformation mapping relationship from latitude and longitude coordinates to AutoCAD coordinates and from AutoCAD coordinates to pixel coordinates obtained from the calibration, a vehicle latitude and longitude positioning mapping map is obtained. 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 vehicle positioning method based on piecewise affine transformation as described in claim 1, characterized in that, Based on the known latitude and longitude coordinates and AutoCAD coordinates of the control points, several virtual control points are generated, specifically including: Several virtual control points are generated by using methods such as edge midpoints, diagonal intersections, or bilinear interpolation to generate control point meshes.
3. The vehicle positioning method based on piecewise affine transformation as described in claim 1, characterized in that, The control point set is subjected to Delaunay triangulation, and piecewise affine transformations are performed within each Delaunay triangle to obtain the coordinate transformation mapping relationship from latitude and longitude coordinates to AutoCAD coordinates, specifically including: For the correspondence of three points in each Delaunay triangle, construct a 3×3 secondary coordinate matrix G and a 3×2 target point matrix C, and substitute them into the following formula: Among them, the secondary coordinate matrix G is constructed from the latitude and longitude coordinates of the triangle vertices, the target point matrix C is constructed from the AutoCAD coordinates corresponding to the triangle vertices; M is the intermediate transformation matrix; The formula for obtaining the intermediate transformation matrix M by transformation is: Transpose matrix M to obtain the final affine transformation matrix A: This enables the mapping from homogeneous coordinates to target coordinates.
4. The vehicle positioning method based on piecewise affine transformation as described in claim 1, characterized in that, Based on the known AutoCAD coordinates and pixel coordinates of the control points, a perspective transformation method optimized by weighted least squares is used to obtain the coordinate transformation mapping relationship from AutoCAD coordinates to pixel coordinates, specifically including: Based on known control points, a three-level control point set is formed, and differentiated weights are assigned to control points at each level. The perspective transformation matrix is solved by weighted least squares method, and the global mapping relationship from AutoCAD coordinates to pixel coordinates is calculated.
5. The vehicle positioning method based on piecewise affine transformation as described in claim 4, characterized in that, Based on known control points, a three-level control point set is formed, and differentiated weights are assigned to control points at each level, specifically including: The known control points are used as primary control points; the coordinates of the diagonal intersection points are obtained using the known control points and are used as secondary control points; then, using the principle of cross ratio invariance of perspective transformation, the coordinates of the midpoints of the four line segments are obtained in two ways and are used as tertiary control points; thus, a set of three levels of control points is formed, and different weight coefficients are assigned to the three different levels of control points.
6. The vehicle positioning method based on piecewise affine transformation as described in claim 4, characterized in that, The perspective transformation matrix is solved using the weighted least squares method, and the global mapping relationship from AutoCAD coordinates to pixel coordinates is calculated, specifically including: Based on the pixel coordinates, AutoCAD coordinates and corresponding weight coefficients of all control points in the three-level control point set, two rows of equations are constructed for each control point and integrated into an overdetermined system of equations with dimension (2N,9), where N is the number of control points. The solution vector corresponding to the minimum singular value is solved by singular value decomposition. The solution vector is reshaped into a 3×3 matrix and normalized by the third row and third column elements to obtain the perspective transformation matrix H. The grid generation function generates all pixel coordinates (u,v) within the entire monitored image range, and transforms the pixel coordinates (u,v) into homogeneous coordinates. The homogeneous coordinates are then multiplied by the perspective transformation matrix H to obtain the homogeneous AutoCAD coordinates. Divide the first two dimensions of the homogeneous AutoCAD coordinates by the third component w′ to obtain the non-homogeneous AutoCAD coordinates, which is to restore the AutoCAD coordinates (x,y) in the two-dimensional rectangular coordinate system. Each pixel coordinate (u,v) is associated with its corresponding AutoCAD 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 AutoCAD coordinate. The corresponding array is the global mapping relationship from AutoCAD coordinates to pixel coordinates.
7. The vehicle positioning method based on piecewise affine transformation as described in claim 6, characterized in that, For each control point, construct two rows of equations and integrate them into an overdetermined system of equations of dimension (2N,9), specifically including: Construct two-line equations: [-x*w, -y*w, -1*w, 0, 0, 0, u*x*w, u*y*w, u*w], [0, 0, 0, -x*w, -y*w, -1*w, v*x*w, v*y*w, v*w] in: x is the horizontal coordinate value of the control point in AutoCAD coordinates; y is the vertical coordinate value of the control point in AutoCAD coordinates; u represents the column coordinate value in the pixel coordinates of the control point; v is the row coordinate value in the pixel coordinates of the control point; w is the weight coefficient corresponding to the control point.
8. The vehicle positioning method based on piecewise affine transformation 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 road monitoring area, specifically including: High-precision RTK equipment is used to collect latitude and longitude coordinates, which include latitude and longitude. Acquire aerial views from drones or road construction drawings, and obtain AutoCAD coordinates through image scaling, calibration, and coordinate extraction; The road image is captured by the input roadside camera, and the pixel position of the control point in the image is extracted by the image processing tool to obtain the pixel coordinates. The pixel coordinates are taken 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.
9. The vehicle positioning method based on piecewise affine transformation as described in claim 1, characterized in that, The control point set is subjected to Delaunay triangulation, and piecewise affine transformations are performed within each Delaunay triangle to obtain the coordinate transformation mapping relationship from latitude and longitude coordinates to AutoCAD coordinates, specifically including: The Delaunay triangulation satisfies the "empty circle property", meaning that the circumcircle of any triangle does not contain any control points other than the three vertices.
10. A vehicle positioning system based on piecewise affine transformation, 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 road monitoring area; The virtual point generation module is used to generate several virtual control points based on the latitude and longitude coordinates and AutoCAD coordinates of known control points, and to combine the known control points and virtual control points into a control point set; The affine transformation module is used to perform Delaunay triangulation on the control point set, and to perform piecewise affine transformation within each Delaunay triangle to obtain the coordinate transformation mapping relationship from latitude and longitude coordinates to AutoCAD coordinates. The perspective transformation module is used to obtain the coordinate transformation mapping relationship from AutoCAD coordinates to pixel coordinates based on the known AutoCAD coordinates and pixel coordinates of the control points, using the weighted least squares optimized perspective transformation method. The latitude and longitude positioning map generation module is used to integrate the coordinate transformation mapping relationship from latitude and longitude coordinates to AutoCAD coordinates and the coordinate transformation mapping relationship from AutoCAD coordinates to pixel coordinates obtained by calibration to obtain the vehicle latitude and longitude positioning map. The vehicle positioning module is used to obtain the pixel coordinates of the vehicle to be located within the target monitoring area, and to obtain the latitude and longitude coordinates of the vehicle to be located by inverse transformation based on the vehicle latitude and longitude positioning mapping map.