A terrain surveying and mapping method based on aerial surveying and mapping technology

By pre-training the YOLOv5 model and multi-feature fusion recognition model, combined with area network adjustment and beam method adjustment, the problem of low ground control point identification and matching accuracy in aerial surveying and mapping is solved, and high-precision aerial image spatial positioning and three-dimensional positioning are achieved. Reconstruction improves the efficiency of surveying and mapping and the reliability of results.

CN118640878BActive Publication Date: 2024-10-22NANCHANG HANGKONG UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411124456.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-16
Publication Date
2024-10-22
Estimated Expiration
2044-08-16

AI Technical Summary

Technical Problem

The identification and matching accuracy of ground control points in existing aerial surveying and mapping is low and is easily affected by factors such as angle and lighting, resulting in matching failure or mismatching.

Method used

The pre-trained YOLOv5 target detection model is combined with the image pyramid and sliding window strategies to automatically identify and locate ground control points, and through a multi-feature fusion control point recognition model, the matching relationship between ground control points in different aerial images is constructed. Combined with area network adjustment and beam method adjustment, the spatial position and attitude angle of the image are solved, and a high-precision three-dimensional point cloud and digital elevation model are generated.

Benefits of technology

It improves the matching accuracy and robustness of ground control points, achieves high-precision spatial positioning and three-dimensional reconstruction of aerial images, and enhances the reliability and efficiency of surveying and mapping results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118640878B_ABST
    Figure CN118640878B_ABST
Patent Text Reader

Abstract

The present application discloses a terrain surveying method based on aerial surveying technology, which relates to the field of aerial surveying, including: obtaining an aerial image data set of a survey area; setting N ground control points (GCPs) in the survey area, and measuring the three-dimensional coordinates of each ground control point (GCP) using the GPS‑RTK method; using a pre-trained YOLOv5 target detection model to detect and locate the GCP on each aerial image through targets; obtaining the pixel coordinates of the GCP on the corresponding aerial image; constructing a control point recognition model of multi-feature fusion according to the pixel coordinates of the GCP on all aerial images; solving the spatial position and attitude angle of each aerial image through regional network adjustment and bundle adjustment; generating a digital surface model (DSM) of the survey area through a multi-view image dense matching algorithm; generating a digital elevation model (DEM) and an orthophoto map of the survey area through a terrain surface reconstruction algorithm and an orthorectification method. In view of the low matching accuracy of ground control points in aerial surveying in the prior art, the present application improves the matching accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of aerial surveying and mapping, and in particular to a terrain surveying and mapping method based on aerial surveying and mapping technology. Background Art

[0002] With the development of modern surveying and mapping technology, aerial photogrammetry has become an important means of obtaining topographic spatial information. Aerial photogrammetry uses drones or aircraft equipped with aerial photographic instruments to image the ground, obtain high-resolution aerial image data, and use photogrammetry principles and computer vision technology to achieve three-dimensional modeling and topographic mapping of the survey area. Compared with traditional ground measurement methods, aerial photogrammetry has the advantages of high operating efficiency, low cost, and short data acquisition cycle. It has been widely used in topographic map production, engineering construction, land and resources surveys, disaster monitoring and other fields.

[0003] However, in the practical application of aerial photogrammetry, there are still some technical problems that need to be solved urgently. Among them, the identification and matching of ground control points is a key link that affects the accuracy and efficiency of aerial surveying and mapping. Ground control points are a set of high-precision control points arranged in the survey area, and their accurate three-dimensional coordinates are obtained through the global positioning system (GPS) or other geodetic methods. In the process of aerial triangulation and image space positioning, ground control points play the role of controlling the benchmark and correcting image distortion. Their accurate identification and reliable matching directly affect the accuracy of the final surveying and mapping results.

[0004] At present, the recognition and matching of ground control points mainly adopts a semi-automatic method with manual assistance. That is, the approximate position of the control point is manually marked on the aerial image, and then the feature matching algorithm is used to accurately match it in a local range. Although this method can realize the recognition and matching of control points, the feature matching algorithm is sensitive to the appearance changes of the control points and is easily affected by factors such as angle and lighting, resulting in matching failure or mismatch. Summary of the invention

[0005] In response to the problem of low recognition and matching accuracy of ground control points in aerial surveying in the prior art, the present application provides a terrain surveying method based on aerial surveying technology, which improves the matching accuracy of control points in aerial surveying through control point extraction and matching, image space positioning and three-dimensional reconstruction.

[0006] The purpose of this application is achieved through the following technical solutions.

[0007] The present application provides a terrain surveying method based on aerial surveying technology, including: using a drone to perform oblique photography of a survey area to obtain an aerial image data set of the survey area; preprocessing the obtained aerial image data set; the preprocessing includes distortion correction and color balance; setting N ground control points GCP in the survey area, using the GPS-RTK method to measure the three-dimensional coordinates of each ground control point GCP, and establishing a ground control network of the survey area; using the preprocessed aerial image data set as input, using a pre-trained YOLOv5 target detection model, through target detection and positioning the ground control point GCP on each aerial image; performing edge detection and corner point positioning on the area where the ground control point GCP is detected on the aerial image, and obtaining the pixel coordinates of the ground control point GCP in the corresponding aerial image; extracting the multi-scale features of the ground control point according to the pixel coordinates of each ground control point GCP on all aerial images, and constructing a control network with multi-feature fusion. The point recognition model is used to determine the matching relationship between each ground control point in different aerial images; wherein the multi-scale features include color, shape and texture; the three-dimensional coordinates of each ground control point GCP, the pixel coordinates of each ground control point on the aerial image, and the matching relationship between each ground control point in the aerial images are obtained as observation values, and the spatial position and attitude angle of each aerial image are solved through regional network adjustment and bundle adjustment; S8, using the solved spatial position and attitude angle of each aerial image, the pre-processed aerial image data set is matched through a multi-view image dense matching algorithm to generate three-dimensional point cloud data of the survey area, and a digital surface model DSM of the survey area is generated through point cloud filtering and gridding processing; for the generated digital surface model DSM, non-ground points are eliminated through a terrain surface reconstruction algorithm and an orthorectification method, and a digital elevation model DEM and an orthophoto map of the survey area are generated as output as terrain surveying and mapping results.

[0008] Among them, oblique photography: a method of aerial photography, by carrying cameras with multiple oblique angles on aircraft, imaging the ground from different angles, and obtaining oblique image data of the survey area. Oblique photography can capture the side information of objects more comprehensively, which is conducive to three-dimensional modeling and texture mapping. Aerial image: image data obtained by vertically or obliquely shooting the ground using aerial cameras carried by aircraft. Aerial images are an important data source in the field of surveying and mapping, and are widely used in map making, object recognition, three-dimensional reconstruction, etc. Ground control points GCP: a group of high-precision control points arranged in the survey area, whose three-dimensional coordinates are obtained by GPS and other measurement methods. Ground control points serve as a link between the image and the ground. In aerial photogrammetry, they are used to provide benchmark control and realize the spatial positioning of the image.

[0009] PS-RTK method: GPS real-time dynamic differential technology, through the cooperation of base stations and mobile stations, to achieve centimeter-level real-time positioning. In aerial surveying and mapping, GPS-RTK is often used to quickly obtain the three-dimensional coordinates of ground control points. Pre-trained YOLOv5 target detection model: YOLO (You Only Look Once) is a real-time target detection algorithm based on deep learning, which can quickly detect and locate multiple targets in an image. The pre-trained YOLOv5 model is a general target detection model trained on a large-scale data set, which can be used for automatic identification of ground control points in aerial images. Pixel coordinates of aerial images: The pixel position coordinates corresponding to ground control points on aerial images, usually expressed in (x, y) form. The pixel coordinates of control points are important observations for image spatial positioning and three-dimensional reconstruction. Block adjustment: A photogrammetric adjustment method that simultaneously adjusts multiple images by establishing collinear equations between image point coordinates, control point coordinates and exterior orientation elements, and solves the image's attitude and position parameters to achieve image stitching and positioning. Bundle adjustment: A rigorous adjustment method based on collinear equations. It uses observation values ​​such as image point coordinates and control point coordinates to solve the exterior orientation elements and object point coordinates of the image through iterative solution, thereby achieving high-precision spatial positioning of the image. Multi-view image dense matching algorithm: Using the overlapping relationship of multi-view images, stereo matching technology is used to automatically identify and match the same-name points between images to generate dense three-dimensional point cloud data. Common dense matching algorithms include SIFT, SURF, SGM, etc. Terrain surface reconstruction algorithm: Extract ground points from scattered three-dimensional point cloud data and reconstruct a continuous terrain surface. Common terrain surface reconstruction algorithms include TIN, ANUDEM, Kriging interpolation, etc. Orthorectification method: Eliminate the geometric distortion of aerial images caused by sensor tilt and terrain undulations to generate orthophoto images. Orthorectification requires the use of digital elevation model DEM and the exterior orientation elements of the image, through geometric transformation and grayscale resampling.

