Interchange method for three-point longitude and latitude coordinates and picture coordinates of electric power intranet

Through a method based on vector operation and coordinate conversion, the problem of latitude and longitude to the image coordinate mapping of the power intranet environment, the combination of reporting data and system functions on the equipment, and improving the system extension and universality.

CN119379531APending Publication Date: 2025-01-28齐丰科技股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411467918.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

In the power intranet environment, due to the access restrictions on external APIs, it is impossible to directly map latitude and longitude to image coordinates, and the latitude and longitude coordinates reported by the device cannot directly correspond to the real location of the offline map component, affecting the deployment of the power inspection system.

Method used

Put forward a three -point latitude and weft coordinate and picture coordinate exchange method based on vector operations and coordinate conversion. Through manually setting the benchmark point, verification, and adjusting the plane coordinates, calculate the plane response of the original point of the picture coordinate and the positive transit vector, and provide the latitude and longitude degree to provide the latitude and longitude degree The rapid exchange algorithm between the coordinates.

Benefits of technology

Without access to external data, the effective combination of data reporting data and system functional requirements have been achieved without access to external data, which improves the extension and universality of the system, simplifies the configuration of the benchmark point, and improves the efficiency of the algorithm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119379531A_ABST
    Figure CN119379531A_ABST
Patent Text Reader

Abstract

The invention provides a method for interchanging three-point longitude and latitude coordinates and picture coordinates of an electric power intranet, which is based on a vector operation and coordinate conversion method and can be used for interchanging the three-point longitude and latitude coordinates and the picture coordinates of the electric power intranet without accessing external data. The method can effectively combine the reported data of the electric power inspection equipment and the function of an inspection service system for conversion, greatly improves the continuation of the system, is more loose in selection of a configuration reference point, has great universality, and is high in algorithm efficiency. The method comprises the following specific steps: step 1, manually setting three datum points and mapping the datum points to plane coordinates; step 2, checking the precision of the plane coordinates; step 3, adaptively adjusting plane coordinates; 4, calculating a plane coordinate corresponding to the origin of the coordinates of the picture; 5, calculating a plane orthogonal basis vector corresponding to the picture orthogonal basis vector; and step 6, providing a rapid interchange algorithm between the longitude and latitude and the picture coordinates.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of vector conversion algorithms, and in particular to a method for exchanging three-point longitude and latitude coordinates and image coordinates of an electric power intranet. Background Art

[0002] At present, most systems use the APIs of Baidu Maps and Amap to integrate the map calculation components provided by them for latitude and longitude calculation and map rendering. However, in the intranet environment, due to the strict restrictions on external access, it is impossible to use external APIs to present and calculate map data. At the same time, in the actual power intranet patrol system, the latitude and longitude coordinates reported by the connected devices are the actual longitude and latitude, and there are encryption algorithms between the coordinates and longitude and latitude of Baidu and Amap. The actual longitude and latitude reported cannot directly correspond to the real position of the offline map component. Moreover, in the actual scene, the camera is at high altitude. The horizontal and vertical axes of the taken pictures will not be completely parallel to the longitude and latitude, and the commonly used basic coordinate mapping based on satellite images will inevitably fail; these factors have a great impact on the deployment of the power inspection system; for this reason, the applicant proposed a method for exchanging the three-point longitude and latitude coordinates and image coordinates of the power intranet. Based on vector operations and coordinate conversion methods, without accessing external data, the algorithm effectively combines the reported data of the power inspection equipment and the functional requirements of the inspection business system, while retaining great functional extensibility for users, greatly improving the system extensibility, and making the selection of configuration reference points more relaxed, with great universality. Summary of the invention

[0003] To solve the above technical problems, the present invention proposes a method for exchanging three-point longitude and latitude coordinates and image coordinates of an electric power intranet, and the specific steps are: step one, manually setting three reference points and mapping them to plane coordinates; step two, verifying the accuracy of the plane coordinates; step three, adaptively adjusting the plane coordinates; step four, calculating the plane coordinates corresponding to the origin of the image coordinates; step five, calculating the plane orthogonal basis vectors corresponding to the orthogonal basis vectors of the image; step six, providing a fast exchange algorithm between longitude and latitude and image coordinates; the method is based on vector operations and coordinate conversion methods, and can effectively combine the reported data of the electric power patrol equipment and the functions of the patrol business system for conversion without accessing external data, which greatly improves the system extensibility, makes the selection of configuration reference points more relaxed, has great universality, and has high algorithm efficiency.

[0004] To achieve the above object, the technical solution adopted by the present invention is:

[0005] A method for exchanging three-point longitude and latitude coordinates and image coordinates of an electric power intranet, characterized in that: the algorithm for exchanging three-point longitude and latitude coordinates and image coordinates of the electric power intranet comprises the following steps:

