Aerial image pixel point longitude and latitude calibration method and device, computer device and storage medium
By constructing a transformation model between aerial image pixel coordinates and GPS coordinates using the SIFT algorithm, the problem of lack of real-time capability in aerial modeling software during large-scale data processing is solved, and the effect of quickly obtaining real GPS coordinates is achieved.
Patent Information
- Application Number
- CN202210965164.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-12
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2042-08-12
AI Technical Summary
Existing aerial modeling software lacks real-time performance when processing large amounts of data, resulting in slow GPS acquisition speed for image pixels.
A pixel coordinate to GPS coordinate transformation model is constructed using the SIFT algorithm. By matching feature points and aligning orientations of two consecutive aerial images, the rotation angle and scaling ratio are calculated to establish the mapping relationship between pixel coordinates and GPS coordinates, thus quickly obtaining the real GPS coordinates.
This reduces computational load, shortens the time for acquiring GPS pixels in aerial images, and meets the need for real-time acquisition of GPS pixels in images.
Smart Images

Figure CN115457124B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a latitude and longitude calibration method, in particular to a method and device for calibrating latitude and longitude of pixels in aerial images, a computer device and a storage medium. BACKGROUND
[0002] Generally, aerial modeling is achieved by inputting aerial images into special modeling software, and then the modeling software generates a three-dimensional point cloud by matching feature points to obtain related points of all images. On the basis of the point cloud, the picture is distorted, and an outer layer of texture and color is added to the point cloud model. Thus, a three-dimensional aerial model is obtained, and then the latitude and longitude of each point is calculated based on the model.
[0003] The aerial modeling software needs to input a large number of images for matching and alignment, and a large number of image feature point comparison operations are required. Therefore, the processing speed and the number of images are closely related, and there is a lack of immediacy when processing a large amount of data.
[0004] Therefore, it is necessary to design a new method to reduce the amount of calculation and shorten the time required for obtaining GPS of aerial image pixels, so as to meet the demand for immediate acquisition of image pixel GPS. SUMMARY
[0005] The present application aims to overcome the defects of the prior art and provide a method and device for calibrating latitude and longitude of pixels in aerial images, a computer device and a storage medium.
[0006] To achieve the above-mentioned purpose, the present application adopts the following technical solution: a method for calibrating latitude and longitude of pixels in aerial images, comprising:
[0007] obtaining at least two consecutive aerial images;
[0008] constructing a pixel coordinate and GPS coordinate conversion model using SIFT algorithm and the two consecutive aerial images;
[0009] obtaining pixel coordinates;
[0010] inputting the pixel coordinates into the pixel coordinate and GPS coordinate conversion model to calculate real GPS coordinates, so as to obtain real GPS coordinates;
[0011] outputting the real GPS coordinates.
[0012] The further technical solution is that the pixel coordinate and GPS coordinate conversion model is constructed using SIFT algorithm and the two consecutive aerial images, comprising:
[0013] calculating a feature point set and a feature description vector set of the two consecutive aerial images using SIFT algorithm;
[0014] matching feature points in the feature point set and the feature description vector set of the two continuous aerial images to obtain a matching result;
[0015] aligning the two continuous aerial images according to the matching result;
[0016] calculating a GPS coordinate difference vector and a pixel difference vector of the two continuous aerial images after alignment according to the matching result;
[0017] calculating a rotation angle and a scaling ratio of the two continuous aerial images according to the GPS coordinate difference vector and the pixel difference vector of the two continuous aerial images after alignment;
[0018] recording the rotation angle, the scaling ratio, and a mapping relationship between the pixel difference vector and the pixel coordinate of the two continuous aerial images after alignment to obtain a pixel coordinate and GPS coordinate conversion model.
[0019] The further technical solution is that the SIFT algorithm is used to calculate the feature point set and the feature description vector set of the two continuous aerial images, including:
[0020] extracting feature points of the two continuous aerial images by using the SIFT algorithm, and determining feature point coordinates to obtain the feature point set of the two continuous aerial images;
[0021] determining a vector describing the feature points to obtain the feature description vector set of the two continuous aerial images.
[0022] The further technical solution is that the feature point set and the feature description vector set of the two continuous aerial images are matched to obtain a matching result, including:
[0023] matching the feature point set and the feature description vector set of the two continuous aerial images by using a KD-Tree to obtain a common feature point coordinate set, thereby forming the matching result.
[0024] The further technical solution is that the GPS coordinate difference vector and the pixel difference vector of the two continuous aerial images after alignment are calculated according to the matching result, including:
[0025] calculating a pixel coordinate difference of the common feature points in the matching result to obtain a pixel difference;
[0026] performing linear fitting on the pixel difference and the pixel coordinate of the corresponding common feature points as the X-axis and the Y-axis of the image to obtain a functional relationship between the pixel coordinate and the pixel difference;
[0027] calculating a translation difference of the two continuous aerial images when the pixel coordinate is the center of the image according to the functional relationship between the pixel coordinate and the pixel difference to obtain a pixel difference vector;
[0028] The GPS coordinate difference vector is obtained by calculating the difference between the GPS coordinates of the centers of the two aligned continuous aerial images.
[0029] The further technical solution is that the pixel coordinates are input into the pixel coordinate and GPS coordinate conversion model to calculate the real GPS coordinates, and the real GPS coordinates are obtained.
[0030] The pixel coordinates are input into the pixel coordinate and GPS coordinate conversion model to calculate the pixel difference corresponding to the pixel coordinates.
[0031] The GPS coordinate difference corresponding to the pixel coordinates is calculated according to the pixel difference.
[0032] The pixel GPS coordinates are calculated according to the GPS coordinate difference, and the real GPS coordinates are obtained.
[0033] The further technical solution is that the pixel coordinates are input into the pixel coordinate and GPS coordinate conversion model to calculate the pixel difference corresponding to the pixel coordinates, and the real GPS coordinates are obtained.
[0034] The pixel coordinates and the difference vector of the image center are calibrated by using the mapping relationship between the pixel difference vector and the pixel coordinates of the two continuous aerial images, so that the pixel difference corresponding to the pixel coordinates is obtained.
[0035] The further technical solution is that the pixel coordinates are input into the pixel coordinate and GPS coordinate conversion model to calculate the real GPS coordinates, and the real GPS coordinates are obtained.
[0036] The present application also provides an aerial image pixel point longitude and latitude calibration device, which comprises:
[0037] An image acquisition unit is configured to acquire at least two continuous aerial images.
[0038] A model construction unit is configured to construct a pixel coordinate and GPS coordinate conversion model by using a SIFT algorithm and the two continuous aerial images.
[0039] A pixel coordinate acquisition unit is configured to acquire pixel coordinates.
[0040] A GPS coordinate determination unit is configured to input the pixel coordinates into the pixel coordinate and GPS coordinate conversion model to calculate real GPS coordinates, so that the real GPS coordinates are obtained.
[0041] An output unit is configured to output the real GPS coordinates.
[0042] The application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the method described above when executing the computer program.
[0043] The application further provides a storage medium storing a computer program, wherein the computer program is executed by a processor to implement the method described above.
[0044] Compared with the prior art, the application has the beneficial effects that: the application quickly obtains the mapping relationship between the pixel coordinate system and the real GPS coordinate system in two images by modeling any two adjacent images, and quickly obtains the corresponding real GPS coordinates by inputting the pixel coordinates to be calibrated into the model, thereby reducing the operation amount, shortening the time required for obtaining the pixel GPS of the aerial image, and meeting the instant obtaining requirement of the image pixel GPS.
[0045] The application will be further described below in combination with the drawings and specific embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0046] In order to more clearly illustrate the technical solutions of the embodiments of the application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.
[0047] Figure 1 The application provides an application scenario diagram of the aerial image pixel point longitude and latitude calibration method;
[0048] Figure 2 The application provides a flowchart of the aerial image pixel point longitude and latitude calibration method;
[0049] Figure 3 The application provides a sub-flowchart of the aerial image pixel point longitude and latitude calibration method;
[0050] Figure 4 The application provides a sub-flowchart of the aerial image pixel point longitude and latitude calibration method;
[0051] Figure 5 The application provides a sub-flowchart of the aerial image pixel point longitude and latitude calibration method;
[0052] Figure 6 The application provides a sub-flowchart of the aerial image pixel point longitude and latitude calibration method;
[0053] Figure 7A sub-flow diagram of the aerial image pixel point longitude and latitude calibration method provided by the embodiment of the present application is shown in the figure;
[0054] Figure 8 A schematic block diagram of the aerial image pixel point longitude and latitude calibration device provided by the embodiment of the present application is shown in the figure;
[0055] Figure 9 A schematic block diagram of the model construction unit of the aerial image pixel point longitude and latitude calibration device provided by the embodiment of the present application is shown in the figure;
[0056] Figure 10 A schematic block diagram of the feature calculation sub-unit of the aerial image pixel point longitude and latitude calibration device provided by the embodiment of the present application is shown in the figure;
[0057] Figure 11 A schematic block diagram of the vector calculation sub-unit of the aerial image pixel point longitude and latitude calibration device provided by the embodiment of the present application is shown in the figure;
[0058] Figure 12 A schematic block diagram of the GPS coordinate determination unit of the aerial image pixel point longitude and latitude calibration device provided by the embodiment of the present application is shown in the figure;
[0059] Figure 13 A schematic block diagram of the first calculation sub-unit of the aerial image pixel point longitude and latitude calibration device provided by the embodiment of the present application is shown in the figure;
[0060] Figure 14 A schematic block diagram of the computer device provided by the embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0061] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0062] It should be understood that, when used in the specification and the appended claims, the terms “comprise” and “include” indicate the presence of described features, integers, steps, operations, elements, and / or components, but do not exclude one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0063] It should also be understood that the terms used in the present application specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the present application specification and the appended claims, unless otherwise clearly indicated by the context, the singular forms “a”, “an” and “the” are intended to include the plural forms.
[0064] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0065] Please see Figure 1 and Figure 2 , Figure 1 This is a schematic diagram illustrating an application scenario of the aerial image pixel latitude and longitude calibration method provided in this embodiment of the invention. Figure 2 This is a schematic flowchart illustrating the aerial image pixel latitude and longitude calibration method provided in this embodiment of the invention. This method is applied in a server. The server interacts with a terminal, acquiring two consecutive aerial images from the terminal. It then models any two adjacent images to quickly obtain the mapping relationship between the pixel coordinate systems in the two images and the actual GPS coordinate system. When pixel coordinates are input, the actual GPS coordinates can be quickly output, significantly improving computational efficiency and image requirements. This embodiment's method is used for GPS coordinate calibration of a pixel in continuous projection images such as aerial images, satellite images, and drone footage. The method requires continuous images (at least two, with some identical content captured in the two consecutive aerial images) and the actual GPS coordinates of the center pixel in each image. It then outputs the actual GPS coordinates of any pixel in the two consecutive aerial images. The final result depends on the accuracy of the given GPS coordinates, the degree of image distortion, and whether it is orthographic projection. In tests with DJI drones, the maximum error reached less than 15m.
[0066] Figure 2 This is a flowchart illustrating the aerial image pixel latitude and longitude calibration method provided in an embodiment of the present invention. Figure 2 As shown, the method includes the following steps S110 to S150.
[0067] S110: Acquire at least two consecutive aerial images.
[0068] In this embodiment, the two consecutive aerial images are input from the terminal and are two consecutive aerial images.
[0069] S120 uses the SIFT algorithm and two consecutive aerial images to construct a pixel coordinate to GPS coordinate transformation model.
[0070] In this embodiment, the pixel coordinate to GPS coordinate conversion model refers to the mapping relationship between the pixel coordinates of two consecutive aerial images and the actual GPS coordinates.
[0071] In one embodiment, please refer to Figure 3 The above-mentioned step S120 may include steps S121 to S126.
[0072] S121, using SIFT algorithm to calculate the feature point set and the feature description vector set of two continuous aerial images.
[0073] In this embodiment, the feature point set refers to a set composed of feature points and corresponding coordinates of two continuous aerial images.
[0074] The feature description vector set refers to a set composed of vectors describing feature points.
[0075] The SIFT algorithm can extract the feature point position of an image and the feature vector of the position. By comparing or aligning the feature points between two images, the parts (common feature points) describing the same object of the two images can be obtained, and the difference of the same object in the image pixel can be obtained. Meanwhile, the real GPS difference (displacement) of two continuous aerial images is known. Since it is an orthographic projection image, when the directions of the two images are the same, the real displacement of each pixel point is also consistent, and the real displacement of the image center can be regarded as the real displacement of the common feature point. Therefore, the real displacement and the image pixel displacement are known, and the conversion formula of the pixel coordinate system and the real GPS coordinate system can be derived by calculating the scaling ratio k and the rotation angle a.
[0076] In an embodiment, referring to Figure 4 The above step S121 can include steps S1211-S1212.
[0077] S1211, using SIFT algorithm to extract feature points of two continuous aerial images, and determining feature point coordinates to obtain a feature point set of two continuous aerial images;
[0078] S1212, determining vectors describing feature points to obtain a feature description vector set of two continuous aerial images.
[0079] Using SIFT algorithm to extract feature points to obtain feature point coordinates x1, x2 of two continuous aerial images; vectors y1, y2 describing feature points.
[0080] S122, performing feature point matching on the feature point set and the feature description vector set of the two continuous aerial images to obtain a matching result.
[0081] In this embodiment, the matching result refers to a coordinate set of common feature points.
[0082] Specifically, using KD-Tree to perform feature point matching on the feature point set and the feature description vector set of two continuous aerial images to obtain a common feature point coordinate set, forming a matching result.
[0083] The points describing the same object in the two continuous aerial images are classified to obtain a set of point pairs, such as Figure 1 point 1 of the first image, Figure 2 point 1 of the second image, Figure 1 point 2 of the first image, Figure 2 point 2 of the second image, and so on; the feature points y1 and y2 of the two images are matched, the feature points with close feature descriptions are defined as common feature points, and a set of common feature point coordinates {(x11, x21), (x12, x22),...} is obtained.
[0084] S123, aligning the orientations of the two continuous aerial images according to the matching result.
[0085] If there is an angle deflection in the shooting process of the two continuous aerial images, such as Figure 1 shooting towards the north, Figure 2 shooting towards the west, the orientations of the two continuous aerial images need to be unified.
[0086] When there is an angle deflection, the difference vector of point 2 and point 1 in the two images should be a fixed value, such as Figure 2 located Figure 1 in the south, then Figure 2 all the pixel coordinates of the points should be located Figure 1 one fixed value below, but when the camera orientations of shooting Figure 1 and Figure 2 are different, the difference vector will not be a fixed value, so it needs to be corrected first. The steps of correction are: the difference vector (between point 1 and point 2) of Figure 1 and the difference vector of Figure 2 are used to calculate the included angle and the scaling ratio (length ratio), and then the two images are rotated to the same camera angle by image scaling and rotation, and the rotation angle is the angle of the difference vector. At this time, the two continuous aerial images should only have the difference in translation, not the difference in rotation.
[0087] S124, calculating the GPS coordinate difference vector and the pixel difference vector of the two continuous aerial images after alignment according to the matching result.
[0088] In this embodiment, the GPS coordinate difference vector refers to the difference between the GPS coordinates of the centers of the two continuous aerial images after alignment, and the pixel difference vector refers to the translation difference of the two continuous aerial images when the pixel coordinates are the centers of the images.
[0089] The GPS coordinate difference vector and the pixel difference vector of the two continuous aerial images are calculated, where the pixel coordinate difference of all feature point pairs is calculated, and a first function relationship is fitted according to the pixel position and the pixel difference to obtain f(pixel position, pixel difference), and the translation difference of the two images when the pixel position is the image center, that is, the pixel difference vector, is calculated according to the function. The vector represents the pixel transformation difference between all points of the two images.
[0090] In an embodiment, referring to Figure 5 The step S124 described above can include steps S1241-S1244.
[0091] S1241, the pixel coordinates of the common feature points in the matching result are calculated to obtain the pixel difference.
[0092] In the embodiment, the pixel difference refers to the result of the pixel coordinate difference of the common feature points of the two continuous aerial images, and c1=x11-x21, c2=x12-x22, and so on are obtained.
[0093] S1242, a linear fitting is performed according to the pixel difference and the pixel coordinates of the corresponding common feature points as the X-axis and Y-axis of the image to obtain the function relationship between the pixel coordinates and the pixel difference.
[0094] In the embodiment, the function relationship between the pixel coordinates and the pixel difference is determined to prevent the interference of the non-orthographic projection oblique shooting on the image.
[0095] S1243, the translation difference of the two continuous aerial images when the pixel coordinates are the image center is calculated according to the function relationship between the pixel coordinates and the pixel difference to obtain the pixel difference vector.
[0096] S1244, the GPS coordinate difference of the centers of the two aligned continuous aerial images is calculated to obtain the GPS coordinate difference vector.
[0097] The GPS coordinates of the centers of the two aligned continuous aerial images are known and are subtracted to form the GPS coordinate difference vector.
[0098] The GPS coordinate difference vector of the two is calculated, that is, the GPS coordinates of the aerial vehicle at the time when the aerial image is known, which can be regarded as the GPS coordinates of the image center point when the vertical shooting is performed, and the GPS coordinates of the centers of the two continuous aerial images are subtracted.
[0099] S125, the rotation angle and the scaling ratio of the two are calculated according to the GPS coordinate difference vector and the pixel difference vector of the two aligned continuous aerial images.
[0100] In the embodiment, the rotation angle refers to the angle of the orientation of the two aligned continuous aerial images, and the scaling ratio refers to the size ratio of the two aligned continuous aerial images.
[0101] The rotation angle and the scaling ratio are conversion parameters of a real GPS coordinate system and a pixel coordinate system (a shooting direction).
[0102] S126, record the rotation angle, the scaling ratio, and a mapping relationship of the pixel difference vector and the pixel coordinate of the two aligned continuous aerial images, to obtain a pixel coordinate and GPS coordinate conversion model.
[0103] S130, obtain a pixel coordinate.
[0104] In the embodiment, the pixel coordinate refers to a coordinate corresponding to a pixel position to be calibrated.
[0105] S140, input the pixel coordinate into the pixel coordinate and GPS coordinate conversion model to calculate a real GPS coordinate, to obtain a real GPS coordinate.
[0106] In the embodiment, the real GPS coordinate refers to a GPS coordinate corresponding to the pixel coordinate.
[0107] In an embodiment, referring to Figure 6 The step S140 can include steps S141-S143.
[0108] S141, input the pixel coordinate into the pixel coordinate and GPS coordinate conversion model to calculate a pixel difference corresponding to the pixel coordinate.
[0109] In an embodiment, referring to Figure 7 The step S141 can include steps S1411-S1412.
[0110] S1411, input the pixel coordinate into the pixel coordinate and GPS coordinate conversion model to calculate a difference vector of the pixel coordinate and an image center;
[0111] S1412, calibrate the difference vector of the pixel coordinate and the image center and the pixel coordinate by using the mapping relationship of the pixel difference vector and the pixel coordinate of the two continuous aerial images, to obtain a pixel difference corresponding to the pixel coordinate.
[0112] Specifically, the pixel coordinate is brought into f (pixel position, pixel difference) to obtain two image pixel differences of the pixel position, and the pixel difference is subtracted from the image pixel difference to obtain a pixel difference vector error of the pixel position. The difference of the pixel coordinate and the pixel coordinate of the image center is calculated and added to the pixel difference vector error of the pixel position, to obtain the pixel difference.
[0113] S142, calculate a GPS coordinate difference corresponding to the pixel coordinate according to the pixel difference.
[0114] In the embodiment, the pixel difference vector is rotated and scaled according to the angle and scaling ratio of the GPS difference vector obtained by the pixel coordinate and GPS coordinate conversion model and the pixel difference vector, to obtain the GPS difference vector, i.e. the GPS coordinate difference.
[0115] S143, calculating the pixel GPS coordinate according to the GPS coordinate difference to obtain the real GPS coordinate.
[0116] In the embodiment, the real GPS coordinate of the pixel point is obtained by adding the GPS (provided by the aerial image) of the image center to the GPS difference vector.
[0117] S150, outputting the real GPS coordinate.
[0118] The aerial image pixel point longitude and latitude calibration method described above quickly obtains the mapping relationship between the pixel coordinate system and the real GPS coordinate system in two images by modeling any two adjacent images, and the corresponding real GPS coordinate can be quickly obtained by inputting the pixel coordinate to be calibrated into the model, so as to reduce the calculation amount, shorten the time required for obtaining the pixel GPS of the aerial image, and meet the real-time acquisition demand of the image pixel GPS.
[0119] Figure 8 is a schematic block diagram of an aerial image pixel point longitude and latitude calibration device 300 provided by an embodiment of the present application. As shown in Figure 8 Corresponding to the aerial image pixel point longitude and latitude calibration method described above, the present application further provides an aerial image pixel point longitude and latitude calibration device 300. The aerial image pixel point longitude and latitude calibration device 300 includes units for executing the aerial image pixel point longitude and latitude calibration method described above, and the device can be configured in a server. Specifically, referring to Figure 8 , the aerial image pixel point longitude and latitude calibration device 300 includes an image acquisition unit 301, a model construction unit 302, a pixel coordinate acquisition unit 303, a GPS coordinate determination unit 304, and an output unit 305.
[0120] The image acquisition unit 301 is configured to acquire at least two continuous aerial images; the model construction unit 302 is configured to construct a pixel coordinate and GPS coordinate conversion model by using the SIFT algorithm and the two continuous aerial images; the pixel coordinate acquisition unit 303 is configured to acquire the pixel coordinate; the GPS coordinate determination unit 304 is configured to input the pixel coordinate into the pixel coordinate and GPS coordinate conversion model to calculate the real GPS coordinate, so as to obtain the real GPS coordinate; and the output unit 305 is configured to output the real GPS coordinate.
[0121] In an embodiment, as Figure 9As shown, the model construction unit 302 comprises a feature calculation subunit 3021, a matching subunit 3022, an alignment subunit 3023, a vector calculation subunit 3024, a scale calculation subunit 3025, and a recording subunit 3026.
[0122] The feature calculation subunit 3021 is configured to calculate the feature point set and the feature description vector set of the two continuous aerial images by using the SIFT algorithm; the matching subunit 3022 is configured to perform feature point matching on the feature point set and the feature description vector set of the two continuous aerial images to obtain a matching result; the alignment subunit 3023 is configured to perform orientation alignment on the two continuous aerial images according to the matching result; the vector calculation subunit 3024 is configured to calculate the GPS coordinate difference vector and the pixel difference vector of the two continuous aerial images after alignment according to the matching result; the scale calculation subunit 3025 is configured to calculate the rotation angle and the scaling ratio of the GPS coordinate difference vector and the pixel difference vector of the two continuous aerial images after alignment; and the recording subunit 3026 is configured to record the rotation angle, the scaling ratio, and the mapping relationship between the pixel difference vector and the pixel coordinate of the two continuous aerial images after alignment to obtain the pixel coordinate and GPS coordinate conversion model.
[0123] In an embodiment, as shown in Figure 10 The feature calculation subunit 3021 comprises an extraction module 30211 and a vector determination module 30212.
[0124] The extraction module 30211 is configured to extract the feature points of the two continuous aerial images by using the SIFT algorithm and determine the feature point coordinates to obtain the feature point set of the two continuous aerial images; and the vector determination module 30212 is configured to determine the vector describing the feature points to obtain the feature description vector set of the two continuous aerial images.
[0125] In an embodiment, the matching subunit 3022 is configured to perform feature point matching on the feature point set and the feature description vector set of the two continuous aerial images by using the KD-Tree to obtain the common feature point coordinate set, thereby forming the matching result.
[0126] In an embodiment, as shown in Figure 11 The vector calculation subunit 3024 comprises a pixel difference calculation module 30241, a fitting module 30242, a translation difference calculation module 30243, and a coordinate difference calculation module 30244.
[0127] The pixel difference calculation module 30241 is configured to calculate a difference value of pixel coordinates of the common feature points in the matching result to obtain a pixel difference. The fitting module 30242 is configured to perform linear fitting according to the pixel difference and the pixel coordinates of the corresponding common feature points as an X-axis and a Y-axis of an image to obtain a functional relationship between the pixel coordinates and the pixel difference. The translation difference calculation module 30243 is configured to calculate a translation difference of two continuous aerial images when the pixel coordinates are at the center of the image according to the functional relationship between the pixel coordinates and the pixel difference to obtain a pixel difference vector. The coordinate difference calculation module 30244 is configured to calculate a difference value of GPS coordinates at the center of the two continuous aerial images after alignment to obtain a GPS coordinate difference vector.
[0128] In an embodiment, as shown in FIG. 3, the GPS coordinate determination unit 304 includes a first calculation sub-unit 3041, a second calculation sub-unit 3042, and a real coordinate calculation sub-unit 3043. Figure 12
[0129] The first calculation sub-unit 3041 is configured to input the pixel coordinates into a pixel coordinate and GPS coordinate conversion model to calculate a pixel difference corresponding to the pixel coordinates. The second calculation sub-unit 3042 is configured to calculate a GPS coordinate difference corresponding to the pixel coordinates according to the pixel difference. The real coordinate calculation sub-unit 3043 is configured to calculate a pixel GPS coordinate according to the GPS coordinate difference to obtain a real GPS coordinate.
[0130] In an embodiment, as shown in FIG. 3, the first calculation sub-unit 3041 includes a center difference calculation module 30411 and a calibration module 30412. Figure 13
[0131] The center difference calculation module 30411 is configured to input the pixel coordinates into a pixel coordinate and GPS coordinate conversion model to calculate a difference vector of the pixel coordinates and the center of the image. The calibration module 30412 is configured to calibrate the difference vector of the pixel coordinates and the center of the image and the pixel coordinates by using a mapping relationship between the pixel difference vector and the pixel coordinates of the two continuous aerial images to obtain a pixel difference corresponding to the pixel coordinates.
[0132] It should be noted that the specific implementation process of the aerial image pixel point longitude and latitude calibration device 300 and each unit can be clearly understood by those skilled in the art, which can be referred to the corresponding description in the foregoing method embodiments. For the convenience and brevity of description, it will not be described here.
[0133] The aerial image pixel point longitude and latitude calibration device 300 can be realized in the form of a computer program, which can run on a computer device as shown in FIG. 3. Figure 14
[0134] Please refer to Figure 14 , Figure 14 is a schematic block diagram of a computer device provided by an embodiment of the present application. The computer device 500 can be a server, wherein the server can be a standalone server or a server cluster composed of multiple servers.
[0135] Please refer to Figure 14 The computer device 500 includes a processor 502, a memory, and a network interface 505 connected through a system bus 501, wherein the memory can include a non-volatile storage medium 503 and an internal memory 504.
[0136] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions that, when executed, cause the processor 502 to perform a method for calibrating longitude and latitude of a pixel point of a aerial image.
[0137] The processor 502 is configured to provide computing and control capabilities to support the operation of the entire computer device 500.
[0138] The internal memory 504 provides an environment for the execution of the computer program 5032 in the non-volatile storage medium 503, which, when executed by the processor 502, causes the processor 502 to perform a method for calibrating longitude and latitude of a pixel point of a aerial image.
[0139] The network interface 505 is configured to perform network communication with other devices. Those skilled in the art can understand that Figure 14 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device 500 to which the scheme of the present application is applied. The specific computer device 500 can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0140] The processor 502 is configured to run the computer program 5032 stored in the memory to implement the following steps:
[0141] Obtain at least two consecutive aerial images; construct a pixel coordinate and GPS coordinate conversion model using a SIFT algorithm and the two consecutive aerial images; obtain a pixel coordinate; input the pixel coordinate into the pixel coordinate and GPS coordinate conversion model to calculate a real GPS coordinate to obtain the real GPS coordinate; and output the real GPS coordinate.
[0142] In an embodiment, the processor 502, when implementing the step of constructing a pixel coordinate and GPS coordinate conversion model using a SIFT algorithm and the two consecutive aerial images, specifically implements the following steps:
[0143] calculating a feature point set and a feature description vector set of two continuous aerial images by using a SIFT algorithm; performing feature point matching on the feature point set and the feature description vector set of the two continuous aerial images to obtain a matching result; aligning the orientations of the two continuous aerial images according to the matching result; calculating a GPS coordinate difference vector and a pixel difference vector of the two continuous aerial images after alignment according to the matching result; calculating a rotation angle and a scaling ratio of the two continuous aerial images after alignment according to the GPS coordinate difference vector and the pixel difference vector; and recording the rotation angle, the scaling ratio, and a mapping relationship between the pixel difference vector and the pixel coordinates of the two continuous aerial images after alignment to obtain a pixel coordinate and GPS coordinate conversion model.
[0144] In an embodiment, the processor 502, when implementing the step of calculating a feature point set and a feature description vector set of two continuous aerial images by using a SIFT algorithm, specifically implements the following steps:
[0145] extracting feature points of two continuous aerial images by using a SIFT algorithm, and determining feature point coordinates to obtain a feature point set of the two continuous aerial images; and determining a vector describing the feature points to obtain a feature description vector set of the two continuous aerial images.
[0146] In an embodiment, the processor 502, when implementing the step of performing feature point matching on the feature point set and the feature description vector set of the two continuous aerial images to obtain a matching result, specifically implements the following steps:
[0147] performing feature point matching on the feature point set and the feature description vector set of the two continuous aerial images by using a KD-Tree to obtain a common feature point coordinate set, thereby forming a matching result.
[0148] In an embodiment, the processor 502, when implementing the step of calculating a GPS coordinate difference vector and a pixel difference vector of the two continuous aerial images after alignment according to the matching result, specifically implements the following steps:
[0149] calculating a pixel difference by calculating a difference value of pixel coordinates of common feature points in the matching result; performing linear fitting on the pixel difference and the pixel coordinates of the corresponding common feature points as the X-axis and Y-axis of the image to obtain a functional relationship between the pixel coordinates and the pixel difference; calculating a translation difference of the two continuous aerial images when the pixel coordinates are at the center of the image according to the functional relationship between the pixel coordinates and the pixel difference to obtain a pixel difference vector; and calculating a difference value of GPS coordinates of the centers of the two continuous aerial images after alignment to obtain a GPS coordinate difference vector.
[0150] In an embodiment, the processor 502, when implementing the step of inputting the pixel coordinates into the pixel coordinate and GPS coordinate conversion model to calculate the pixel difference corresponding to the pixel coordinates, implements the following steps:
[0151] inputting the pixel coordinates into the pixel coordinate and GPS coordinate conversion model to calculate the pixel difference corresponding to the pixel coordinates; calculating the GPS coordinate difference corresponding to the pixel coordinates according to the pixel difference; and calculating the pixel GPS coordinates according to the GPS coordinate difference to obtain the real GPS coordinates.
[0152] In an embodiment, the processor 502, when implementing the step of inputting the pixel coordinates into the pixel coordinate and GPS coordinate conversion model to calculate the pixel difference corresponding to the pixel coordinates, implements the following steps:
[0153] inputting the pixel coordinates into the pixel coordinate and GPS coordinate conversion model to calculate the difference vector between the pixel coordinates and the image center; and calibrating the difference vector between the pixel coordinates and the image center and the pixel coordinates according to the mapping relationship between the pixel difference vector and the pixel coordinates of two continuous aerial images to obtain the pixel difference corresponding to the pixel coordinates.
[0154] It should be understood that, in the embodiments of the present application, the processor 502 can be a central processing unit (CPU), and the processor 502 can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0155] It can be understood by those skilled in the art that all or part of the processes in the method of the above-mentioned embodiments can be completed by a computer program instructing related hardware. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the above-mentioned embodiments of the method.
[0156] Therefore, the present application further provides a storage medium. The storage medium can be a computer readable storage medium. The storage medium stores a computer program, wherein the computer program is executed by a processor to make the processor perform the following steps:
[0157] obtaining at least two continuous aerial images; constructing a pixel coordinate and GPS coordinate conversion model by using a SIFT algorithm and the two continuous aerial images; obtaining a pixel coordinate; inputting the pixel coordinate into the pixel coordinate and GPS coordinate conversion model to calculate a real GPS coordinate, so as to obtain the real GPS coordinate; and outputting the real GPS coordinate.
[0158] In an embodiment, when the processor executes the computer program to implement the step of constructing the pixel coordinate and GPS coordinate conversion model by using the SIFT algorithm and the two continuous aerial images, the processor specifically implements the following steps:
[0159] calculating a feature point set and a feature description vector set of the two continuous aerial images by using the SIFT algorithm; performing feature point matching on the feature point set and the feature description vector set of the two continuous aerial images to obtain a matching result; performing orientation alignment on the two continuous aerial images according to the matching result; calculating a GPS coordinate difference vector and a pixel difference vector of the two continuous aerial images after alignment according to the matching result; calculating a rotation angle and a scaling ratio of the two continuous aerial images after alignment according to the GPS coordinate difference vector and the pixel difference vector; and recording the rotation angle, the scaling ratio, and a mapping relationship between the pixel difference vector and the pixel coordinate of the two continuous aerial images after alignment, so as to obtain the pixel coordinate and GPS coordinate conversion model.
[0160] In an embodiment, when the processor executes the computer program to implement the step of calculating the feature point set and the feature description vector set of the two continuous aerial images by using the SIFT algorithm, the processor specifically implements the following steps:
[0161] extracting feature points of the two continuous aerial images by using the SIFT algorithm, and determining feature point coordinates, so as to obtain the feature point set of the two continuous aerial images; and determining a vector for describing the feature points, so as to obtain the feature description vector set of the two continuous aerial images.
[0162] In an embodiment, when the processor executes the computer program to implement the step of performing feature point matching on the feature point set and the feature description vector set of the two continuous aerial images to obtain a matching result, the processor specifically implements the following steps:
[0163] performing feature point matching on the feature point set and the feature description vector set of the two continuous aerial images by using a KD-Tree, so as to obtain a common feature point coordinate set and form the matching result.
[0164] In an embodiment, the processor, when executing the computer program to implement the step of calculating the GPS coordinate difference vector and the pixel difference vector of the two aligned continuous aerial images according to the matching result, implements the following steps:
[0165] calculating the pixel coordinate difference of the common feature points in the matching result to obtain the pixel difference; performing linear fitting according to the pixel difference and the pixel coordinates of the corresponding common feature points as the X-axis and Y-axis of the image to obtain the functional relationship between the pixel coordinates and the pixel difference; calculating the translation difference of the two continuous aerial images when the pixel coordinates are the center of the image according to the functional relationship between the pixel coordinates and the pixel difference to obtain the pixel difference vector; and calculating the GPS coordinate difference vector by calculating the difference of the GPS coordinates of the centers of the two aligned continuous aerial images.
[0166] In an embodiment, the processor, when executing the computer program to implement the step of inputting the pixel coordinates into the pixel coordinate and GPS coordinate conversion model to calculate the real GPS coordinates, implements the following steps:
[0167] inputting the pixel coordinates into the pixel coordinate and GPS coordinate conversion model to calculate the pixel difference corresponding to the pixel coordinates; calculating the GPS coordinate difference corresponding to the pixel coordinates according to the pixel difference; and calculating the pixel GPS coordinates according to the GPS coordinate difference to obtain the real GPS coordinates.
[0168] In an embodiment, the processor, when executing the computer program to implement the step of inputting the pixel coordinates into the pixel coordinate and GPS coordinate conversion model to calculate the pixel difference corresponding to the pixel coordinates, implements the following steps:
[0169] inputting the pixel coordinates into the pixel coordinate and GPS coordinate conversion model to calculate the difference vector of the pixel coordinates and the center of the image; and calibrating the difference vector of the pixel coordinates and the center of the image and the pixel coordinates by using the mapping relationship between the pixel difference vector and the pixel coordinates of the two continuous aerial images to obtain the pixel difference corresponding to the pixel coordinates.
[0170] The storage medium can be a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk, and various computer readable storage media that can store program codes.
[0171] Those skilled in the art can understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been described in general terms in the above description. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0172] In several embodiments provided by the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. For example, the apparatus embodiments described above are merely schematic. For example, the division of each unit is only a logical function division, and actual implementation can have another division manner. For example, a plurality of units or components can be combined or integrated into another system, or some features can be omitted or not executed.
[0173] The steps in the method embodiments of the present application can be adjusted, combined and deleted in sequence according to actual needs. The units in the apparatus embodiments of the present application can be combined, divided and deleted according to actual needs. In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit.
[0174] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art, or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, a terminal or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application.
[0175] The above description is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed by the present application, and these modifications or replacements should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for calibrating the latitude and longitude of pixels in aerial images, characterized in that, include: Acquire at least two consecutive aerial images; A pixel coordinate to GPS coordinate transformation model was constructed using the SIFT algorithm and two consecutive aerial images. Get pixel coordinates; The pixel coordinates are input into the pixel coordinate to GPS coordinate conversion model to calculate the real GPS coordinates. Output the actual GPS coordinates; The method of constructing a pixel coordinate to GPS coordinate transformation model using the SIFT algorithm and two consecutive aerial images includes: The SIFT algorithm is used to calculate the feature point set and feature description vector set of two consecutive aerial images; Feature point matching is performed on the feature point set and feature description vector set of two consecutive aerial images to obtain the matching result; The orientation of the two consecutive aerial images is aligned based on the matching results. The GPS coordinate difference vector and pixel difference vector of the two consecutive aerial images after alignment are calculated based on the matching results. The rotation angle and scaling ratio of the two consecutive aerial images are calculated based on the GPS coordinate difference vector and pixel difference vector of the aligned images. Record the rotation angle, scaling ratio, and the mapping relationship between the pixel difference vector and pixel coordinates of the two consecutive aerial images after alignment, so as to obtain the pixel coordinate to GPS coordinate conversion model.
2. The aerial image pixel latitude and longitude calibration method according to claim 1, characterized in that, The step of using the SIFT algorithm to calculate the feature point set and feature description vector set of two consecutive aerial images includes: The SIFT algorithm is used to extract feature points from two consecutive aerial images and determine the coordinates of the feature points to obtain the feature point set of the two consecutive aerial images. Determine the vectors describing the feature points to obtain the feature description vector set of two consecutive aerial images.
3. The aerial image pixel latitude and longitude calibration method according to claim 1, characterized in that, The process of performing feature point matching on the feature point set and feature description vector set of two consecutive aerial images to obtain the matching result includes: KD-Tree is used to perform feature point matching on the feature point set and feature description vector set of two consecutive aerial images to obtain the set of coordinates of common feature points, thus forming the matching result.
4. The aerial image pixel latitude and longitude calibration method according to claim 1, characterized in that, The step of calculating the GPS coordinate difference vector and pixel difference vector of the aligned two consecutive aerial images based on the matching result includes: The pixel difference is obtained by calculating the difference between the pixel coordinates of the common feature points in the matching results. Based on the pixel difference and the pixel coordinates of the corresponding common feature points as the X and Y axes of the image, a straight line fit is performed to obtain the functional relationship between the pixel coordinates and the pixel difference. The translation difference between two consecutive aerial images with pixel coordinates as the image center is calculated based on the functional relationship between pixel coordinates and pixel difference, so as to obtain the pixel difference vector; The GPS coordinate difference vector is obtained by calculating the difference between the centers of the two aligned consecutive aerial images.
5. The aerial image pixel latitude and longitude calibration method according to claim 1, characterized in that, The step of inputting the pixel coordinates into the pixel coordinate to GPS coordinate conversion model to calculate the real GPS coordinates includes: The pixel coordinates are input into the pixel coordinate to GPS coordinate conversion model to calculate the pixel difference corresponding to the pixel coordinates. Calculate the GPS coordinate difference corresponding to the pixel coordinates based on the pixel difference; The pixel GPS coordinates are calculated based on the GPS coordinate difference to obtain the true GPS coordinates.
6. The aerial image pixel latitude and longitude calibration method according to claim 5, characterized in that, The step of inputting the pixel coordinates into the pixel coordinate to GPS coordinate conversion model and calculating the pixel difference corresponding to the pixel coordinates includes: The pixel coordinates are input into the pixel coordinate to GPS coordinate conversion model to calculate the difference vector between the pixel coordinates and the image center. The pixel difference vector and pixel coordinates of two consecutive aerial images are used to calibrate the difference vector between the pixel coordinates and the image center, as well as the pixel coordinates themselves, in order to obtain the pixel difference corresponding to the pixel coordinates.
7. An aerial image pixel latitude and longitude calibration device, characterized in that, include: The image acquisition unit is used to acquire at least two consecutive aerial images; The model building unit is used to construct a pixel coordinate to GPS coordinate transformation model using the SIFT algorithm and two consecutive aerial images; Pixel coordinate acquisition unit, used to acquire pixel coordinates; The GPS coordinate determination unit is used to input the pixel coordinates into the pixel coordinate to GPS coordinate conversion model to calculate the real GPS coordinates and obtain the real GPS coordinates. The output unit is used to output the actual GPS coordinates.
8. A computer device, characterized in that, The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method as described in any one of claims 1 to 6.
9. A storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Method and system for calculating correspondence relationship between pixel of aerial image and GPS
CN108320309A
Splicing method for aerial images of power transmission line unmanned aerial vehicle
CN114663789A