[0010] Among them, in oblique photogrammetry, the same ground control point will appear on multiple aerial images at different angles and locations. In order to perform image spatial positioning and three-dimensional reconstruction, it is necessary to match the coordinates of each control point on different images and establish the correspondence between the control points between images. The multi-feature fusion control point recognition model constructed is to achieve this goal. It may be difficult to accurately identify and match control points on different images relying solely on the geometric coordinate information of the control points, because differences in perspective, scale, lighting, etc. between images will cause changes in the appearance of the control points. Fusion of multi-scale features of control points (such as color, shape, texture, etc.) can provide more discriminant information and improve the accuracy and robustness of control point recognition and matching.

[0011] Among them, the center coordinates of the detected control point area are accurately extracted through sub-pixel edge extraction and corner point positioning algorithms. This step obtains the high-precision measured coordinates of the control point on the image, which can be regarded as the "final coordinates" of the control point on a single image. Automatic recognition and accurate matching of control points on all aerial images are achieved. "All aerial images" here refer to the oblique photography image set of the survey area, and each control point may appear on multiple images at different angles. The constructed multi-feature fusion recognition model is used to match the same control point between different images and establish the correspondence between control points between images. The high-precision coordinates of the control point on each image have been obtained, and there is no need to recalculate the coordinates. It is only necessary to establish the correspondence between these coordinates between different images. Specifically, the high-precision three-dimensional coordinates of the control point in the survey area coordinate system obtained by technologies such as GPS-RTK reflect the real position of the control point on the ground. Through the multi-feature fusion recognition model, the correspondence between the same control point on different images is established. This information associates the measured coordinates of the control points on different images, providing a basis for joint adjustment. The high-precision coordinates of the control point in the image coordinate system reflect the precise position of the control point on each image. The purpose of block adjustment and bundle adjustment is to establish the conversion relationship between the image coordinate system and the survey area coordinate system, and to solve the exterior orientation element parameters of each image (including the spatial position and attitude angle elements of the image). This process requires the above three elements as observation values, constructs the adjustment equation group, and obtains the optimal parameter estimation value through iterative calculation.

[0012] Furthermore, a ground control network is established for the survey area, including: determining the number N and distribution locations of ground control points (GCPs) according to the area and terrain of the survey area. ;in, Represents the initial spatial position of the i-th ground control point; at each initial spatial position Set the ground control point mark at the i-th ground control point, and use the GPS-RTK receiver to perform static measurement and record the measured 3D coordinates of the i-th ground control point ; Measure the 3D coordinates of all ground control points As the observation value; construct the observation equation, use the known control point data as the constraint condition, use the least squares adjustment method to adjust the observation equation and obtain the three-dimensional coordinates of each ground control point ; The adjustment solution adjusts the weight factor of the observation value through iterative calculation until the adjustment result converges to the optimal value. The three-dimensional coordinates of the high-precision ground control points obtained by the adjustment solution Based on the preset spatial topology rules, the ground control points are connected into a network to construct a high-precision three-dimensional control network covering the entire survey area. The high precision of the control network is reflected in the fact that the relative position accuracy between adjacent control points is better than the preset threshold ΔP, and the absolute positioning accuracy of the entire control network and the global coordinate system is better than the preset threshold ΔA. Through this control network, high-precision spatial positioning of aerial images and high-precision generation of subsequent three-dimensional models can be achieved.

[0013] Furthermore, the preprocessed aerial image dataset is used as input, and the pretrained YOLOv5 target detection model is used to perform target detection and locate the ground control points (GCPs) on each aerial image, including: dividing the preprocessed aerial image dataset into a training set and a validation set, and annotating each aerial image in the training set to obtain pixel-level annotation data of the ground control points; using the annotated training set data, fine-tuning the pretrained YOLOv5 target detection model through a transfer learning method to obtain an optimized model suitable for ground control point detection; the model training process is optimized by setting hyperparameters such as learning rate, batch size, and number of iterations, and the validation set data is used to evaluate and select the model performance; each preprocessed aerial image to be processed is used as input, and the target detection model is used to obtain the detection results of the ground control points on each image through a forward reasoning process, and the detection results include the pixel coordinates of the ground control points. and confidence ; Where i represents the i-th ground control point detected; During the inference process, the image pyramid and sliding window strategy are set.

[0014] Preferably, according to a preset confidence threshold , filter and merge the test results, and remove those with confidence lower than The detection results of the ground control points on each aerial image are obtained by merging the detection frames with overlap higher than the preset threshold, and the final detection results are recorded as ; Where M represents the number of ground control points finally detected; When merging detection frames, the following strategies are adopted to improve the accuracy and uniqueness of the detection results: Adaptive non-maximum suppression (Adaptive NMS) algorithm is introduced to dynamically adjust the merging strategy according to the confidence and overlap of the detection frame; Specifically, by setting the confidence threshold and overlap threshold , adaptively filter and merge the detection frames, with a confidence level higher than And the overlap is less than The detection frames with overlapped area are retained, and the rest are removed. Based on the Adaptive NMS algorithm, a weighted voting mechanism is introduced to further optimize the merged detection frames. Specifically, for each retained detection frame, a weight coefficient is calculated according to its confidence and area size, and then all the detection frames with overlapped area higher than The detection frames of the merged frames are weighted averaged to obtain the final position and confidence of the merged detection frame. In the process of weighted voting, the spatial relative position relationship between the detection frames is fully considered, and spatial constraints are introduced to eliminate or penalize the merged results that do not meet the spatial constraints.

[0015] Specifically, according to the prior distribution characteristics of the ground control points, the minimum spacing threshold is set and the maximum spacing threshold , calculate the Euclidean distance between the merged detection frames, and remove the distance less than or greater than detection box pairs; for the remaining detection boxes, a graph-based optimization method is used to perform global adjustment and optimization according to their confidence and spatial distribution characteristics; specifically, the detection boxes are regarded as nodes of the graph, and the spatial relationships between the detection boxes are regarded as edges of the graph. A detection box relationship graph is constructed, and then the graph is optimized by the maximum clique algorithm or the minimum cut algorithm to obtain the final ground control point detection result.

[0016] Furthermore, in the inference process, the image pyramid and sliding window strategies are set, including: constructing a multi-scale image pyramid, downsampling and upsampling the input aerial image by setting different scaling factors, generating multiple image scales with different resolutions, and performing target detection at each scale; on the aerial image of each scale, the size of the sliding window is set to , where w and h are the width and height of the window respectively; set the horizontal and vertical sliding steps of the sliding window to and ,in, , ;by and With step length, slide the window from left to right and from top to bottom on the image to obtain a series of overlapping candidate regions; input each candidate region into the target detection model, and calculate the confidence that the candidate region contains the ground control point through forward reasoning. and location coordinates , get the preliminary detection result of the sliding window on the corresponding scale image;

[0017] Furthermore, in the inference process, an image pyramid and a sliding window strategy are set, and the method also includes: in the inference process, an image pyramid and a sliding window strategy are set, and the method also includes: while performing sliding window detection, a candidate region generation mechanism based on a region proposal network RPN is introduced into the target detection model; a series of rectangular candidate frames are generated through the RPN network using the preset ground control point prior features, and each candidate frame is represented by It indicates that, is the center coordinate of the candidate box, w and h are the width and height of the candidate box respectively; the RPN network extracts input features through a convolutional neural network and predicts the probability that the candidate box contains a ground control point through two parallel fully connected layers And the correction amount of the candidate box position coordinates ; Get probability Candidate boxes above the threshold are corrected with the position coordinates Adjust the position and size of the obtained candidate box to obtain the RPN preliminary detection box on the corresponding scale image; calculate the similarity between the sliding window candidate area and the RPN candidate box and the preset ground control point prior features to obtain the corresponding attention weight and ; For the i-th sliding window candidate area, the confidence Multiply by the corresponding , and obtain the weighted confidence ; For the i-th RPN candidate box, the probability Multiply by the corresponding , and obtain the weighted probability value ; Set the confidence threshold , weighted confidence of sliding windows on all scale images and RPN weighted probability value Smaller than The candidate regions or candidate frames are eliminated to obtain the final candidate regions; the final candidate regions are mapped back to the original resolution aerial image of step S2 according to the corresponding scale and position information to obtain the pixel coordinates of the ground control points on the corresponding image. And the corresponding final confidence .

[0018] Specifically, the sliding window candidate region is a series of rectangular regions generated at multiple scales through image pyramid and sliding window strategies, covering the entire image area. The RPN candidate box is a series of rectangular candidate boxes generated by the region proposal network (RPN), which is mainly concentrated in the area that may contain ground control points. The two candidate region generation methods complement each other: the sliding window strategy can fully cover the image, while the RPN mechanism can generate high-quality candidate regions in a targeted manner. For the sliding window candidate region, calculate its similarity with the prior features of the ground control points to obtain the attention weight , and then the original confidence Multiply , and obtain the weighted confidence For the RPN candidate box, calculate its similarity with the prior features of the ground control point and obtain the attention weight , and then the original probability Multiply , and obtain the weighted probability value By introducing attention weights, we can make full use of prior features to weight candidate regions and candidate boxes, and highlight candidate regions with high similarity to prior features. and RPN weighted probability value Compare with the confidence threshold ct. Eliminate candidate regions or candidate boxes whose weighted confidence or weighted probability value is less than ct. The remaining candidate regions include two parts: the region with weighted confidence greater than or equal to ct in the sliding window candidate region; the region with weighted probability value greater than or equal to ct in the RPN candidate box. These two parts of candidate regions complement each other and together constitute the final screened high-confidence candidate regions. Map the final screened candidate regions back to the original resolution aerial image according to the corresponding scale and location information. Obtain the pixel coordinates of each candidate region on the original image And the corresponding final confidence . These candidate regions will serve as an important basis for subsequent precise positioning and extraction of ground control points. By combining the sliding window strategy and the RPN mechanism, comprehensive and targeted candidate regions are generated. The candidate regions are then weighted using prior features, and high-quality candidate regions are screened out using confidence thresholds. The remaining candidate regions include sliding window candidate regions and RPN candidate boxes, which will be used for precise positioning and extraction of ground control points in subsequent steps. This candidate region generation method guided by multi-strategy fusion and prior knowledge can effectively improve the accuracy and efficiency of ground control point detection.