[0006] Step 1: Manually set three reference points and map them to plane coordinates;

[0007] Step 2: Verify the accuracy of plane coordinates;

[0008] Step 3: Adaptively adjust the plane coordinates;

[0009] Step 4: Calculate the plane coordinates corresponding to the origin of the image coordinates;

[0010] Step 5: Calculate the plane orthogonal basis vectors corresponding to the image orthogonal basis vectors;

[0011] Step 6: Provide a fast conversion algorithm between longitude and latitude and image coordinates.

[0012] Furthermore, the specific process of step 1 of the algorithm for exchanging the three-point longitude and latitude coordinates of the power intranet and the image coordinates is as follows:

[0013] 1) Provide a general solution method solveEquation for a quadratic equation of two variables; according to the solution process, if the system of equations is:

[0014]

[0015] The corresponding solution of the equation is:

[0016]

[0017]

[0018] The solveEquation method returns a pair of values, where the element at index 0 corresponds to the value of x, and the element at index 1 corresponds to y The value of .

[0019] 2) Set the image coordinates of the reference point;

[0020] The initial data accepts the coordinate information of three reference points. Each point contains two coordinates: imgCor image coordinates and gcsCor longitude and latitude coordinates. The three groups are named: (imgCor0, gcsCor0), (imgCor1, gcsCor1), and (imgCor2, gcsCor2).

[0021] 3) Select Mercator mapping or equivalent mapping according to the configuration;

[0022] Let longitude be lng, latitude be lat, plane coordinate abscissa be X, plane coordinate ordinate be y. The mapping method gcsCor2plainCor provides two mapping methods;

[0023] One way is direct mapping: for directly taken pictures, since their representative range is mostly very small compared to the scale of the earth, the length change caused by the longitude and latitude is very small and can be ignored; let the scaling scale be r, then the mapped plane coordinates can be expressed as:

[0024] x=r·lng

[0025] y=r·lat

[0026] Another way is Mercator mapping: For the commonly used satellite images, that is, the earth plane map, its generation method is not 1:1; the conventional mapping method will appear in the polar region The great stretching, so the latitude needs to be logarithmically transformed; the plane coordinates mapped can be expressed as:

[0027] x=r·lng

[0028]

[0029] At the same time, a mapping method from plane coordinates to latitude and longitude coordinates, plainCor2gcsCorl, is provided; there are two reverse mapping methods:

[0030] Direct Mapping:

[0031]

[0032] Mercator Mapping:

[0033]

[0034] Furthermore, the verification of plane coordinate accuracy in step 2 of the algorithm for exchanging the three-point longitude and latitude coordinates of the power intranet and the image coordinates includes proximity, collinearity, length, and angle. The algorithm is prohibited from being performed in the presence of zero vectors, collinearity, excessive length ratio differences (ratio error exceeds 2%), or excessive angle differences (angle error exceeds 0.5°).

[0035] Furthermore, the specific process of step 3 of the algorithm for exchanging the three-point longitude and latitude coordinates of the power intranet and the image coordinates is as follows:

[0036] 1) Basic data;

[0037] Take the image coordinates of three points: imgCor0, imgCor1, imgCor2, and the corresponding three plane coordinates: gcsCor0, gcsCor1, gcsCor2; calculate the image direction vector imgV1 from imgCor0 to imgCor1, the plane direction vector plainV1 from gcsCor0 to gcsCor1, the image direction vector imgV2 from imgCor1 to imgCor2, and the plane direction vector plainV2 from gcsCor1 to gcsCor2; obtain the modulus mi1 of imgV1, the modulus mg1 of plainV1, the modulus mi2 of imgV2, and the modulus mg2 of plainV2 through the direction vectors;

[0038] 2) Calculate the angle adjustment coefficient and the length adjustment coefficient;

[0039] Since the coordinates of the image are accurate coordinates, and the plane coordinates are mapped from the manually configured longitude and latitude coordinates, there will be artificial random errors in the process; the purpose of this step is to appropriately scale plainV1 and plainV2 so that the modulus ratio coefficient is consistent with the image vector, and to appropriately rotate plainV1 and plainV2 so that the angle is consistent with the image vector;

[0040] In order to cope with universal situations, it is hereby stipulated that during the scaling process, the two vectors cannot be enlarged and reduced at the same time, and must satisfy one scaling and one expansion, and the percentages must be the same; during the rotation process, the two vectors cannot rotate in the same direction, and must rotate in opposite directions, that is, open and close at the same time;

[0041] Based on the adjustment restrictions mentioned above, the dot product result of the image vector obtained through the vector is dm1, and the dot product result of the plane coordinate is dm2; let the scale basis be r1 and the angle adjustment basis be da, then the calculation method can be expressed as:

[0042]

[0043]

