Search

CN-121982095-A - AR building defect real-time positioning and rendering method, system and medium based on GPS and Kalman filtering

CN121982095ACN 121982095 ACN121982095 ACN 121982095ACN-121982095-A

Abstract

The application provides a real-time positioning and rendering method, a system and a medium for AR building defects based on GPS and Kalman filtering, wherein the method comprises the steps of collecting GPS original data, and filtering the GPS original data in real time based on an extended Kalman filtering algorithm to obtain smooth position data; the method comprises the steps of performing three-level coordinate conversion on smooth position data to obtain target coordinates adapting to AR rendering, obtaining cloud defect data, establishing a local cache to obtain the local defect data, initializing an AR scene, establishing a defect mark according to the converted target coordinates and the local defect data, establishing a mapping relation between a defect ID and the AR mark, analyzing the smooth position data and the target coordinates, updating the positions of the AR mark in real time, improving positioning errors through a Kalman filtering algorithm, keeping stability when equipment moves based on the AR defect mark, ensuring accurate alignment of the defect mark and a real position through a multi-source coordinate conversion model, and reducing mapping errors.

Inventors

  • SHI WEI
  • DU JIAHAO
  • YE LU
  • QUAN XIN

Assignees

  • 上海狮尾智能化科技有限公司

Dates

Publication Date
20260505
Application Date
20260120