[0019] Furthermore, a multi-feature fusion control point recognition model is constructed to determine the matching relationship between each ground control point in different aerial images, including: according to the pixel coordinates of each ground control point GCP obtained on the aerial image , taking the pixel coordinates as the center, obtain the image block containing the corresponding control point area on the aerial image; for each ground control point image block obtained, extract the multi-scale features and construct the feature descriptor of the ground control point; the multi-scale feature descriptors of the same ground control point obtained from different aerial images are combined As input, m is the number of aerial images where the corresponding control points are observed; a control point recognition model with multi-feature fusion is trained using a deep learning method to obtain the matching relationship between ground control points in different aerial images;

[0020] Furthermore, for each acquired ground control point image block, multi-scale features are extracted, including: calculating the color histogram of the image block in the HSV color space, extracting the feature vector reflecting the color distribution of the ground control point ; Perform Canny edge detection and contour extraction on the image block, calculate the geometric moment of the contour, and extract the feature vector reflecting the shape of the ground control point ; Use Gabor wavelet transform to perform multi-scale and multi-directional texture analysis on image blocks and extract feature vectors reflecting the texture of ground control points ; Transform the color, shape and texture feature vectors , and Combined into a multi-scale feature descriptor of the ground control point .

[0021] Furthermore, a deep learning method is used to train a multi-feature fusion control point recognition model to obtain the matching relationship between ground control points in different aerial images, including: constructing a twin convolutional neural network and a triplet loss function to identify the multi-scale features of paired ground control points. As input, semantic features are extracted through a two-way weight-sharing convolution branch. The semantic features include edge contour structure features and multi-scale spatial structure features of image blocks; specifically, multi-scale features of paired ground control points As input, high-level semantic features reflecting the local and global appearance of ground control points are extracted through a two-way weight-sharing convolution branch, including: It means that the edge detection layer in the convolutional neural network is used to extract the edge contour structure features of the control point image block; It means using the corner detection layer in the convolutional neural network to extract the high curvature corner features of the control point image block; The spatial pyramid pooling layer in the representation network extracts the multi-scale spatial structural features of the control point image blocks; It means that the context association layer in the convolutional neural network is used to extract the surrounding semantic information features of the control point image block; the feature fusion layer is used to , , and Perform adaptive weighted fusion to obtain the fused high-level semantic feature vector of the ground control points ; Set a similarity measurement layer at the end of the twin convolutional neural network, and calculate the feature vector The Euclidean distance between two ground control points is used to measure the similarity between them.

[0022] A similarity measurement layer is set at the end of the twin convolutional neural network to measure the similarity of two ground control points by calculating the Euclidean distance between the feature vectors; according to the matching relationship of the annotated ground control points, the matching control points are selected from the ground control point feature descriptors obtained from the multi-view aerial images as positive sample pairs. ; Randomly select unmatched control point pairs from the feature descriptors of different ground control points as negative sample pairs ; Combine positive sample pairs And negative sample pairs , forming a training triplet ; Through the triple loss function constraint, the positive sample The feature distance of is smaller than that of the negative sample pair feature distance to enhance the distinguishability of control point matching; use the mini-batch gradient descent algorithm and back propagation algorithm to iteratively optimize the triplet loss function, update the weight parameters of the twin convolutional neural network, and learn the discriminative representation of control point features; use the trained control point recognition model to obtain the matching relationship between ground control points in different aerial images.

[0023] Furthermore, the trained control point recognition model is used to obtain the matching relationship between ground control points in different aerial images, including: detecting and extracting candidate ground control points from multi-view aerial images, obtaining their image coordinates and multi-scale feature descriptors , where i is the control point number; detect and extract candidate ground control points from multi-view aerial images, and obtain their image coordinates and multi-scale feature descriptors , where i is the control point number; each pair of feature descriptors Input the trained twin convolutional neural network and obtain their similarity scores through the following steps: : Extraction through convolutional branches with two-way weight sharing High-level semantic features and ; Calculate feature vectors in the similarity measurement layer and The Euclidean distance between ; Perform maximum value suppression on the similarity matrix of ground control points row by row and column by column; Similarity score Perform permutations and combinations to construct an N×N ground control point similarity matrix S, where N is the total number of ground control points. ; Perform maximum suppression processing on the matrix S by row and column respectively to obtain the optimal matching candidate for each control point; set the similarity threshold λ, and satisfy The control point pairs (i, j) with maximum values ​​in both rows and columns are determined as matches; the index of the same-name points in the aerial images of different viewing angles for each ground control point i is output , and obtain a multi-view matching relationship. Preferably, the random sampling consensus algorithm (RANSAC) is used to verify the geometric consistency of the initial same-name point matching, eliminate the wrong matching point pairs, and obtain the final ground control point matching relationship.

[0024] Preferably, the trained twin network model is used to calculate the multi-view similarity matrix of the ground control points; the initial control point matching is randomly sampled from the similarity matrix, and the global homography transformation matrix between images is estimated using RANSAC; the reprojection error of the matched ground control points is calculated according to the homography transformation matrix, and the outlier matching with an error greater than a set threshold is eliminated; the homography transformation matrix is ​​iteratively updated until the number of matched inliers reaches the maximum, and a globally consistent matching relationship between the same-name image points of the ground control points is obtained.

[0025] Furthermore, the triple loss function is expressed as follows:

[0026]

[0027] in, represents the triplet loss function, which is used to measure the relative distance relationship between positive and negative sample pairs; θ represents the weight parameter of the twin convolutional neural network; Represents the training triplet The reference ground control point feature descriptors in ; Represents a positive sample pair K samples with the largest median distance; Represents negative sample pairs K samples with the smallest median distance; Represents the twin convolutional neural network mapping function fused with the attention mechanism to extract high-level semantic features of ground control points; The Euclidean distance metric function between the feature vectors output by the twin network; Represents the scale adaptive weight coefficient, which is adaptively adjusted according to the importance of the feature scale s. , α is a hyperparameter that controls the scale weight distribution; m represents a constant margin term greater than 0, which is used to control the distance interval between positive and negative sample pairs; γ represents a balance parameter that controls the weight of the polar constraint loss term; represents the epipolar constraint distance metric function, which is used to measure the consistency error of matching point pairs under epipolar geometry; represents the convolution feature extraction function, which performs convolution operation on the input ground control point feature descriptor to extract a multi-scale convolution feature map; represents the attention weight function, which generates regional saliency weights for the convolutional feature map and highlights semantically salient areas; Represents the element-by-element multiplication operator, which is used to weight the attention weight map and the convolution feature map pixel by pixel to obtain the fused attention enhanced features.

[0028] Among them, by introducing the scale adaptive weight coefficient , adaptively weighting the feature distances of different scales according to the importance of the feature scale, enhancing the model's adaptability and robustness to scale changes. Adopting a difficult example mining strategy, focusing on training difficult examples with the largest distance in positive sample pairs and the smallest distance in negative sample pairs, increasing the learning intensity of difficult examples, accelerating the convergence speed of the model and improving generalization performance. Fusion of epipolar geometric constraint loss term , guiding the model to learn matching relationships that satisfy epipolar geometric consistency, improving the accuracy of the epipolar geometric constraints of the matching results and reducing mismatches. , adaptively adjust the weights of different areas in the convolutional feature map, highlight the expression of semantically significant areas, suppress the interference of background noise, and enhance the discriminative power of feature representation.

[0029] Compared with the prior art, the advantages of this application are:

[0030] By using the pre-trained YOLOv5 target detection model, combined with the image pyramid and sliding window strategy, ground control points in aerial images can be efficiently detected at different scales and locations. At the same time, a candidate region generation mechanism based on the region proposal network RPN is introduced to constrain the position and size of the candidate box through prior features, further improving the accuracy of control point positioning.

[0031] A multi-feature fusion ground control point descriptor is proposed, which comprehensively considers the multi-scale visual information of the control point area, such as color, shape and texture, to form a unique feature representation. On this basis, a twin convolutional neural network is designed to learn the control point feature embedding with strong discriminability and invariant view through the metric learning framework and triplet loss function, which greatly improves the matching accuracy of control points between aerial images of different viewpoints. At the same time, the epipolar geometric constraints are introduced to further ensure the robustness and consistency of the matching.

[0032] The high-precision ground control network is used to obtain the precise three-dimensional coordinates of each control point. The pixel coordinates of the control points on the aerial image and the cross-view matching relationship are combined, and the spatial position and attitude angle parameters of each aerial image are solved with high precision through regional block adjustment and bundle adjustment. The image space resection and forward intersection are used comprehensively to achieve accurate mapping from two-dimensional images to three-dimensional object coordinates, laying the foundation for subsequent dense matching and three-dimensional reconstruction.