[0044] 3) Plane basis vector adjustment and determine effective adjustment:

[0045] Let the length scaling factor be dm, then the plane coordinate transformation needs to satisfy

[0046]

[0047] From this we can deduce:

[0048]

[0049] Based on the obtained dm, the plane vector is scaled accordingly to obtain the plane vector of the target length;

[0050] For the angle adjustment reference da, the rotation angle is ra. It can be seen that if the adjustment is successful, then there must be an equation:

[0051]

[0052] Based on the adjustment rules, take:

[0053]

[0054]

[0055] Then da needs to be offset when plainV1 rotates ra and plainV2 rotates -ra; this can be derived from the vector rotation formula;

[0056] After rotation, plainV1 becomes:

[0057]

[0058] After rotation, plainV2 becomes:

[0059]

[0060] It should be noted that since the direction of rotation is unknown, the initial angle reference value is an absolute value; therefore, it is necessary to invert ra and then perform another calculation; there must be a ra value in the two calculations that can completely cancel out da, and the transformed plane vector corresponding to this value is the required vector.

[0061] Furthermore, the specific process of step 4 of the algorithm for exchanging the three-point longitude and latitude coordinates of the power intranet and the image coordinates is as follows:

[0062] 1) Basic data, take out the components of all coordinate pairs:

[0063] x0=imgCor0[0], x1=imgCor1[0], x2=imgCor2[0],

[0064] y0=imgCor0[1], y1=imgCor1[1], y2=imgCor2[1],

[0065] a0=plainCor0[0], a1=plainCor1[0], a2=PlainCor2[0],

[0066] b0=plainCor0[1], b1=plainCor1[1], b2=plainCor2[1].

[0067] From the equivalence of vector operation rules and coordinate system transformation, we can know that: for the origin Oxy of the image, the origin representation derived from the image non-orthogonal bases imgV1 and imgV2 is substituted into the plane non-orthogonal bases plainV1 and plainV2, and the resulting coordinates are Oab, the mapping coordinates of the image origin in the plane.

[0068] 2) Calculate the non-orthogonal basis transformation coefficients of the image origin;

[0069] Derive the vector from imgCor0 to Oxy The image non-orthogonal basis represents the coefficients; if dx1 = x1-x0, dx2 = x2-x0, dy1 = y1-y0, dy2 = y2-y0, through the equation The simultaneous equations of can be obtained:

[0070] k1k2=solveEquation(dx1,dx2,-x0,dy1,dy2,-y0)

[0071] in:

[0072] 3) Calculate the plane coordinates of the image origin;

[0073] In calculating the transformation coefficients of the non-orthogonal basis of the image origin, we get the non-orthogonal basis of two images. If da1=a1-a0, da2=a2-a0, db1=b1-b0, db2=b2-b0, then the expression of Oab can be equivalently derived as follows:

[0074] Oab=(a0+k1·da1+k2·da2, b0+k1·db1+k2·db2).

[0075] Furthermore, the specific process of step 5 of the algorithm for exchanging the three-point longitude and latitude coordinates of the power intranet and the image coordinates is as follows:

[0076] 1) Calculate the transformation coefficients of the orthogonal basis vectors in the horizontal and vertical axes of the image with the given non-orthogonal basis vectors. Let the horizontal axis basis vector be The vertical axis basis vector is The two sets of simultaneous equations are:

[0077]

[0078]

[0079] We can get:

[0080] m1m2=solveEquation(dx1,dx2,1,dy1,dy2,0)

[0081]

[0082] n1n2=solveEquation(dx1,dx2,0,dy1,dy2,1)

[0083]

[0084] 2) Calculate the plane orthogonal basis vectors corresponding to the orthogonal basis vectors in the horizontal and vertical axes of the image coordinates in the plane coordinates;

[0085] In the calculation picture, the transformation coefficients of the orthogonal basis vectors in the horizontal and vertical axes of the coordinates and the given non-orthogonal basis vectors are obtained from the orthogonal basis vectors in the picture coordinate system. The corresponding non-orthogonal basis is expressed as follows. Then, by equivalence, the plane orthogonal basis corresponding to the image orthogonal basis in the plane coordinates can be obtained. and The same coefficients can be expressed via a non-orthogonal basis of the plane as:

[0086]

[0087] Furthermore, the specific process of step six of the algorithm for exchanging the three-point longitude and latitude coordinates of the power intranet and the image coordinates is as follows:

[0088] 1) Through steps 1 to 5, we get the key data, the plane orthogonal basis corresponding to the image orthogonal basis and And the plane coordinates corresponding to the origin Oxy of the image coordinate system in the plane coordinates represent Oab; based on the key data, the plainCor2gcsCor and gcsCor2plainCor methods can be used to complete the fast conversion;

[0089] 2) Provide fast conversion from longitude and latitude to image coordinates;

