Scenic spot 3D scene construction method and system based on spatial positioning
Patent Information
- Application Number
- CN202511604175.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-05
- Publication Date
- 2025-12-05
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
[0004]为解决上述技术问题,提供一种基于空间定位的景区3D场景构建方法及系统,本技术方案解决了上述背景技术中提出的现有基于空间定位的景区3D场景构建方法的数据采集流程零散,多依赖单一设备采集,未结合景区功能分区与复杂度动态调整精度,易导致核心区域数据冗余或边缘区域数据缺失,同时其建模精度把控不足,建筑初始模型构建未充分融合多视角特征匹配与空间定位矩阵,缺乏点云数据的精细化校准,模型与实地偏差较大的问题
本方案提出的一种基于空间定位的景区3D场景构建方法,通过结合景区规划红线与核心景点分布确定采集范围,动态调整数据精度并采集图像、视频、点云多源数据,同步经预处理得到目标景区场景数据,实现了场景数据精准全面获取,保障建模数据可靠性;通过SIFT算法提取特征点、FLANN匹配器筛选、Bundle Adjustment算法优化相机参数构建空间定位矩阵,结合Mask R - CNN分割建筑区域与三角测量法计算世界坐标,实现3D建筑初始子模型结构化构建;通过Li DAR点云数据分类与偏差矩阵两次修正模型,实现3D建筑初始子模型高精度优化;通过高斯-克吕格投影转换GPS坐标并校准,实现GPS与3D子场景精准映射;通过ICP算法对齐子场景、LOD技术优化,实现子场景无缝拼接,最终实现景区3D标准场景高质量构建,全流程标准化自动化,减少人工干预,提升效率与精度,满足景区多场景应用需求。
Smart Images