[0033] After obtaining accurate image exterior orientation elements, the multi-view image dense matching technology is used to automatically generate a high-resolution three-dimensional point cloud of the survey area. Through point cloud filtering, denoising and gridding, a digital surface model DSM describing the surface morphology is obtained. On this basis, the terrain surface reconstruction algorithm is used to intelligently remove non-ground points such as trees and buildings, extract the true ground elevation, and finally obtain a high-precision digital elevation model DEM reflecting the terrain undulations.

[0034] Based on the reconstructed high-precision DEM, the original aerial image is orthorectified to eliminate the geometric deformation caused by aerial tilt and terrain undulation, and an orthophoto map is generated. The orthophoto map combined with the DEM not only retains the texture and spectral information of the image, but also has accurate spatial location information. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The present application will be further described in the form of exemplary embodiments, which will be described in detail by the accompanying drawings. These embodiments are not restrictive, and in these embodiments, the same number represents the same structure, wherein:

[0036] Figure 1 is an exemplary flow chart of a terrain surveying and mapping method based on aerial surveying and mapping technology according to some embodiments of the present application;

[0037] Figure 2 is an exemplary flow chart of constructing a three-dimensional control network for a survey area according to some embodiments of the present application;

[0038] Figure 3 is an exemplary flow chart for obtaining pixel coordinates and final confidence of ground control points on an image according to some embodiments of the present application;

[0039] Figure 4 is an exemplary flow chart of obtaining a trained control point recognition model according to some embodiments of the present application;

[0040] Figure 5 This is an exemplary flowchart for obtaining the matching relationship between GCPs in different aerial images according to some embodiments of the present application. DETAILED DESCRIPTION

[0041] The method and system provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0042] Figure 1 This is an exemplary flow chart of a terrain surveying method based on aerial surveying technology shown in some embodiments of the present application, a terrain surveying method based on aerial surveying technology, including: using a drone to perform oblique photography of a survey area to obtain an aerial image dataset of the survey area; preprocessing the obtained aerial image dataset; the preprocessing includes distortion correction and color balance; setting N ground control points GCP in the survey area, using the GPS-RTK method to measure the three-dimensional coordinates of each ground control point GCP, and establishing a ground control network for the survey area; using the preprocessed aerial image dataset as input, using the pre-trained YOLOv5 target detection model, through target detection and positioning the ground control point GCP on each aerial image; performing edge detection and corner point positioning on the area where the ground control point GCP is detected on the aerial image, and obtaining the pixel coordinates of the ground control point GCP in the corresponding aerial image; extracting the ground control point GCP according to the pixel coordinates of each ground control point GCP obtained on all aerial images. The multi-scale features of the control points are used to construct a control point recognition model with multi-feature fusion, which is used to determine the matching relationship between each ground control point in different aerial images; among which, the multi-scale features include color, shape and texture; the three-dimensional coordinates of each ground control point GCP, the pixel coordinates of each ground control point on the aerial image, and the matching relationship between each ground control point in the aerial images are obtained as observation values, and the spatial position and attitude angle of each aerial image are solved through regional block adjustment and bundle adjustment; the pre-processed aerial image data set is matched with the spatial position and attitude angle of each solved aerial image through the multi-view image dense matching algorithm to generate the three-dimensional point cloud data of the survey area, and the digital surface model DSM of the survey area is generated through point cloud filtering and gridding processing; the generated digital surface model DSM is used to eliminate non-ground points through the terrain surface reconstruction algorithm and orthorectification method to generate the digital elevation model DEM and orthophoto map of the survey area as the output of terrain surveying and mapping results.

[0043] Specifically, a drone is used to perform oblique photography of the survey area to obtain an aerial image dataset of the survey area. A drone equipped with five sensors is selected as the aerial photography platform. The five sensors include a vertical view sensor and four oblique view sensors. The oblique view sensors can be set to a 45° tilt angle and are arranged in a cross with the vertical view sensor to achieve simultaneous exposure of five view angles. According to the size of the survey area, the terrain undulation and the photography scale requirements, the aerial photography parameters are reasonably designed, including the flight altitude, speed, heading overlap and lateral overlap. The flight altitude can be set to 200m-500m, and the heading overlap and lateral overlap are set to 80% and 70% respectively to ensure the complete coverage of the image and the accuracy of stereo measurement. The drone ground control station is used to plan the route, write the mission flight script, control the drone to fly and expose autonomously according to the predetermined route, and obtain a five-view multi-angle aerial image dataset of the survey area. The drone is required to fly smoothly and avoid drastic posture changes to ensure image quality. After the image acquisition is completed, the image data of the five perspectives are stored and converted into common digital image formats, such as TIFF, JPG, etc., to construct a five-view aerial image dataset in preparation for subsequent processing.

[0044] The acquired aerial image data set is preprocessed; the preprocessing includes distortion correction and color balance; distortion correction: using the IMU attitude data and GNSS navigation data recorded by the UAV flight platform, synchronize the image exposure time with the attitude and navigation data to obtain the exterior orientation elements of each image; combining the camera internal parameters (such as focal length, principal point coordinates, lens distortion coefficient, etc.), using collinear equations or direct linear transformation (DLT) and other algorithms, the geometric distortion correction of the five-view aerial images is performed to eliminate the image geometric deformation caused by lens distortion and attitude changes; color balance: due to the differences in exposure time, lighting conditions, etc. of the five-view images, the colors between the perspectives are inconsistent; in order to eliminate the color difference The five-view images after distortion correction need to be color balanced. Common color balance methods include histogram matching, grayscale value conversion, and statistical methods. The histogram matching method adjusts the image histogram to make the color distribution of images with different viewpoints tend to be consistent. The grayscale value conversion method converts the grayscale values ​​of images with different viewpoints to the same scale by establishing a linear or nonlinear mapping relationship between grayscale values ​​between viewpoints. The statistical method performs adaptive local color adjustment by calculating statistical features such as the mean and variance of local areas of the image. After color balancing, the overall color tone of the five-view images tends to be unified, and the color difference between viewpoints is effectively suppressed, providing a consistent texture basis for subsequent image matching and three-dimensional reconstruction.

[0045] Figure 2The present invention is an exemplary flow chart of constructing a three-dimensional control network for a survey area according to some embodiments of the present application. N ground control points GCP are set in the survey area, and the three-dimensional coordinates of each ground control point GCP are measured using the GPS-RTK method to establish a ground control network for the survey area. The number N and the distribution positions of the ground control points GCP are determined according to the area and terrain of the survey area. ;in, Indicates the initial spatial position of the ith ground control point: the larger the survey area and the more complex the terrain, the more control points N are required; in general, 4 to 5 control points are set per square kilometer in flat and open areas, and 6 to 8 control points are set per square kilometer in mountainous and hilly areas; at the same time, in order to ensure the accuracy of aerotriangulation, the number of control points N should not be less than 1 / 6 of the number of aerial photographs; the distribution of ground control points should be as uniform as possible to avoid large areas of blank control points; at the same time, factors such as terrain features and ground object obstruction should be fully considered, and control points should be arranged in areas with wide views and obvious ground features, such as intersections, building corners, permanent landmarks, etc.; the total number of control points N is determined by comprehensively analyzing the survey area, terrain features and image distribution, and the initial spatial position of each control point is determined on the basis of meeting the requirements of distribution uniformity and reliability The control point distribution map should correspond to the aerial photography distribution map to ensure that each control point can be imaged on multiple images.

[0046] A ground control point marker is set at each initial spatial position Pi, and a GPS-RTK receiver is used for static measurement to record the measured 3D coordinates of the i-th ground control point. :Ground control points can be marked by artificially laid markers or obvious ground feature points, such as painted cross marks, stamped steel nail markers, etc. The markers should be large enough, generally not less than 0.6m, so that they can be clearly identified in aerial photography; Use a GPS-RTK receiver to perform static measurement of each ground control point, the receiver antenna should be placed directly above the control point marker, the measurement time should be no less than 10min, and the sampling interval should be set to 1s; The GPS-RTK receiver can achieve centimeter-level positioning accuracy through the differential positioning principle of the base station and the mobile station; Perform multiple independent measurements on each control point, and the antenna should be relocated for each measurement to reduce measurement errors; The average of multiple measurement results is taken as the final measurement coordinates of the control point. , and record the accuracy indicators of each measurement for subsequent adjustment calculations.

[0047] Measure 3D coordinates of all ground control points As the observation value, the observation equation is constructed, and the known control point data is used as the constraint condition. The least squares adjustment method is used to adjust and solve the observation equation to obtain the three-dimensional coordinates of each ground control point. ; Among them, the adjustment solution adjusts the weight factor of the observation value through iterative calculation until the adjustment result converges to the optimal value: the construction of the observation equation needs to consider the functional relationship between the GPS-RTK measurement coordinates, the image point coordinates, and the internal and external parameters of the camera, and introduce a suitable error model, such as the Gauss-Markov model, to form an error equation; the adjustment calculation process needs to set an appropriate number of iterations and convergence thresholds, and the initial value of the iteration can be selected as the arithmetic mean of the measurement coordinates of each control point; the calculation of the weight factor can be based on the accuracy index of the measurement coordinates, and the higher the accuracy, the greater the weight of the measurement value; the adjustment result Not only the accuracy of the measured coordinates of each control point is taken into account, but also the geometric constraint relationship between them. Compared with the original measured coordinates, it is more in line with the overall optimal conditions and has higher accuracy.