[0090] Take the longitude and latitude mapped to the plane coordinates (iab, jab) via gcsCor2plainCor, and let its coordinates in the image coordinate system be (i, j); it can be seen that (i, j) actually represents because and Already mapped to the plane coordinates and Then this point can also be expressed as an equivalent Then we can get the equation:

[0091]

[0092] If we take δ aba =O ab[0], δ abb =O ab [1] x aba =x ab [0], y aba =y ab [0], x abb =x ab [1] abb =y ab [1], then:

[0093] imgCor=solveEquation(x aba ,y aba ,i ab -δ aba , x abb ,y abb , j ab -δ abb )

[0094] The whole process only requires one mapping and one calculation to get the result;

[0095] 3) Provide fast conversion of image coordinates to longitude and latitude;

[0096] Use the equivalent equation mentioned in the quick conversion of latitude and longitude to image coordinates:

[0097]

[0098] At this time, i and j are the image coordinates, and the plane coordinates can be directly obtained as:

[0099] plainCor=(O ab [0]+i·x ab [0]+j·y ab [0],O ab [1]+i·x ab [1]+j·y ab [1])

[0100] After obtaining the plane coordinates, use plainCor2gcsCor mapping.

[0101] The benefits of this application are:

[0102] 1. The algorithm for exchanging three-point longitude and latitude coordinates and image coordinates in the power intranet can still perform map mapping and calculations when the intranet environment strictly restricts external access;

[0103] 2. The three-point longitude and latitude coordinates of the power intranet and the image coordinate exchange algorithm have a 1:1 intuitive mapping between the longitude and latitude coordinates reported by the access device and the actual longitude and latitude of the image, which is easy to configure;

[0104] 3. The horizontal and vertical axes of the plane diagram of the three-point longitude and latitude coordinates and image coordinates exchange algorithm of the power intranet do not need to be parallel to the longitude and latitude, which is extensive and extensible;

[0105] 4. The three-point longitude and latitude coordinates and image coordinates exchange algorithm of the power intranet can be fully calculated locally or in the local area network to ensure the security of geographic data;

[0106] 5. The reference information of the three-point longitude and latitude coordinates of the power intranet and the image coordinate exchange algorithm can be calculated and set once for continuous coordinate mapping operations, and the mapping algorithm is extremely efficient. BRIEF DESCRIPTION OF THE DRAWINGS

[0107] Figure 1 A schematic diagram for deriving the basis of the present invention;

[0108] Figure 2 Schematic diagram of the algorithm flow of the present invention. DETAILED DESCRIPTION

[0109] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments:

[0110] like Figure 1-2 As shown, a method for exchanging the longitude and latitude coordinates of three points in the power intranet and the image coordinates is shown: The algorithm for exchanging the longitude and latitude coordinates of three points in the power intranet and the image coordinates is shown, and the steps are:

[0111] Step 1: Manually set three reference points and map them to plane coordinates; manual quick setting makes the operation simple and convenient;

[0112] Step 2: Verify the accuracy of plane coordinates; Verify the accuracy of plane coordinates to make the data more accurate;

[0113] Step 3: Adaptively adjust the plane coordinates; through adaptive adjustment, human intervention is reduced and the calculation results are more accurate;

[0114] Step 4: Calculate the plane coordinates corresponding to the origin of the image coordinates;

[0115] Step 5: Calculate the plane orthogonal basis vectors corresponding to the image orthogonal basis vectors;

[0116] Step 6: Provide a fast conversion algorithm between longitude and latitude and image coordinates.

[0117] The specific process of step 1 of the algorithm for exchanging the three-point longitude and latitude coordinates of the power intranet and the image coordinates is as follows:

[0118] 1) Provide a general solution method solveEquation for a quadratic equation of two variables; according to the solution process, if the system of equations is:

[0119]

[0120] The corresponding solution of the equation is:

[0121]

[0122]

[0123] The solveEquation method returns a pair of values, where the element at index 0 corresponds to the value of x, and the element at index 1 corresponds to y The value of .

[0124] 2) Set the image coordinates of the reference point;

[0125] The initial data accepts the coordinate information of three reference points. Each point contains two coordinates: imgCor image coordinates and gcsCor longitude and latitude coordinates. The three groups are named: (imgCor0, gcsCor0), (imgCor1, gcsCor1), and (imgCor2, gcsCor2).

[0126] 3) Select Mercator mapping or equivalent mapping according to the configuration;

[0127] Let longitude be lng, latitude be lat, plane coordinate abscissa be X, plane coordinate ordinate be y. The mapping method gcsCor2plainCor provides two mapping methods;

[0128] One way is direct mapping: for directly taken pictures, since their representative range is mostly very small compared to the scale of the earth, the length change caused by the longitude and latitude is very small and can be ignored; let the scaling scale be r, then the mapped plane coordinates can be expressed as:

[0129] x=r·lng

[0130] y=r·lat

[0131] Another way is Mercator mapping: For the commonly used satellite images, that is, the earth plane map, its generation method is not 1:1; the conventional mapping method will appear in the polar region The great stretching, so the latitude needs to be logarithmically transformed; the plane coordinates mapped can be expressed as:

[0132] x=r·lng

[0133]

[0134] At the same time, a mapping method from plane coordinates to latitude and longitude coordinates, plainCor2gcsCorl, is provided; there are two reverse mapping methods:

[0135] Direct Mapping:

[0136]

[0137] Mercator Mapping:

[0138]

[0139] The verification plane coordinate accuracy of the algorithm for exchanging the three-point longitude and latitude coordinates of the power intranet and the image coordinates in step 2 includes the degree of proximity, collinearity, length, and angle. The algorithm is prohibited from being performed in the presence of zero vectors, collinearity, a large difference in the length corresponding ratio (ratio error exceeds 2%), or a large angle difference (angle error exceeds 0.5°).

[0140] The specific process of step 3 of the algorithm for exchanging the longitude and latitude coordinates of the three points of the power intranet and the image coordinates is as follows:

[0141] 1) Basic data;

[0142] Take the image coordinates of three points: imgCor0, imgCor1, imgCor2, and the corresponding three plane coordinates: gcsCor0, gcsCor1, gcsCor2; calculate the image direction vector imgV1 from imgCor0 to imgCor1, the plane direction vector plainV1 from gcsCor0 to gcsCor1, the image direction vector imgV2 from imgCor1 to imgCor2, and the plane direction vector plainV2 from gcsCor1 to gcsCor2; obtain the modulus mi1 of imgV1, the modulus mg1 of plainV1, the modulus mi2 of imgV2, and the modulus mg2 of plainV2 through the direction vectors;

[0143] 2) Calculate the angle adjustment coefficient and the length adjustment coefficient;

[0144] Since the coordinates of the image are accurate coordinates, and the plane coordinates are mapped from the manually configured longitude and latitude coordinates, there will be artificial random errors in the process; the purpose of this step is to appropriately scale plainV1 and plainV2 so that the modulus ratio coefficient is consistent with the image vector, and to appropriately rotate plainV1 and plainV2 so that the angle is consistent with the image vector;

[0145] In order to cope with universal situations, it is hereby stipulated that during the scaling process, the two vectors cannot be enlarged and reduced at the same time, and must satisfy one scaling and one expansion, and the percentages must be the same; during the rotation process, the two vectors cannot rotate in the same direction, and must rotate in opposite directions, that is, open and close at the same time;

[0146] Based on the adjustment restrictions mentioned above, the dot product result of the image vector obtained through the vector is dm1, and the dot product result of the plane coordinate is dm2; let the scale basis be r1 and the angle adjustment basis be da, then the calculation method can be expressed as:

[0147]

[0148]

[0149] 3) Plane basis vector adjustment and determine effective adjustment:

[0150] Let the length scaling factor be dm, then the plane coordinate transformation needs to satisfy

[0151]

[0152] From this we can deduce:

[0153]

[0154] Based on the obtained dm, the plane vector is scaled accordingly to obtain the plane vector of the target length;

[0155] For the angle adjustment reference da, the rotation angle is ra. It can be seen that if the adjustment is successful, then there must be an equation:

[0156]

[0157] Based on the adjustment rules, take:

[0158]

[0159]

[0160] Then da needs to be offset when plainV1 rotates ra and plainV2 rotates -ra; this can be derived from the vector rotation formula;

[0161] After rotation, plainV1 becomes:

[0162]

[0163] After rotation, plainV2 becomes:

[0164]

[0165] It should be noted that since the direction of rotation is unknown, the initial angle reference value is an absolute value; therefore, it is necessary to invert ra and then perform another calculation; there must be a ra value in the two calculations that can completely cancel out da, and the transformed plane vector corresponding to this value is the required vector.

[0166] The specific process of step 4 of the algorithm for exchanging the three-point longitude and latitude coordinates of the power intranet and the image coordinates is as follows:

[0167] 1) Basic data, take out the components of all coordinate pairs:

[0168] x0=imgCor0[0], x1=imgCor1[0], x2=imgCor2[0],

[0169] y0=imgCor0[1], y1=imgCor1[1], y2=imgCor2[1],

[0170] a0=plainCor0[0], a1=plainCor1[0], a2=plainCor2[0],

[0171] b0=plainCor0[1], b1=plainCor1[1], b2=plainCor2[1].

