Coordinate conversion method, device, computer equipment and storage medium
By performing geometric transformation on the initial coordinate set and training the neural network model, the problem of large error in coordinate transformation of artificial neural network is solved, and high-precision coordinate transformation effect is achieved.
Patent Information
- Application Number
- CN202111009781.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-31
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2041-08-31
AI Technical Summary
In the existing technology, artificial neural network coordinate conversion has the problem of large conversion errors, especially in the conversion of Gaussian plane rectangular coordinate data in the national coordinate system or the global coordinate system. The error can reach tens of kilometers. This is mainly because the artificial neural network model easily falls into the local minimum and it is difficult to reach the global minimum.
By performing geometric transformations such as translation, normalization, inverse normalization, inverse coordinate difference, inverse rotation and inverse scaling on the initial coordinate set, the absolute value of the coordinate data is reduced, and then input into the artificial neural network model for conversion. Finally, inverse translation processing is performed to obtain the target coordinate set, and the initial neural network model is trained with sample data to improve accuracy.
The absolute values of the input and output coordinate data of the artificial neural network are greatly reduced, the accuracy of coordinate conversion is improved, the absolute error of the output data is reduced by 5-6 orders of magnitude, and the relative error remains unchanged.
Smart Images

Figure CN115757665B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial neural network technology, and in particular to a coordinate conversion method, device, computer equipment and storage medium. Background Art
[0002] In petroleum exploration and development, various forms of coordinate conversion are often required. These may involve conversions between different coordinate systems or within the same coordinate system. Examples of conversions between different coordinate systems include the 1954 Beijing coordinate system, the 1980 Xi'an coordinate system, the 2000 National Geodetic Coordinate System, and the WGS-84 coordinate system. Conversions within the same coordinate system include conversions between the 3-degree and 6-degree zones of the 1954 Beijing coordinate system, and between the 1.5-degree and 3-degree zones of the WGS-84 coordinate system.
[0003] In related art, coordinate transformation is performed using artificial neural networks. The specific steps are as follows: First, the artificial neural network model is determined, including the neural network structure, number of neurons, activation function, etc. Then, the artificial neural network learning rules are established, and the artificial neural network is trained using known coordinate data. Finally, the trained artificial neural network is used to perform coordinate transformation. That is, the pre-transformation coordinates are input to the artificial neural network, and the artificial neural network calculates the post-transformation coordinates. The neural network training dataset consists of an input coordinate dataset and an output coordinate dataset (also called a target dataset). Generally, the input coordinate dataset belongs to the pre-transformation coordinate system, and the output coordinate dataset belongs to the post-transformation coordinate system.
[0004] However, in the specific application of artificial neural network models for coordinate conversion, there is a problem of large conversion errors, with the maximum error reported in relevant literature being tens of kilometers. The main reasons for the large conversion errors are as follows: Although artificial neural network models can theoretically approximate any nonlinear function with arbitrary precision, they are prone to falling into local minima and find it difficult to reach the global minimum. In other words, when artificial neural network models fit a nonlinear function, it is difficult to achieve zero error, and generally there will be a small error. The absolute value of the Gaussian plane rectangular coordinate data in the national coordinate system or global coordinate system is very large, generally with 6-8 integer digits. Even if the relative error of the artificial neural network model in the coordinate conversion is small, such as one ten-thousandth, the absolute error of the coordinate conversion can reach tens of thousands of meters. Therefore, it is understandable that the coordinate conversion error can reach tens of kilometers. Therefore, it can be seen that the error of the converted coordinates obtained by the above-mentioned related technologies is large. Summary of the Invention
[0005] The embodiments of the present application provide a coordinate conversion method, apparatus, computer device, and storage medium, which can improve the accuracy of the converted coordinates. The technical solution is as follows:
[0006] In one aspect, the present application provides a coordinate conversion method, the method comprising:
[0007] Acquire an initial coordinate set of the exploration object in an original coordinate system, wherein the initial coordinate set includes at least one initial coordinate, and each initial coordinate includes an initial abscissa and an initial ordinate;
[0008] Performing translation processing on the initial coordinate set to obtain a first coordinate set with a reduced order of magnitude;
[0009] Normalizing the first coordinate set to obtain a normalized coordinate set, and inputting the normalized coordinate set into an artificial neural network coordinate transformation model to obtain an output coordinate set;
[0010] Performing inverse normalization processing on the output coordinate set to obtain an inverse normalized coordinate set;
[0011] performing inverse coordinate difference processing on the inverse normalized coordinate set to obtain a second coordinate set;
[0012] performing inverse rotation processing on the second coordinate set to obtain an inversely rotated coordinate set;
[0013] Performing inverse scaling on the inversely rotated coordinate set to obtain an inversely scaled coordinate set;
[0014] An inverse translation process is performed on the inversely scaled coordinate set to obtain a target coordinate set of the exploration object in a target coordinate system.
[0015] In a possible implementation, performing translation processing on the initial coordinate set to obtain a first coordinate set with a reduced magnitude includes:
[0016] Determine translation parameters;
[0017] Each initial coordinate in the initial coordinate set is translated according to the translation parameter to obtain a first coordinate set with a reduced order of magnitude.
[0018] In another possible implementation, normalizing the first coordinate set to obtain a normalized coordinate set includes:
[0019] Determine the normalization coefficient;
[0020] The ratio of each coordinate in the first coordinate set to the normalization coefficient is determined as a normalized coordinate to obtain a normalized coordinate set.
[0021] In another possible implementation, performing inverse normalization on the output coordinate set to obtain an inverse normalized coordinate set includes:
[0022] Determine the inverse normalization coefficient;
[0023] The product of each coordinate in the output coordinate set and the inverse normalization coefficient is determined to be the inverse normalized coordinate, to obtain the inverse normalized coordinate set.
[0024] In another possible implementation, performing inverse coordinate difference processing on the inverse normalized coordinate set to obtain a second coordinate set includes:
[0025] The inverse normalized coordinate set is added to the first coordinate set to obtain the second coordinate set.
[0026] In another possible implementation, performing inverse rotation on the second coordinate set to obtain the inversely rotated coordinate set includes:
[0027] determining a first angular difference;
[0028] According to the first angle difference, each coordinate in the second coordinate set is subjected to inverse rotation processing to obtain an inversely rotated coordinate set.
[0029] In another possible implementation, performing inverse scaling on the inversely rotated coordinate set to obtain the inversely scaled coordinate set includes:
[0030] Determine the inverse scaling factor;
[0031] The ratio of each inversely rotated coordinate in the inversely rotated coordinate set to the inverse scaling coefficient is determined to obtain an inversely scaled coordinate set.
[0032] In another possible implementation, performing inverse translation on the inversely scaled coordinate set to obtain a target coordinate set of the exploration object in a target coordinate system includes:
[0033] Determine the inverse translation parameters;
[0034] The sum of each inverse scaling coordinate in the inverse scaling coordinate set and the inverse translation parameter is determined to obtain a target coordinate set of the exploration object in the target coordinate system.
[0035] In another possible implementation, before obtaining the initial coordinate set of the exploration object in the original coordinate system, the method further includes:
[0036] Acquire a sample input set and a sample output set, wherein the sample input set includes corresponding coordinates of the exploration object in the original coordinate system, and the sample output set includes corresponding coordinates of the exploration object in the target coordinate system;
[0037] Performing translation processing on the sample input set and the sample output set to obtain a translation input coordinate set and a translation output coordinate set with reduced orders of magnitude;
[0038] Scaling the translation output coordinate set to obtain a scaled output coordinate set;
[0039] performing rotation processing on the scaled output coordinate set to obtain a rotated output coordinate set;
[0040] Determine the difference between the rotation output coordinate set and the translation input coordinate set as a coordinate difference set;
[0041] Normalizing the translation input coordinate set to obtain a training input coordinate set, and normalizing the coordinate difference set to obtain a training output coordinate set;
[0042] Based on the training input coordinate set and the training output coordinate set, the initial neural network model is trained to obtain an artificial neural network coordinate transformation model.
[0043] On the other hand, the present application provides a coordinate conversion device, comprising:
[0044] An acquisition module, configured to acquire an initial coordinate set of the exploration object in an original coordinate system, wherein the initial coordinate set includes at least one initial coordinate, and each initial coordinate includes an initial horizontal coordinate and an initial vertical coordinate;
[0045] A translation module, configured to perform translation processing on the initial coordinate set to obtain a first coordinate set with a reduced magnitude;
[0046] a normalization module, configured to perform normalization processing on the first coordinate set to obtain a normalized coordinate set, and input the normalized coordinate set into an artificial neural network coordinate conversion model to obtain an output coordinate set;
[0047] an inverse normalization module, configured to perform inverse normalization processing on the output coordinate set to obtain an inverse normalized coordinate set;
[0048] an inverse coordinate difference module, configured to perform inverse coordinate difference processing on the inverse normalized coordinate set to obtain a second coordinate set;
[0049] an inverse rotation module, configured to perform inverse rotation processing on the second coordinate set to obtain an inversely rotated coordinate set;
[0050] an inverse scaling module, configured to perform inverse scaling on the inversely rotated coordinate set to obtain an inversely scaled coordinate set;
[0051] The inverse translation module is configured to perform inverse translation processing on the inversely scaled coordinate set to obtain a target coordinate set of the exploration object in a target coordinate system.
[0052] In a possible implementation, the translation module is configured to determine a translation parameter; and perform translation processing on each initial coordinate in the initial coordinate set according to the translation parameter to obtain a first coordinate set with a reduced order of magnitude.
[0053] In another possible implementation, the normalization module is configured to determine a normalization coefficient; determine a ratio of each coordinate in the first coordinate set to the normalization coefficient as a normalized coordinate, and obtain a normalized coordinate set.
[0054] In another possible implementation, the inverse normalization module is used to determine an inverse normalization coefficient; determine the product of each coordinate in the output coordinate set and the inverse normalization coefficient as the inverse normalized coordinate, and obtain the inverse normalized coordinate set.
[0055] In another possible implementation, the inverse coordinate difference module is configured to add the inverse normalized coordinate set to the first coordinate set to obtain the second coordinate set.
[0056] In another possible implementation, the inverse rotation module is configured to determine a first angle difference; and perform inverse rotation processing on each coordinate in the second coordinate set according to the first angle difference to obtain an inversely rotated coordinate set.
[0057] In another possible implementation, the inverse scaling module is configured to determine an inverse scaling coefficient; and determine a ratio of each inversely rotated coordinate in the inversely rotated coordinate set to the inverse scaling coefficient to obtain the inversely scaled coordinate set.
[0058] In another possible implementation, the inverse translation module is configured to determine an inverse translation parameter; determine the sum of each inverse scaled coordinate in the inverse scaled coordinate set and the inverse translation parameter to obtain a target coordinate set of the exploration object in a target coordinate system.
[0059] In another possible implementation, the apparatus further includes:
[0060] The acquisition module is further configured to acquire a sample input set and a sample output set, wherein the sample input set includes corresponding coordinates of the exploration object in the original coordinate system, and the sample output set includes corresponding coordinates of the exploration object in the target coordinate system;
[0061] The translation module is further configured to perform translation processing on the sample input set and the sample output set to obtain a translation input coordinate set and a translation output coordinate set with reduced orders of magnitude;
[0062] a scaling module, configured to perform scaling processing on the translation output coordinate set to obtain a scaled output coordinate set;
[0063] a rotation module, configured to rotate the scaled output coordinate set to obtain a rotated output coordinate set;
[0064] The coordinate difference set determining module is configured to determine a coordinate difference set between the rotation output coordinate set and the translation output coordinate set;
[0065] The normalization module is further configured to perform normalization processing on the translation input coordinate set to obtain a training input coordinate set, and to perform normalization processing on the coordinate difference set to obtain a training output coordinate set;
[0066] The training module is used to train the initial neural network model based on the training input coordinate set and the training output coordinate set to obtain an artificial neural network coordinate transformation model.
[0067] On the other hand, an embodiment of the present application provides a computer device, which includes: a processor and a memory, wherein the memory stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the operations performed in the coordinate conversion method described in any of the above possible implementation methods.
[0068] On the other hand, an embodiment of the present application provides a computer-readable storage medium, which stores at least one program code, and the at least one program code is loaded and executed by a processor to implement the operations performed in the coordinate conversion method described in any of the above possible implementation methods.
[0069] The beneficial effects of the technical solutions provided by the embodiments of the present application include at least:
[0070] The embodiment of the present application provides a coordinate conversion method, which significantly reduces the absolute value of the input and output coordinate data of the artificial neural network. Generally, the coordinate data of the output data set of the neural network training is a 6-8 digit integer, which is converted into a 1-2 digit integer using the method of the present invention. In the original technology, the artificial neural network model needs to fit a data with a large absolute value, but in the embodiment of the present application, after performing geometric transformation and coordinate difference transformation on the initial coordinate set, it is only necessary to fit a data with a smaller absolute value. In this way, under the condition that the relative error of the artificial neural network model conversion coordinate remains unchanged, the absolute error of the output data of the artificial neural network model conversion coordinate will be greatly reduced, thereby improving the accuracy of the artificial neural network conversion coordinate. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0072] Figure 1 is a flow chart of a training method for an artificial neural network coordinate transformation model according to an exemplary embodiment;
[0073] Figure 2 is a flow chart showing a coordinate conversion method according to an exemplary embodiment;
[0074] Figure 3 is a block diagram of a coordinate conversion device according to an exemplary embodiment;
[0075] Figure 4 The figure is a structural block diagram of a computer device according to an exemplary embodiment. DETAILED DESCRIPTION
[0076] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0077] In one possible implementation, see Figure 1 The computer device trains the artificial neural network model through sample data to obtain the artificial neural network coordinate transformation model, including:
[0078] 101. A computer device obtains a sample input set and a sample output set. The sample input set includes coordinates of the exploration object in an original coordinate system, and the sample output set includes corresponding coordinates of the exploration object in a target coordinate system.
[0079] In the embodiments of the present application, the coordinates of the exploration object in the original coordinate system include multiple sample input coordinates; the corresponding coordinates of the exploration object in the target coordinate system include multiple sample output coordinates. Each exploration object's coordinates in the original coordinate system correspond to its coordinates in the target coordinate system. The purpose of coordinate conversion is to convert the corresponding target coordinates based on the original coordinates. In Table 1, input coordinates and output coordinates with the same sequence number have a corresponding relationship, such as the input coordinate with sequence number 1 has a corresponding relationship with the output coordinate. One sample input coordinate corresponds to one sample input horizontal coordinate and one sample input vertical coordinate, and one sample output coordinate corresponds to one sample output horizontal coordinate and one sample output vertical coordinate.
[0080] In one possible implementation, as shown in Table 1, the sample input set includes six sample input coordinates, and the sample output set includes six sample output coordinates. The coordinate data in Table 1 uses the WGS-84 coordinate system and the UTM projection, with the central meridian of the input coordinate system at 138° and the central meridian of the output coordinate system at 139°.
[0081] Table 1 Sample input set and sample output set
[0082]
[0083]
[0084] 102. The computer device performs translation processing on the sample input set and the sample output set to obtain a translation input coordinate set and a translation output coordinate set with reduced orders of magnitude.
[0085] In one possible implementation, this step is: the computer device determines the average horizontal coordinate and the average vertical coordinate of multiple input coordinates in the sample input set, and translates the sample input set according to the average horizontal coordinate and the average vertical coordinate of the multiple input coordinates to obtain a translated input coordinate set; and determines the average horizontal coordinate and the average vertical coordinate of multiple output coordinates in the sample output set, and translates the sample output set according to the average horizontal coordinate and the average vertical coordinate of the multiple output coordinates to obtain a translated output coordinate set.
[0086] In one possible implementation, the computer device performs translation processing on the sample input set, and the steps of obtaining the translation input coordinate set are as follows: for each sample input horizontal coordinate in the sample input set, the computer device determines the difference between the sample input horizontal coordinate and the average horizontal coordinate as the translation input horizontal coordinate, and obtains multiple translation input horizontal coordinates; and, for each sample input vertical coordinate in the sample input set, the computer device determines the difference between the sample input vertical coordinate and the average vertical coordinate as the translation input vertical coordinate, and obtains multiple translation input vertical coordinates; the multiple translation input horizontal coordinates and the multiple translation input vertical coordinates are combined to obtain the translation input coordinate set.
[0087] In one possible implementation, the computer device performs translation processing on the sample output set, and the steps of obtaining the translation output coordinate set are as follows: for each sample output horizontal coordinate in the sample output set, the computer device determines the difference between the sample output horizontal coordinate and the average horizontal coordinate as the translation output horizontal coordinate, and obtains multiple translation output horizontal coordinates; and, for each sample output vertical coordinate in the sample output set, the computer device determines the difference between the sample output vertical coordinate and the average vertical coordinate as the translation output vertical coordinate, and obtains multiple translation output vertical coordinates; the multiple translation output horizontal coordinates and the multiple translation output vertical coordinates are combined to obtain the translation output coordinate set.
[0088] For example, referring to Table 1, the translation input coordinate set includes 6 translation input coordinates, and the translation output coordinate set includes 6 translation output coordinates. The average value of the 6 translation input horizontal coordinates, i.e., the average horizontal coordinate m of the input coordinates, is x =509101.086225; the average value of the 6 translation input vertical coordinates, that is, the average vertical coordinate of the input coordinates m y =1225195.809948; the average value of the 6 translation output horizontal coordinates, that is, the average horizontal coordinate of the output coordinates t x =399884.102351; the average value of the 6 translation output vertical coordinates, that is, the average vertical coordinate of the output coordinates t y =1225348.503716.
[0089] The computer device performs translation processing on the sample input set and the sample output set to obtain a translation input coordinate set and a translation output coordinate set with reduced orders of magnitude, as shown in Table 2.
[0090] Table 2 Translation input coordinate set and translation output coordinate set
[0091] Serial number Translate input horizontal coordinate Translate the input vertical coordinate Translate the output horizontal coordinate Translate the output vertical coordinate 1 -9101.086225 -9216.376816 -9133.122100 -9187.143853 2 2.570296 -9215.113590 -28.279038 -9216.204593 3 9106.244793 -9211.323899 9076.366250 -9242.737317 4 -9101.086225 9212.135766 -9071.276332 9243.985932 5 -2.582262 9213.417165 28.410693 9214.507127 6 9095.939624 9217.261376 9127.900525 9187.592706
[0092] 103. The computer device performs scaling processing on the translation output coordinate set to obtain a scaled output coordinate set.
[0093] In one possible implementation, this step is: the computer device determines, from the multiple translation input coordinates in the translation input set, the point farthest from the coordinate origin in the first quadrant of the original coordinate system as the first vertex, and determines the first distance between the first vertex and the coordinate origin; and, from the multiple translation output coordinates in the translation output set, determines the corresponding point (with the same serial number) of the first vertex as the second vertex, and determines the second distance between the second vertex and its coordinate origin; determines the ratio of the first distance to the second distance as the scaling factor; determines the product of each translation output horizontal coordinate in the translation output coordinate set and the scaling factor to obtain multiple scaling output horizontal coordinates, and determines the product of each translation output vertical coordinate in the translation output coordinate set and the scaling factor to obtain multiple scaling output vertical coordinates, and combines the multiple scaling output horizontal coordinates and the multiple scaling output vertical coordinates to obtain a scaling output coordinate set.
[0094] The corresponding point of the first vertex is the point with the same sequence number as the first vertex in the target coordinate system. For example, if the first vertex is (9095.939624, 9217.261376), then the point with the same sequence number as the first vertex in the target coordinate system, that is, the second vertex, is (9127.900525, 9187.592706).
[0095] In one possible implementation, the step of determining, by the computer device, the first distance between the first vertex and the coordinate origin thereof comprises: determining the abscissa and ordinate of the first vertex, and determining, based on the abscissa and ordinate of the first vertex, the first distance between the first vertex and the coordinate origin thereof using the following formula 1;
[0096] Formula 1:
[0097] Among them, d1 represents the first distance, x itr Indicates the horizontal coordinate of the first vertex, y itr Indicates the vertical coordinate of the first vertex.
[0098] In one possible implementation, the step of determining, by the computer device, the second distance between the second vertex and the coordinate origin thereof comprises: determining the abscissa and ordinate of the second vertex, and determining, based on the abscissa and ordinate of the second vertex, the second distance between the second vertex and the second coordinate origin thereof using the following formula 2;
[0099] Formula 2:
[0100] Among them, d2 represents the second distance, x otr Indicates the horizontal coordinate of the second vertex, y otr Indicates the ordinate of the second vertex.
[0101] Optionally, the scaling factor can be represented by the letter s, that is, s = d1 / d2. The horizontal coordinate of the translation output can be represented by x o Indicates that the scaled output horizontal coordinate can be used with x s If x s =x0*s; optional, the vertical coordinate of the translation output can be used o Indicates that the scaling output ordinate can be used with y s means; then y s =y0*s. In this example: s=0.9998914782.
[0102] For example, referring to Table 3, the computer device performs scaling processing on the translation output coordinate set, and the obtained scaled output coordinate set includes 6 scaled output coordinates, and 1 scaled output coordinate includes 1 scaled output horizontal coordinate and 1 scaled output horizontal coordinate.
[0103] Table 3 Scaling output coordinate set
[0104] Serial number Scale output horizontal axis Scale output vertical coordinate 1 -9132.130957 -9186.146849 2 -28.275969 -9215.204435 3 9075.381267 -9241.734279 4 -9070.291901 9242.982758 5 28.407610 9213.507152 6 9126.909950 9186.595652
[0105] 104. The computer device rotates the scaled output coordinate set to obtain a rotated output coordinate set.
[0106] In one possible implementation, this step is: the computer device determines a first angle between a line connecting a first vertex and its coordinate origin and the positive direction of the X-axis of the original coordinate system from a plurality of translation input coordinates in the translation input set; and determines a second angle between a line connecting a second vertex and its coordinate origin and the positive direction of the X-axis of the target coordinate system from a plurality of translation output coordinates in the translation output set; subtracts the second angle from the first angle to obtain a first angle difference, and rotates the scaled output coordinate set according to the first angle difference to obtain a rotated output coordinate set.
[0107] In a possible implementation, the step of determining the first angle by the computer device includes: determining a first distance and a vertical coordinate value of a first vertex, and determining the first angle according to the first distance and the vertical coordinate value of the first vertex using the following formula 3;
[0108] Formula 3: α=arcsin(y itr / d1)
[0109] Among them, α represents the first angle, y itr represents the ordinate value of the first vertex, and d1 represents the first distance.
[0110] In a possible implementation, the step of determining the second angle by the computer device includes: determining a second distance and a ordinate value of the second vertex, and determining the second angle according to the second distance and the ordinate value of the second vertex using the following formula 4;
[0111] Formula 4: β = arcsin(y otr / d2)
[0112] Among them, β represents the second angle, y otr represents the ordinate value of the second vertex, and d2 represents the second distance.
[0113] In one possible implementation, the computer device rotates the scaled output coordinate set according to the first angle difference to obtain the rotated output coordinate set. The steps include: the computer device rotates the scaled output horizontal coordinate and the scaled output vertical coordinate of each scaled output coordinate according to the first angle difference using the following formula 5 to obtain a rotated output horizontal coordinate and a rotated output vertical coordinate; obtains a plurality of rotated output horizontal coordinates and a plurality of rotated output vertical coordinates; and combines the plurality of rotated output horizontal coordinates and the plurality of rotated output vertical coordinates to obtain the rotated output coordinate set.
[0114] Formula 5:
[0115] Among them, x s Indicates scaling output horizontal coordinate, y s Indicates scaling output ordinate, x rIndicates the rotation output horizontal coordinate, y r represents the rotation output ordinate, and θ represents the first angle difference. In this example, the first angle difference θ = 0.0034748565, in radians.
[0116] For example, the computer device performs rotation processing on the scaled output coordinate set, and the obtained rotated output coordinate set is shown in Table 4, where the rotated output coordinate set includes 6 rotated output horizontal coordinates and 6 rotated output vertical coordinates.
[0117] Table 4 Rotation output coordinate set
[0118] Serial number Rotate output horizontal coordinate Rotate output vertical coordinate 1 -9100.155346 -9217.824170 2 3.745651 -9215.247055 3 9107.440112 -9210.142900 4 -9102.355115 9211.409056 5 -3.608112 9213.550240 6 9094.932810 9218.254828
[0119] 105. The computer device determines the difference between the rotation output coordinate set and the translation input coordinate set as a coordinate difference set.
[0120] In one possible implementation, this step is: the computer device determines, for each rotated output horizontal coordinate and each rotated output vertical coordinate in the rotated output coordinate set, the difference between the rotated output horizontal coordinate and the corresponding translation input horizontal coordinate to obtain multiple horizontal coordinate differences, and determines the difference between the rotated output vertical coordinate and the corresponding translation input vertical coordinate to obtain multiple vertical coordinate differences; and combines the multiple horizontal coordinate differences and the multiple vertical coordinate differences to obtain a coordinate difference set.
[0121] For example, referring to Table 5, the coordinate difference set includes 6 abscissa differences and 6 ordinate differences.
[0122] Table 5 Coordinate difference set
[0123] Serial number Abscissa difference Vertical coordinate difference 1 0.930879 -1.447353 2 1.175355 -0.133464 3 1.195319 1.180999 4 -1.268890 -0.726709 5 -1.025850 0.133075 6 -1.006813 0.993453
[0124] For example, the abscissa difference 0.930879 for sequence number 1 is the difference between the rotated output abscissa -9100.155346 and the translated output abscissa -9101.086225.
[0125] In the embodiments of the present application, the absolute values of the input and output coordinate data of the artificial neural network are significantly reduced. After processing by the method of the present invention, the integer digits of the output coordinate data are generally only 1-2 digits, which is much smaller than the 6-8 digits of the coordinate data before transformation. When the relative error of the coordinate conversion of the neural network model remains unchanged, the absolute error of the coordinate conversion of the artificial neural network model is reduced by 5-6 orders of magnitude. After the translation transformation, the input coordinate data can generally be reduced by 2-3 integer digits, which also helps to improve the coordinate conversion accuracy of the artificial neural network.
[0126] 106. The computer device normalizes the translation input coordinate set to obtain a training input coordinate set, and normalizes the coordinate difference set to obtain a training output coordinate set.
[0127] In one possible implementation, the computer device normalizes the translation input coordinate set to obtain the training input coordinate set, including the following steps (11)-(13):
[0128] (11) The computer device determines the absolute value of the horizontal coordinate of each sample input and the absolute value of the vertical coordinate of each sample input in the sample input set to obtain multiple first absolute values; and determines the absolute value with the largest value from the multiple first absolute values obtained as the first normalization coefficient.
[0129] For example, the first normalization coefficient is max in Indicates; Continuing to refer to Table 2, the first normalization coefficient is 9217.261376.
[0130] (12) The computer device determines, for each translation input horizontal coordinate in the translation input coordinate set, a ratio of the translation input horizontal coordinate to the first normalization coefficient as the training input horizontal coordinate, thereby obtaining a plurality of training input horizontal coordinates; and, for each translation input vertical coordinate in the translation input coordinate set, determines a ratio of the translation input vertical coordinate to the first normalization coefficient as the training input vertical coordinate, thereby obtaining a plurality of training input vertical coordinates.
[0131] For example, the first normalization coefficient is max in Indicates; the horizontal coordinate of the translation input is x i Indicates that the training input horizontal coordinate is x ni If x ni =x i / max in ; Translate the input vertical coordinate using y i Indicates that the training input ordinate is y ni If y ni =y i / max in .
[0132] (13) The computer device combines the multiple training input horizontal coordinates and the multiple training input vertical coordinates to obtain a training input coordinate set.
[0133] In one possible implementation, the computer device normalizes the coordinate difference set to obtain the training output coordinate set, including the following steps (21)-(23):
[0134] (21) The computer device determines the absolute value of each horizontal coordinate difference and the absolute value of each vertical coordinate difference in the coordinate difference set to obtain multiple second absolute values; and determines the absolute value with the largest value from the multiple second absolute values obtained as the second normalization coefficient.
[0135] Optionally, the second normalization coefficient is max d Continuing to refer to Table 5, the second normalization coefficient is 1.447353.
[0136] (22) The computer device determines, for each horizontal coordinate difference in the coordinate difference set, a ratio of the horizontal coordinate difference to the second normalization coefficient as a training output horizontal coordinate, thereby obtaining a plurality of training output horizontal coordinates; and, for each vertical coordinate difference in the coordinate difference set, determines, for each vertical coordinate difference, a ratio of the vertical coordinate difference to the second normalization coefficient as a training output vertical coordinate, thereby obtaining a plurality of training output vertical coordinates.
[0137] Optional, coordinate difference horizontal coordinate is x d Indicates that the training output horizontal coordinate is x nd If x nd =x d / max d ; The vertical coordinate of the coordinate difference is y d Indicates that the training output ordinate is y nd If y nd =y d / max d .
[0138] (23) The computer device combines the multiple training output horizontal coordinates and the multiple training output vertical coordinates to obtain a training output coordinate set.
[0139] In one possible implementation, the computer device normalizes the translation input coordinate set to obtain a training input coordinate set, and normalizes the coordinate difference set to obtain a training output coordinate set as shown in Table 6; wherein the normalized training input coordinate set includes 6 training input horizontal coordinates and 6 training input vertical coordinates; and the normalized training output coordinate set includes 6 training output horizontal coordinates and 6 training output vertical coordinates.
[0140] Table 6 Training input coordinate set and training output coordinate set
[0141] Serial number Training input horizontal coordinate Training input vertical coordinate Training output horizontal coordinate Training output vertical coordinate 1 -0.987396 -0.999904 0.643159 -1.000000 2 0.000279 -0.999767 0.812072 -0.092213 3 0.987956 -0.999356 0.825866 0.815972 4 -0.987396 0.999444 -0.876697 -0.502095 5 -0.000280 0.999583 -0.708776 0.091944 6 0.986838 1.000000 -0.695624 0.686393
[0142] 107. The computer device trains the initial neural network model based on the training input coordinate set and the training output coordinate set to obtain an artificial neural network coordinate transformation model.
[0143] In one possible implementation, this step is: the computer device inputs the training input horizontal coordinate and the training input vertical coordinate into the initial neural network model to obtain the initial output horizontal coordinate and the initial output vertical coordinate; according to the first target difference between the initial output horizontal coordinate and the training output horizontal coordinate and the second target difference between the initial output vertical coordinate and the training output vertical coordinate, the parameters in the initial neural network model are adjusted until the first target difference is less than the first preset value and the second target difference is less than the second preset value, the adjusted parameters are stored, and the artificial neural network coordinate conversion model is obtained.
[0144] In the embodiment of the present application, the specific numerical values of the first preset value and the second preset value are not limited and can be set and modified as needed.
[0145] Figure 2 FIG. 1 is a flow chart showing a coordinate conversion method according to an exemplary embodiment. Figure 2 , the method comprising:
[0146] 201. A computer device obtains a corresponding initial coordinate set of the exploration object in an original coordinate system. The initial coordinate set includes at least one initial coordinate, and each initial coordinate includes an initial horizontal coordinate and an initial vertical coordinate.
[0147] The original coordinate system before the artificial neural network coordinate transformation model conversion should be consistent with the coordinate system of the training input dataset, and the target coordinate system after the conversion should be consistent with the coordinate system of the training output dataset; that is, when using the neural network model to transform coordinates, the coordinate systems before and after the conversion correspond to the training input and output coordinate systems.
[0148] In a possible implementation, the initial coordinate set includes coordinate values corresponding to a plurality of initial coordinates. For example, referring to Table 7, the initial coordinate set includes 3 initial horizontal coordinates and 3 initial vertical coordinates.
[0149] Table 7 Initial coordinate set in the original coordinate system
[0150] Serial number Initial horizontal coordinate Initial vertical coordinate 1 500000.000000 1225193.664030 2 509101.089813 1225194.936347 3 518202.197576 1225198.753314
[0151] 202. The computer device performs translation processing on the initial coordinate set to obtain a first coordinate set with a reduced magnitude.
[0152] In a possible implementation, the computer device determines a translation parameter, and performs a translation process on each initial coordinate in the initial coordinate set according to the translation parameter to obtain a first coordinate set with a reduced order of magnitude.
[0153] In one possible implementation, in step 102, the computer device determines the average horizontal coordinate and the average vertical coordinate of the training input coordinate data set and stores the average horizontal coordinate and the average vertical coordinate. In this step, the computer device can directly obtain the average horizontal coordinate and the average vertical coordinate locally and determine them as the translation parameters required for this step.
[0154] In one possible implementation, the computer device translates each initial coordinate in the initial coordinate set according to the translation parameter to obtain the first coordinate set after the order of magnitude is reduced. The computer device determines, for each initial coordinate in the initial coordinate set, the difference between the initial horizontal coordinate and the average horizontal coordinate of the initial coordinate as the first horizontal coordinate, and determines the difference between the initial vertical coordinate and the average vertical coordinate as the first vertical coordinate, to obtain the first horizontal coordinates and first vertical coordinates after the multiple initial coordinates are translated, and combines the multiple first horizontal coordinates and first vertical coordinates to obtain the first coordinate set after the order of magnitude is reduced.
[0155] For example, the average horizontal coordinate is m x =509101.086225; the average vertical coordinate is m y = 1225195.809948. The computer device performs translation processing on the coordinate values corresponding to the three initial coordinates to obtain a first coordinate set with a reduced order of magnitude, as shown in Table 8.
[0156] Table 8 First coordinate set
[0157] Serial number The first horizontal coordinate The first vertical coordinate 1 -9101.086225 -2.145918 2 0.003588 -0.873601 3 9101.111351 2.943366
[0158] 203. The computer device normalizes the first coordinate set to obtain a normalized coordinate set, and inputs the normalized coordinate set into an artificial neural network coordinate conversion model to obtain an output coordinate set.
[0159] In a possible implementation, the computer device determines a normalization coefficient, determines a ratio of each coordinate in the first coordinate set to the normalization coefficient as a normalized coordinate, and obtains a normalized coordinate set.
[0160] In one possible implementation, in step 106, the computer device determines the first normalization coefficient corresponding to the training sample input set and stores the first normalization coefficient. In this step, the computer device can directly obtain the first normalization coefficient locally and determine it as the normalization coefficient required for this step.
[0161] Optionally, the first coordinate set includes n first horizontal coordinates. Accordingly, the step of determining the normalized horizontal coordinate by the computer device is as follows: the computer device determines the normalized horizontal coordinate for the first horizontal coordinate corresponding to each coordinate using the following formula 6;
[0162] Formula 6: x ni =x i / max in , 0<i≤n
[0163] Among them, x i Indicates the first horizontal coordinate of the i-th position, x ni Indicates the normalized horizontal coordinate corresponding to the first horizontal coordinate of the i-th in Indicates the normalization coefficient corresponding to the first coordinate set.
[0164] Optionally, the first coordinate set includes n first vertical coordinates. Accordingly, the step of determining the normalized vertical coordinate by the computer device is as follows: the computer device determines the normalized vertical coordinate for the first vertical coordinate corresponding to each coordinate using the following formula 7;
[0165] Formula 7: y ni =y i / max in , 0<i≤n
[0166] Among them, y i Indicates the first vertical coordinate of the i-th position, y ni Indicates the normalized ordinate corresponding to the i-th first ordinate, max in Indicates the normalization coefficient corresponding to the first coordinate set, max in =9217.261376.
[0167] The computer device performs normalization processing on the first coordinate set according to the first normalization coefficient, and the obtained normalized coordinate set is shown in Table 9.
[0168] Table 9 Normalized coordinate set
[0169] Serial number Normalized horizontal axis Normalized vertical coordinate 1 -0.987396 -0.000233 2 0.000000 -0.000095 3 0.987399 0.000319
[0170] In this step, the computer device inputs the normalized coordinate set into the artificial neural network coordinate transformation model to obtain an output coordinate set.
[0171] The computer device inputs the normalized coordinate set into the artificial neural network coordinate transformation model, and the obtained output coordinate set is shown in Table 10.
[0172] Table 10 Output coordinate set
[0173] Serial number Output horizontal coordinate Output vertical coordinate 1 -0.186074 -0.750788 2 -0.027650 0.010059 3 -0.013177 0.751310
[0174] 204. The computer device performs inverse normalization processing on the output coordinate set to obtain an inverse normalized coordinate set.
[0175] In one possible implementation, this step includes determining an inverse normalization coefficient, determining that the product of each coordinate in the output coordinate set and the inverse normalization coefficient is the inverse normalized coordinate, and obtaining the inverse normalized coordinate set. Inverse normalization is the inverse of normalization.
[0176] In a possible implementation, in step 106, the computer device determines the second normalization coefficient corresponding to the coordinate difference set and stores the second normalization coefficient. The computer device can directly obtain the second normalization coefficient locally and determine it as the inverse normalization coefficient required for this step. In this example, the inverse normalization coefficient max d =1.447353.
[0177] In one possible implementation, the computer device determines that the product of each coordinate in the output coordinate set and the inverse normalization coefficient is the inverse normalized coordinate, and the steps of obtaining the inverse normalized coordinate set are: for the output horizontal coordinate of each coordinate in the output coordinate set, the computer device determines the product of the output horizontal coordinate and the inverse normalization coefficient as the inverse normalized horizontal coordinate to obtain multiple inverse normalized horizontal coordinates, and, for the output vertical coordinate of each coordinate in the output coordinate set, the computer device determines the product of the output vertical coordinate and the inverse normalization coefficient as the inverse normalized vertical coordinate to obtain multiple inverse normalized vertical coordinates; and combines the multiple inverse normalized horizontal coordinates and the multiple inverse normalized vertical coordinates to obtain the inverse normalized coordinate set.
[0178] The computer device performs inverse normalization processing on the output coordinate set to obtain the inverse normalized coordinate set shown in Table 11.
[0179] Table 11 Inverse normalized coordinate set
[0180] Serial number Inverse normalized horizontal coordinate Inverse normalized ordinate 1 -0.269315 -1.086656 2 -0.040019 0.014559 3 -0.019072 1.087411
[0181] 205. The computer device performs inverse coordinate difference processing on the inverse normalized coordinate set to obtain a second coordinate set.
[0182] In a possible implementation, this step is: performing inverse coordinate difference processing on the inverse normalized coordinate set, that is, adding the inverse normalized coordinate set and corresponding data of the first coordinate set to obtain the second coordinate set.
[0183] The steps of the computer device performing inverse coordinate difference processing on the inverse normalized coordinate set are as follows: the computer device adds the first horizontal coordinate in the inverse normalized coordinate set to the first horizontal coordinate in the first coordinate set to obtain the first second horizontal coordinate, and adds the second horizontal coordinate of the inverse normalized coordinate set to the second horizontal coordinate in the first coordinate set to obtain the second second horizontal coordinate, and so on, to obtain multiple second horizontal coordinates, and similarly, to obtain multiple second vertical coordinates; the computer device combines the multiple second horizontal coordinates and the multiple second vertical coordinates to obtain a second coordinate set.
[0184] The second coordinate set determined by the computer device is shown in Table 12.
[0185] Table 12 Second coordinate set
[0186] Serial number The second horizontal axis The second vertical coordinate 1 -9101.355540 -3.232574 2 -0.036431 -0.859042 3 9101.092279 4.030777
[0187] 206. The computer device performs inverse rotation processing on the second coordinate set to obtain an inversely rotated coordinate set.
[0188] In one possible implementation, this step includes: determining a first angle difference; and performing an inverse rotation process on each coordinate in the second coordinate set according to the first angle difference to obtain an inversely rotated coordinate set. The inverse rotation process is an inverse transformation of the rotation process.
[0189] In a possible implementation, in step 104, the computer device determines the first angle difference and stores the first angle difference. In this step, the computer device can directly obtain the first angle difference locally and determine it as the first angle difference required for this step.
[0190] In one possible implementation, the computer device performs inverse rotation processing on each coordinate in the second coordinate set according to the first angle difference to obtain the inversely rotated coordinate set. The steps are as follows: the computer device performs inverse rotation processing on the second abscissa and the second ordinate of each coordinate in the second coordinate set according to the first angle difference using the following formula 8 to obtain an inversely rotated abscissa and an inversely rotated ordinate; obtain multiple inversely rotated abscissas and multiple inversely rotated ordinates, and combine the obtained multiple inversely rotated abscissas and multiple inversely rotated ordinates into the inversely rotated coordinate set;
[0191] Formula 8:
[0192] Among them, x rd Indicates the second horizontal coordinate, y rd Indicates the second vertical coordinate, X rr Indicates the reverse rotation of the horizontal coordinate, y rr represents the reverse rotation ordinate, and θ represents the first angle difference.
[0193] The computer device performs inverse rotation processing on the second coordinate set to obtain the inversely rotated coordinate set shown in Table 13.
[0194] Table 13 Inverse rotation coordinate set
[0195] Serial number Reverse rotation of the horizontal coordinate Reverse rotation of the vertical coordinate 1 -9101.311825 28.393286 2 -0.039416 -0.858911 3 9101.051339 -27.594174
[0196] 207. The computer device performs inverse scaling on the inversely rotated coordinate set to obtain an inversely scaled coordinate set.
[0197] In a possible implementation, this step is: determining an inverse scaling coefficient; determining a ratio of each inversely rotated coordinate in the inversely rotated coordinate set to the inverse scaling coefficient to obtain an inversely scaled coordinate set, wherein the inverse scaling process is an inverse transformation of the scaling process.
[0198] In a possible implementation, in step 103, the computer device determines the scaling factor and stores the scaling factor. Accordingly, in this step, the computer device may directly obtain the scaling factor locally and determine it as the inverse scaling factor of this step.
[0199] In one possible implementation, a computer device determines the ratio of each inversely rotated coordinate in the inversely rotated coordinate set to the inverse scaling coefficient, and the steps for obtaining the inversely scaled coordinate set are: the computer device determines the ratio of each inversely rotated horizontal coordinate in the inversely rotated coordinate set to the inverse scaling coefficient to obtain multiple inversely scaled horizontal coordinates, and determines the ratio of each inversely rotated vertical coordinate in the inversely rotated coordinate set to the inverse scaling coefficient to obtain multiple inversely scaled vertical coordinates; and combines the multiple inversely scaled horizontal coordinates and the multiple inversely scaled vertical coordinates to obtain the inversely scaled coordinate set.
[0200] For example, the computer device performs inverse scaling processing on the inversely rotated coordinate set to obtain the inversely scaled coordinate set as shown in Table 14.
[0201] Table 14 Inverse scaling coordinate set
[0202] Serial number Inverse scale horizontal axis Inverse scale vertical axis 1 -9102.299622 28.396368 2 -0.039421 -0.859004 3 9102.039108 -27.597168
[0203] 208. The computer device performs inverse translation processing on the inversely scaled coordinate set to obtain a target coordinate set of the exploration object in the target coordinate system.
[0204] In one possible implementation, this step is: the computer device determines an inverse translation parameter; determines the sum of each inverse scaled coordinate in the inverse scaled coordinate set and the inverse translation parameter to obtain a target coordinate set of the exploration object in the target coordinate system, and the inverse translation processing is an inverse transformation of the translation processing.
[0205] In one possible implementation, in step 102, the computer device determines the average horizontal coordinate and the average vertical coordinate of multiple output coordinates in the training sample output set, and stores the average horizontal coordinate and the average vertical coordinate of the multiple output coordinates. In this step, the computer device can directly obtain the average horizontal coordinate and the average vertical coordinate locally and determine them as the inverse translation parameters required for this step.
[0206] In one possible implementation, the inverse translation parameter includes an average horizontal coordinate and an average vertical coordinate of multiple output coordinates in the sample output set. Accordingly, the steps of determining the sum of each inverse-scaled coordinate in the inverse-scaled coordinate set and the inverse translation parameter to obtain a target coordinate set of the exploration object in the target coordinate system include: determining the sum of each inverse-scaled horizontal coordinate in the inverse-scaled coordinate set and the average horizontal coordinate to obtain multiple target horizontal coordinates; and determining the sum of each inverse-scaled vertical coordinate in the inverse-scaled coordinate set and the average vertical coordinate to obtain multiple target vertical coordinates; and combining the multiple target horizontal coordinates and the multiple target vertical coordinates to obtain the target coordinate set of the exploration object in the target coordinate system.
[0207] For example, the average horizontal coordinate t x =399884.102351; average vertical coordinate t y = 1225348.503716. The computer device performs inverse translation processing on the inverse scaled coordinate set to obtain the target coordinate set of the exploration object in the target coordinate system as shown in Table 15.
[0208] Table 15 Target coordinate set
[0209] Serial number Target horizontal coordinate Target vertical coordinate 1 390781.802728 1225376.900084 2 399884.062930 1225347.644712 3 408986.141459 1225320.906548
[0210] The embodiment of the present application provides a coordinate conversion method, which significantly reduces the absolute value of the input and output coordinate data of the artificial neural network. Generally, the coordinate data of the output data set of the neural network training is a 6-8 digit integer, which is converted into a 1-2 digit integer using the method of the present invention. In the original technology, the artificial neural network model needs to fit a data with a large absolute value, but in the embodiment of the present application, after performing geometric transformation and coordinate difference transformation on the initial coordinate set, it is only necessary to fit a data with a smaller absolute value. In this way, under the condition that the relative error of the artificial neural network model conversion coordinate remains unchanged, the absolute error of the output data of the artificial neural network model conversion coordinate will be greatly reduced, thereby improving the accuracy of the artificial neural network conversion coordinate.
[0211] Figure 3 FIG. 1 is a block diagram of a coordinate conversion device according to an exemplary embodiment. Figure 3 , the device comprises:
[0212] An acquisition module 301 is configured to acquire an initial coordinate set of the exploration object in an original coordinate system, wherein the initial coordinate set includes at least one initial coordinate, and each initial coordinate includes an initial horizontal coordinate and an initial vertical coordinate;
[0213] A translation module 302 is configured to perform translation processing on the initial coordinate set to obtain a first coordinate set with a reduced magnitude;
[0214] A normalization module 303 is configured to perform normalization processing on the first coordinate set to obtain a normalized coordinate set, and input the normalized coordinate set into an artificial neural network coordinate conversion model to obtain an output coordinate set;
[0215] An inverse normalization module 304 is configured to perform inverse normalization processing on the output coordinate set to obtain an inverse normalized coordinate set;
[0216] An inverse coordinate difference module 305 is used to perform inverse coordinate difference processing on the inverse normalized coordinate set to obtain a second coordinate set;
[0217] The inverse rotation module 306 is used to perform inverse rotation processing on the second coordinate set to obtain an inversely rotated coordinate set;
[0218] An inverse scaling module 307 is configured to perform inverse scaling on the inversely rotated coordinate set to obtain an inversely scaled coordinate set;
[0219] The inverse translation module 308 is configured to perform inverse translation processing on the inversely scaled coordinate set to obtain a target coordinate set of the exploration object in the target coordinate system.
[0220] In a possible implementation, the translation module 302 is configured to determine a translation parameter; and perform a translation process on each initial coordinate in the initial coordinate set according to the translation parameter to obtain a first coordinate set with a reduced magnitude.
[0221] In another possible implementation, the normalization module 303 is configured to determine a normalization coefficient; determine a ratio of each coordinate in the first coordinate set to the normalization coefficient as a normalized coordinate, and obtain a normalized coordinate set.
[0222] In another possible implementation, the inverse normalization module 304 is configured to determine an inverse normalization coefficient; determine the product of each coordinate in the output coordinate set and the inverse normalization coefficient as the inverse normalized coordinate, and obtain the inverse normalized coordinate set.
[0223] In another possible implementation, the inverse coordinate difference module 305 is configured to add the inverse normalized coordinate set to the first coordinate set to obtain a second coordinate set.
[0224] In another possible implementation, the inverse rotation module 306 is configured to determine a first angle difference; and perform an inverse rotation process on each coordinate in the second coordinate set according to the first angle difference to obtain an inversely rotated coordinate set.
[0225] In another possible implementation, the inverse scaling module 307 is configured to determine an inverse scaling coefficient; determine a ratio of each inversely rotated coordinate in the inversely rotated coordinate set to the inverse scaling coefficient, and obtain the inversely scaled coordinate set.
[0226] In another possible implementation, the inverse translation module 308 is configured to determine an inverse translation parameter; determine the sum of each inverse scaled coordinate in the inverse scaled coordinate set and the inverse translation parameter to obtain a target coordinate set of the exploration object in the target coordinate system.
[0227] In another possible implementation, the device further includes:
[0228] The acquisition module 301 is further configured to acquire a sample input set and a sample output set, wherein the sample input set includes corresponding coordinates of the exploration object in the original coordinate system, and the sample output set includes corresponding coordinates of the exploration object in the target coordinate system;
[0229] The translation module 302 is further configured to perform translation processing on the sample input set and the sample output set to obtain a translation input coordinate set and a translation output coordinate set with reduced orders of magnitude;
[0230] A scaling module is used to scale the translation output coordinate set to obtain a scaled output coordinate set;
[0231] A rotation module, used for rotating the scaled output coordinate set to obtain a rotated output coordinate set;
[0232] A coordinate difference set determining module, configured to determine a coordinate difference set between a rotation output coordinate set and a translation output coordinate set;
[0233] The normalization module 303 is further configured to perform normalization processing on the translation input coordinate set to obtain a training input coordinate set, and to perform normalization processing on the coordinate difference set to obtain a training output coordinate set;
[0234] The training module is used to train the initial neural network model based on the training input coordinate set and the training output coordinate set to obtain an artificial neural network coordinate transformation model.
[0235] The embodiment of the present application provides a coordinate conversion method, which significantly reduces the absolute value of the input and output coordinate data of the artificial neural network. Generally, the coordinate data of the output data set of the neural network training is a 6-8 digit integer, which is converted into a 1-2 digit integer using the method of the present invention. In the original technology, the artificial neural network model needs to fit a data with a large absolute value, but in the embodiment of the present application, after performing geometric transformation and coordinate difference transformation on the initial coordinate set, it is only necessary to fit a data with a smaller absolute value. In this way, under the condition that the relative error of the artificial neural network model conversion coordinate remains unchanged, the absolute error of the output data of the artificial neural network model conversion coordinate will be greatly reduced, thereby improving the accuracy of the artificial neural network conversion coordinate.
[0236] Figure 4 The following is a block diagram of a computer device 400 according to an exemplary embodiment of the present invention. Computer device 400 may be a smartphone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), laptop computer, or desktop computer. Computer device 400 may also be referred to as a user device, portable computer device, laptop computer device, desktop computer device, or other similar names.
[0237] Typically, the computer device 400 includes a processor 401 and a memory 402 .
[0238] The processor 401 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 401 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 401 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 401 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 401 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0239] The memory 402 may include one or more computer-readable storage media, which may be non-transitory. The memory 402 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 402 is used to store at least one instruction, which is executed by the processor 401 to implement the coordinate conversion method provided in the method embodiment of the present application.
[0240] In some embodiments, computer device 400 may optionally include a peripheral device interface 403 and at least one peripheral device. Processor 401, memory 402, and peripheral device interface 403 may be connected via a bus or signal lines. Each peripheral device may be connected to peripheral device interface 403 via a bus, signal lines, or circuit boards. Specifically, the peripheral device may include at least one of a radio frequency circuit 404, a display screen 405, a camera 406, an audio circuit 407, a positioning component 408, and a power supply 409.
[0241] The peripheral device interface 403 can be used to connect at least one I / O (Input / Output)-related peripheral device to the processor 401 and the memory 402. In some embodiments, the processor 401, the memory 402, and the peripheral device interface 403 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 401, the memory 402, and the peripheral device interface 403 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
[0242] The radio frequency circuit 404 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 404 communicates with communication networks and other communication devices via electromagnetic signals. The radio frequency circuit 404 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 404 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The radio frequency circuit 404 can communicate with other computer devices via at least one wireless communication protocol. Such wireless communication protocols include, but are not limited to, metropolitan area networks, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the radio frequency circuit 404 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.
[0243] Display screen 405 is used to display a user interface (UI). This UI may include graphics, text, icons, videos, or any combination thereof. When display screen 405 is a touchscreen display, it is also capable of collecting touch signals on or above the surface of display screen 405. These touch signals can be input as control signals to processor 401 for processing. In this case, display screen 405 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there can be a single display screen 405, located on the front panel of computer device 400. In other embodiments, there can be at least two display screens 405, located on different surfaces of computer device 400 or in a foldable design. In still other embodiments, display screen 405 can be a flexible display screen, located on a curved or foldable surface of computer device 400. Display screen 405 can also be configured as a non-rectangular, irregular shape, i.e., a special-shaped screen. Display screen 405 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0244] The camera assembly 406 is used to capture images or videos. Optionally, the camera assembly 406 includes a front camera and a rear camera. Typically, the front camera is set on the front panel of the computer device, and the rear camera is set on the back of the computer device. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 406 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation under different color temperatures.
[0245] The audio circuit 407 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals that are input into the processor 401 for processing, or input into the radio frequency circuit 404 to achieve voice communication. For the purpose of stereo sound collection or noise reduction, there can be multiple microphones, each located in different parts of the computer device 400. The microphone can also be an array microphone or an omnidirectional collection microphone. The speaker is used to convert the electrical signal from the processor 401 or the radio frequency circuit 404 into sound waves. The speaker can be a traditional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as distance measurement. In some embodiments, the audio circuit 407 may also include a headphone jack.
[0246] Positioning component 408 is used to locate the current geographic location of computer device 400 to implement navigation or LBS (Location Based Service). Positioning component 408 can be a positioning component based on the US GPS (Global Positioning System), China's BeiDou system, Russia's Greninja system, or the European Union's Galileo system.
[0247] Power supply 409 is used to power the various components of computer device 400. Power supply 409 can be AC power, DC power, disposable batteries, or rechargeable batteries. When power supply 409 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
[0248] In some embodiments, the computer device 400 further includes one or more sensors 410 , including but not limited to: an acceleration sensor 411 , a gyroscope sensor 412 , a pressure sensor 413 , a fingerprint sensor 414 , an optical sensor 415 , and a proximity sensor 416 .
[0249] Accelerometer 411 can detect the magnitude of acceleration along the three coordinate axes of the coordinate system established by computer device 400. For example, accelerometer 411 can be used to detect the components of gravity acceleration along the three coordinate axes. Processor 401 can control display screen 405 to display a user interface in either a landscape or portrait view based on the gravity acceleration signal collected by accelerometer 411. Accelerometer 411 can also be used to collect game or user motion data.
[0250] The gyroscope sensor 412 can detect the orientation and rotation angle of the computer device 400. It can also work with the accelerometer 411 to collect 3D motions of the user on the computer device 400. Based on the data collected by the gyroscope sensor 412, the processor 401 can implement the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.
[0251] The pressure sensor 413 can be installed on the side frame of the computer device 400 and / or below the display screen 405. When the pressure sensor 413 is installed on the side frame of the computer device 400, it can detect the user's grip signal of the computer device 400. The processor 401 can perform left and right hand recognition or shortcut operations based on the grip signal collected by the pressure sensor 413. When the pressure sensor 413 is installed below the display screen 405, the processor 401 controls the operational controls on the UI interface based on the user's pressure operation on the display screen 405. The operational controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0252] The fingerprint sensor 414 is used to collect the user's fingerprint. The processor 401 identifies the user's identity based on the fingerprint collected by the fingerprint sensor 414, or the fingerprint sensor 414 identifies the user's identity based on the collected fingerprint. When the user's identity is recognized as a trusted identity, the processor 401 authorizes the user to perform relevant sensitive operations, such as unlocking the screen, viewing encrypted information, downloading software, making payments, and changing settings. The fingerprint sensor 414 can be set on the front, back, or side of the computer device 400. When a physical button or manufacturer logo is set on the computer device 400, the fingerprint sensor 414 can be integrated with the physical button or manufacturer logo.
[0253] Optical sensor 415 is used to detect ambient light intensity. In one embodiment, processor 401 can control the display brightness of display screen 405 based on the ambient light intensity detected by optical sensor 415. Specifically, when the ambient light intensity is high, the display brightness of display screen 405 is increased; when the ambient light intensity is low, the display brightness of display screen 405 is decreased. In another embodiment, processor 401 can also dynamically adjust the shooting parameters of camera assembly 406 based on the ambient light intensity detected by optical sensor 415.
[0254] Proximity sensor 416, also known as a distance sensor, is typically located on the front panel of computer device 400. Proximity sensor 416 is used to detect the distance between the user and the front of computer device 400. In one embodiment, when proximity sensor 416 detects that the distance between the user and the front of computer device 400 is gradually decreasing, processor 401 controls display screen 405 to switch from the screen-on state to the screen-off state. When proximity sensor 416 detects that the distance between the user and the front of computer device 400 is gradually increasing, processor 401 controls display screen 405 to switch from the screen-off state to the screen-on state.
[0255] Those skilled in the art will understand that Figure 4 The structure shown in the figure does not constitute a limitation on the computer device 400, and the computer device 400 may include more or fewer components than shown in the figure, or combine some components, or adopt a different component arrangement.
[0256] In an exemplary embodiment, a computer-readable storage medium is further provided, wherein the computer-readable storage medium stores at least one instruction. The at least one instruction can be executed by a processor in a computer device to perform the coordinate conversion method in the above embodiment. For example, the computer-readable storage medium can be a ROM (Read-Only Memory), a RAM (Random Access Memory), a CD-ROM (Compact Disc Read-Only Memory), a magnetic tape, a floppy disk, an optical data storage device, or the like.
[0257] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.
[0258] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A coordinate conversion method, characterized in that: The method comprises: Acquire an initial coordinate set of the exploration object in an original coordinate system, wherein the initial coordinate set includes at least one initial coordinate, and each initial coordinate includes an initial abscissa and an initial ordinate; Performing translation processing on the initial coordinate set to obtain a first coordinate set with a reduced order of magnitude; Normalizing the first coordinate set to obtain a normalized coordinate set, and inputting the normalized coordinate set into an artificial neural network coordinate transformation model to obtain an output coordinate set; Performing inverse normalization processing on the output coordinate set to obtain an inverse normalized coordinate set; performing inverse coordinate difference processing on the inverse normalized coordinate set to obtain a second coordinate set; Determining a first angle difference; performing inverse rotation processing on each coordinate in the second coordinate set according to the first angle difference to obtain an inversely rotated coordinate set; Determining an inverse scaling coefficient; determining a ratio of each inversely rotated coordinate in the inversely rotated coordinate set to the inverse scaling coefficient to obtain an inversely scaled coordinate set; Determining an inverse translation parameter; determining the sum of each inverse scaled coordinate in the inverse scaled coordinate set and the inverse translation parameter to obtain a target coordinate set of the exploration object in the target coordinate system; Before obtaining the initial coordinate set of the exploration object in the original coordinate system, the method further includes: Acquire a sample input set and a sample output set, wherein the sample input set includes corresponding coordinates of the exploration object in the original coordinate system, and the sample output set includes corresponding coordinates of the exploration object in the target coordinate system; Performing translation processing on the sample input set and the sample output set to obtain a translation input coordinate set and a translation output coordinate set with reduced orders of magnitude; Scaling the translation output coordinate set to obtain a scaled output coordinate set; performing rotation processing on the scaled output coordinate set to obtain a rotated output coordinate set; Determine the difference between the rotation output coordinate set and the translation input coordinate set as a coordinate difference set; Normalizing the translation input coordinate set to obtain a training input coordinate set, and normalizing the coordinate difference set to obtain a training output coordinate set; Based on the training input coordinate set and the training output coordinate set, the initial neural network model is trained to obtain an artificial neural network coordinate transformation model.
2. The method according to claim 1, characterized in that The performing translation processing on the initial coordinate set to obtain a first coordinate set with a reduced order of magnitude includes: Determine translation parameters; Each initial coordinate in the initial coordinate set is translated according to the translation parameter to obtain a first coordinate set with a reduced order of magnitude.
3. The method according to claim 1, characterized in that Normalizing the first coordinate set to obtain a normalized coordinate set includes: Determine the normalization coefficient; The ratio of each coordinate in the first coordinate set to the normalization coefficient is determined as a normalized coordinate to obtain a normalized coordinate set.
4. The method according to claim 1, wherein The performing inverse normalization on the output coordinate set to obtain an inverse normalized coordinate set includes: Determine the inverse normalization coefficient; The product of each coordinate in the output coordinate set and the inverse normalization coefficient is determined to be the inverse normalized coordinate, to obtain the inverse normalized coordinate set.
5. The method according to claim 1, wherein The performing inverse coordinate difference processing on the inverse normalized coordinate set to obtain a second coordinate set includes: The inverse normalized coordinate set is added to the first coordinate set to obtain the second coordinate set.
6. A coordinate conversion device, characterized in that: The device comprises: An acquisition module, configured to acquire an initial coordinate set of the exploration object in an original coordinate system, wherein the initial coordinate set includes at least one initial coordinate, and each initial coordinate includes an initial horizontal coordinate and an initial vertical coordinate; A translation module, configured to perform translation processing on the initial coordinate set to obtain a first coordinate set with a reduced magnitude; a normalization module, configured to perform normalization processing on the first coordinate set to obtain a normalized coordinate set, and input the normalized coordinate set into an artificial neural network coordinate conversion model to obtain an output coordinate set; an inverse normalization module, configured to perform inverse normalization processing on the output coordinate set to obtain an inverse normalized coordinate set; an inverse coordinate difference module, configured to perform inverse coordinate difference processing on the inverse normalized coordinate set to obtain a second coordinate set; an inverse rotation module, configured to determine a first angle difference; and perform inverse rotation processing on each coordinate in the second coordinate set according to the first angle difference to obtain an inversely rotated coordinate set; an inverse scaling module, configured to determine an inverse scaling coefficient; determine a ratio of each inversely rotated coordinate in the inversely rotated coordinate set to the inverse scaling coefficient, and obtain an inversely scaled coordinate set; an inverse translation module, configured to determine an inverse translation parameter; determine the sum of each inverse scaled coordinate in the inverse scaled coordinate set and the inverse translation parameter to obtain a target coordinate set of the exploration object in the target coordinate system; The device further comprises: The acquisition module is further configured to acquire a sample input set and a sample output set, wherein the sample input set includes corresponding coordinates of the exploration object in the original coordinate system, and the sample output set includes corresponding coordinates of the exploration object in the target coordinate system; The translation module is further configured to perform translation processing on the sample input set and the sample output set to obtain a translation input coordinate set and a translation output coordinate set with reduced orders of magnitude; a scaling module, configured to perform scaling processing on the translation output coordinate set to obtain a scaled output coordinate set; a rotation module, configured to rotate the scaled output coordinate set to obtain a rotated output coordinate set; The coordinate difference set determining module is configured to determine a coordinate difference set between the rotation output coordinate set and the translation output coordinate set; The normalization module is further configured to perform normalization processing on the translation input coordinate set to obtain a training input coordinate set, and to perform normalization processing on the coordinate difference set to obtain a training output coordinate set; The training module is used to train the initial neural network model based on the training input coordinate set and the training output coordinate set to obtain an artificial neural network coordinate transformation model.
7. A computer device, characterized in that: The computer device comprises: A processor and a memory, wherein the memory stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the operations performed in the coordinate conversion method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores at least one program code, and the at least one program code is loaded and executed by a processor to implement the operations performed in the coordinate conversion method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Image distortion processing method based on coordinate transformation
CN109493274A
Bayesian regularization back propagation neural network coordinate conversion method and device
CN111598235A