[0048] High-precision three-dimensional coordinates of ground control points obtained by adjustment Based on the preset spatial topology rules, the ground control points are connected into a network to build a high-precision three-dimensional control network covering the entire survey area. The high precision of the control network is reflected in the fact that the relative position accuracy between adjacent control points is better than the preset threshold ΔP, and the absolute positioning accuracy of the entire control network and the global coordinate system is better than the preset threshold ΔA. Through this control network, high-precision spatial positioning of aerial images and high-precision generation of subsequent three-dimensional models can be achieved: Commonly used spatial topology rules for control networks include triangulated networks (TIN), Delaunay triangulation (DT), etc. These rules can form a regular mesh structure to ensure the complete coverage of the control network. The relative position accuracy between adjacent control points refers to the ratio of the difference between the coordinates of the two points to their actual spatial distance, and this ratio should be less than a certain threshold ΔP, such as 1 / 10000; the overall absolute positioning accuracy refers to the deviation between the control network coordinates and the global geodetic coordinates, which should be less than a certain threshold ΔA, such as 0.2m; the establishment of a high-precision three-dimensional control network enables each subsequent aerial photograph to calculate high-precision exterior orientation elements through control point solutions, thereby achieving accurate positioning of the image; at the same time, the control network also provides a guarantee for the geometric accuracy of the subsequent three-dimensional model, and the three-dimensional coordinates of any point on the model can be obtained through interpolation between control points to obtain centimeter-level accuracy.

[0049] Figure 3It is an exemplary flow chart for obtaining pixel coordinates and final confidence of ground control points on an image according to some embodiments of the present application, taking a preprocessed aerial image dataset as input, using a pretrained YOLOv5 target detection model, detecting and locating the ground control points GCP on each aerial image through targets; dividing the preprocessed aerial image dataset into a training set and a validation set, and annotating each aerial image in the training set to obtain pixel-level annotation data of the ground control points: the ratio of the aerial image dataset to the training set and the validation set can be set to 8:2 or 9:1, that is, 80%-90% of the images are used for model training, and 10%-20% of the images are used for model verification; Manually annotate the training set images, select the positions of all ground control points on each image, and assign corresponding category labels (such as "GCP") to obtain annotation files stored in PASCAL VOC or COCO format; during the annotation process, try to select control point areas with clear fields of view and less background interference. The annotation box should be close to the edge of the target, and at the same time, ensure that the control point is completely located inside the annotation box; each control point is annotated on at least 3 images to improve the robustness of the annotation.

[0050] Using the labeled training set data, the pre-trained YOLOv5 target detection model is fine-tuned through transfer learning to obtain an optimized model suitable for ground control point detection; the model training process is optimized by setting hyperparameters such as learning rate, batch size, and number of iterations, and the model performance is evaluated and selected using the validation set data: select the model on common datasets (such as COCO, Image Net, etc.) as the basic model, which has good feature extraction and target detection capabilities; the YOLOv5 model is fine-tuned by transfer learning method using the labeled training set data; the output layer of the model is replaced by a fully connected layer adapted to the number of ground control point categories, and the weight of this layer is randomly initialized; the parameters of the remaining network layers are loaded with the weights of the pre-trained model, and a smaller learning rate is set for fine-tuning; during model training, the learning rate is set to 0.01, the batch size is set to 16, and the number of iterations is set to 100; the SGD optimizer is used, and the momentum term and weight decay strategy are used; every 10 iterations, the model performance is evaluated on the validation set, and the current optimal model weights are saved; the model performance evaluation indicator uses mAP (mean Average Precision), that is, the average of the AP values ​​of each category under different IoU (Intersection over Union) thresholds; the model with the highest mAP value on the validation set is selected as the final ground control point detection model.

[0051] Each preprocessed aerial image to be processed is used as input, and the trained target detection model is used to obtain the detection results of the ground control points on each image through the forward reasoning process. The detection results include the pixel coordinates of the ground control points. and confidence ; Where i represents the i-th ground control point detected; set the image pyramid and sliding window strategy during the inference process: set the image pyramid scaling factor to 0.8, that is, each time the input image is reduced to 0.8 times the original, to generate an image pyramid containing multi-scale images; according to the prior size of the ground control points, set the initial size of the sliding window to 64*64 and the sliding step to 32; on each scale image, start sliding the window from the upper left corner, and obtain the candidate area row by row and column by column until the lower right corner of the window reaches the edge of the image; input the sliding window candidate area into the detection model to obtain the preliminary detection results at this scale; use the prior features of the ground control points in the training set, such as color histogram, gradient direction Histogram, LBP texture features, etc., to build the RPN network; on each scale image, a series of rectangular candidate boxes are generated through the RPN network; the RPN candidate boxes are input into the detection model to obtain another set of preliminary detection results on this scale; the similarity between the sliding window candidate area and the RPN candidate box and the prior features is calculated respectively, and the cosine similarity, chi-square similarity and other metrics can be used; the similarity is used as the attention weight to weight the confidence of the preliminary detection results, highlight the significant area, and suppress background interference; the confidence threshold is set to 0.5, and the sliding window results and RPN results on all scales are threshold filtered and non-maximum suppressed, and finally the pixel coordinates of the ground control points detected on each image are obtained. and its confidence .

[0052] For the area where the ground control point GCP is detected on the aerial image, edge detection and corner point positioning are performed to obtain the pixel coordinates of the ground control point GCP in the corresponding aerial image; for each ground control point area detected in step S4, the pixel coordinates of the area are used to obtain the pixel coordinates of the ground control point GCP in the corresponding aerial image. As the center, expand a certain edge width w to obtain the expanded ground control point rectangular area ; The size of the edge width w is determined according to the prior characteristics of the control points, generally 1 / 4 to 1 / 3 of the control point size; for the expanded ground control point area , the Canny operator is used for edge detection; the Canny edge detection operator extracts significant edge pixels in the control point area through Gaussian filtering, gradient calculation, non-maximum suppression, double threshold processing and other steps; the parameters of the Canny operator, such as the Gaussian kernel size, gradient threshold, etc., can be set and optimized according to the actual characteristics of the control point; in the extracted edge pixels, the corner features are further detected; the commonly used corner detection methods include Harris corner detection and FAST corner detection; taking Harris corner detection as an example, by calculating the covariance matrix of the gradient in the neighborhood of the pixel point, the gradient in the neighborhood of the pixel point is determined. The degree of change in the degree of the control point is used to determine whether the point is a corner point; pixels whose corner point response values ​​are greater than the set threshold are considered to be corner points; the selection of the threshold needs to balance the corner point detection rate and the false detection rate; according to the prior template of the ground control point, template matching is performed among the detected corner points to find a group of corner points that best match the control point features; template matching can use similarity metrics such as normalized cross correlation (NCC); in the matching process, it is necessary to consider changes in the scale and rotation of the control points, and the robustness of the matching can be improved through multi-scale and multi-angle template matching; for a group of matched corner points, take their geometric center as the precise coordinates of the ground control point ,Right now: , ,in, represents the coordinates of the jth matching corner point, and n is the total number of matching corner points. To further improve the positioning accuracy of the control points, the coordinates of the control points are finely corrected at the sub-pixel level in combination with the local features of the image, such as gradient direction and grayscale centroid. The correction amount can be calculated by using the gradient information of the local area of ​​the image and solving it through mathematical optimization methods such as the least squares method. For ground control points that meet the positioning accuracy requirements, As the pixel coordinates of the control point on the current aerial image, and its number and the three-dimensional coordinates of the control point obtained by 3 Corresponding.

[0053] Figure 4 is an exemplary flow chart of obtaining a trained control point recognition model according to some embodiments of the present application, according to the pixel coordinates of each ground control point GCP obtained on all aerial images, extracting the multi-scale features of the ground control point, and constructing a control point recognition model with multi-feature fusion to determine the matching relationship between each ground control point in different aerial images; according to the pixel coordinates of each ground control point GCP obtained in step S5 on the aerial image , with the pixel coordinates as the center, obtain the image block containing the corresponding control point area on the aerial image. The size of the image block is determined according to the actual size and resolution of the ground control point, and is generally 1.5 to 2 times the actual size of the control point. For each ground control point image block obtained, extract multi-scale features and construct the feature descriptor of the ground control point: in the HSV color space, calculate the color histogram of the image block and extract the feature vector reflecting the color distribution of the ground control point The HSV space can better express the color information of the image. By counting the histograms of the three channels H, S, and V, the feature vector representing the color distribution is obtained. Canny edge detection and contour extraction are performed on the image block, the geometric moment of the contour is calculated, and the feature vector reflecting the shape of the ground control point is extracted. Geometric moments such as area moment, center moment, and direction moment can characterize the geometric features of the control point area. Gabor wavelet transform is used to perform multi-scale and multi-directional texture analysis on the image block to extract the feature vector reflecting the texture of the ground control point. Gabor wavelet can obtain good resolution in both frequency domain and space domain. By selecting Gabor kernel functions of different scales and directions, texture features of different frequencies and directions can be extracted. , and Combined into a multi-scale feature descriptor of the ground control point , as the input feature of the control point recognition model. The multi-scale feature descriptors of the same ground control point obtained from different aerial images are As input, a deep learning method is used to train a control point recognition model with multi-feature fusion to obtain the matching relationship between ground control points in different aerial images.