[0172] From the equivalence of vector operation rules and coordinate system transformation, we can know that: for the origin Oxy of the image, the origin representation derived from the image non-orthogonal bases imgV1 and imgV2 is substituted into the plane non-orthogonal bases plainV1 and plainV2, and the resulting coordinates are Oab, the mapping coordinates of the image origin in the plane.

[0173] 2) Calculate the non-orthogonal basis transformation coefficients of the image origin;

[0174] Derive the vector from imgCor0 to Oxy The image non-orthogonal basis represents the coefficients; if dx1 = x1-x0, dx2 = x2-x0, dy1 = y1-y0, dy2 = y2-y0, through the equation The simultaneous equations of can be obtained:

[0175] k1k2=solveEquation(dx1,dx2,-x0,dy1,dy2,-y0)

[0176] in:

[0177] 3) Calculate the plane coordinates of the image origin;

[0178] In calculating the transformation coefficients of the non-orthogonal basis of the image origin, we get the non-orthogonal basis of two images. If da1=a1-a0, da2=a2-a0, db1=b1-b0, db2=b2-b0, then the expression of Oab can be equivalently derived as follows:

[0179] Oab=(a0+k1·da1+k2·da2, b0+k1·db1+k2·db2).

[0180] The specific process of step 5 of the algorithm for exchanging the three-point longitude and latitude coordinates of the power intranet and the image coordinates is as follows:

[0181] 1) Calculate the transformation coefficients of the orthogonal basis vectors in the horizontal and vertical axes of the image with the given non-orthogonal basis vectors. Let the horizontal axis basis vector be The vertical axis basis vector is The two sets of simultaneous equations are:

[0182]

[0183]

[0184] We can get:

[0185] m1m2=solveEquation(dx1,dx2,1,dy1,dy2,0)

[0186]

[0187] n1n2=solveEquation(dx1, dx2, 0, dy1, dy2, 1)

[0188]

[0189] 2) Calculate the plane orthogonal basis vectors corresponding to the orthogonal basis vectors in the horizontal and vertical axes of the image coordinates in the plane coordinates;

[0190] In the calculation picture, the transformation coefficients of the orthogonal basis vectors in the horizontal and vertical axes of the coordinates and the given non-orthogonal basis vectors are obtained from the orthogonal basis vectors in the picture coordinate system. The corresponding non-orthogonal basis is expressed as follows. Then, by equivalence, the plane orthogonal basis corresponding to the image orthogonal basis in the plane coordinates can be obtained. and The same coefficients can be expressed via a non-orthogonal basis of the plane as:

[0191]

[0192] The specific process of step six of the algorithm for exchanging the three-point longitude and latitude coordinates of the power intranet and the image coordinates is as follows;

[0193] 1) Through steps 1 to 5, we get the key data, the plane orthogonal basis corresponding to the image orthogonal basis and And the plane coordinates corresponding to the origin Oxy of the image coordinate system in the plane coordinates represent Oab; based on the key data, the plainCor2gcsCor and gcsCor2plainCor methods can be used to complete the fast conversion;

[0194] 2) Provide fast conversion from longitude and latitude to image coordinates;

[0195] Take the longitude and latitude mapped to the plane coordinates (iab, jab) via gcsCor2plainCor, and let its coordinates in the image coordinate system be (i, j); it can be seen that (i, j) actually represents because and Already mapped to the plane coordinates and Then this point can also be expressed as an equivalent Then we can get the equation:

[0196]

[0197] If we take δ aba =O ab [0], δ abb =O ab [1] x aba =x ab [0], y aba =y ab [0], x abb =x ab [1] abb =y ab [1], then:

[0198] imgCor=solveEquation(x aba ,y aba ,i ab -δ abo , x abb ,y abb , j ab -δ abb )

[0199] The whole process only requires one mapping and one calculation to get the result;

[0200] 3) Provide fast conversion of image coordinates to longitude and latitude;

[0201] Use the equivalent equation mentioned in the quick conversion of latitude and longitude to image coordinates:

[0202]

[0203] At this time, i and j are the image coordinates, and the plane coordinates can be directly obtained as:

[0204] plainCor=(O ab [0]+i·x ab [0]+j·y ab [0],O ab [1]+i·x ab [1]+j·y ab [1])

[0205] After obtaining the plane coordinates, use plainCor2gcsCor mapping.

[0206] The above description is only a preferred embodiment of the present invention and does not constitute any other form of limitation to the present invention. Any modification or equivalent change made based on the technical essence of the present invention still falls within the scope of protection required by the present invention.

Claims

1. A method for exchanging three-point longitude and latitude coordinates and image coordinates in an electric power intranet, characterized in that: The steps are: Step 1: Manually set three reference points and map them to plane coordinates; Step 2: Verify the accuracy of plane coordinates; Step 3: Adaptively adjust the plane coordinates; Step 4: Calculate the plane coordinates corresponding to the origin of the image coordinates; Step 5: Calculate the plane orthogonal basis vectors corresponding to the image orthogonal basis vectors; Step 6: Provide a fast conversion algorithm between longitude and latitude and image coordinates.

