A coordinate conversion precision calculation method, system, device and medium
By calculating the pixel and latitude/longitude coordinates within the field of view of the PTZ camera, and combining the mapping model and Gaussian projection formula, the coordinate transformation deviation is automatically evaluated, solving the problem of inaccurate coordinate transformation caused by manual operation and achieving high-precision coordinate transformation calculation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGZHOU FUAN DIGITAL TECH CO LTD
- Filing Date
- 2025-11-24
- Publication Date
- 2026-06-26
AI Technical Summary
In existing technologies, the accuracy of coordinate transformation cannot be guaranteed due to the discrepancies between the two-dimensional and three-dimensional coordinate point pairs established manually, which affects the precision of dynamic monitoring of natural resources and smart city planning.
By acquiring the pixel coordinates and latitude and longitude coordinates within the field of view of the PTZ camera, the planar coordinates are calculated using a mapping model between two-dimensional and three-dimensional coordinates. The coordinate transformation deviation is calculated by combining the Gaussian projection forward calculation formula and Euclidean distance, and the coordinate transformation accuracy is automatically evaluated to optimize the mapping model parameters.
It enables automatic, fast, and accurate calculation of coordinate transformation deviations, improving the reliability and accuracy of coordinate transformations and providing high-precision coordinate mapping assurance for multi-view spatial positioning in complex scenarios.
Smart Images