[0054] Specifically, the Siamese CNN structure and triplet loss function are used. The training steps are as follows: Construct the Siamese CNN and triplet loss function to use the multi-scale features of paired ground control points. As input, semantic features are extracted through a two-way weight-sharing convolution branch. The semantic features include the edge contour structure features and multi-scale spatial structure features of the image block: : Use the edge detection layer in CNN to extract the edge contour structure features of the control point image block; : Use the corner detection layer in CNN to extract the high curvature corner features of the control point image block; : Use the spatial pyramid pooling layer in CNN to extract the multi-scale spatial structural features of the control point image blocks; :Use the context association layer in CNN to extract the surrounding semantic information features of the control point image block. Use the feature fusion layer to , , and Perform adaptive weighted fusion to obtain the fused high-level semantic feature vector of the ground control points . A similarity measurement layer is set at the end of the twin CNN to calculate the feature vector The Euclidean distance between the two ground control points is used to measure the similarity between them. According to the matching relationship of the annotated ground control points, the matching control points are selected from the ground control point feature descriptors obtained from the multi-view aerial images as positive sample pairs. ; Randomly select unmatched control point pairs from the feature descriptors of different ground control points as negative sample pairs ; Combine positive and negative sample pairs to form training triplets . Through the triple loss function constraint, the positive sample pair The feature distance of is smaller than that of the negative sample pair The feature distance is used to enhance the distinguishability of control point matching. The triplet loss function expression is: , using the mini-batch gradient descent algorithm and the back-propagation algorithm, the triplet loss function is iteratively optimized, the weights of the twin CNN network are updated, and the discriminative representation of the control point features is learned.

[0055] Figure 5 The exemplary flowchart of obtaining the matching relationship between GCPs in different aerial images according to some embodiments of the present application is to use the trained control point recognition model to obtain the matching relationship between ground control points in different aerial images. The specific implementation steps are as follows: Detect and extract candidate ground control points from multi-view aerial images, obtain their image coordinates and multi-scale feature descriptors First, for each frame of aerial image Perform control point detection. You can use classic feature point detection algorithms such as Harris corner points, SIFT feature points, SURF feature points, or use convolutional neural networks to achieve end-to-end control point detection. Detect and obtain the set of candidate control points on the k-th frame image. ,in, Represents the pixel coordinates of the i-th control point in the k-th frame image , is the number of candidate control points of the k-th frame image. Then, for each candidate control point Extracting multi-scale feature descriptors .by Centered on Image blocks of different scales (such as 16×16, 32×32, 64×64) are intercepted, and the HSV color histogram features are calculated for each scale of image blocks. , Canny edge geometry features , Gabor wavelet texture features , concatenate the feature vectors of different scales to obtain the multi-scale feature descriptor of the control point .

[0056] Each pair of feature descriptors Input the trained twin CNN to obtain the similarity score For any two frames of images and Candidate control points, enumerate all possible feature descriptor pairs , and input it into the trained twin CNN. The twin CNN contains two convolution branches with the same structure and shared weights, one for Perform feature transformation: , ; , ; ; ; Where conv(*) is the convolution feature extraction function, att(*) is the attention weight function, and ⊙ represents element-by-element multiplication. The convolution branch is used to extract high-level semantic features such as edges, corners, spatial pyramids, and contexts of control points, and the attention mechanism is used to enhance the representation of semantically significant areas.

[0057] In the similarity metric layer of the twin CNN, we calculate and The Euclidean distance is used as the similarity score: , repeat the above process to calculate all control point feature pairs Similarity score . Construct the ground control point similarity matrix S. For all pairs of candidate control points (p_i^a, p_j^b), their similarity scores according to and The indexes of are arranged to form an N×N similarity matrix S, where N is the total number of all candidate control points. The matrix element S(i, j) represents the similarity score between the i-th control point and the j-th control point.

[0058] Perform maximum suppression on the similarity matrix S. In order to select the best match from many candidate matches, it is necessary to perform maximum suppression on the similarity matrix S row by row and column by column. Specifically, for each row i of the matrix S, find the column index with the largest similarity score , , for each column j of the matrix S, find the row index with the largest similarity score : ,if and , then (i, j) is the potential optimal matching control point pair. Set the similarity threshold λ to determine the final matching point pair. After maximum suppression, further select the control point pairs (i, j) that meet the following conditions as matches: S (i, j) > λ, where λ is the similarity threshold set empirically and can be adjusted according to the characteristics of the data set and the matching accuracy requirements. Output the multi-view control point matching index For each ground control point i, output its image at different viewing angles Index of points of the same name in , establish the correspondence between control points in multiple perspectives. The index of the same-name point of ground control point i can be expressed as: ,in, It represents the matching point index of control point i in the k-th frame image, and m is the number of aerial images that observe the control point (m≤K).

[0059] The RANSAC algorithm is used to verify the matching consistency and eliminate the wrong matching point pairs. In order to further improve the matching accuracy, the RANSAC algorithm can be used to verify the geometric consistency of the initial matching point pairs. RANSAC gradually selects consistent matching point pairs that meet the epipolar geometric constraints through repeated iterations of the "-verification" process, and eliminates incorrect matches. The specific steps are as follows: randomly select 8 pairs of points from the set of matching point pairs, and calculate the basic matrix F determined by them; according to the basic matrix F, calculate the epipolar geometric error of each pair of matching points, and count the number of inliers whose error is less than the threshold t; repeat several times, and select the basic matrix F with the largest number of inliers as the best estimate; use all inliers to re-estimate the best basic matrix F, and select the final consistent matching point pairs based on F. RANSAC can effectively remove false matches and improve the accuracy and reliability of control point matching. After the above steps, the trained twin CNN can be used to obtain the matching relationship between ground control points in different aerial images, and establish the corresponding index of the same-name points of control points between multiple perspectives, which can be used for subsequent aerial triangulation and aerial triangulation encryption.

[0060] Combining key technologies such as twin CNN matching, regional block adjustment and bundle adjustment, the specific implementation method for obtaining the spatial position and attitude angle of aerial images is as follows: Input each ground control point The three-dimensional coordinates of ; Each ground control point In aerial imagery The pixel coordinates on ; Each ground control point GCP_i has the same name point index in different aerial images . Construct a regional block adjustment model. Use the three-dimensional coordinates of the control points and image point coordinates The regional network adjustment model is established for the observation value. The adjustment model includes the image point coordinate observation equation, the control point coordinate observation equation and the system error correction model. The image point coordinate observation equation describes the functional relationship between the image point coordinates and the camera position and posture and the control point coordinates:

[0061] ;

[0062]

[0063] in, is the principal point coordinate, f is the focal length of the camera, is the camera position coordinate of the kth image, is the rotation matrix element of the image, representing the camera attitude angle. The control point coordinate observation equation describes the three-dimensional coordinates of the control point GCP_i Its real coordinates The relationship between: , , ,In addition, a systematic error correction model is introduced to ,improve the accuracy of regional network adjustment, such as camera distortion ,difference of atmosphere refraction, etc.

[0064] Combine multi-view matching point pairs and control point GCPs to build a bundle adjustment model. Based on the regional block adjustment, the ground control point matching relationship obtained by the twin CNN is used to introduce more image points with the same name as constraints to achieve joint adjustment of multi-view images. Suppose the i-th control point In the image and The coordinates of the matching image points are and , satisfying the following epipolar constraints: ,in, and Matching points and The homogeneous coordinates of For images arrive The basic matrix F can be expressed as: ,in, and For images and The internal parameter matrix of and is the rotation matrix of the image, is the translation vector The constraints of matching point pairs and basic matrix are introduced into the bundle adjustment model and solved jointly with the regional block adjustment model to obtain more image connection points and improve the adjustment accuracy and robustness.

[0065] The exterior orientation elements of each aerial image are solved by using bundle adjustment. In the constructed bundle adjustment model, the three-dimensional coordinates of the control point GCP, the image point coordinates and the matching point pairs are used as observation values, and the exterior orientation elements of each aerial image are solved at the same time, including the camera position and attitude angle The objective function of the adjustment solution is the sum of squares of the observed values, including the sum of squares of the residuals of the control point coordinates, the sum of squares of the residuals of the image point coordinates, and the sum of squares of the residuals of the matching point epipolar distances: ,in, , , is the control point coordinate residual, , is the image point coordinate residual, and d is the distance of the matching point on the epipolar line. Solving the above objective function using the least squares method or robust estimation method (such as L1 norm) can obtain the exterior orientation elements of each aerial image. , determine the spatial position and attitude angle of the image. At the same time, adjustment can also optimize the coordinates of control points and image points to improve accuracy. Output: Each aerial image The camera position coordinates ; Each aerial image Camera pose angle .