Figure CN121074271A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of digital scenic spots, in particular to a method and system for constructing a 3D scene of a scenic spot based on spatial positioning. BACKGROUND
[0002] With the promotion of digital tourism and smart scenic spot construction, the application demand of 3D scenes of scenic spots in the fields of tour guide, planning and design, emergency management, etc. is increasingly urgent. High-precision 3D scenes of scenic spots can provide immersive virtual tour experience for tourists, provide spatial decision support for scenic spot managers, and help achieve fine management and sustainable development of scenic spot resources. It is a key technical support for promoting the transformation of scenic spots from traditional operation to smart operation.
[0003] However, the data collection process of the existing method for constructing a 3D scene of a scenic spot based on spatial positioning is scattered, and it relies on single device collection. The precision is not dynamically adjusted in combination with the functional zoning and complexity of the scenic spot, which may lead to data redundancy in the core area or data loss in the edge area. In addition, the modeling precision is not well controlled, the initial model of the building is not fully fused with multi-angle feature matching and spatial positioning matrix, and the fine calibration of point cloud data is lacking, resulting in a large deviation between the model and the actual site. Therefore, a method and system for constructing a 3D scene of a scenic spot based on spatial positioning are needed to solve the above problems. SUMMARY
[0004] To solve the above technical problems, a method and system for constructing a 3D scene of a scenic spot based on spatial positioning are provided. The technical solution solves the problem of the existing method for constructing a 3D scene of a scenic spot based on spatial positioning, which is scattered in data collection process, relies on single device collection, and does not dynamically adjust the precision in combination with the functional zoning and complexity of the scenic spot, which may lead to data redundancy in the core area or data loss in the edge area. In addition, the modeling precision is not well controlled, the initial model of the building is not fully fused with multi-angle feature matching and spatial positioning matrix, and the fine calibration of point cloud data is lacking, resulting in a large deviation between the model and the actual site.
[0005] To achieve the above purposes, the technical solution adopted by the present application is as follows: A method for constructing a 3D scene of a scenic spot based on spatial positioning, comprising: obtaining target scenic spot scene data; based on the target scenic spot scene data, determining a spatial positioning matrix, and based on the spatial positioning matrix, sequentially constructing 3D building initial sub-models in the target scenic spot; obtaining target scenic spot point cloud data, correcting the 3D building initial sub-models to obtain 3D building standard sub-models; obtaining a position positioning information table corresponding to the 3D building standard sub-models, and constructing a scenic spot 3D sub-scene in combination with the corresponding target scenic spot scene data. obtaining GPS positioning information corresponding to the target scenic spot scene data, and mapping the GPS positioning information to a 3D sub-scene of the scenic spot to obtain a 3D standard sub-scene of the scenic spot; splicing the 3D standard sub-scene of the scenic spot to obtain a 3D standard scene of the scenic spot.
[0006] In an optional embodiment, the target scenic spot scene data is obtained, specifically including: obtaining a scenic spot planning red line and a core scenic spot distribution to determine a scene data collection range; generating a collection area vector boundary file based on the scene data collection range using Arc GIS software, wherein boundary point coordinates are in a CGCS2000 coordinate system, and the boundary point coordinates are denoted as a boundary point set; obtaining a Euclidean distance between adjacent boundary points to determine a core tour area and a peripheral buffer area; obtaining a building density and a terrain undulation in the core tour area and the peripheral buffer area to determine a scenic spot scene complexity and determine a data collection accuracy level; determining a collection parameter and a collection method based on the data collection accuracy level, and simultaneously determining a grid spacing based on the collection area vector boundary file and the data collection accuracy level; determining a fly-around point based on the core scenic spot distribution and the collection area vector boundary file; planning a UAV flight path according to the grid spacing and the fly-around point; controlling a UAV to collect scenic spot scene images according to the UAV flight path, and simultaneously recording a shooting coordinate and a shooting pose of each scenic spot scene image in real time through a GNSS RTK positioning instrument during the collection to obtain shooting metadata; embedding the shooting metadata in a scenic spot scene image file header to obtain an original scene image data set; determining a dynamic element dense area distribution in the collection area through the original scene image data set, and then arranging a video collection device to obtain an original scene video data set; respectively pre-processing the original scene image data set and the original scene video data set to obtain qualified target scenic spot scene data.
[0007] In an optional embodiment, the target scenic spot scene data is used to determine a spatial positioning matrix, and 3D building initial sub-models in the target scenic spot are sequentially constructed based on the spatial positioning matrix, specifically including: based on the target scenic spot scene data, obtaining the pre-processed original scene image data set, and simultaneously using a SIFT algorithm to extract image feature points to obtain a feature point set of each image in the pre-processed original scene image data set, integrating all the feature point sets to obtain a global feature point set; Based on the global feature point set, the FLANN matcher is used for feature point matching to obtain an initial matching feature point set of different images; The Euclidean distance of two feature vectors in the initial matching feature point set of different images is obtained, the Euclidean distance threshold is set synchronously, and the initial matching feature point set of different images corresponding to the feature vectors with the Euclidean distance greater than the Euclidean distance threshold is taken as a standard matching feature point set; Based on the standard matching feature point set and the shooting coordinates and attitude parameters of the shooting metadata in the original scene image dataset, the Bundle Adjustment algorithm is used to obtain the camera internal and external parameters; The minimum reprojection error is obtained, and the camera internal and external parameters are iteratively optimized synchronously until the minimum reprojection error is less than 1 pixel, and the optimized camera internal and external parameters are obtained; Based on the optimized camera internal and external parameters, a spatial positioning matrix is constructed, wherein for each image, the spatial positioning matrix is used to describe the mapping relationship between the image pixel coordinates and the world coordinates; The spatial positioning matrices of all images are integrated to obtain a spatial positioning matrix set; Based on the target scenic area scene data, the preprocessed original scene video dataset is obtained, and the preprocessed key frame set is extracted therefrom, the Mask R-CNN model is used for building area segmentation, and a building feature point set is obtained; Based on the spatial positioning matrix set and the building feature point set, the world coordinates of the building feature points are calculated using the triangulation method to obtain a building feature point world coordinate set; Based on the building feature point world coordinate set, a 3D initial sub-model framework is constructed using the Sketch Up software; Based on the preprocessed original scene image dataset, the texture image of the building area is extracted, and the UV mapping relationship between the texture image and the building surface is determined according to the spatial positioning matrix, the texture is attached to the surface of the 3D initial sub-model framework through the UV unfolding tool, and the building attribute metadata is added synchronously to obtain a 3D building initial sub-model.
[0008] In an optional embodiment, the target scenic area point cloud data is obtained, the 3D building initial sub-model is corrected, and a 3D building standard sub-model is obtained, specifically including: Based on the position distribution of the 3D building initial sub-model in the target scenic area, a LiDAR point cloud collection path is planned to obtain a point cloud collection path file; Based on the point cloud collection path file, the unmanned aerial vehicle carrying the LiDAR device is controlled to collect point clouds to obtain an original point cloud dataset; According to the original point cloud dataset, the Cloud Compare software is used for preprocessing to obtain a registered point cloud dataset; By registering the post-registration point cloud dataset, a point cloud classification is performed using a random forest classification algorithm to obtain a building point cloud dataset; Based on the 3D building initial sub-model and the building point cloud dataset, a model and point cloud deviation matrix is obtained; The 3D building initial sub-model is corrected for the first time through the model and point cloud deviation matrix; The 3D building initial sub-model after the first correction is corrected for the second time based on the building point cloud dataset; The 3D building initial sub-model after the second correction is verified for quality, and the 3D building standard sub-model that passes the verification is used as the 3D building standard sub-model.
[0009] In an optional embodiment, the 3D building standard sub-model corresponding position positioning information table is obtained, and the corresponding target scenic area scene data is combined to construct a scenic area 3D sub-scene, specifically including: The model attribute file corresponding to each 3D building standard sub-model is obtained, and the center point coordinates, orientation angle and bounding box coordinate range are extracted, and after integration, the position positioning information table is obtained; Based on the pre-processed original scene image dataset and original scene video dataset in the target scenic area scene data, a non-building element feature table is extracted; Based on the non-building element feature table, a vegetation model is constructed using Speed Tree software, and a road and water system model is constructed using Civil3D software, thereby obtaining a non-building element 3D model set; The scenic area function partition is obtained, and the position positioning information table is used to determine the sub-scene division scheme; According to the sub-scene division scheme, the corresponding models are extracted from all 3D building standard sub-models and non-building element model sets to obtain a sub-scene model set; The post-registration point cloud dataset is obtained, and a sub-scene terrain model is constructed using Global Mapper software; The motion trajectory information in the pre-processed original scene video dataset is obtained, and interactive logic is added to the sub-scene basic framework, thereby determining the scenic area 3D sub-scene.
[0010] In an optional embodiment, the GPS positioning information corresponding to the target scenic area scene data is obtained, and is mapped into the scenic area 3D sub-scene to obtain a scenic area 3D standard sub-scene, specifically including: The metadata of the target scenic area scene data is obtained, thereby extracting the GPS positioning information and determining the original GPS data set; The Gauss-Kruger projection algorithm is used to convert the longitude and latitude coordinates in the original GPS data set into CGCS2000 plane rectangular coordinates to obtain the converted GPS coordinate set; Determine the association between the GPS coordinates and the sub-scenes based on the 3D sub-scenes of the scenic spots and the converted GPS coordinate set, and obtain an association table; Map the GPS coordinates to the corresponding 3D sub-scenes of the scenic spots according to the association table, and obtain a sub-scene set containing GPS markers; Obtain the GPS coordinates and plane coordinates of at least three known control points in the scenic spot, calibrate the sub-scene set containing GPS markers, obtain the control point mapping deviation, and then construct a linear correction model, and then apply the linear correction model to all mapped GPS coordinates to obtain a calibrated GPS coordinate set; Update the GPS markers in the sub-scenes based on the calibrated GPS coordinate set, and obtain a sub-scene set containing accurate GPS markers; Develop a GPS interaction function through the sub-scene set containing accurate GPS markers, and obtain a sub-scene set containing GPS interaction functions; Verify the functions and accuracy of the sub-scene set containing GPS interaction functions, and use the sub-scene set containing GPS interaction functions that pass the verification as the 3D standard sub-scenes of the scenic spot.
[0011] In an optional embodiment, the 3D standard sub-scenes of the scenic spot are spliced to obtain a 3D standard scene of the scenic spot, specifically including: Extract the center point coordinates and bounding box coordinates corresponding to each 3D standard sub-scene of the scenic spot, calculate the distance matrix of the center point coordinates of all 3D standard sub-scenes of the scenic spot, determine the spatial adjacency relationship of the sub-scenes, and obtain an adjacency table; Determine the sub-scene splicing order based on the adjacency table, and thus determine a splicing order table; Select the 3D standard sub-scene of the scenic spot as the reference sub-scene for the initial splicing through the splicing order table, and extract the coordinate system parameters of the reference sub-scene as the global splicing coordinate system; Extract the splicing feature points of the adjacent 3D standard sub-scene combination in sequence, establish a feature point pair set, and the adjacent 3D standard sub-scene combination includes a first standard sub-scene and a second standard sub-scene; Obtain a sub-scene alignment transformation matrix through the feature point pair set, and then use the sub-scene alignment transformation matrix to transform all model point coordinates corresponding to the first standard sub-scene to the reference coordinate system, and realize alignment with the second standard sub-scene; Align all adjacent 3D standard sub-scene combinations in sequence, then obtain an overlapping area, and obtain repeated models in the overlapping area, simultaneously filter the repeated models in the overlapping area, and retain high-precision models, thereby constructing a spliced scene without overlapping defects; The global optimization is performed on the spliced scene to obtain an optimized spliced scene, and then the overall verification is performed on the optimized spliced scene, and finally the 3D standard scene of the scenic spot is obtained.
[0012] Further, a 3D scene construction system of a scenic spot based on spatial positioning is provided for implementing the construction method of any one of the above, comprising: A data acquisition and preprocessing module is configured to determine a scene data acquisition range, plan a flight path of a UAV to collect image and video data, record shooting metadata synchronously, and preprocess the collected raw data to obtain qualified target scenic spot scene data. A 3D building initial model construction module is configured to extract image feature points and match them, optimize camera parameters to construct a spatial positioning matrix, segment a building area and calculate feature point world coordinates, and construct a 3D building initial submodel. A model correction and optimization module is configured to plan a LiDAR point cloud collection path and collect point cloud data, correct the 3D building initial submodel based on the point cloud data after preprocessing and classification, and obtain a 3D building standard submodel. A scene integration and output module is configured to construct a 3D sub-scene of a scenic spot, map GPS positioning information and calibrate it, splice sub-scenes, and obtain a 3D standard scene of the scenic spot.
[0013] In an optional embodiment, the data acquisition and preprocessing module comprises: An acquisition range determination unit is configured to obtain a scenic spot planning red line and a core scenic spot distribution, and determine a scene data acquisition range. A vector boundary generation unit is configured to generate a collection area vector boundary file of a CGCS2000 coordinate system based on the acquisition range using ArcGIS software. A region division unit is configured to calculate the Euclidean distance of adjacent boundary points, and determine a core tour area and a peripheral buffer area. A precision level determination unit is configured to obtain a building density and a terrain undulation, and determine a scenic spot scene complexity and a data acquisition precision level. A flight path planning unit is configured to determine a grid spacing and a surrounding flight point based on the precision level, and plan a UAV flight path. An image collection unit is configured to control a UAV to collect scenic spot scene images according to the flight path, and record shooting coordinates and attitudes by a GNSS RTK positioning instrument to obtain shooting metadata. An image dataset generation unit is configured to embed shooting metadata into an image file header to obtain an original scene image dataset; A video acquisition unit is configured to arrange equipment according to a dynamic element dense area distribution to obtain an original scene video dataset; A data preprocessing unit is configured to preprocess the original scene image dataset and the original scene video dataset respectively to obtain a target scenic spot scene dataset.
[0014] In an optional embodiment, the 3D building initial model construction module comprises: A feature point extraction unit is configured to extract feature points of the preprocessed original scene image dataset using a SIFT algorithm to obtain a global feature point set; A feature point matching unit is configured to perform feature point matching using a FLANN matcher and combine Euclidean distance threshold screening to obtain a standard matching feature point set; A camera parameter acquisition unit is configured to acquire and iteratively optimize camera internal and external parameters using a Bundle Adjustment algorithm based on the standard matching feature points and the shooting metadata; A space positioning matrix construction unit is configured to construct and integrate a space positioning matrix set mapping image pixel coordinates and world coordinates based on the optimized camera parameters; A building area segmentation unit is configured to extract key frames from the original scene video dataset, segment a building area using a Mask R-CNN model, and obtain a building feature point set; A world coordinate calculation unit is configured to calculate building feature point world coordinates using a triangulation method based on the space positioning matrix set and the building feature point set; A model framework construction unit is configured to construct a 3D initial sub-model framework based on the building feature point world coordinates using Sketch Up software; A texture fitting unit is configured to extract a building texture image, determine a UV mapping relationship and fit the texture, add attribute metadata, and obtain a 3D building initial sub-model.
[0015] Compared with the prior art, the present application has the following advantages: The scheme provides a 3D scene construction method of a scenic spot based on spatial positioning, determines a collection range by combining a scenic spot planning red line and core scenic spot distribution, dynamically adjusts data precision and collects image, video and point cloud multi-source data, synchronously obtains target scenic spot scene data through preprocessing, realizes accurate and comprehensive acquisition of scene data, and guarantees modeling data reliability; a spatial positioning matrix is constructed by extracting feature points through a SIFT algorithm, screening through an FLANN matcher, and optimizing camera parameters through a Bundle Adjustment algorithm, world coordinates are calculated by combining Mask R-CNN segmentation of a building area and a triangulation method, and 3D building initial submodel structured construction is realized; the 3D building initial submodel is high-precision optimized by twice correction of a model through LiDAR point cloud data classification and a deviation matrix; GPS and 3D subscene accurate mapping is realized by converting GPS coordinates and calibration through Gauss-Krueger projection; seamless subscene splicing is realized by aligning subscenes through an ICP algorithm and optimizing through an LOD technology, and finally, high-quality construction of a 3D standard scene of a scenic spot is realized, the whole process is standardized and automated, manual intervention is reduced, efficiency and precision are improved, and application requirements of multiple scenes of a scenic spot are met. BRIEF DESCRIPTION OF DRAWINGS
[0016] Figure 1 A flowchart of a 3D scene construction method of a scenic spot based on spatial positioning is provided in the present application. Figure 2 A flowchart of acquisition of a 3D building initial submodel in the present application. Figure 3 A flowchart of acquisition of a 3D building standard submodel in the present application. Figure 4 A system framework diagram of a 3D scene construction system of a scenic spot based on spatial positioning provided in the present application. DETAILED DESCRIPTION
[0017] The following description is used to disclose the present application so that those skilled in the art can implement the present application. The preferred embodiments in the following description are only used as examples, and other obvious modifications can be thought of by those skilled in the art.
[0018] REFERENCE Figure 1 - Figure 4 As shown in the figure, a 3D scene construction method of a scenic spot based on spatial positioning comprises: Acquiring target scenic spot scene data; Based on the target scenic spot scene data, a spatial positioning matrix is determined, and based on the spatial positioning matrix, 3D building initial submodels in the target scenic spot are sequentially constructed; Acquiring target scenic spot point cloud data, correcting the 3D building initial submodel, and obtaining a 3D building standard submodel; Obtain the position positioning information table corresponding to the 3D building standard sub-model, and combine the corresponding target scenic spot scene data to construct a 3D sub-scene of the scenic spot; Obtain the GPS positioning information corresponding to the target scenic spot scene data, and map it to the 3D sub-scene of the scenic spot to obtain a 3D standard sub-scene of the scenic spot; Splice the 3D standard sub-scene of the scenic spot to obtain a 3D standard scene of the scenic spot.
[0019] Further, the target scenic spot scene data is obtained, specifically including: Obtain the scenic planning red line and the core scenic spot distribution to determine the scene data collection range; Based on the scene data collection range, use Arc GIS software to generate a collection area vector boundary file, wherein the boundary point coordinates adopt CGCS2000 coordinate system, denoted as a boundary point set; Obtain the Euclidean distance between adjacent boundary points to determine the core tour area and the peripheral buffer area; Obtain the building density and terrain relief in the core tour area and the peripheral buffer area to determine the complexity of the scenic spot scene and the data collection accuracy level; Based on the data collection accuracy level, determine the collection parameters and collection methods, and based on the collection area vector boundary file and the data collection accuracy level, obtain the grid spacing; Based on the core scenic spot distribution and the collection area vector boundary file, determine the surrounding flight points; According to the grid spacing and the surrounding flight points, plan the unmanned aerial vehicle flight path; According to the unmanned aerial vehicle flight path, control the unmanned aerial vehicle to collect the scenic spot scene image, and at the same time in the collection process, record the shooting coordinates and shooting posture of each scenic spot scene image in real time through the GNSS RTK positioning instrument to obtain shooting metadata; Embed the shooting metadata into the scenic spot scene image file header to obtain the original scene image data set; Determine the dynamic element dense area distribution in the collection area through the original scene image data set, and then arrange the video collection equipment to obtain the original scene video data set; Preprocess the original scene image data set and the original scene video data set respectively to obtain qualified target scenic spot scene data: Based on the original scene image data set , use Photo shop software for preprocessing; Firstly, remove the noise through Gaussian filtering, the filter kernel size is 5x5, the standard deviation σ=1.2, and the calculation formula is ; Color correction is then performed to adjust the brightness and contrast of the image to the standard range (brightness 50-80, contrast 40-60), obtaining the pre-processed image dataset ; Based on the original scene video dataset , preprocessing is performed using Premiere Pro software; Anti-shake processing is performed on each video segment, and a motion tracking algorithm is used to correct lens jitter; Key frames are then extracted with an extraction interval of 10 frames per frame, obtaining a key frame image set , and the same noise reduction and color correction processing as the image is performed on the key frames, obtaining the pre-processed video dataset and the pre-processed key frame set ; Based on the pre-processed image dataset and the pre-processed video dataset , data quality inspection is performed; inspection indicators include image clarity (contrast is calculated by calculating the gray level co-occurrence matrix, requiring ≥60), video smoothness (frame rate fluctuation ≤±2 fps), and positioning information integrity (metadata loss rate ≤0.1%); Unqualified data is re-collected and pre-processed, and finally qualified target scenic area scene data is obtained, including , and .
[0020] Specifically, in the process of obtaining the target scenic area scene data, based on the scenic area planning red line and the distribution of core scenic spots, the scene data collection range is determined, and according to the collection range, the Arc GIS software is used to generate a collection area vector boundary file, wherein the boundary point coordinates adopt the CGCS2000 coordinate system, denoted as the boundary point set: , the Euclidean distance between adjacent boundary points is calculated: ; to ensure that the collection range completely covers the core scenic area and the peripheral 50-meter buffer area, wherein i is an index value, used to describe that i and i+1 are two adjacent boundary points, i∈n; According to the complexity of the scenic area scene (such as building density and terrain undulation), the data collection accuracy level is determined: if the building density ≥0.3 buildings / 100㎡ and the terrain undulation ≥5°, the image resolution ≥300 dpi, the video frame rate ≥30 fps, and the positioning accuracy ≤±5 cm are set; Based on this accuracy level, a drone equipped with a 50 million pixel tilt photography camera, a 4K high-definition video collection device, and a GNSS RTK positioning instrument are selected as the collection tools; determine the collection parameters and the collection method based on the data collection accuracy level, and based on the collection region vector boundary file and the data collection accuracy level, obtain a grid spacing; determine the fly-around points based on the core scenic spot distribution and the collection region vector boundary file; plan the unmanned aerial vehicle flight path according to the grid spacing and the fly-around points” is specifically: a “grid + fly-around” combined path planning strategy is adopted, the grid spacing is set to where f is the camera focal length and θ is the camera field of view angle, to ensure that the adjacent image overlap rate is ≥60% and the heading overlap rate is ≥80%; The fly-around flight path is adopted for the core scenic spot (fly-around point), the flight radius r = 50 m, and the number of flight circles is ≥2 circles.
[0021] Specifically, in the collection process, the GNSS RTK positioning instrument records the shooting coordinates and the shooting attitude (roll angle a, pitch angle β, and yaw angle γ) of each image in real time, and embeds these metadata into the image file header; After the collection is completed, the original scene image dataset is obtained, wherein each image contains pixel data and metadata; Through the original scene image dataset, the dynamic element dense area distribution in the collection region is determined, and then the video collection device is arranged to obtain the original scene video dataset, which is specifically based on the dynamic element dense area distribution of the main roads, scenic spot entrances and the like in the collection region to arrange the video collection device; The device arrangement spacing is determined as where w is the effective coverage width of a single device and θ is the device field of view angle, to ensure that there is no collection blind area; Start the device to collect 24-hour video data continuously, generate 1 video segment every hour, add metadata such as collection location coordinates and time stamp to each segment, and obtain the original scene video dataset ; It can be understood that by combining the scenic area planning red line and the core scenic spot distribution to determine the collection range, dynamically adjusting the data collection accuracy, synchronously collecting image, video and point cloud multi-source data and preprocessing, the accurate and comprehensive acquisition of the target scenic area scene data is realized, the core area data redundancy or the edge area data missing is avoided, and the data basis reliability for subsequent modeling is ensured.
[0022] Further, based on the target scenic area scene data, a spatial positioning matrix is determined, and based on the spatial positioning matrix, 3D building initial sub-models in the target scenic area are sequentially constructed, specifically including: Based on the target scenic spot scene data, the pre-processed original scene image dataset is obtained, the SIFT algorithm is used to extract the image feature points synchronously, the feature point set of each image in the pre-processed original scene image dataset is obtained, all the feature point sets are integrated, and the global feature point set is obtained: Based on the pre-processed image dataset , the SIFT algorithm is used to extract the image feature points; Through the steps of constructing a scale space, detecting extreme points, accurately positioning key points, assigning direction information, and generating feature descriptors, the feature point set of each image is obtained: , wherein each feature point contains coordinates (u, v), scale sigma, direction theta, and a 128-dimensional feature vector; Integrate all image feature points to obtain a global feature point set: ; Based on the global feature point set, use the FLANN matcher to match the feature points to obtain the initial matching feature point set of different images: Based on the global feature point set S, use the FLANN matcher to match the feature points; Calculate the Euclidean distance of the feature vectors of two feature points , set the distance threshold T = 0.7, and determine the matching feature point pair when d < T, to obtain the feature point matching pair set , wherein , , are the matching feature points in different images; Get the Euclidean distance of two feature vectors in the initial matching feature point set of different images, set the Euclidean distance threshold synchronously, and take the initial matching feature point set of different images corresponding to the feature vector with a Euclidean distance greater than the Euclidean distance threshold as the standard matching feature point set; Based on the standard matching feature point set and the shooting coordinates and attitude parameters of the shooting metadata in the original scene image dataset, use the Bundle Adjustment algorithm to obtain the camera internal and external parameters, minimize the re-projection error, and iteratively optimize the camera internal and external parameters synchronously until the minimized re-projection error is less than 1 pixel, and the optimized camera internal and external parameters are obtained. Specifically, based on the standard matching feature point set M and the shooting coordinates and attitude parameters in the image metadata, the Bundle Adjustment algorithm is used to calculate the camera internal and external parameters; Intrinsic matrix: ; , wherein , is the focal length, , The principal point coordinates are; the extrinsic parameter matrix is [R|t], R is a 3*3 rotation matrix, and t is a 3*1 translation vector; By minimizing the re-projection error ((π is a perspective projection function, and P is a world coordinate), the parameters are iteratively optimized until E<1 pixel, and the optimized camera parameters are obtained; Based on the optimized camera internal and external parameters, a spatial positioning matrix is constructed, wherein for each image, the spatial positioning matrix is used to describe the mapping relationship between the image pixel coordinates and the world coordinates, and specifically, based on the optimized camera internal and external parameters, a spatial positioning matrix is constructed; for each image, the spatial positioning matrix is used to describe the mapping relationship between the image pixel coordinates and the world coordinates, that is , wherein λ is a scale factor; Integrate the spatial positioning matrices of all images to obtain a spatial positioning matrix set ; Based on the target scenic spot scene data, a pre-processed original scene video data set is obtained, and a pre-processed key frame set is extracted therefrom, an architectural feature point set is obtained by using a Mask R-CNN model for building area segmentation, and specifically, based on the pre-processed key frame set , a Mask R-CNN model is used for building area segmentation; through the steps of feature extraction, region proposal, classification and mask generation, the building area binary mask of each key frame is obtained , and the region with a mask value of 1 corresponds to a building; Combined with the feature point matching pair set M, the feature points located in the building area are screened out to obtain a building feature point set: ; Based on the spatial positioning matrix set and the building feature point set, the world coordinates of the building feature points are calculated using the triangulation method to obtain a building feature point world coordinate set, and specifically, based on the spatial positioning matrix set M and the building feature point set , the world coordinates of the building feature points are calculated using the triangulation method; For a matching feature point pair , projection equations are established through the spatial positioning matrices , of the corresponding images, and the world coordinates are obtained by simultaneous solution ; The mean value of multiple sets of solving results of the same feature point is taken to obtain a building feature point world coordinate set: ; Based on the building feature point world coordinate set , a 3D building initial sub-model framework is constructed using Sketch Up software; According to the spatial distribution of the feature points, the geometric structure of the wall, roof and the like of the building is fitted, for a rectangular building, the length , width , height is determined by the feature points, and a cuboid basic model is constructed; For a special-shaped building, the feature points are connected by Delaunay triangulation to form an irregular geometric surface, and an initial geometric model of the building is obtained; Based on the preprocessed original scene image data set, a texture image of the building region is extracted, and the UV mapping relationship between the texture image and the building set surface is determined according to the spatial positioning matrix. The texture is attached to the surface of the 3D initial sub-model frame through a UV unfolding tool, and the building attribute metadata is added synchronously, so as to obtain a 3D building initial sub-model. After the specific 3D building initial sub-model is integrated, a 3D building initial sub-model set can be obtained: Each sub-model in the set includes geometric, texture and attribute data.
[0023] It can be understood that the SIFT algorithm is used to extract feature points, the FLANN matcher is used to screen matching pairs, the Bundle Adjustment algorithm is used to optimize camera parameters to construct a spatial positioning matrix, the Mask R-CNN is used to segment the building region, and the triangulation method is used to calculate the world coordinates of the feature points, so as to realize the structured construction of the 3D building initial sub-model, and ensure that the model geometric structure is preliminarily consistent with the actual building.
[0024] Further, the target scenic spot point cloud data is acquired, the 3D building initial sub-model is corrected, and a 3D building standard sub-model is obtained, which specifically includes: Based on the position distribution of the 3D building initial sub-model in the target scenic spot, a LiDAR point cloud collection path is planned, and a point cloud collection path file is obtained; Based on the point cloud collection path file, the unmanned aerial vehicle carrying the LiDAR device is controlled to collect point clouds, and an original point cloud data set is obtained; According to the original point cloud data set, the Cloud Compare software is used for preprocessing, and a registered point cloud data set is obtained; Through the registered point cloud data set, a random forest classification algorithm is used for point cloud classification, and a building point cloud data set is obtained; Based on the 3D building initial sub-model and the building point cloud data set, a model and point cloud deviation matrix is obtained; Through the model and point cloud deviation matrix, the 3D building initial sub-model is corrected for the first time; Based on the building point cloud data set, the 3D building initial sub-model after the first correction is corrected for the second time; The second revised 3D building initial sub-model is verified in quality, and the verified 3D building initial sub-model is taken as the 3D building standard sub-model.
[0025] Specifically, based on the position distribution of the set of 3D building initial sub-models , a LiDAR point cloud collection path is planned; a "layered flight" strategy is adopted, for a region with a building height H≤10m, the flight height is set to H+5m, and for a region with H>10m, the flight height is set to 1.5H, to ensure that the point cloud density is ≥200 points / ㎡; the path spacing is set to , where R is the scanning radius and θ is the scanning angle, to obtain a point cloud collection path file. Based on the point cloud collection path file, a UAV carrying a LiDAR device is controlled to collect point clouds; during the collection process, the position coordinates and attitude parameters of the LiDAR device are recorded in real time through GNSS RTK, and the sampling frequency is set to 10Hz; after the collection is completed, an original point cloud dataset is obtained, each point containing three-dimensional coordinates , reflection intensity I and collection timestamp.
[0026] Based on the original point cloud dataset , Cloud Compare software is used for preprocessing; first, statistical filtering is used to remove noise points, setting the number of neighborhood points k=15, when the distance from the point to the neighborhood point mean distance is greater than the mean plus 2 times the standard deviation, it is determined as a noise point and deleted; then the ICP algorithm is used for point cloud registration, selecting 3 scenic control points as the registration reference, the registration error is controlled within ±3cm, to obtain the registered point cloud dataset . Based on the registered point cloud dataset , a random forest classification algorithm is used for point cloud classification; the elevation, reflection intensity, normal vector and other features of the points are extracted, and the classification model is trained to classify the point cloud into ground points, building points, vegetation points and other points; the building points are selected to obtain the building point cloud dataset: . Based on the set of 3D building initial sub-models and the building point cloud dataset , the deviation of the model and the point cloud is calculated;
[0027] For each initial sub-model , the surface triangular patches are traversed, and the distance from each point in the building point cloud to the nearest patch is calculated , where P is the point cloud coordinate, is a point on the patch, and n is the patch normal vector; the deviation value is counted to obtain the average deviation, the maximum deviation and the standard deviation.
[0028] Based on the deviation statistical result, when the average deviation is greater than 5cm, the 3D building initial sub-model is geometrically corrected; For wall deviation, the wall vertex coordinates are adjusted by fitting the point cloud surface through the moving least squares method, and the fitting formula is: ; wherein is a weight function; For door and window position deviation, the door and window are repositioned according to the coordinates of the intermittent area in the point cloud, and the size and position parameters of the door and window are corrected. Based on the reflection intensity and color information of the building point cloud dataset, the texture of the sub-model is corrected; for the texture misplacement area, the corresponding texture in the preprocessed image is re-extracted, the UV mapping parameters are adjusted according to the point cloud coordinates, and the texture pixels are ensured to correspond one-to-one with the point cloud spatial position; for the color deviation area, the texture color is adjusted through the histogram matching algorithm, so that the similarity between the model color and the point cloud color is greater than or equal to 90%. Based on the corrected sub-model, quality verification is performed; the deviation between the model and the point cloud is calculated again, and the average deviation is required to be less than or equal to 5 cm, and the maximum deviation is required to be less than or equal to 10 cm; at the same time, the geometric integrity (no leakage, overlapping surface) and the texture consistency (no stretching, distortion) of the model are checked; after verification, a set of 3D building standard sub-models are obtained and stored in FBX format.
[0029] It can be understood that through LiDAR point cloud data acquisition and classification, two corrections are made based on the model and point cloud deviation matrix and quality verification, high-precision optimization of the 3D building initial sub-model is realized, the 3D building standard sub-model is obtained, the spatial deviation between the model and the field is greatly reduced, and the detail authenticity of the building model is improved.
[0030] Further, the position positioning information table corresponding to the 3D building standard sub-model is obtained, and combined with the corresponding target scenic area scene data, a scenic area 3D sub-scene is constructed, specifically including: The model attribute file corresponding to each 3D building standard sub-model is obtained, and the center point coordinates, orientation angle and bounding box coordinate range are extracted, and after integration, the position positioning information table is obtained; Based on the preprocessed original scene image dataset and the original scene video dataset in the target scenic area scene data, a non-building element feature table is extracted; Based on the non-building element feature table, a vegetation model is constructed using Speed Tree software, and a road and water system model is constructed using Civil3D software, thereby obtaining a non-building element 3D model set; The function partition of the scenic area is obtained, and the position positioning information table is used to determine the sub-scene division scheme; According to the sub-scene division scheme, the corresponding models are extracted from all 3D building standard sub-models and non-building element model sets to obtain a sub-scene model set; The registered point cloud dataset is obtained, and a sub-scene terrain model is constructed using Global Mapper software; Obtaining motion trajectory information in the preprocessed original scene video dataset, adding interaction logic to the sub-scene basic framework, and thus determining a 3D sub-scene of a scenic spot.
[0031] Specifically, based on a set of standard 3D building sub-models, position positioning information of each sub-model is extracted; center point coordinates , orientation angle (an angle with the north direction) and bounding box coordinate range are obtained through a model attribute file , and a position positioning information table is obtained. Corresponding to the positioning parameters of the u-th sub-model. Based on the preprocessed image dataset and the preprocessed video dataset in the scene data of the target scenic spot, feature information of non-building elements (vegetation, roads and water systems) is extracted; parameters such as the crown width and height of vegetation, the width and material of roads, and the boundary and depth of water systems are extracted through image recognition, and a non-building element feature table is obtained. Based on the non-building element feature table, a vegetation model is constructed using Speed Tree software, and a road and water system model is constructed using Civil3D software; for trees, a parameterized model is constructed according to the crown width r and height h, and the trunk diameter d = 0.1h; for roads, a roadbed and pavement model is constructed according to the width w and length l, and the pavement texture uses the road texture in the preprocessed image; and a set of non-building element 3D models is obtained. Based on the scenic function zoning (core tour area, leisure area and entrance area) and the position positioning information table , a 3D sub-scene is divided; each sub-scene contains at least one core building sub-model and surrounding non-building element model, and the sub-scene boundary is determined according to the spatial correlation of the elements to ensure that the overlapping area of adjacent sub-scenes is greater than or equal to 5%, and a sub-scene division scheme is obtained: .
[0032] Based on the sub-scene division scheme, corresponding models are extracted from the set of standard 3D building sub-models and the set of non-building element models; the spatial coordinates of the models are adjusted according to the position positioning information table, so that the relative position error between the models is less than or equal to ±10cm, and a sub-scene model set is obtained.
[0033] The expression formula of the sub-scene model set is: .
[0034] Based on the ground points in the registered point cloud dataset , a sub-scene terrain model is constructed using Global Mapper software; the ground points are converted into TIN (triangular irregular network), the terrain surface is generated through linear interpolation, and the ground texture in the preprocessed image is superimposed, and a sub-scene terrain model is obtained Based on the sub-scene model set and the sub-scene terrain model , the model is matched with the terrain to ensure that the building bottom, road surface and terrain are in complete contact without suspension or penetration phenomenon, and attribute metadata such as sub-scene name and function description are added to obtain a sub-scene basic framework Based on the motion trajectory information in the preprocessed video data set , the sub-scene basic framework is added with interactive logic, the road is set as a passable area, the water system is set as an impassable area, the tourist moving speed v=1.5m / s is defined, the information query interaction point is added to the core building, the scenic area introduction text and picture resources are associated, the Unity engine is used for rendering, the lighting parameters (sunlight intensity 1.0, environment light intensity 0.5) are set, and a scenic 3D sub-scene set is obtained .
[0035] Further, the GPS positioning information corresponding to the target scenic area scene data is obtained and mapped to the scenic 3D sub-scene to obtain a scenic 3D standard sub-scene, which specifically includes: The metadata of the target scenic area scene data is obtained to extract the GPS positioning information and determine an original GPS data set; The Gauss-Kruger projection algorithm is used to convert the longitude and latitude coordinates in the original GPS data set into CGCS2000 plane rectangular coordinates to obtain a converted GPS coordinate set; Based on the scenic 3D sub-scene and the converted GPS coordinate set, the association relationship between the GPS coordinates and the sub-scene is determined to obtain an association table; According to the association table, the GPS coordinates are mapped to the corresponding scenic 3D sub-scene to obtain a sub-scene set containing GPS markers; The GPS coordinates and plane coordinates of at least three known control points in the scenic area are obtained, the sub-scene set containing GPS markers is calibrated to obtain a control point mapping deviation, a linear correction model is constructed, and then the linear correction model is applied to all mapped GPS coordinates to obtain a calibrated GPS coordinate set; Based on the calibrated GPS coordinate set, the GPS markers in the sub-scene are updated to obtain a sub-scene set containing accurate GPS markers; Through the sub-scene set containing accurate GPS markers, a GPS interaction function is developed to obtain a sub-scene set containing GPS interaction function; The sub-scene set containing GPS interaction function is verified in function and accuracy, and the sub-scene set containing GPS interaction function that passes the verification is used as the scenic 3D standard sub-scene.
[0036] Specifically, based on the metadata of the target scenic spot scene data, GPS positioning information is extracted; the latitude and longitude coordinates at the time of collection are read from the metadata of the image and video and the elevation H to obtain an original GPS data set , wherein . Based on the original GPS data set , the latitude and longitude coordinates are converted into CGCS2000 plane rectangular coordinates using the Gauss-Kruger projection algorithm, and the conversion formula is:
[0037] ; ; wherein B is the latitude, is the longitude, is the central meridian longitude, and N is the radius of curvature of the equinoctial circle, , , to obtain a converted GPS coordinate set .
[0038] Based on the 3D sub-scene set of the scenic spot and the converted GPS coordinate set , the association relationship between the GPS coordinates and the sub-scenes is determined; The distance from each GPS coordinate to the center of each sub-scene is calculated: ; The sub-scene with the smallest is determined as the associated sub-scene, and an association table is obtained , wherein k+1=i are all index label values, so . Based on the association table R, the GPS coordinates are mapped to the corresponding sub-scenes; for static GPS coordinates (such as image collection points), point objects are marked in the sub-scenes, and attributes such as coordinates and collection time are added; for dynamic GPS coordinates (such as video collection tracks), line objects are generated in the sub-scenes, and coordinate points are connected in timestamp order to obtain a sub-scene set containing GPS markers . Based on the GPS coordinates and plane coordinates of the three known control points in the scenic spot, the mapping result is calibrated; the mapping deviation of the control points is calculated , , a linear correction model is established , , the coefficients a, b, c, d, e, and f are solved by the least square method; the correction model is applied to all the mapped GPS coordinates to obtain a calibrated GPS coordinate set . Based on the calibrated GPS coordinate set , update the GPS markers in the sub-scene; replace the original mapping coordinates with the calibrated coordinates to ensure that the GPS markers deviate from the actual location by less than or equal to ±50 cm; add GPS positioning accuracy information (such as RTK positioning accuracy ±2 cm, general GPS positioning accuracy ±5 m) to obtain a sub-scene set containing accurate GPS markers:
[0039] Based on the sub-scene set containing accurate GPS markers , develop GPS interaction functions; implement the "GPS navigation" function, input the target GPS coordinates, and plan the optimal path through the Dijkstra algorithm, with a path planning accuracy of ≤±1 m; implement the "GPS positioning query" function, click on the GPS markers in the sub-scene to view the corresponding collected data (images, videos), and obtain a sub-scene set containing GPS interaction functions: Based on the sub-scene set containing GPS interaction functions , verify the functions and accuracy; verify that the GPS navigation path is consistent with the actual road by more than or equal to 95%, the positioning query function response time is less than or equal to 1 s, and the GPS marker position deviation is less than or equal to ±50 cm; after verification, obtain a scenic 3D standard sub-scene set: .
[0040] It can be understood that by extracting standard sub-model positioning information to construct 3D sub-scenes, using Gauss-Kruger projection to convert GPS coordinates and linear calibration, accurate mapping of GPS positioning information and 3D sub-scenes is achieved, generating a scenic 3D standard sub-scene, providing accurate spatial anchor points for scene interaction and positioning navigation.
[0041] Further, the scenic 3D standard sub-scenes are spliced to obtain a scenic 3D standard scene, which specifically includes: Extract the center point coordinates and bounding box coordinates corresponding to each scenic 3D standard sub-scene, and calculate the distance matrix of all scenic 3D standard sub-scene center point coordinates to determine the spatial adjacency relationship of the sub-scenes, and obtain an adjacency relationship table; Based on the adjacency relationship table, determine the sub-scene splicing order to determine a splicing order table; Through the splicing order table, select the starting spliced scenic 3D standard sub-scene as the reference sub-scene, and extract the coordinate system parameters of the reference sub-scene as the global splicing coordinate system; In turn, extract the splicing feature points of adjacent scenic 3D standard sub-scene combinations, establish a feature point pair set, and the adjacent scenic 3D standard sub-scene combination includes a first standard sub-scene and a second standard sub-scene; The sub-scene alignment transformation matrix is obtained through the feature point pair set, and then all model fixed point coordinates corresponding to the first standard sub-scene are transformed to the reference coordinate system by using the sub-scene alignment transformation matrix, so as to realize alignment with the second standard sub-scene; All adjacent 3D standard sub-scenes are sequentially combined for alignment, and then an overlapping region is obtained, and a repeated model in the overlapping region is obtained, the repeated model in the overlapping region is screened synchronously, and a high-precision model is retained, so as to construct a spliced scene without overlapping defects. The spliced scene is globally optimized to obtain an optimized spliced scene, and then the optimized spliced scene is verified as a whole, and finally a 3D standard scene of the scenic area is obtained.
[0042] Specifically, based on a 3D standard sub-scene set of a scenic area , a center point coordinate and a bounding box coordinate of each sub-scene are extracted; a distance matrix between the center points is calculated , wherein .
[0043] The spatial adjacent relationship of the sub-scenes is determined to obtain an adjacent relationship table , wherein is a list of adjacent sub-scenes of the jth sub-scene.
[0044] Based on the adjacent relationship table A, the sub-scene splicing order is determined; the sub-scene containing the center point of the scenic area is taken as the starting splicing sub-scene, and the splicing order table O is obtained according to the principle of “from inside to outside, from near to far” and according to the distance matrix D from small to large. Based on the splicing order table O, the starting splicing sub-scene is selected as the reference sub-scene ; the coordinate system parameters (origin, coordinate axis direction) of the reference sub-scene are extracted as the global splicing coordinate system, and all other sub-scenes are aligned based on the coordinate system. Based on the adjacent sub-scene combination , the splicing feature points are extracted; the SIFT algorithm is used to identify the co-occurring feature points (such as building corners and landscape ornament vertices) in the overlapping region of the two sub-scenes, and the feature point pair set is obtained; wherein , are matching feature points in , respectively. Based on the feature point pair set , the sub-scene alignment transformation matrix is calculated;
[0045] The transformation matrix is solved by using the ICP algorithm: , wherein is a 3x3 rotation matrix, is a 3x1 translation vector; and then the transformation matrix is minimized Aligning, alignment error is less than or equal to ±3cm; the sub-scene All model vertex coordinates of the sub-scene Transformed to the reference coordinate system, realize the alignment with Based on the aligned sub-scene set, the overlapping area is processed; for the repeated models in the overlapping area, the model with higher precision is retained (by comparing the deviation of the model and the point cloud, the smaller one is the high precision); for the overlapping gap of continuous elements such as terrain and road, linear interpolation is used to supplement the vertex coordinates, and the texture splicing parameters are adjusted to make the transition area texture similarity ≥90%, and the splicing scene without overlapping defects is obtained Based on the splicing scene , global optimization is carried out; using LOD (level of detail) technology, the number of geometric faces of the model with a distance greater than or equal to 50m from the camera is simplified (simplification rate 50%), and the texture resolution is reduced (from 2048x2048 to 1024x1024); using occlusion culling technology, the background model completely occluded by the foreground model is hidden, and the rendering load is reduced; using Unity engine for global light baking, the baking resolution is set to 512x512, and the optimized splicing scene Based on the optimized splicing scene , overall verification is carried out; verification indicators include spatial accuracy (distance error between any two points is less than or equal to ±5cm), visual consistency (no obvious difference in lighting and material), and running performance (PC frame rate is greater than or equal to 60fps, mobile frame rate is greater than or equal to 30fps); for unqualified areas, re-align, overlap processing or optimization is carried out, and finally the 3D standard scene of the scenic area .
[0046] It can be understood that by calculating the sub-scene distance matrix to determine the splicing order and the reference, the ICP algorithm aligns adjacent sub-scenes and processes the overlapping area, combined with LOD technology and light baking optimization, seamless splicing and global optimization of the 3D standard sub-scene of the scenic area are realized, high-quality 3D standard scene of the scenic area is obtained, and the application requirements of the scenic area guide, planning, emergency management and other scenes are met.
[0047] Further, a scenic 3D scene construction system based on spatial positioning is proposed, which is used to realize the construction method of any one of the above, comprising: Data acquisition and preprocessing module, the data acquisition and preprocessing module is used to determine the scene data acquisition range, plan the unmanned aerial vehicle flight path to collect image and video data, record the shooting metadata synchronously, and preprocess the collected raw data to obtain qualified target scenic area scene data; 3D building initial model construction module, the 3D building initial model construction module is used to extract image feature points and match, optimize camera parameters to construct spatial positioning matrix, segment building area and calculate feature point world coordinates, construct 3D building initial sub model; Model correction and optimization module, the model correction and optimization module is used to plan Li DAR point cloud collection path and collect point cloud data, correct 3D building initial sub model based on point cloud data after preprocessing and classification, obtain 3D building standard sub model; Scene integration and output module, the scene integration and output module is used to construct 3D sub scene of scenic spot, map GPS positioning information and calibrate, splice sub scene to obtain 3D standard scene of scenic spot.
[0048] Further, the data acquisition and preprocessing module comprises: Acquisition range determination unit, the acquisition range determination unit is used to obtain scenic spot planning red line and core scenic spot distribution, determine scene data acquisition range; Vector boundary generation unit, the vector boundary generation unit is used to generate CGCS2000 coordinate system acquisition area vector boundary file based on acquisition range using Arc GIS software; Region division unit, the region division unit is used to calculate the Euclidean distance of adjacent boundary points, determine the core tour area and the peripheral buffer area; Precision level determination unit, the precision level determination unit is used to obtain building density and terrain undulation, determine the complexity of the scenic spot scene and the data acquisition precision level; Flight path planning unit, the flight path planning unit is used to determine the grid spacing and the surrounding flight points based on the precision level, and plan the flight path of the unmanned aerial vehicle; Image acquisition unit, the image acquisition unit is used to control the unmanned aerial vehicle to collect the scenic spot scene image according to the flight path, record the shooting coordinates and attitude through the GNSS RTK positioning instrument, and obtain the shooting metadata; Image dataset generation unit, the image dataset generation unit is used to embed the shooting metadata into the image file header to obtain the original scene image dataset; Video acquisition unit, the video acquisition unit is used to distribute equipment according to the distribution of dynamic element dense area to obtain the original scene video dataset; Data preprocessing unit, the data preprocessing unit is used to preprocess the original scene image dataset and the original scene video dataset respectively to obtain the target scenic spot scene data.
[0049] Further, the 3D building initial model construction module comprises: Feature point extraction unit, the feature point extraction unit is used to extract the feature points of the preprocessed original scene image dataset using the SIFT algorithm to obtain a global feature point set; The feature point matching unit is configured to perform feature point matching using a FLANN matcher and to screen a standard matching feature point set in combination with an Euclidean distance threshold; The camera parameter acquisition unit is configured to acquire and iteratively optimize camera internal and external parameters using a Bundle Adjustment algorithm based on the standard matching feature points and the shooting metadata; The spatial positioning matrix construction unit is configured to construct and integrate a spatial positioning matrix set mapping image pixel coordinates and world coordinates based on the optimized camera parameters; The building area segmentation unit is configured to extract key frames from the original scene video dataset and segment a building area using a Mask R-CNN model to obtain a building feature point set; The world coordinate calculation unit is configured to calculate building feature point world coordinates using a triangulation method based on the spatial positioning matrix set and the building feature point set; The model framework construction unit is configured to construct a 3D initial sub-model framework based on the building feature point world coordinates using Sketch Up software; The texture fitting unit is configured to extract a building texture image, determine a UV mapping relationship, and fit the texture to obtain a 3D building initial sub-model.
[0050] Further, the model correction and optimization module comprises: The point cloud path planning unit is configured to plan a LiDAR point cloud collection path and generate a path file based on the position distribution of the 3D building initial sub-model; The point cloud collection unit is configured to control a UAV carrying a LiDAR device to collect an original point cloud dataset according to the path file; The point cloud preprocessing unit is configured to preprocess the original point cloud dataset using Cloud Compare software to obtain a registered point cloud dataset; The point cloud classification unit is configured to classify the registered point cloud dataset using a random forest classification algorithm to obtain a building point cloud dataset; The model correction unit is configured to acquire a model and point cloud deviation matrix and correct the 3D building initial sub-model twice; The quality verification unit is configured to perform quality verification on the corrected model and to take a qualified model as a 3D building standard sub-model.
[0051] Further, the scene integration and output module comprises: A positioning information extraction unit is configured to extract information such as a center point coordinate of the 3D building standard sub-model, and to integrate the position positioning information table; A non-building model construction unit is configured to extract non-building element features, and to construct a 3D model set of non-building elements such as vegetation and roads by using professional software; A sub-scene division unit is configured to determine a sub-scene division scheme and extract corresponding models in combination with the scenic area function division and the position positioning information table; A terrain model construction unit is configured to construct a sub-scene terrain model based on the registered point cloud data set by using Global Mapper software; A GPS mapping unit is configured to extract and convert GPS positioning information, and to map the GPS positioning information to the 3D sub-scene of the scenic area and calibrate the GPS positioning information; An interactive function development unit is configured to add interactive logic to the sub-scene based on the motion trajectory information, and to develop a GPS interactive function; A sub-scene splicing unit is configured to determine spatial adjacent relationships and splicing sequences of the sub-scenes, align the sub-scenes, and process overlapping areas; A global optimization unit is configured to globally optimize and integrally verify the spliced scenes, and to obtain the 3D standard scene of the scenic area.
[0052] It can be understood that, through the collaborative work of the four modules of data acquisition and preprocessing, 3D building initial model construction, model correction and optimization, scene integration and output, the standardization and automation of the whole process of the construction of the 3D scene of the scenic area are realized, manual intervention is reduced, the efficiency and overall accuracy of the scene construction are improved, and technical support is provided for the construction of the smart scenic area.
[0053] The present application has the advantages that: the high precision, standardization and high efficiency of the whole process of the construction of the 3D scene of the scenic area are realized. In the data acquisition stage, the precision is dynamically adjusted in combination with the scenic area planning and complexity, and the data reliability is guaranteed by the preprocessing of the multi-source data; in the modeling link, the spatial positioning matrix and the initial model are constructed by the collaborative work of multiple algorithms, and the model and the field deviation are greatly reduced by twice correction of the point cloud data; in the scene integration, the GPS positioning is accurately mapped and calibrated, and the sub-scenes are aligned and optimized by using professional algorithms, so that the spatial misplacement is avoided; the system modules have clear division of labor and collaborative work, manual intervention is reduced, the multi-scene requirements such as scenic area guide, planning and emergency management are met, and reliable technical support is provided for the construction of the smart scenic area.
[0054] The above shows and describes the basic principles, main features and advantages of the present application. Those skilled in the art should understand that the present application is not limited to the above-mentioned embodiments, and the above-mentioned embodiments and descriptions in the specification are only the principles of the present application. Various changes and improvements can be made without departing from the spirit and scope of the present application, and these changes and improvements all fall within the scope of the claimed present application. The scope of protection of the present application is defined by the appended claims and their equivalents.
Claims
1. A method for constructing a 3D scene of a scenic spot based on spatial positioning, characterized in that, The method comprises the following steps: acquiring target scenic spot scene data, wherein the target scenic spot scene data comprises an original scene image data set and an original scene video data set; based on the target scenic spot scene data, constructing a spatial positioning matrix by extracting image feature points and matching and optimizing camera internal and external parameters, combining building area segmentation and feature point world coordinate calculation, and sequentially constructing 3D building initial sub-models in the target scenic spot; acquiring target scenic spot point cloud data, correcting the 3D building initial sub-models, and obtaining 3D building standard sub-models; extracting center point coordinates, orientation angles and bounding box coordinates of the 3D building standard sub-models to form a position positioning information table, combining non-building element features extracted from the target scenic spot scene data to construct non-building element 3D models, and dividing and constructing scenic spot 3D sub-scenes; acquiring GPS positioning information corresponding to the target scenic spot scene data, mapping the GPS positioning information to the scenic spot 3D sub-scenes after coordinate conversion and calibration, and obtaining scenic spot 3D standard sub-scenes; determining spatial adjacent relationships of the scenic spot 3D standard sub-scenes, aligning, overlapping and processing regions, and globally optimizing and splicing to obtain a scenic spot 3D standard scene. 2.The method of claim 1, wherein, The method for acquiring target scenic spot scene data comprises the following steps: acquiring scenic spot planning red lines and core scenic spot distribution, thereby determining a scene data collection range; generating a collection area vector boundary file using Arc GIS software based on the scene data collection range, wherein boundary point coordinates adopt a CGCS2000 coordinate system, and the boundary point coordinates are recorded as a boundary point set; acquiring the Euclidean distance between adjacent boundary points, determining a core tour area and a peripheral buffer area; acquiring building density and terrain relief in the core tour area and the peripheral buffer area, thereby determining scenic spot scene complexity and determining a data collection accuracy level; determining collection parameters and collection methods based on the data collection accuracy level, and obtaining a grid spacing based on the collection area vector boundary file and the data collection accuracy level; determining a surrounding flight point based on the core scenic spot distribution and the collection area vector boundary file; planning a UAV flight path according to the grid spacing and the surrounding flight point; controlling the UAV to collect scenic spot scene images according to the UAV flight path, and recording shooting coordinates and shooting postures of each scenic spot scene image in real time through a GNSS RTK positioning instrument during the collection process, thereby obtaining shooting metadata; embedding the shooting metadata in a scenic spot scene image file header, thereby obtaining an original scene image data set; determining dynamic element dense area distribution in the collection area through the original scene image data set, and then arranging video collection equipment to obtain an original scene video data set; respectively pre-processing the original scene image data set and the original scene video data set, and obtaining qualified target scenic spot scene data.
3. The method of claim 1, wherein, The method comprises the following steps: based on the target scenic spot scene data, acquiring a pre-processed original scene image data set, simultaneously extracting image feature points using a SIFT algorithm, obtaining a feature point set of each image in the pre-processed original scene image data set, integrating all the feature point sets, and obtaining a global feature point set; Based on the global feature point set, the FLANN matcher is used for feature point matching to obtain an initial matching feature point set of different images; The Euclidean distance of two feature vectors in the initial matching feature point set of different images is obtained, the Euclidean distance threshold is set synchronously, and the initial matching feature point set of different images corresponding to the feature vectors with the Euclidean distance greater than the Euclidean distance threshold is taken as a standard matching feature point set; Based on the standard matching feature point set and the shooting coordinates and attitude parameters of the shooting metadata in the original scene image dataset, the Bundle Adjustment algorithm is used to obtain the camera internal and external parameters; The minimum reprojection error is obtained, and the camera internal and external parameters are iteratively optimized synchronously until the minimum reprojection error is less than 1 pixel, and the optimized camera internal and external parameters are obtained; Based on the optimized camera internal and external parameters, a spatial positioning matrix is constructed, wherein for each image, the spatial positioning matrix is used to describe the mapping relationship between the image pixel coordinates and the world coordinates; The spatial positioning matrices of all images are integrated to obtain a spatial positioning matrix set; Based on the target scenic area scene data, the preprocessed original scene video dataset is obtained, and the preprocessed key frame set is extracted therefrom, the Mask R-CNN model is used for building area segmentation to obtain a building feature point set; Based on the spatial positioning matrix set and the building feature point set, the world coordinates of the building feature points are calculated using the triangulation method to obtain a building feature point world coordinate set; Based on the building feature point world coordinate set, a 3D initial sub-model framework is constructed using the Sketch Up software; Based on the preprocessed original scene image dataset, the texture image of the building area is extracted, and the UV mapping relationship between the texture image and the building surface is determined according to the spatial positioning matrix, the texture is attached to the surface of the 3D initial sub-model framework through the UV unfolding tool, and the building attribute metadata is added synchronously to obtain a 3D building initial sub-model.
4. The method of claim 1, wherein, The target scenic area point cloud data is obtained, and the 3D building initial sub-model is corrected to obtain a 3D building standard sub-model, specifically including: Based on the position distribution of the 3D building initial sub-model in the target scenic area, a LiDAR point cloud collection path is planned to obtain a point cloud collection path file; Based on the point cloud collection path file, the unmanned aerial vehicle carrying the LiDAR device is controlled to collect point clouds to obtain an original point cloud dataset; According to the original point cloud dataset, the Cloud Compare software is used for preprocessing to obtain a registered point cloud dataset; Through the registered point cloud dataset, the random forest classification algorithm is used for point cloud classification to obtain a building point cloud dataset; Based on the 3D building initial sub-model and the building point cloud dataset, a model and point cloud deviation matrix is obtained; The 3D building initial sub-model is corrected for the first time through the model and point cloud deviation matrix; The 3D building initial sub-model after the first correction is corrected for the second time based on the building point cloud dataset; The 3D building initial sub-model after the second correction is verified for quality, and the 3D building initial sub-model that passes the verification is taken as a 3D building standard sub-model.
5. The method of claim 1, wherein, The position positioning information table corresponding to the 3D building standard sub-model is acquired, and a scenic spot 3D sub-scene is constructed in combination with the corresponding target scenic spot scene data, and specifically includes: A model attribute file corresponding to each 3D building standard sub-model is acquired, and a center point coordinate, an orientation angle and a bounding box coordinate range are extracted, and after integration, a position positioning information table is obtained; Based on the preprocessed original scene image data set and the original scene video data set in the target scenic spot scene data, a non-building element feature table is extracted; Based on the non-building element feature table, a vegetation model is constructed using Speed Tree software, and a road and water system model is constructed using Civil3D software, so as to obtain a non-building element 3D model set; The function partition of the scenic spot is acquired, and the position positioning information table is used to determine a sub-scene division scheme; According to the sub-scene division scheme, corresponding models are extracted from all 3D building standard sub-models and non-building element model sets to obtain a sub-scene model set; The registered point cloud data set is acquired, and a sub-scene terrain model is constructed using Global Mapper software; The motion trajectory information in the preprocessed original scene video data set is acquired, and an interactive logic is added to the sub-scene basic framework, so as to determine a scenic spot 3D sub-scene.
6. The method of claim 1, wherein, The GPS positioning information corresponding to the target scenic spot scene data is acquired, and is mapped into the scenic spot 3D sub-scene to obtain a scenic spot 3D standard sub-scene, and specifically includes: The metadata of the target scenic spot scene data is acquired, so as to extract the GPS positioning information and determine an original GPS data set; The latitude and longitude coordinates in the original GPS data set are converted into CGCS2000 plane rectangular coordinates using the Gauss-Kruger projection algorithm to obtain a converted GPS coordinate set; Based on the scenic spot 3D sub-scene and the converted GPS coordinate set, the correlation between the GPS coordinates and the sub-scene is determined to obtain a correlation table; According to the correlation table, the GPS coordinates are mapped into the corresponding scenic spot 3D sub-scene to obtain a sub-scene set containing GPS markers; The GPS coordinates and plane coordinates of at least three known control points in the scenic spot are acquired, and the sub-scene set containing GPS markers is calibrated to obtain a control point mapping deviation, so as to construct a linear correction model, and then the linear correction model is applied to all mapped GPS coordinates to obtain a calibrated GPS coordinate set; Based on the calibrated GPS coordinate set, the GPS markers in the sub-scene are updated to obtain a sub-scene set containing accurate GPS markers; Through the sub-scene set containing accurate GPS markers, a GPS interaction function is developed to obtain a sub-scene set containing a GPS interaction function; The sub-scene set containing the GPS interaction function is verified in function and precision, and the sub-scene set containing the GPS interaction function that passes the verification is taken as a scenic spot 3D standard sub-scene.
7. The method of claim 1, wherein, The scenic spot 3D standard sub-scenes are spliced to obtain a scenic spot 3D standard scene, and specifically includes: The center point coordinates and the bounding box coordinates corresponding to each scenic spot 3D standard sub-scene are extracted, and a distance matrix of the center point coordinates of all scenic spot 3D standard sub-scenes is calculated to determine the spatial adjacent relationship of the sub-scenes, and an adjacent relationship table is obtained; Based on the adjacency relation table, the sub-scene splicing order is determined, so as to determine the splicing order table; Through the splicing order table, the starting spliced scenic 3D standard sub-scene is selected as the reference sub-scene, and the coordinate system parameters of the reference sub-scene are extracted as the global splicing coordinate system; The splicing feature points of the adjacent scenic 3D standard sub-scene combination including the first standard sub-scene and the second standard sub-scene are extracted in sequence, and a feature point pair set is established; Through the feature point pair set, the sub-scene alignment transformation matrix is obtained, and then all model fixed point coordinates corresponding to the first standard sub-scene are transformed to the reference coordinate system by using the sub-scene alignment transformation matrix, so as to realize alignment with the second standard sub-scene; All adjacent scenic 3D standard sub-scene combinations are aligned in sequence, then the overlapping area is obtained, and the repeated models in the overlapping area are obtained, the repeated models in the overlapping area are screened synchronously, and the high-precision models are retained, so as to construct a spliced scene without overlapping defects; The global optimization is performed on the spliced scene, and the optimized spliced scene is obtained, then the optimized spliced scene is verified as a whole, and finally the scenic 3D standard scene is obtained.
8. A spatial positioning based 3D scene construction system for scenic spots, configured to implement the construction method according to any one of claims 1-7. It comprises: A data acquisition and preprocessing module, which is used for determining the scene data acquisition range, planning the unmanned aerial vehicle flight path to collect image and video data, synchronously recording the shooting metadata, and preprocessing the collected raw data to obtain qualified target scenic scene data; A 3D building initial model construction module, which is used for extracting image feature points and matching, optimizing camera parameters to construct a spatial positioning matrix, segmenting the building area and calculating the feature point world coordinates, and constructing a 3D building initial sub-model; A model correction and optimization module, which is used for planning the LiDAR point cloud collection path and collecting point cloud data, correcting the 3D building initial sub-model based on the classified point cloud data to obtain a 3D building standard sub-model; A scene integration and output module, which is used for constructing a scenic 3D sub-scene, mapping the GPS positioning information and calibrating, and splicing the sub-scenes to obtain a scenic 3D standard scene.
9. The 3D scene construction system based on spatial positioning of scenic spots according to claim 8, characterized in that, The data acquisition and preprocessing module comprises: An acquisition range determination unit, which is used for acquiring the scenic planning red line and the core scenic spot distribution, and determining the scene data acquisition range; A vector boundary generation unit, which is used for generating the acquisition area vector boundary file of the CGCS2000 coordinate system based on the acquisition range by using the ArcGIS software; A region division unit, which is used for calculating the Euclidean distance of adjacent boundary points, and determining the core tour area and the peripheral buffer area; A precision level determination unit, which is used for acquiring the building density and the terrain undulation, and determining the scenic scene complexity and the data acquisition precision level; A flight path planning unit, which is used for determining the grid spacing and the surrounding flight points based on the precision level, and planning the unmanned aerial vehicle flight path; An image acquisition unit is configured to acquire a scenic spot scene image by controlling the UAV according to a flight path, record a shooting coordinate and an attitude by using a GNSS RTK positioning instrument, and obtain shooting metadata; An image dataset generation unit is configured to embed the shooting metadata into an image file header to obtain an original scene image dataset; A video acquisition unit is configured to distribute equipment according to a dynamic element dense area distribution to obtain an original scene video dataset; A data preprocessing unit is configured to preprocess the original scene image dataset and the original scene video dataset respectively to obtain a target scenic spot scene data.
10. The 3D scene construction system based on spatial positioning of scenic spots according to claim 8, characterized in that, The 3D building initial model construction module comprises: A feature point extraction unit is configured to extract feature points of the preprocessed original scene image dataset by using a SIFT algorithm to obtain a global feature point set; A feature point matching unit is configured to perform feature point matching by using a FLANN matcher, and combine a Euclidean distance threshold screening to obtain a standard matching feature point set; A camera parameter acquisition unit is configured to acquire and iteratively optimize camera internal and external parameters by using a Bundle Adjustment algorithm based on the standard matching feature points and the shooting metadata; A spatial positioning matrix construction unit is configured to construct and integrate a spatial positioning matrix set of image pixel coordinates and world coordinate mapping based on the optimized camera parameters; A building area segmentation unit is configured to extract a key frame from the original scene video dataset, and segment a building area by using a Mask R-CNN model to obtain a building feature point set; A world coordinate calculation unit is configured to calculate building feature point world coordinates by using a triangulation method based on the spatial positioning matrix set and the building feature point set; A model framework construction unit is configured to construct a 3D initial sub-model framework based on the building feature point world coordinates by using Sketch Up software; A texture fitting unit is configured to extract a building texture image, determine a UV mapping relationship, fit the texture, add attribute metadata, and obtain a 3D building initial sub-model.