2. A method for exchanging three-point longitude and latitude coordinates and image coordinates of an electric power intranet according to claim 1, characterized in that: The specific process of step one is: 1) Provide a general solution method solveEquation for a quadratic equation of two variables; according to the solution process, if the system of equations is: The corresponding solution of the equation is: The solveEquation method returns a pair of values, where the element at index 0 corresponds to the value of x, and the element at index 1 corresponds to y The value of . 2) Set the image coordinates of the reference point; The initial data accepts the coordinate information of three reference points. Each point contains two coordinates: imgCor image coordinates and gcsCor longitude and latitude coordinates. The three groups are named: (imgCor0, gcsCor0), (imgCor1, gcsCor1), and (imgCor2, gcsCor2). 3) Select Mercator mapping or equivalent mapping according to the configuration; Let longitude be lng, latitude be lat, plane coordinate abscissa be X, plane coordinate ordinate be y. The mapping method gcsCor2plainCor provides two mapping methods; One way is direct mapping: for directly taken pictures, since their representative range is mostly very small compared to the scale of the earth, the length change caused by the longitude and latitude is very small and can be ignored; let the scaling scale be r, then the mapped plane coordinates can be expressed as: x=r·lng y=r·lat Another way is Mercator mapping: For the commonly used satellite images, that is, the earth plane map, its generation method is not 1:1; the conventional mapping method will appear in the polar region The great stretching, so the latitude needs to be logarithmically transformed; the plane coordinates mapped can be expressed as: x=r·lng At the same time, a mapping method from plane coordinates to latitude and longitude coordinates, plainCor2gcsCorl, is provided; there are two reverse mapping methods: Direct Mapping: Mercator Mapping:

3. A method for exchanging three-point longitude and latitude coordinates and image coordinates of an electric power intranet according to claim 1, characterized in that: The verification range of the plane coordinate accuracy in step 2 includes proximity, collinearity, length, and angle. The algorithm is prohibited from operating in the case of zero vector, collinearity, excessive length ratio difference (ratio error exceeds 2%), or excessive angle difference (angle error exceeds 0.5°).

4. A method for exchanging three-point longitude and latitude coordinates and image coordinates of an electric power intranet according to claim 1, characterized in that: The specific process of step three is: 1) Basic data; Take the image coordinates of the three points as: imgCor0, imgCor1, imgCor2, and the corresponding three plane coordinates are: gcsCor0, g csCor1, gcsCor2; calculate the image direction vector imgV1 from imgCor0 to imgCor1, the plane direction vector plainV1 from gcsCor0 to gcsCor1, the image direction vector imgV2 from imgCor1 to imgCor2, and the plane direction vector plainV2 from gcsCor1 to gcsCor2; through the direction vectors, the modulus length mi1 of imgV1 is obtained as, the modulus length mg1 of plainV1 is obtained as, the modulus length mi2 of imgV2 is obtained as, and the modulus length mg2 of plainV2 is obtained as; 2) Calculate the angle adjustment coefficient and the length adjustment coefficient; Since the coordinates of the image are accurate coordinates, and the plane coordinates are mapped from the manually configured longitude and latitude coordinates, there will be artificial random errors in the process; the purpose of this step is to appropriately scale plainV1 and plainV2 so that the modulus ratio coefficient is consistent with the image vector, and to appropriately rotate plainV1 and plainV2 so that the angle is consistent with the image vector; In order to cope with universal situations, it is hereby stipulated that during the scaling process, the two vectors cannot be enlarged and reduced at the same time, and must satisfy one scaling and one expansion, and the percentages must be the same; during the rotation process, the two vectors cannot rotate in the same direction, and must rotate in opposite directions, that is, open and close at the same time; Based on the adjustment restrictions mentioned above, the dot product result of the image vector obtained through the vector is dm1, and the dot product result of the plane coordinate is dm2; let the scale basis be r1 and the angle adjustment basis be da, then the calculation method can be expressed as: 3) Plane basis vector adjustment and determine effective adjustment: Let the length scaling factor be dm, then the plane coordinate transformation needs to satisfy From this we can deduce: Based on the obtained dm, the plane vector is scaled accordingly to obtain the plane vector of the target length; For the angle adjustment reference da, the rotation angle is ra. It can be seen that if the adjustment is successful, then there must be an equation: Based on the adjustment rules, take: Then da needs to be offset when plainV1 rotates ra and plainV2 rotates -ra; this can be derived from the vector rotation formula; After rotation, plainV1 becomes: After rotation, plainV2 becomes: It should be noted that since the direction of rotation is unknown, the initial angle reference value is an absolute value; therefore, it is necessary to invert ra and then perform another calculation; there must be a ra value in the two calculations that can completely cancel out da, and the transformed plane vector corresponding to this value is the required vector.