[0066] Combining key technologies such as multi-view image dense matching, point cloud filtering and gridding, the specific implementation method of using the solved aerial image spatial position and attitude angle to generate the survey area DSM is as follows: Input: preprocessed aerial image dataset ; Each aerial image The camera position coordinates and attitude angle . Perform multi-view image dense matching on the aerial image dataset. Using multi-view stereo vision technology, dense matching of aerial images is achieved through feature point matching, fusion region growing, global optimization and other steps to obtain dense same-name points between images. First, stable feature points such as SIFT and SURF are extracted on each image, and feature descriptors are used to perform feature matching between images of different perspectives to obtain a set of rough same-name points. Then, the initial same-name points are used as seed points, and fusion region growing is performed in their neighborhoods through regional correlation constraints (such as normalized cross correlation NCC and mutual information MI) to diffuse more same-name points. Finally, a global optimization model (such as graph cut and belief propagation) is introduced to optimize the disparity / depth value of each pixel in the entire image range to obtain dense and consistent same-name point matching results.

[0067] Aerial Imagery A point with the same name on , which is The matching points on , the result of multi-view image dense matching can be expressed as: , where N is the total number of matching points and K is the number of aerial images. Each matching image point can obtain its coordinates , Parallax and confidence And other attribute information.

[0068] The 3D point cloud is generated by using the multi-view image matching results and the image exterior orientation elements. The 3D coordinates of each matching point are calculated using the Multi-View Forward Intersection method based on the coordinates of the same-name points obtained by dense matching and the spatial position and posture of the image. , generate point cloud data of the survey area. , from the projection equation we can get: , ;

[0069] Combine the above two sets of equations and combine them with the known image position , and attitude angle , , you can calculate the matching point The three-dimensional coordinates of .

[0070] The three-dimensional coordinate set of all matching points is recorded as: ; P is the original three-dimensional point cloud data of the survey area, and each point corresponds to a matching pair of points of the same name on the image. The generated point cloud data is filtered and denoised. Due to errors in feature matching, multi-view forward intersection and other links, the point cloud data inevitably contains some outliers and noise. In order to improve the quality of the point cloud, it is necessary to filter and denoise it. Common point cloud filtering algorithms include statistical filters, radius filters, voxel filters, etc. Among them, statistical filtering removes outliers according to the distribution characteristics of the local neighborhood of the point cloud; radius filtering removes sparse points by setting the search radius and point number threshold; voxel filtering divides the point cloud into three-dimensional grids, and each grid retains a representative point to achieve downsampling. Point cloud filtering and denoising can effectively eliminate wild points caused by incorrect matching and improve the accuracy and stability of the point cloud.

[0071] The filtered point cloud is meshed to generate a DSM. To facilitate subsequent applications such as object classification and 3D reconstruction, the discrete point cloud data needs to be converted into a regular mesh surface model DSM. Common point cloud meshing methods include triangulation and rasterization. Triangulation generates an irregular triangulated network (TIN) surface of the point cloud through the Delaunay triangulation algorithm; rasterization projects the point cloud onto a horizontal grid, calculates the elevation value of each grid, and generates a regular DSM grid.

[0072] After gridding, the point cloud P is converted into a continuous surface model S: S (x, y) = Interpolate (P); where S (x, y) represents the elevation value of the DSM at the plane position (x, y), and Interpolate (*) is an interpolation function, commonly used are nearest neighbor interpolation, inverse distance weighted interpolation, Kriging interpolation, etc. The plane resolution and elevation accuracy of the DSM can be set according to actual needs. The higher the resolution, the finer the DSM, but the larger the data volume. Output: 3D point cloud data of the survey area ; Digital surface model DSM of the survey area: S (x, y).

[0073] Combining key technologies such as terrain surface reconstruction and orthorectification, the specific implementation method of using DSM to generate DEM and orthophoto maps of the survey area is as follows: Input the digital surface model DSM of the survey area: S (x, y). Using the terrain surface reconstruction algorithm, remove non-ground points from the DSM to generate DEM. DSM describes the elevation information of the ground and the surface of objects, while DEM only reflects the ups and downs of the ground itself. In order to extract DEM from DSM, it is necessary to remove non-ground points such as trees and buildings to reconstruct the real terrain surface. Commonly used terrain surface reconstruction algorithms include morphological filtering, progressive TIN densification (ATIN), slope-based filtering, etc. Among them, morphological filtering smoothes the DSM through opening and closing operations to remove non-ground points above the ground; the ATIN algorithm starts from the seed point, continuously densifies the TIN network, and filters out elevation mutation points; slope-based filtering distinguishes ground and non-ground points according to the slope change characteristics of the local point cloud. Taking slope-based filtering as an example, the elevation of a point p on the DSM is , its local neighborhood The point set inside is , each neighborhood point The elevation is The local slope at point p is defined as: ,in, For p and The distance on the plane. If the local slope at point p is If it is greater than the preset threshold τ, p is considered a non-ground point and is removed from the DSM; otherwise, p is considered a ground point and is retained in the DEM. The above slope filtering is performed on each grid point of the DSM, and finally a DEM containing only the terrain surface is obtained after filtering out non-ground points. The filtered DEM is recorded as: , where SlopeFilter (*) is the slope filter function.

[0074] Based on the DEM and image exterior orientation elements, the DSM is orthorectified to generate an orthophoto map. The orthophoto map eliminates the geometric deformation caused by the image tilt and terrain undulation at a uniform scale, realizing the conversion of the image to a map. First, take each grid point on the DEM as As the projection center, calculate the coordinates of the projection image point on the original image And the projection residual: , ,

[0075] Where j is the image index, is the projection center coordinate of image j. is the DEM grid point The projection residual onto image j.

[0076] Then, for each DEM grid, an image with the smallest projection residual is selected as the optimal image, and the orthophoto texture information is sampled from the image: , ,in, is the grid point The optimal image index is is its projection coordinate on the optimal image. O is the generated orthophoto. The optimal image is selected by the minimum residual criterion to ensure the geometric accuracy and texture quality of the orthophoto. The above orthorectification is performed on each grid point of the DEM, and finally a seamless orthophoto map covering the entire survey area is obtained. Output: Digital elevation model DEM of the survey area: D (x, y); orthophoto map O of the survey area.

[0077] In summary, the terrain surface reconstruction algorithm is used to remove non-ground points from the DSM, extract the elevation information of the ground itself, and generate the DEM of the survey area. Then, based on the DEM, the geometric deformation of the original image is eliminated through the orthorectification method to obtain the orthophoto map. The combination of DEM and orthophoto map not only reflects the terrain undulation characteristics of the survey area, but also contains rich texture information of the ground objects. It is an important part of surveying and mapping results and can be widely used in terrain analysis, three-dimensional visualization, geographic national conditions survey and other fields. This method realizes the automatic conversion of aerial images to topographic maps and image maps, greatly improving the efficiency and accuracy of surveying and mapping.

Claims

1. A terrain surveying method based on aerial surveying technology, include: Use drones to take oblique photographs of the survey area and obtain an aerial image dataset of the survey area; Preprocess the acquired aerial image dataset; Preprocessing includes distortion correction and color balancing; Set up N ground control points (GCPs) in the survey area, use GPS-RTK method to measure the three-dimensional coordinates of each ground control point (GCP), and establish a ground control network in the survey area; The preprocessed aerial image dataset is used as input, and the pre-trained YOLOv5 object detection model is used to detect and locate the ground control points (GCPs) on each aerial image. For the area where the ground control point GCP is detected on the aerial image, edge detection and corner point positioning are performed to obtain the pixel coordinates of the ground control point GCP in the corresponding aerial image; According to the pixel coordinates of each ground control point GCP obtained on all aerial images, the multi-scale features of the ground control point are extracted, and a control point recognition model with multi-feature fusion is constructed to determine the matching relationship between each ground control point in different aerial images; wherein the multi-scale features include color, shape and texture; The three-dimensional coordinates of each ground control point (GCP), the pixel coordinates of each ground control point on the aerial image, and the matching relationship between each ground control point and the aerial image are used as observation values ​​to solve the spatial position and attitude angle of each aerial image through regional block adjustment and bundle adjustment. Using the calculated spatial position and attitude angle of each aerial image, the pre-processed aerial image data set is matched through the multi-view image dense matching algorithm to generate the three-dimensional point cloud data of the survey area, and the digital surface model DSM of the survey area is generated through point cloud filtering and gridding processing; For the generated digital surface model DSM, the non-ground points are eliminated through the terrain surface reconstruction algorithm and orthorectification method, and the digital elevation model DEM and orthophoto map of the survey area are generated as the output of terrain surveying and mapping results; The preprocessed aerial image dataset is used as input, and the pre-trained YOLOv5 target detection model is used to perform target detection and locate the ground control points (GCPs) on each aerial image, including: The preprocessed aerial image dataset is divided into a training set and a validation set, and each aerial image in the training set is annotated to obtain pixel-level annotation data of ground control points; Using the labeled training set data, the pre-trained YOLOv5 target detection model is adjusted through the transfer learning method to obtain a target detection model for detecting ground control points; Each preprocessed aerial image to be processed is used as input, and the target detection model is used to obtain the detection results of the ground control points on each image through the forward reasoning process. The detection results include the pixel coordinates of the ground control points (u i ,v i ) and confidence c i ; Where i represents the i-th ground control point detected; During the inference process, the image pyramid and sliding window strategy are set; During inference, set the image pyramid and sliding window strategy, including: Construct a multi-scale image pyramid, downsample and upsample the input aerial image by setting different scaling factors, generate multiple image scales with different resolutions, and perform target detection at each scale; On the aerial image at each scale, the size of the sliding window is set to w×h according to the prior size of the ground control points, where w and h are the width and height of the window, respectively; Set the horizontal and vertical sliding steps of the sliding window to s w and h ,in, In s w and h is the step length, slide the window from left to right and from top to bottom on the image to obtain a series of overlapping candidate regions; Each candidate region is input into the target detection model in step S42, and the confidence c of the candidate region containing the ground control point is calculated by forward reasoning. i and position coordinates (u i ,v i ), and obtain the preliminary detection result of the sliding window on the corresponding scale image; During inference, set the image pyramid and sliding window strategy, including: While performing sliding window detection, a candidate region generation mechanism based on a region proposal network RPN is introduced into the target detection model in step S42; Using the preset ground control point prior features, a series of rectangular candidate boxes are generated through the RPN network. Each candidate box is represented by (x, y, w, h), where (x, y) is the center coordinate of the candidate box, and w and h are the width and height of the candidate box respectively; The RPN network extracts input features through a convolutional neural network and predicts the probability p of the candidate box containing the ground control point through two parallel fully connected layers. i And the correction amount of the candidate box position coordinates (Δx, Δy, Δw, Δh); Get the probability p i The candidate boxes above the threshold are selected, and the position and size of the obtained candidate boxes are adjusted with the correction value (Δx, Δy, Δw, Δh) of the position coordinates to obtain the RPN preliminary detection box on the corresponding scale image; Calculate the similarity between the sliding window candidate area and the RPN candidate box and the preset ground control point prior features respectively, and get the corresponding attention weight ws i and wr i ; For the i-th sliding window candidate region, the confidence c i Multiply by the corresponding ws i , get the weighted confidence cs i '; For the i-th RPN candidate box, the probability p i Multiply by the corresponding wr i , and obtain the weighted probability value pr i '; Set the confidence threshold c t , weighted confidence of sliding windows on all scale images {cs i '} and RPN weighted probability value {pr i '} is less than c t Eliminate the candidate regions or candidate frames to obtain the final candidate regions; The final candidate area is mapped back to the original resolution aerial image in step S2 according to the corresponding scale and position information to obtain the pixel coordinates of the ground control point on the corresponding image {(u i ,v i )} and the corresponding final confidence {c i }.