Figure CN121585809B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology for camera calibration, and in particular to a method, system, device, and medium for calculating coordinate transformation accuracy. Background Technology
[0002] In the dynamic monitoring of natural resources or the planning of smart cities, images of the target monitoring scene are collected through machine vision camera monitoring system, and the location information of various targets and targets is obtained through the built-in two-dimensional coordinate and three-dimensional coordinate mapping model.
[0003] In existing technologies, multiple sets of known 2D and 3D coordinate point pairs are typically used to establish a mapping relationship between 2D and 3D coordinates, thereby achieving mutual conversion between 2D and 3D coordinates. However, since the accuracy of coordinate transformation is related to the accuracy of the 2D and 3D coordinate point pairs, and the establishment of these pairs is done manually, there are varying degrees of accuracy deviation, making it impossible to determine the usability of the coordinate transformation. Summary of the Invention
[0004] Therefore, the purpose of this invention is to provide a coordinate transformation accuracy calculation method. This method effectively solves the problem that the mapping between two-dimensional and three-dimensional coordinates is affected by the manual operation of two-dimensional and three-dimensional coordinate point pairs, which affects the accuracy of coordinate transformation. It can automatically, quickly and accurately calculate the deviation of coordinate transformation, and provide more reliable data for dynamic monitoring of natural resources, planning of smart cities, subsequent three-dimensional reconstruction and fine-tuning.
[0005] A method for calculating coordinate transformation accuracy includes the following steps:
[0006] S10: Obtain the pixel coordinates of the j-th target point within the i-th visible range of the PTZ camera in the video frame. and latitude and longitude coordinates Where i∈(1,N) and j∈(1,K), N is the total number of visible range bands set by the PTZ camera, and K is the number of target points in the i-th visible range band;
[0007] S20A: Obtain the constructed mapping model between 2D and 3D coordinates; map the pixel coordinates of the j-th target point within the i-th visible range. Inputting a mapping model between 2D and 3D coordinates yields the first computational plane coordinates of the j-th target point within the i-th visible range. ;
[0008] S20B: Transfer the latitude and longitude coordinates of the j-th target point within the i-th visible range. By inputting the Gaussian projection forward calculation formula, the coordinates of the second calculation plane of the j-th target point within the i-th visible range are obtained. ;
[0009] S30: Calculate the first computational plane coordinates of the j-th target point within the i-th visible range. With the second calculation plane coordinates distance , distance As the coordinate transformation deviation value of the j-th target point in the i-th visible range ;
[0010] Repeat the above steps to obtain the coordinate transformation deviation values of K target points within the i-th visible range;
[0011] Control the pan-tilt camera to rotate to the next visible range, repeat the above steps, and obtain the coordinate transformation deviation values of N×K target points;
[0012] S40: Calculate the average coordinate transformation deviation of K target points in each visible range band to obtain a list of coordinate transformation accuracy for N visible range bands. .
[0013] Further, step S10 includes the following sub-steps:
[0014] S11: Control the pan-tilt camera to rotate, and within the i-th visible range, adjust the zoom ratio to make the j-th target point with obvious features clearly appear in the video frame, and obtain the pixel coordinates of the j-th target point in the video frame. Where i∈(1,N) and j∈(1,K), N is the total number of visible range bands set by the PTZ camera, and K is the number of target points in the i-th visible range band;
[0015] S12: Obtain the latitude and longitude coordinates of the j-th target point through a geographic information system or map. .
[0016] Furthermore, the N-viewable range band of the PTZ camera is divided as follows:
[0017] Based on distance, it is divided into three regions: proximal, mid-range, and distal.
[0018] Alternatively, the minimum and maximum zoom ratios of the PTZ camera can be divided into segments and the zoom ratios can be rounded to obtain the visible range corresponding to each zoom ratio segment.
[0019] The K target points within each field of view are evenly distributed within that field of view and are at different distances from the center of the PTZ camera.
[0020] Furthermore, the mapping model between the two-dimensional coordinates and the three-dimensional coordinates is as follows:
[0021]
[0022] Where M is the intrinsic parameter matrix of the PTZ camera, [R, T] is the extrinsic parameter matrix of the PTZ camera, R is a 3×3 rotation matrix, and T is a 3×1 translation matrix; For pixel coordinates, Used as world coordinates.
[0023] Furthermore, the first computational plane coordinates of the j-th target point within the i-th visible range are calculated using Euclidean distance. With the second calculation plane coordinates distance :
[0024] ,
[0025] in, For the first calculation plane coordinates, The coordinates of the second calculation plane.
[0026] Further, step S40 includes the following steps:
[0027] S41: Extract the coordinate transformation deviation values of the K target points in the i-th visible range from the N×K target point coordinate transformation deviation values. ;
[0028] S42: Calculate the average value of the coordinate transformation deviation for the i-th visible range band. The average value of the coordinate transformation deviation As the coordinate transformation accuracy of the i-th visible range band;
[0029]
[0030] S43: Repeat steps S41~S42 to obtain a list of coordinate transformation precision corresponding to N visible ranges. ...
[0031] Furthermore, it also includes step S50: determining whether the coordinate transformation accuracy of the N visible range bands is less than the preset accuracy threshold of the corresponding visible range band.
[0032] If the coordinate transformation accuracy of all N visible range bands is less than the preset accuracy threshold of the corresponding visible range band, then the constructed mapping model between two-dimensional coordinates and three-dimensional coordinates is deemed to meet the requirements and can be put into use.
[0033] In other cases, the mapping model between 2D and 3D coordinates should be reconstructed or the parameters of the mapping model between 2D and 3D coordinates should be optimized.
[0034] Compared to existing technologies, this invention calculates the first calculation plane coordinates by using a mapping model of two-dimensional and three-dimensional coordinates to determine the pixel coordinates of target points in different visible ranges. It then calculates the second calculation plane coordinates by using Gaussian projection to determine the latitude and longitude coordinates of the target points. Finally, it calculates the distance between the first and second plane coordinates using Euclidean distance. This yields the coordinate transformation deviation generated by applying the mapping model of two-dimensional and three-dimensional coordinates to different visible ranges. This directly reflects the reliability and accuracy of the coordinate transformation of the mapping model within the full visible range of the PTZ camera, providing high-precision coordinate mapping for multi-view spatial positioning in complex scenarios and providing accurate data for subsequent positioning calibration, target tracking, and spatial analysis.
[0035] Meanwhile, the present invention provides a coordinate transformation accuracy calculation system, including a PTZ camera and a coordinate transformation accuracy calculation device, wherein the PTZ camera and the coordinate transformation accuracy calculation device are communicatively connected;
[0036] The pan-tilt camera rotates and captures images according to the coordinate transformation accuracy calculation device, and transmits the captured images to the coordinate transformation accuracy calculation device.
[0037] The coordinate transformation accuracy calculation device includes a coordinate acquisition unit, a pixel planar coordinate calculation unit, a latitude and longitude planar coordinate calculation unit, a planar coordinate deviation calculation unit, and a coordinate transformation accuracy output unit.
[0038] The coordinate acquisition unit is used to acquire the pixel coordinates of the j-th target point within the i-th visible range of the PTZ camera in the video frame. and latitude and longitude coordinates Where i∈(1,N) and j∈(1,K), N is the total number of visible range bands set by the PTZ camera, and K is the number of target points in the i-th visible range band;
[0039] The pixel plane coordinate calculation unit is used to obtain the constructed mapping model between two-dimensional and three-dimensional coordinates; and to calculate the pixel coordinates of the i-th visible range with the j-th target point. Inputting a mapping model between 2D and 3D coordinates yields the first computational plane coordinates of the j-th target point within the i-th visible range. ;
[0040] The latitude and longitude plane coordinate calculation unit is used to calculate the latitude and longitude coordinates of the i-th visible range including the j-th target point. By inputting the Gaussian projection forward calculation formula, the coordinates of the second calculation plane of the j-th target point within the i-th visible range are obtained. ;
[0041] The planar coordinate deviation calculation unit is used to calculate the first calculated planar coordinates of the j-th target point within the i-th visible range. With the second calculation plane coordinates distance , distance As the coordinate transformation deviation value of the j-th target point in the i-th visible range ;
[0042] The coordinate transformation deviation values of K target points within the i-th visible range are obtained through the coordinate acquisition unit, pixel plane coordinate calculation unit, latitude and longitude plane coordinate calculation unit, and plane coordinate deviation calculation unit.
[0043] Control the pan-tilt camera to rotate to the next visible range zone, and obtain the coordinate transformation deviation values of N×K target points through the coordinate acquisition unit, pixel plane coordinate calculation unit, latitude and longitude plane coordinate calculation unit, and plane coordinate deviation calculation unit;
[0044] The coordinate transformation accuracy output unit is used to calculate the average value of the coordinate transformation deviation values of K target points in each visible range band, and obtain a coordinate transformation accuracy list for N visible range bands. .
[0045] Compared with the prior art, the beneficial effects of the coordinate transformation accuracy calculation system proposed in this invention are the same as those of the coordinate transformation accuracy calculation method, and will not be repeated here. Attached Figure Description
[0046] To better understand and implement this invention, the following detailed description is provided in conjunction with the accompanying drawings.
[0047] Figure 1 This is a schematic diagram of the coordinate transformation accuracy calculation system of the present invention;
[0048] Figure 2 This is a flowchart of the coordinate transformation accuracy calculation method of the present invention. Detailed Implementation
[0049] The technical solutions of the present invention will now be clearly and completely described with reference to the accompanying drawings of the embodiments of the present invention. The described embodiments are merely some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the protection scope of the present invention.
[0050] Since existing technologies cannot assess the accuracy of established mapping relationships between 2D and 3D coordinates, this invention proposes a coordinate transformation accuracy calculation method. This method calculates the first calculation plane coordinates by using a mapping model of 2D and 3D coordinates to determine the pixel coordinates of target points in different viewable ranges. Then, it calculates the second calculation plane coordinates by using Gaussian projection to determine the latitude and longitude coordinates of the target points. Finally, it calculates the distance between the first and second plane coordinates using Euclidean distance. This yields the coordinate transformation deviation generated by applying the mapping model of 2D and 3D coordinates to different viewable ranges, thus intuitively reflecting the reliability and accuracy of the coordinate transformation of the mapping model of 2D and 3D coordinates within the full viewable range of the PTZ camera. This provides high-precision coordinate mapping assurance for multi-view spatial positioning in complex scenarios and solves the problem of not being able to determine the usability of the mapping model of 2D and 3D coordinates.
[0051] The coordinate transformation accuracy calculation method described in this invention is implemented by a coordinate transformation accuracy calculation system.
[0052] Please see Figure 1 The coordinate transformation accuracy calculation system includes a PTZ camera and a coordinate transformation accuracy calculation device, and the PTZ camera and the coordinate transformation accuracy calculation device are communicatively connected.
[0053] The pan-tilt camera rotates and captures images according to the coordinate transformation accuracy calculation device, and transmits the captured images to the coordinate transformation accuracy calculation device.
[0054] Please see Figure 2 The coordinate transformation accuracy calculation device is used to execute the coordinate transformation accuracy calculation method, including a coordinate acquisition unit, a pixel plane coordinate calculation unit, a latitude and longitude plane coordinate calculation unit, a plane coordinate deviation calculation unit, a coordinate transformation accuracy output unit, and a coordinate transformation accuracy evaluation unit.
[0055] The coordinate acquisition unit is used to perform step S10: acquire the pixel coordinates of the j-th target point within the i-th visible range of the PTZ camera in the video frame. and latitude and longitude coordinates Where i∈(1,N) and j∈(1,K), N is the total number of visible range bands set by the PTZ camera, and K is the number of target points in the i-th visible range band.
[0056] In practice, the following sub-steps are included:
[0057] S11: Control the pan-tilt camera to rotate, and within the i-th visible range, adjust the zoom ratio to make the j-th target point with obvious features clearly appear in the video frame, and obtain the pixel coordinates of the j-th target point in the video frame. Where i∈(1,N) and j∈(1,K), N is the total number of visible range bands set by the PTZ camera, and K is the number of target points in the i-th visible range band;
[0058] S12: Obtain the latitude and longitude coordinates of the j-th target point through a geographic information system or map. .
[0059] Specifically, based on the field of view of the PTZ camera, the field of view is divided into N field of view zones: such as dividing it into three areas—near end, middle end, and far end—based on distance; or further subdividing it into more levels based on the actual application scenario; or dividing it into segments with equal proportional zoom ratios based on the minimum and maximum zoom ratios of the PTZ camera, and rounding them down to obtain the field of view zone corresponding to each zoom ratio segment.
[0060] The K target points within each field of view are evenly distributed within that field of view and are at different distances from the center of the PTZ camera.
[0061] For example, the visible range is divided into three zones: near end (0 meters to 500 meters), middle end (500 meters to 1000 meters), and far end (1000 meters to 1500 meters). For each visible range zone, at least five target points with obvious ground features are selected, such as the corners of buildings, intersections, streetlights, and signs. Their pixel coordinates in the image are collected, and their latitude and longitude coordinates are obtained simultaneously through a GIS system or map to ensure accurate data correspondence.
[0062] The pixel plane coordinate calculation unit is used to perform step S20A: obtaining the constructed mapping model between two-dimensional and three-dimensional coordinates; and calculating the pixel coordinates of the i-th visible range with the j-th target point. Inputting a mapping model between 2D and 3D coordinates yields the first computational plane coordinates of the j-th target point within the i-th visible range. .
[0063] In practice, using the intrinsic and extrinsic parameters obtained from the calibration of the PTZ camera, a projection mapping model between the pixel coordinates of the video image and world coordinates is constructed, that is, the mapping model between two-dimensional coordinates and three-dimensional coordinates is as follows:
[0064]
[0065] Where M is the intrinsic parameter matrix of the PTZ camera, [R, T] is the extrinsic parameter matrix of the PTZ camera, R is a 3×3 rotation matrix, and T is a 3×1 translation matrix; For pixel coordinates, Used as world coordinates.
[0066] The pixel coordinates of the j-th target point within the i-th visible range. By substituting this projection model, the three-dimensional coordinates of the target point in the world coordinate system can be calculated. This allows us to obtain the first calculated plane coordinates of the j-th target point within the i-th visible range. .
[0067] The latitude and longitude plane coordinate calculation unit is used to perform step S20B: calculate the latitude and longitude coordinates of the i-th visible range with the j-th target point. By inputting the Gaussian projection forward calculation formula, the coordinates of the second calculation plane of the j-th target point within the i-th visible range are obtained. .
[0068] In practice, the Gaussian projection forward calculation formula is used to calculate the latitude and longitude coordinates of the j-th target point within the i-th visible range. Convert to planar coordinates That is, the second calculation plane coordinates The specific calculations are as follows:
[0069]
[0070] In the formula: The length of the meridian arc; The radius of curvature of the meridian; ; , Longitude of the central meridian; ; , It is the second eccentricity of the ellipsoid.
[0071] The planar coordinate deviation calculation unit is used to perform step S30: calculate the first calculated planar coordinates of the j-th target point within the i-th visible range. With the second calculation plane coordinates distance , distance As the coordinate transformation deviation value of the j-th target point in the i-th visible range .
[0072] In practice, the Euclidean distance between the two planar coordinates of the j-th target point within the i-th visible range is calculated as the coordinate transformation deviation value of that target point. :
[0073] ,
[0074] in, For the first calculation plane coordinates, The coordinates of the second calculated plane.
[0075] The coordinate transformation deviation value reflects the degree of coordinate offset caused by manually marked coordinate point pairs within the i-th visible range during the establishment of the mapping model between two-dimensional and three-dimensional coordinates. It is a key indicator for evaluating the accuracy of coordinate transformation calculation.
[0076] Repeat steps S10~S30 above to obtain the coordinate transformation deviation values of K target points within the i-th visible range. ;
[0077] Control the pan-tilt camera to rotate to the next visible range, and repeat steps S10~S30 above to obtain the coordinate transformation deviation values of N×K target points, forming a coordinate transformation deviation value matrix A:
[0078] .
[0079] The coordinate transformation accuracy output unit is used to execute step S40: calculate the average value of the coordinate transformation deviation values of K target points in each visible range band, and obtain a coordinate transformation accuracy list of N visible range bands. .
[0080] The specific implementation includes the following steps:
[0081] S41: Extract the coordinate transformation deviation values of the K target points in the i-th visible range from the N×K target point coordinate transformation deviation values. ;
[0082] S42: Calculate the average value of the coordinate transformation deviation for the i-th visible range band. The average value of the coordinate transformation deviation As the coordinate transformation accuracy of the i-th visible range band;
[0083]
[0084] S43: Repeat steps S41~S42 to obtain a list of coordinate transformation precision corresponding to N visible ranges. .
[0085] The coordinate transformation accuracy list is stored in array form, with each item corresponding to the average coordinate transformation deviation of a visible range. This fully presents the coordinate transformation accuracy distribution of the PTZ camera under different visible ranges, identifies the mapping error distribution characteristics of the PTZ camera under different viewpoints, and reflects the spatial variation law of the error of the mapping model between two-dimensional and three-dimensional coordinates under different visible ranges.
[0086] Furthermore, to evaluate the overall accuracy of the mapping model between two-dimensional and three-dimensional coordinates, the coordinate transformation accuracy calculation device also includes a coordinate transformation accuracy evaluation unit.
[0087] The coordinate transformation accuracy evaluation unit is used to perform step S50: determine whether the coordinate transformation accuracy of the N visible range bands is less than the preset accuracy threshold of the corresponding visible range band.
[0088] If the coordinate transformation accuracy of all N visible range bands is less than the preset accuracy threshold of the corresponding visible range band, then the constructed mapping model between two-dimensional coordinates and three-dimensional coordinates is deemed to meet the requirements and can be put into use.
[0089] In other cases, the mapping model between 2D and 3D coordinates should be reconstructed or the parameters of the mapping model between 2D and 3D coordinates should be optimized.
[0090] In practical applications, coordinate point pairs can be supplemented and calibrated for the visible range with large errors, and the mapping model parameters can be adjusted or nonlinear correction terms can be introduced to improve the overall accuracy.
[0091] The coordinate transformation accuracy calculation method described in this invention can intuitively reflect the reliability and accuracy of the coordinate transformation of the mapping model between two-dimensional and three-dimensional coordinates within the full field of view of the PTZ camera. This provides high-precision coordinate mapping assurance for multi-view spatial positioning in complex scenarios, and provides accurate accuracy basis for subsequent positioning calibration, target tracking and spatial analysis, further improving the overall spatial mapping accuracy of the system.
[0092] Meanwhile, the coordinate transformation accuracy calculation device is stored in an electronic device and is executed by the electronic device to implement the coordinate transformation accuracy calculation method.
[0093] The electronic devices include, but are not limited to, memory, processor, and network interface that can communicate with each other via a system bus.
[0094] The electronic device can be a rack server, blade server, tower server, or cabinet server, or other computing device. The electronic device can be a standalone server or a server cluster composed of multiple servers.
[0095] The memory includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. The memory can be an internal storage unit of the electronic device, such as the hard disk or RAM of the electronic device. The memory can also be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc. The memory may also include both internal storage units and external storage devices of the electronic device.
[0096] The processor can be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. This processor is typically used to control the overall operation of the electronic device, such as performing control and processing related to data interaction or communication with the electronic device. The processor is used to run program code stored in the memory or process data, such as running the coordinate transformation accuracy calculation method.
[0097] The network interface may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between the electronic device and other electronic devices. For example, the network interface is used to connect the electronic device to an external data platform via a network, establishing a data transmission channel and communication connection between the electronic device and the external data platform. The network may be an intranet, the Internet, Global System for Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G network, Bluetooth, Wi-Fi, or other wireless or wired networks.
[0098] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indication will also change accordingly.
[0099] Furthermore, the use of terms such as "first" and "second" in this invention is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, features defined with "first" and "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of the various embodiments can be combined with each other, but only on the basis of being achievable by those skilled in the art. When the combination of technical solutions is contradictory or impossible to implement, such a combination of technical solutions should be considered non-existent and not within the scope of protection claimed by this invention.
[0100] The embodiments described above are merely examples of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and the present invention also intends to include these modifications and variations.
Claims
1. A method for calculating coordinate transformation accuracy, characterized in that, Includes the following steps: S10: Obtain the pixel coordinates of the j-th target point within the i-th visible range of the PTZ camera in the video frame. and latitude and longitude coordinates ; Where i∈(1,N) and j∈(1,K), N is the total number of visible range bands set by the PTZ camera, and K is the number of target points in the i-th visible range band; S20A: Obtain the constructed mapping model between 2D and 3D coordinates; map the pixel coordinates of the j-th target point within the i-th visible range. Inputting a mapping model between 2D and 3D coordinates yields the first computational plane coordinates of the j-th target point within the i-th visible range. ; S20B: Transfer the latitude and longitude coordinates of the j-th target point within the i-th visible range. By inputting the Gaussian projection forward calculation formula, the coordinates of the second calculation plane of the j-th target point within the i-th visible range are obtained. ; S30: Calculate the first computational plane coordinates of the j-th target point within the i-th visible range. With the second calculation plane coordinates distance , distance As the coordinate transformation deviation value of the j-th target point in the i-th visible range ; Repeat the above steps to obtain the coordinate transformation deviation values of K target points within the i-th visible range; Control the pan-tilt camera to rotate to the next visible range, repeat the above steps, and obtain the coordinate transformation deviation values of N×K target points; S40: Calculate the average coordinate transformation deviation of K target points in each visible range band to obtain a list of coordinate transformation accuracy for N visible range bands. .
2. The coordinate transformation accuracy calculation method according to claim 1, characterized in that, Step S10 includes the following sub-steps: S11: Control the pan-tilt camera to rotate, and within the i-th visible range, adjust the zoom ratio to make the j-th target point with obvious features clearly appear in the video frame, and obtain the pixel coordinates of the j-th target point in the video frame. ; Where i∈(1,N) and j∈(1,K), N is the total number of visible range bands set by the PTZ camera, and K is the number of target points in the i-th visible range band; S12: Obtain the latitude and longitude coordinates of the j-th target point through a geographic information system or map. .
3. The coordinate transformation accuracy calculation method according to claim 1, characterized in that, The N-band of the pan-tilt camera is divided as follows: Based on distance, it is divided into three regions: proximal, mid-range, and distal. Alternatively, the minimum and maximum zoom ratios of the PTZ camera can be divided into segments and the zoom ratios can be rounded to obtain the visible range corresponding to each zoom ratio segment. The K target points within each field of view are evenly distributed within that field of view and are at different distances from the center of the PTZ camera.
4. The coordinate transformation accuracy calculation method according to claim 1, characterized in that, The mapping model between the two-dimensional coordinates and the three-dimensional coordinates is as follows: Where M is the intrinsic parameter matrix of the PTZ camera, [R, T] is the extrinsic parameter matrix of the PTZ camera, R is a 3×3 rotation matrix, and T is a 3×1 translation matrix; For pixel coordinates, Used as world coordinates.
5. The coordinate transformation accuracy calculation method according to claim 1, characterized in that, The first computational plane coordinates of the j-th target point within the i-th visible range are calculated using Euclidean distance. With the second calculation plane coordinates distance : , in, For the first calculation plane coordinates, The coordinates of the second calculated plane.
6. The coordinate transformation accuracy calculation method according to claim 1, characterized in that, Step S40 includes the following steps: S41: Extract the coordinate transformation deviation values of the K target points in the i-th visible range from the N×K target point coordinate transformation deviation values. ; S42: Calculate the average value of the coordinate transformation deviation for the i-th visible range band. The average value of the coordinate transformation deviation As the coordinate transformation accuracy of the i-th visible range band; S43: Repeat steps S41~S42 to obtain a list of coordinate transformation precision corresponding to N visible ranges. .
7. The coordinate transformation accuracy calculation method according to claim 1, characterized in that, It also includes step S50: determining whether the coordinate transformation accuracy of the N visible range bands is less than the preset accuracy threshold of the corresponding visible range band. If the coordinate transformation accuracy of all N visible range bands is less than the preset accuracy threshold of the corresponding visible range band, then the constructed mapping model between two-dimensional coordinates and three-dimensional coordinates is deemed to meet the requirements and can be put into use. In other cases, the mapping model between 2D and 3D coordinates should be reconstructed or the parameters of the mapping model between 2D and 3D coordinates should be optimized.
8. A coordinate transformation accuracy calculation system, characterized in that, It includes a PTZ camera and a coordinate transformation accuracy calculation device, wherein the PTZ camera and the coordinate transformation accuracy calculation device are communicatively connected; The pan-tilt camera rotates and captures images according to the coordinate transformation accuracy calculation device, and transmits the captured images to the coordinate transformation accuracy calculation device. The coordinate transformation accuracy calculation device includes a coordinate acquisition unit, a pixel planar coordinate calculation unit, a latitude and longitude planar coordinate calculation unit, a planar coordinate deviation calculation unit, and a coordinate transformation accuracy output unit. The coordinate acquisition unit is used to acquire the pixel coordinates of the j-th target point within the i-th visible range of the PTZ camera in the video frame. and latitude and longitude coordinates ; Where i∈(1,N) and j∈(1,K), N is the total number of visible range bands set by the PTZ camera, and K is the number of target points in the i-th visible range band; The pixel plane coordinate calculation unit is used to obtain the constructed mapping model between two-dimensional and three-dimensional coordinates; and to calculate the pixel coordinates of the i-th visible range with the j-th target point. Inputting a mapping model between 2D and 3D coordinates yields the first computational plane coordinates of the j-th target point within the i-th visible range. ; The latitude and longitude plane coordinate calculation unit is used to calculate the latitude and longitude coordinates of the i-th visible range including the j-th target point. By inputting the Gaussian projection forward calculation formula, the coordinates of the second calculation plane of the j-th target point within the i-th visible range are obtained. ; The planar coordinate deviation calculation unit is used to calculate the first calculated planar coordinates of the j-th target point within the i-th visible range. With the second calculation plane coordinates distance , distance As the coordinate transformation deviation value of the j-th target point in the i-th visible range ; The coordinate transformation deviation values of K target points within the i-th visible range are obtained through the coordinate acquisition unit, pixel plane coordinate calculation unit, latitude and longitude plane coordinate calculation unit, and plane coordinate deviation calculation unit. Control the pan-tilt camera to rotate to the next visible range zone, and obtain the coordinate transformation deviation values of N×K target points through the coordinate acquisition unit, pixel plane coordinate calculation unit, latitude and longitude plane coordinate calculation unit, and plane coordinate deviation calculation unit; The coordinate transformation accuracy output unit is used to calculate the average value of the coordinate transformation deviation values of K target points in each visible range band, and obtain a coordinate transformation accuracy list for N visible range bands. .
9. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory storing programs or instructions that can run on the processor, the programs or instructions being executed by the processor to implement the steps of the coordinate transformation accuracy calculation method as described in any one of claims 1 to 7.
10. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the coordinate transformation accuracy calculation method as described in any one of claims 1 to 7.