Claims (10)

  1. 1. The real-time positioning and rendering method for the AR building defects based on GPS and Kalman filtering is characterized by comprising the following steps of: collecting GPS original data, and filtering the GPS original data in real time based on an extended Kalman filtering algorithm to obtain smooth position data; performing three-level coordinate conversion on the smoothed position data based on the three-level coordinate conversion model to obtain target coordinates adapting to AR rendering; Constructing an asynchronous network request mechanism based on Retrofit frames, acquiring cloud defect data according to the asynchronous network request mechanism, and establishing a local cache to obtain the local defect data; Initializing an AR scene, creating a defect mark according to the converted target coordinates and the local defect data, and creating a mapping relation between a defect ID and the AR mark based on the defect mark; And analyzing the smoothed position data and the target coordinates based on the mapping relation to obtain an analysis result, and updating the position of the AR mark in real time according to the analysis result.
  2. 2. The real-time positioning and rendering method of AR building defects based on GPS and kalman filtering according to claim 1, wherein collecting GPS raw data, and filtering the GPS raw data in real time based on an extended kalman filtering algorithm to obtain smoothed position data, specifically comprises: Creating FusedLocationProviderClient examples, configuring core parameters, and detecting whether a GPS acquires positioning permission; If the positioning authority is not acquired, triggering a hierarchical authority application flow to apply for camera authority; if the positioning authority is acquired, a real-time monitoring channel for GPS position updating is established, and GPS original data is acquired; Performing format verification on the GPS original data, and converting the GPS original data into GPS original data with a unified data format; initializing a Kalman filter, and setting a process noise covariance and a measurement noise covariance to obtain the Kalman filter with parameters configured; And filtering the GPS original data with the unified data format based on the Kalman filter after parameter configuration to obtain smooth position data.
  3. 3. The real-time positioning and rendering method of AR building defects based on GPS and kalman filtering according to claim 2, wherein the three-level coordinate transformation is performed on the smoothed position data based on the three-level coordinate transformation model to obtain target coordinates of the adaptive AR rendering, specifically comprising: Loading WGS84 geoellipsoid standard parameters based on a three-level coordinate conversion model, establishing a WGS84 geographic coordinate system, and carrying out coordinate processing on smooth position data based on the WGS84 geographic coordinate system to obtain WGS84 geographic coordinates; Converting the WGS84 geographic coordinates into an ECEF geocentric and geocentric fixed coordinate system to generate ECEF coordinates; Constructing a rotation matrix, and converting ECEF coordinates into ENU coordinates based on the rotation matrix; establishing a coordinate mapping relation based on ARCore world coordinate system characteristics and an ENU coordinate system; and converting the ENU coordinates into ARCore world coordinates based on the coordinate mapping relation, generating ARCore coordinates, and obtaining target coordinates of the adaptive AR rendering.
  4. 4. The real-time positioning and rendering method of AR building defects based on GPS and kalman filtering according to claim 3, wherein an asynchronous network request mechanism is constructed based on Retrofit frames, cloud defect data is obtained according to the asynchronous network request mechanism, a local cache is built, and local defect data is obtained, specifically comprising: Parameter configuration is carried out based on Retrofit frames, an asynchronous network request mechanism is established, and a request instruction is obtained; acquiring cloud defect data based on a request instruction, and recording a time stamp of the cloud defect data; establishing a local cache based on the cloud defect data and the corresponding time stamp, and recording the time stamp of the local cache data; Comparing the time stamp of the cloud defect data with the time stamp of the local cache data, and synchronously updating the local cache data and the corresponding time stamp when the time stamp of the cloud defect data changes to obtain the local defect data.
  5. 5. The real-time positioning and rendering method of AR building defects based on GPS and kalman filtering according to claim 4, wherein initializing an AR scene, creating a defect mark according to the converted target coordinates and the local defect data, and creating a mapping relation between a defect ID and the AR mark based on the defect mark, specifically comprising: Acquiring an AR scene, initializing scene parameters, and obtaining an initialized AR scene; Reading defect data of a local cache, and extracting core information of each piece of defect data, wherein the core information comprises a defect ID, target coordinates, defect type and severity; Performing visual marking on each piece of defect data based on the core information to obtain a defect mark; and traversing all the created defect marks, and establishing a mapping relation between the defect ID and the AR mark.
  6. 6. The real-time positioning and rendering method of AR building defects based on GPS and kalman filtering according to claim 5, wherein the analyzing result is obtained by analyzing the smoothed position data and the target coordinates based on the mapping relation, and the positions of the AR markers are updated in real time according to the analyzing result, specifically comprising: acquiring smooth position data and target coordinates; calculating a position deviation value between the target coordinates and the smoothed position data based on the smoothed position data as a reference; comparing the position deviation value with a set deviation threshold value; if the position deviation value is greater than or equal to the set deviation threshold value, generating correction data, and replacing the position of the AR mark based on the correction data; If the position deviation value is smaller than the set deviation threshold value, the position deviation value is monitored in real time.
  7. 7. The real-time positioning and rendering system for the AR building defects based on the GPS and the Kalman filtering is characterized by comprising a memory and a processor, wherein the memory comprises a program of the real-time positioning and rendering method for the AR building defects based on the GPS and the Kalman filtering, and the program of the real-time positioning and rendering method for the AR building defects based on the GPS and the Kalman filtering realizes the following steps when being executed by the processor: collecting GPS original data, and filtering the GPS original data in real time based on an extended Kalman filtering algorithm to obtain smooth position data; performing three-level coordinate conversion on the smoothed position data based on the three-level coordinate conversion model to obtain target coordinates adapting to AR rendering; Constructing an asynchronous network request mechanism based on Retrofit frames, acquiring cloud defect data according to the asynchronous network request mechanism, and establishing a local cache to obtain the local defect data; Initializing an AR scene, creating a defect mark according to the converted target coordinates and the local defect data, and creating a mapping relation between a defect ID and the AR mark based on the defect mark; And analyzing the smoothed position data and the target coordinates based on the mapping relation to obtain an analysis result, and updating the position of the AR mark in real time according to the analysis result.
  8. 8. The real-time positioning and rendering system for AR building defects based on GPS and kalman filtering according to claim 7, wherein collecting GPS raw data, and filtering the GPS raw data in real time based on an extended kalman filtering algorithm to obtain smoothed position data, specifically comprises: Creating FusedLocationProviderClient examples, configuring core parameters, and detecting whether a GPS acquires positioning permission; If the positioning authority is not acquired, triggering a hierarchical authority application flow to apply for camera authority; if the positioning authority is acquired, a real-time monitoring channel for GPS position updating is established, and GPS original data is acquired; Performing format verification on the GPS original data, and converting the GPS original data into GPS original data with a unified data format; initializing a Kalman filter, and setting a process noise covariance and a measurement noise covariance to obtain the Kalman filter with parameters configured; And filtering the GPS original data with the unified data format based on the Kalman filter after parameter configuration to obtain smooth position data.
  9. 9. The real-time positioning and rendering system of AR building defects based on GPS and kalman filtering according to claim 8, wherein the three-level coordinate transformation is performed on the smoothed position data based on the three-level coordinate transformation model to obtain target coordinates of the adaptive AR rendering, specifically comprising: Loading WGS84 geoellipsoid standard parameters based on a three-level coordinate conversion model, establishing a WGS84 geographic coordinate system, and carrying out coordinate processing on smooth position data based on the WGS84 geographic coordinate system to obtain WGS84 geographic coordinates; Converting the WGS84 geographic coordinates into an ECEF geocentric and geocentric fixed coordinate system to generate ECEF coordinates; Constructing a rotation matrix, and converting ECEF coordinates into ENU coordinates based on the rotation matrix; establishing a coordinate mapping relation based on ARCore world coordinate system characteristics and an ENU coordinate system; and converting the ENU coordinates into ARCore world coordinates based on the coordinate mapping relation, generating ARCore coordinates, and obtaining target coordinates of the adaptive AR rendering.
  10. 10. A computer readable storage medium, wherein the computer readable storage medium includes a real-time positioning and rendering method program for AR building defects based on GPS and kalman filtering, and when the real-time positioning and rendering method program for AR building defects based on GPS and kalman filtering is executed by a processor, the steps of the real-time positioning and rendering method for AR building defects based on GPS and kalman filtering according to any one of claims 1 to 6 are implemented.