5. The method for exchanging three-point longitude and latitude coordinates and image coordinates of an electric power intranet according to claim 1, characterized in that: The specific process of step 4 is as follows: 1) Basic data, take out the components of all coordinate pairs: x0=imgCor0[0], x1=imgCor1[0], x2=imgCor2[0], y0=imgCor0[1], y1=imgCor1[1], y2=imgCor2[1], a0=plainCor0[0], a1=plainCor1[0], a2=plainCor2[0], b0=plainCor0[1], b1=plainCor1[1], b2=plainCor2[1]. From the equivalence of vector operation rules and coordinate system transformation, we can know that: for the origin Oxy of the image, the origin representation derived from the image non-orthogonal bases imgV1 and imgV2 is substituted into the plane non-orthogonal bases plainV1 and plainV2, and the resulting coordinates are Oab, the mapping coordinates of the image origin in the plane. 2) Calculate the non-orthogonal basis transformation coefficients of the image origin; Derive the vector from imgCor0 to Oxy The image non-orthogonal basis represents the coefficients; if dx1 = x1-x0, dx2 = x2-x0, dy1 = y1-y0, dy2 = y2-y0, through the equation The simultaneous equations of can be obtained: k1k2=solveEquation(dx1,dx2,-x0,dy1,dy2,-y0) Where: k1=k1k2[0]; k2=k1k2[1]; 3) Calculate the plane coordinates of the image origin; In calculating the transformation coefficients of the non-orthogonal basis of the image origin, we get the non-orthogonal basis of two images. If da1=a1-a0, da2=a2-a0, db1=b1-b0, db2=b2-b0, then the expression of Oab can be equivalently derived as follows: Oab=(a0+k1·da1+k2·da2, b0+k1·db1+k2·db2).

6. A method for exchanging three-point longitude and latitude coordinates and image coordinates of an electric power intranet according to claim 1, characterized in that: The specific process of step five is as follows: 1) Calculate the transformation coefficients of the orthogonal basis vectors in the horizontal and vertical axes of the image with the given non-orthogonal basis vectors. Let the horizontal axis basis vector be The vertical axis basis vector is The two sets of simultaneous equations are: We can get: m1m2=solveEquation(dx1,dx2,1,dy1,dy2,0) n1n2=solveEquation(dx1, dx2, 0, dy1, dy2, 1) 2) Calculate the plane orthogonal basis vectors corresponding to the orthogonal basis vectors in the horizontal and vertical axes of the image coordinates in the plane coordinates; In the calculation picture, the transformation coefficients of the orthogonal basis vectors in the horizontal and vertical axes of the coordinates and the given non-orthogonal basis vectors are obtained from the orthogonal basis vectors in the picture coordinate system. The corresponding non-orthogonal basis is expressed as follows. Then, by equivalence, the plane orthogonal basis corresponding to the image orthogonal basis in the plane coordinates can be obtained. and The same coefficients can be expressed via a non-orthogonal basis of the plane as:

7. A method for exchanging three-point longitude and latitude coordinates and image coordinates of an electric power intranet according to claim 1, characterized in that: The specific process of step six is: 1) Through steps 1 to 5, we get the key data, the plane orthogonal basis corresponding to the image orthogonal basis and And the plane coordinates corresponding to the origin Oxy of the image coordinate system in the plane coordinates represent Oab; based on the key data, the plainCor2gcsCor and gcsCor2plainCor methods can be used to complete the fast conversion; 2) Provide fast conversion from longitude and latitude to image coordinates; Take the longitude and latitude mapped to the plane coordinates (iab, jab) via gcsCor2plainCor, and let its coordinates in the image coordinate system be (i, j); it can be seen that (i, j) actually represents because and Already mapped to the plane coordinates and Then this point can also be expressed as an equivalent Then we can get the equation: If we take δ aba = O ab [0], δ abb = O ab [1], x aba = x ab [0], y aba = y ab [0], x abb = x ab [1], y abb = y ab [1], then: imgCor=solveEquation(x aba ,y aba ,i ab -δ aba ,x abb ,y abb ,j ab -δ abb ) The whole process only requires one mapping and one calculation to get the result; 3) Provide fast conversion of image coordinates to longitude and latitude; Use the equivalent equation mentioned in the quick conversion of latitude and longitude to image coordinates: At this time, i and j are the image coordinates, and the plane coordinates can be directly obtained as: plainCor=(O ab [0]+i·x ab [0]+j·y ab [0],O ab [1]+i·x ab [1]+j·y ab [1]) After obtaining the plane coordinates, use plainCor2gcsCor mapping.