2. The terrain surveying and mapping method based on aerial surveying and mapping technology according to claim 1, Features: Establish a ground control network for the survey area, including: According to the survey area and terrain, determine the number N and distribution location of ground control points GCP. i |i=1,2,......,N}; where P i represents the initial spatial position of the i-th ground control point; At each initial spatial position P i Set the ground control point mark at each location, and use the GPS-RTK receiver to perform static measurement, and record the measured 3D coordinates (X i ,Y i ,Z i ); The measured 3D coordinates of all ground control points {(X i ,Y i ,Z i )|i=1,2,......,N} as observation values, construct observation equations, use known control point data as constraints, and use the least squares adjustment method to adjust the observation equations to obtain the three-dimensional coordinates (X i ',Y i ',Z i '); The adjustment solution adjusts the weight factor of the observation value through iterative calculation until the adjustment result converges to the optimal value; S34, the three-dimensional coordinates of each ground control point obtained by adjustment {(X i ',Y i ',Z i ')|i=1,2,......,N} as the benchmark, the ground control points are connected into a network according to the preset spatial topology rules to construct a three-dimensional control network of the survey area.

3. The terrain surveying and mapping method based on aerial surveying and mapping technology according to claim 1 or 2, Features: Construct a multi-feature fusion control point recognition model to determine the matching relationship between each ground control point in different aerial images, including: According to the pixel coordinates (u i ,v i ), taking the pixel coordinates as the center, obtain the image block containing the corresponding control point area on the aerial image; For each acquired ground control point image block, multi-scale features are extracted to construct a feature descriptor of the ground control point; The multi-scale feature descriptors of the same ground control point obtained from different aerial images {F i |i=1,2,......,m} as input, where m is the number of aerial images where the corresponding control point is observed; a deep learning method is used to train a multi-feature fusion control point recognition model to obtain the matching relationship between ground control points in different aerial images.

4. The terrain surveying and mapping method based on aerial surveying and mapping technology according to claim 3, Features: For each acquired ground control point image block, multi-scale features are extracted, including: In the HSV color space, the color histogram of the image block is calculated and the feature vector F reflecting the color distribution of the ground control point is extracted. color ; Perform Canny edge detection and contour extraction on the image block, calculate the geometric moment of the contour, and extract the feature vector F that reflects the shape of the ground control point shape ; Gabor wavelet transform is used to perform multi-scale and multi-directional texture analysis on image blocks to extract feature vectors F that reflect the texture of ground control points. texture ; The color, shape and texture feature vectors F color 、F shape and F texture Combined into the multi-scale feature descriptor F of the ground control point i .

5. The terrain surveying and mapping method based on aerial surveying and mapping technology according to claim 3, Features: A deep learning method is used to train a multi-feature fusion control point recognition model to obtain the matching relationship between ground control points in different aerial images, including: Construct a twin convolutional neural network and a triplet loss function to use the multi-scale features of paired ground control points (F i ,F j ) as input, and extract semantic features through a two-way weight-sharing convolution branch. The semantic features include edge contour structure features and multi-scale spatial structure features of the image block; A similarity measurement layer is set at the end of the twin convolutional neural network to measure the similarity of two ground control points by calculating the Euclidean distance between feature vectors; According to the matching relationship of the annotated ground control points, the matching control points are selected from the ground control point feature descriptors obtained from the multi-view aerial images as positive sample pairs (F a ,F p ); Randomly select mismatched control point pairs from the feature descriptors of different ground control points as negative sample pairs (F a ,F n ); Combined positive sample pairs (F a ,F p ) and negative sample pairs (F a ,F n ), forming a training triplet {(F a ,F p ,F n )}; Through the triple loss function constraint, the positive sample pair (F a ,F p ) is smaller than the feature distance of the negative sample pair (F a ,F n ) to enhance the distinguishability of control point matching; Using mini-batch gradient descent and back-propagation algorithms, the triplet loss function is iteratively optimized, the weight parameters of the twin convolutional neural network are updated, and the discriminative representation of control point features is learned; The trained control point recognition model is used to obtain the matching relationship between ground control points in different aerial images.

6. The terrain surveying and mapping method based on aerial surveying and mapping technology according to claim 5, Features: The trained control point recognition model is used to obtain the matching relationship between ground control points in different aerial images, including: Extract multi-scale feature descriptors for each ground control point from different aerial images; The multi-scale feature descriptors of any two ground control points are combined in pairs to form a feature descriptor pair (F i ,F j ); Each pair of feature descriptors (F i ,F j ) as input, and using the trained control point recognition model, the similarity measurement layer calculates (F i ,F j )’s eigenvector f used_feat_i and f used_feat_j The Euclidean distance d between ij , as the similarity score of these two ground control points; For all control point pairs (F i ,F j )’s similarity score f used_feat_j d ij Perform permutations and combinations to construct an N×N ground control point similarity matrix S, where N is the total number of ground control points and S(i,j)=d ij ; Perform maximum value suppression processing on the similarity matrix of ground control points row by row and column by column; Set a similarity threshold, and determine the control point pairs whose similarity scores are greater than the threshold and are the maximum values ​​of the row and column as matches; The multi-viewpoint same-name point matching relationship of each ground control point between different aerial images is obtained as the matching relationship of the ground control point between different aerial images.

7. The terrain surveying and mapping method based on aerial surveying and mapping technology according to claim 5, Features: The triplet loss function expression is as follows: Among them, L(θ) represents the triple loss function, which is used to measure the relative distance relationship between positive and negative sample pairs; θ represents the weight parameter of the twin convolutional neural network; F a represents the reference ground control point feature descriptor in the training triple {(Fa, Fp, Fn)}; Phard represents the positive sample pair (F a ,F p ) K samples with the largest distance; N hard Denotes a negative sample pair (F a ,F n ) with the smallest distance among the K samples; f(*; θ) represents the twin convolutional neural network mapping function fused with the attention mechanism, which is used to extract the high-level semantic features of the ground control points; d(*,*) represents the Euclidean distance metric function between the feature vectors output by the twin network; λ s Represents the scale adaptive weight coefficient, which is adaptively adjusted according to the importance of the feature scale s. α is a hyperparameter that controls the scale weight distribution; m represents a constant margin term greater than 0, which is used to control the distance interval between positive and negative sample pairs; γ represents a balance parameter that controls the weight of the polar constraint loss term; d epi (*,*) represents the epipolar constraint distance metric function, which is used to measure the consistency error of matching point pairs under epipolar geometry; conv(*) represents the convolution feature extraction function, which performs convolution operation on the input ground control point feature descriptor to extract multi-scale convolution feature maps; att(*) represents the attention weight function, which generates regional significance weights for the convolution feature map to highlight semantically significant areas; Represents the element-by-element multiplication operator, which is used to weight the attention weight map and the convolution feature map pixel by pixel to obtain the fused attention enhanced features.