Description

AR building defect real-time positioning and rendering method, system and medium based on GPS and Kalman filtering Technical Field The application relates to the technical field of augmented reality and building detection, in particular to an AR building defect real-time positioning and rendering method, system and medium based on GPS and Kalman filtering. Background In the field of building defect inspection, the traditional manual inspection mode has the problems of low efficiency, strong subjectivity, irregular recording and the like. The existing AR defect detection technology can realize visual marking, but has the following technical bottlenecks: The GPS positioning precision problem is that the traditional GPS positioning has drift phenomenon, the error in a dense building area can reach 1-3 meters, the AR mark is seriously deviated from the actual defect position, and the accurate inspection requirement can not be met; the coordinate transformation complexity is that the dimension difference exists between a geographic coordinate system (WGS 84) and an AR local coordinate system, and the direct transformation is easy to cause mapping deviation, especially under complex scenes such as vertical wall surfaces and the like; The mark stability is poor, namely when equipment moves or GPS signals fluctuate, AR defect marks are easy to shake, drift and even disappear, and user experience and detection precision are affected; The traditional scheme can not realize the dynamic loading, real-time updating and efficient management of defect data when a plurality of defects exist; The network data integration level is low, the defect data is usually stored in a cloud server, the existing scheme lacks seamless integration with a network API, and real-time synchronization and updating of the data cannot be realized. The prior art scheme and the defects thereof are as follows: the single GPS positioning scheme is that LocationManager provided by an Android system is directly used for acquiring GPS data, filtering processing is not performed, environmental influence is large, and positioning accuracy is low; The simple coordinate mapping scheme is that longitude and latitude are directly converted into a simplified model of AR coordinates, the influence of the earth curvature and equipment posture is ignored, and the mapping error is large; the static marking scheme is that the AR marking position is fixed and is not updated in real time along with the movement of equipment, so that the marking is separated from a real scene; the local data storage scheme is that defect data are stored in a local database, cannot be synchronized with a cloud, and lack data sharing and remote management capability; moving average filtering scheme-processing GPS data using a simple moving average algorithm, while being able to smooth out some noise, is not able to efficiently handle burst hopping and systematic errors. Disclosure of Invention The embodiment of the application aims to provide a real-time positioning and rendering method, a real-time positioning and rendering system and a real-time rendering medium for AR building defects based on GPS and Kalman filtering, wherein positioning errors are improved through a Kalman filtering algorithm, AR defect marks are kept stable when equipment moves, accurate alignment of the defect marks and real positions is ensured through a multi-source coordinate conversion model, and mapping errors are reduced. The embodiment of the application also provides an AR building defect real-time positioning and rendering method based on GPS and Kalman filtering, which comprises the following steps: collecting GPS original data, and filtering the GPS original data in real time based on an extended Kalman filtering algorithm to obtain smooth position data; performing three-level coordinate conversion on the smoothed position data based on the three-level coordinate conversion model to obtain target coordinates adapting to AR rendering; Constructing an asynchronous network request mechanism based on Retrofit frames, acquiring cloud defect data according to the asynchronous network request mechanism, and establishing a local cache to obtain the local defect data; Initializing an AR scene, creating a defect mark according to the converted target coordinates and the local defect data, and creating a mapping relation between a defect ID and the AR mark based on the defect mark; And analyzing the smoothed position data and the target coordinates based on the mapping relation to obtain an analysis result, and updating the position of the AR mark in real time according to the analysis result. Optionally, in the real-time positioning and rendering method for AR building defects based on GPS and kalman filtering according to the embodiment of the present application, GPS raw data is collected, and real-time filtering is performed on the GPS raw data based on an extended kalman filtering algorithm to obtain smooth