A method, device, equipment and medium for linking VR and Cesium
By obtaining geographical data and perspective data for position and perspective matching, the fusion engine is used to synchronize the VR panorama and the Cesium three-dimensional map, solving the perspective synchronization and data integration problems in the existing technology, and improving the user experience and application effects.
Patent Information
- Application Number
- CN202410776573.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2044-06-17
AI Technical Summary
Existing technology makes it difficult to accurately synchronize the VR panorama and the Cesium 3D map perspective, especially in terms of perspective rotation and data integration, resulting in poor user experience.
By obtaining geographical data and perspective data, we perform position matching and perspective matching, and use the fusion engine to synchronize the position and perspective of VR panoramic photos and Cesium 3D maps. We use efficient data transmission and processing mechanisms to ensure real-time synchronization.
It achieves seamless switching and synchronous rotation of VR panoramic and Cesium three-dimensional map perspectives, ensuring the immersion and interactivity of user experience, providing seamless transition and in-depth interaction from macro to micro, and improving the application experience of the geographical information industry.
Smart Images

Figure CN118334286B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of linkage technology of virtual reality (VR) technology and three-dimensional map (Cesium) technology in geographic information industry, and in particular to a method, device, equipment and medium for linkage of VR and Cesium. Background Art
[0002] In the geographic information industry, with the rapid development of virtual reality (VR) technology and three-dimensional map (Cesium) technology, users are increasingly demanding more immersive and interactive map experiences. Currently, VR panorama provides an all-round, immersive visual experience, while Cesium, as a web-based three-dimensional map technology, can display detailed earth surfaces and three-dimensional models. Both have their own characteristics, VR panorama focuses on providing an immersive experience, while Cesium focuses on three-dimensional maps for accurate geographic information display and analysis.
[0003] In practical applications, unifying VR panorama with Cesium 3D map perspective can greatly enhance the user experience and achieve seamless transition and deep interaction from macro to micro. For example, in scenes such as urban planning, geography education, and tourist guides, users can not only get an immersive experience through VR panorama, but also get detailed information such as geographic location and terrain through Cesium 3D map perspective. However, achieving this goal faces technical challenges, mainly including perspective synchronization and data integration.
[0004] Currently, the unification of VR panorama and Cesium 3D map perspective mainly relies on manual adjustment or simple coordinate mapping methods, which are either complicated to operate or difficult to achieve precise synchronization. In terms of perspective synchronization, it is necessary to ensure that any rotation or movement of the user in the VR environment can be reflected in the Cesium 3D map view in real time, and vice versa. This not only requires the system to be able to capture and respond to user operations in real time, but also requires accurate calculation of the perspective conversion between two different systems. In terms of data integration, when adding or updating 3D models and layers in the Cesium 3D map view, they also need to be displayed in the VR panorama with the same perspective, which requires the system to be able to efficiently process and synchronize large amounts of geographic information data.
[0005] In view of the above problems, the present invention proposes a technical solution of linking VR and Cesium, which realizes the perfect unification of VR panorama and Cesium 3D map perspective under the PSV (photo-sphere-viewer) fusion engine through an innovative perspective synchronization mechanism and an efficient data integration method. Summary of the invention
[0006] The purpose of the present invention is to provide a method, device, equipment and medium for linking VR and Cesium, linking VR panoramic photos and Cesium three-dimensional maps to achieve position and perspective synchronization, and improve the user application experience of the geographic information industry.
[0007] The embodiments of the present invention provide a method, apparatus, device and medium for linking VR and Cesium.
[0008] A first aspect: a method for linking VR and Cesium, comprising the steps of:
[0009] S1. Obtain VR panoramic photos containing geographic data and perspective data;
[0010] S2, obtain the Cesium three-dimensional map corresponding to the VR panoramic photo;
[0011] S3, using geographic data and perspective data, to match the VR panoramic photo and Cesium 3D map in terms of position and perspective;
[0012] S4. Based on the position matching and perspective matching information, the VR panoramic photos and Cesium 3D maps are linked to achieve position and perspective synchronization to form a fusion engine.
[0013] Optionally, in S1, obtaining a VR panoramic photo containing geographic data and viewing angle data includes:
[0014] S11. Check the accuracy of the geographical data and perspective data of the VR panoramic photo;
[0015] S12. If the geographic data and the viewing angle data are accurate, output the VR panoramic photo;
[0016] S13. If the geographic data and the perspective data are inaccurate, manually align the geographic data and the perspective data of the VR panoramic photo, and output the aligned VR panoramic photo.
[0017] Optionally, in S3, using geographic data and perspective data to perform position matching and perspective matching on the VR panoramic photo and the Cesium three-dimensional map includes:
[0018] S31, VR panoramic photo initialization, obtaining the starting viewpoint geographic data and viewing angle data information of the VR camera;
[0019] S32, configure the Cesium camera of the Cesium 3D map;
[0020] S33, matching and setting the starting origin of the Cesium camera according to the starting viewpoint geographic data and the viewing angle data information of the VR camera;
[0021] S34. Check the linkage view effect between VR panoramic photos and Cesium 3D maps, adjust the matching between VR panoramic photos and Cesium 3D maps, and seamlessly connect the positions and perspectives of VR panoramic photos and Cesium 3D maps.
[0022] Optionally, in 32, configuring a Cesium camera of a Cesium three-dimensional map includes:
[0023] According to the display range of VR panoramic photos, configure the transformation matrix of the Cesium camera, fix the longitude, latitude and altitude range of the Cesium camera, limit the zoom level and rotation operation of the Cesium camera, and control the position and viewing angle of the Cesium camera.
[0024] Optionally, the geographic data includes longitude, latitude and altitude information.
[0025] Optionally, the viewing angle data includes heading angle, pitch angle and roll angle information.
[0026] Optionally, when the Cesium three-dimensional map is linked with a VR panoramic photo, the Cesium three-dimensional map dynamically adds a three-dimensional model, image or vector map according to the viewing angle and location information of the VR panoramic photo.
[0027] A second aspect: a device for linking VR and Cesium, comprising:
[0028] VR unit, obtaining VR panoramic photo geographic data and viewing angle data;
[0029] Cesium unit, obtains Cesium 3D map data;
[0030] The linkage unit matches the position and perspective of VR panoramic photos and Cesium 3D maps, and links VR panoramic photos and Cesium 3D maps to achieve position and perspective synchronization to form a fusion engine.
[0031] A third aspect: An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method provided in the first aspect when executing the program.
[0032] A fourth aspect: A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that when the computer program is executed by a processor, the steps of the method provided in the first aspect are implemented.
[0033] Beneficial effects of the present invention:
[0034] The present invention matches the position and perspective of VR panoramic photos and Cesium three-dimensional maps, and links VR panoramic photos and Cesium three-dimensional maps to achieve position and perspective synchronization to form a fusion engine; it can not only achieve seamless switching and synchronous rotation of the two perspectives, but also ensure that any layer or three-dimensional model added to the Cesium three-dimensional map can be viewed in the VR panorama with the same perspective, which greatly improves the user experience and brings new application methods to the geographic information industry. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 A flowchart of a method for linking VR and Cesium according to the present invention;
[0036] Figure 2 This is a schematic diagram of the principle of a method for linking VR and Cesium in the present invention;
[0037] Figure 3 This is a schematic diagram of the accuracy check process of VR panoramic photos of the present invention;
[0038] Figure 4 This is a schematic diagram of the perspective synchronization process between the VR camera and the Cesium camera of the present invention;
[0039] Figure 5 This is a schematic diagram of basic information parameters of VR panoramic photos of the present invention;
[0040] Figure 6 It is a structural schematic diagram of a device for linking VR and Cesium according to the present invention;
[0041] Figure 7 This is a manual registration effect diagram of the VR panoramic photo and Cesium 3D map data of the present invention;
[0042] Figure 8 This is a linkage effect diagram of the VR panoramic photo and Cesium three-dimensional map of the present invention;
[0043] Fig. 9 It is a schematic diagram of the structure of the electronic device of the present invention. DETAILED DESCRIPTION
[0044] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar symbols throughout represent the same or similar elements or elements with the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0045] In practical applications, unifying the perspectives of VR panoramas and Cesium 3D maps can greatly enhance the user experience and achieve seamless transition and deep interaction from macro to micro. However, the existing unification of VR panoramas and Cesium 3D map perspectives mainly relies on manual adjustment or simple coordinate mapping methods, which are either complicated to operate or difficult to achieve precise synchronization.
[0046] In view of the above problems, the present invention provides a method for linking VR and Cesium. Figure 1 and Figure 2 A flowchart of a method for linking VR and Cesium provided in an embodiment of the present invention, the method comprising the steps of:
[0047] S1. Obtain VR panoramic photos containing geographic data and perspective data. To ensure the accurate unification of VR panoramic photos and Cesium 3D map perspectives, the key is to accurately match geographic data and perspective data. When taking VR panoramic photos, the photos carry detailed geographic data and perspective data.
[0048] For example, Figure 5 As shown, these key information can be automatically recorded when shooting with a drone equipped with a high-precision sensor.
[0049] However, there may be discrepancies between the automatically recorded key information and the actual situation, so manual fine-tuning may be required when applying this data to the fusion engine to achieve the best visual effects and user experience, such as Figure 2 , 3 As shown, you can use:
[0050] S11. Check the accuracy of the geographical data and perspective data of the VR panoramic photo;
[0051] S12. If the geographic data and the viewing angle data are accurate, output the VR panoramic photo;
[0052] S13. If the geographic data and the perspective data are inaccurate, manually align the geographic data and the perspective data of the VR panoramic photo, and output the aligned VR panoramic photo.
[0053] like Figure 7 As shown, by checking the accuracy of the geographic data and perspective data of VR panoramic photos, the accurate transition of users from VR panoramic photos to Cesium three-dimensional maps can be ensured, thereby enhancing the overall immersive and interactive experience.
[0054] S2. Obtain the Cesium 3D map corresponding to the VR panoramic photo. The Cesium 3D map mainly obtains satellite imaging data. The Cesium 3D map carries relatively detailed latitude, longitude and altitude information when it is obtained.
[0055] S3, using geographic data and perspective data, to match the VR panoramic photo and Cesium 3D map in terms of position and perspective;
[0056] As shown in Table 1, geographic data can include latitude, longitude, and altitude information. Geographic data is mainly used to match the location information of VR panoramic photos and Cesium 3D maps to make the display range of the two consistent. Perspective data can include heading angle, top angle, and roll angle. Perspective data is mainly used to match the perspective information of VR panoramic photos and Cesium 3D maps to make the perspective display of the two consistent.
[0057] Table 1 Composition of geographic data and perspective data
[0058]
[0059] The key to the linkage and fusion of VR panoramic photos and Cesium 3D maps is to synchronize their positions and perspectives, and accurately monitor the position and perspective changes of VR panoramic photos and Cesium 3D maps in real time; when users browse VR panoramic photos, it can be considered that they are controlling the viewpoint through a virtual VR camera, and all-round observation is achieved by changing the VR camera position and pitch angle. Similarly, the position and perspective changes of Cesium 3D maps can also be achieved by setting a Cesium camera, synchronizing the Cesium camera viewpoint with the VR camera viewpoint, and achieving accurate matching of the positions and perspectives of the two, so as to achieve the linkage and fusion of VR panoramic photos and Cesium 3D maps. Figure 8 , specifically through:
[0060] S31, VR panoramic photo initialization, obtaining the starting viewpoint geographic data and viewing angle data information of the VR camera;
[0061] S32, configure the Cesium camera of the Cesium 3D map;
[0062] S33, matching and setting the starting origin of the Cesium camera according to the starting viewpoint geographic data and the viewing angle data information of the VR camera;
[0063] S34. Check the linkage view effect between VR panoramic photos and Cesium 3D maps, adjust the matching between VR panoramic photos and Cesium 3D maps, and seamlessly connect the positions and perspectives of VR panoramic photos and Cesium 3D maps.
[0064] In order to keep the perspective of the Cesium camera and the VR camera completely consistent, an efficient data transmission and processing mechanism is required to ensure that the communication between the two systems is delay-free and accurately synchronized, thereby providing users with a smooth and seamless perspective switching experience.
[0065] In developing the perspective rotation synchronization mechanism, the key is to unify the pitch angle calculation logic; the heading angle, pitch angle and roll angle in the Cesium 3D map concept can be used as a unified angle measurement standard.
[0066] Set the heading angle, pitch angle, and roll angle when the VR panoramic photo is initialized as the starting viewpoint of the angle. Set the starting origin of the Cesium camera by matching the VR camera's viewpoint with the angle of the Cesium camera.
[0067] For example, if the initial viewpoint of the VR camera is set to 0° (heading angle), 0° (top angle), and 0° (roll angle), and the corresponding position angles of the Cesium 3D map are 10°, 10°, and 0°, this state of the Cesium 3D map is set as the origin of its camera perspective.
[0068] Subsequently, any changes in the VR perspective are adjusted according to this origin to ensure the synchronization and consistency between the VR panorama and the Cesium 3D map perspective.
[0069] When the VR camera's starting viewpoint matches the Cesium camera's starting origin, the VR panoramic photo position and viewing angle parameters are updated in real time as the user operates. These parameter changes are synchronized to the Cesium 3D map's viewing angle system, and the two are synchronized to form a fusion engine. Through the fusion engine, we can not only greatly improve the user's VR experience, but also provide a consistent viewing angle and experience in different VR virtual and actual geographical environments.
[0070] This conversion method ensures that the two perspectives can be accurately aligned during rotation, thereby achieving seamless linkage and user experience, ensuring the consistency and interoperability of VR panoramic photos and Cesium 3D map perspectives under any operation.
[0071] In order to optimize the real-time synchronization between VR panoramic photos and Cesium 3D map perspectives, the fusion engine uses Cesium cameras set in Cesium 3D maps to achieve this goal. Given that Cesium 3D map cameras have a high degree of freedom, while the display range of VR panoramic photos is relatively fixed, synchronization can be achieved by imposing restrictions on Cesium cameras, which can be achieved through:
[0072] According to the display range of VR panoramic photos, configure the transformation matrix of the Cesium camera, fix the longitude, latitude and altitude range of the Cesium camera, limit the zoom level and rotation operation of the Cesium camera, and control the position and viewing angle of the Cesium camera.
[0073] The Cesium camera reference frame is defined through the transformation matrix, so that the Cesium camera can be positioned and pointed in a specific direction according to this frame, thereby achieving the purpose of observing the scene from a specific perspective. This method effectively controls the observation angle and position of the Cesium camera, ensuring the efficiency and real-time performance of perspective synchronization.
[0074] Further, such as Figure 8 As shown, when the Cesium 3D map is linked with the VR panoramic photo, as the user's VR perspective changes, the Cesium 3D map is dynamically updated, and 3D models, images or vector maps can be added under the 3D view. By linking the view with the VR panoramic photo in this way, a seamless transition and deep interaction from macro to micro can be achieved, thereby achieving a full-scale, immersive visual experience.
[0075] S4. Based on the position matching and perspective matching information, the VR panoramic photos and Cesium 3D maps are linked to achieve position and perspective synchronization to form a fusion engine.
[0076] The present invention also discloses a device for linking VR and Cesium, such as Figure 6 As shown, the device comprises:
[0077] VR unit, obtaining VR panoramic photo geographic data and viewing angle data;
[0078] Cesium unit, obtains Cesium 3D map data;
[0079] The linkage unit matches the position and perspective of VR panoramic photos and Cesium 3D maps, and links VR panoramic photos and Cesium 3D maps to achieve position and perspective synchronization to form a fusion engine.
[0080] The present invention also provides an electronic device, Fig. 9 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, such as Fig. 9 As shown, the electronic device may include: a processor, a communications interface, a memory, and a communications bus, wherein the processor, the communications interface, and the memory communicate with each other via the communications bus. The processor may call the logic instructions in the memory to execute the following method:
[0081] S1. Obtain VR panoramic photos containing geographic data and perspective data;
[0082] S2, obtain the Cesium three-dimensional map corresponding to the VR panoramic photo;
[0083] S3, using geographic data and perspective data, to match the VR panoramic photo and Cesium 3D map in terms of position and perspective;
[0084] S4. Based on the position matching and perspective matching information, the VR panoramic photos and Cesium 3D maps are linked to achieve position and perspective synchronization to form a fusion engine.
[0085] The logical instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a device (which can be a VR device, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0086] An embodiment of the present invention further provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method provided in each of the above embodiments is implemented, for example, including:
[0087] S1. Obtain VR panoramic photos containing geographic data and perspective data;
[0088] S2, obtain the Cesium three-dimensional map corresponding to the VR panoramic photo;
[0089] S3, using geographic data and perspective data, to match the VR panoramic photo and Cesium 3D map in terms of position and perspective;
[0090] S4. Based on the position matching and perspective matching information, the VR panoramic photos and Cesium 3D maps are linked to achieve position and perspective synchronization to form a fusion engine.
[0091] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0092] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a device (which can be a VR device, a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0093] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for linking VR and Cesium, It is characterized in that Includes steps: S1. Obtain VR panoramic photos containing geographic data and perspective data; S2, obtain the Cesium three-dimensional map corresponding to the VR panoramic photo; S3, using geographic data and perspective data, to match the VR panoramic photo and Cesium 3D map in terms of position and perspective; S4. Based on the position matching and perspective matching information, the VR panoramic photo and Cesium 3D map are linked to achieve position and perspective synchronization to form a fusion engine; In S1, obtaining a VR panoramic photo containing geographic data and viewing angle data includes: S11. Check the accuracy of the geographical data and perspective data of the VR panoramic photo; S12. If the geographic data and the viewing angle data are accurate, output the VR panoramic photo; S13. If the geographic data and the viewing angle data are inaccurate, manually align the geographic data and the viewing angle data of the VR panoramic photo, and output the aligned VR panoramic photo; In S3, the location and perspective matching of the VR panoramic photo and the Cesium 3D map is performed using geographic data and perspective data, including: S31, VR panoramic photo initialization, obtaining the starting viewpoint geographic data and viewing angle data information of the VR camera; S32, configure the Cesium camera of the Cesium 3D map; S33, matching and setting the starting origin of the Cesium camera according to the starting viewpoint geographic data and the viewing angle data information of the VR camera; S34. Check the linkage view effect between VR panoramic photos and Cesium 3D maps, adjust the matching between VR panoramic photos and Cesium 3D maps, and seamlessly connect the positions and viewing angles of VR panoramic photos and Cesium 3D maps; In the above 32, configuring the Cesium camera of the Cesium three-dimensional map includes: According to the display range of VR panoramic photos, configure the transformation matrix of the Cesium camera, fix the longitude, latitude and altitude range of the Cesium camera, limit the zoom level and rotation operation of the Cesium camera, and control the position and viewing angle of the Cesium camera; The geographic data includes longitude, latitude and altitude information; The viewing angle data includes heading angle, pitch angle and roll angle information; When the Cesium three-dimensional map is linked with the VR panoramic photo, the Cesium three-dimensional map dynamically adds a three-dimensional model, image or vector map according to the perspective and location information of the VR panoramic photo.
2. A device that links VR and Cesium, It is characterized in that include: VR unit, obtaining VR panoramic photo geographic data and viewing angle data; Cesium unit, obtains Cesium 3D map data; The linkage unit matches the position and perspective of VR panoramic photos and Cesium 3D maps, and links VR panoramic photos and Cesium 3D maps to achieve position and perspective synchronization, forming a fusion engine; The method of using the device includes the steps of: S1. Obtain VR panoramic photos containing geographic data and perspective data; S2, obtain the Cesium three-dimensional map corresponding to the VR panoramic photo; S3, using geographic data and perspective data, to match the VR panoramic photo and Cesium 3D map in terms of position and perspective; S4. Based on the position matching and perspective matching information, the VR panoramic photo and Cesium 3D map are linked to achieve position and perspective synchronization to form a fusion engine; Get VR panoramic photos containing geographic data and perspective data, including: S11. Check the accuracy of the geographical data and perspective data of the VR panoramic photo; S12. If the geographic data and the viewing angle data are accurate, output the VR panoramic photo; S13. If the geographic data and the viewing angle data are inaccurate, manually align the geographic data and the viewing angle data of the VR panoramic photo, and output the aligned VR panoramic photo; Use geographic data and perspective data to match the location and perspective of VR panoramic photos and Cesium 3D maps, including: S31, VR panoramic photo initialization, obtaining the starting viewpoint geographic data and viewing angle data information of the VR camera; S32, configure the Cesium camera of the Cesium 3D map; S33, matching and setting the starting origin of the Cesium camera according to the starting viewpoint geographic data and the viewing angle data information of the VR camera; S34. Check the linkage view effect between VR panoramic photos and Cesium 3D maps, adjust the matching between VR panoramic photos and Cesium 3D maps, and seamlessly connect the positions and viewing angles of VR panoramic photos and Cesium 3D maps; Configure the Cesium camera for the Cesium 3D map, including: According to the display range of VR panoramic photos, configure the transformation matrix of the Cesium camera, fix the longitude, latitude and altitude range of the Cesium camera, limit the zoom level and rotation operation of the Cesium camera, and control the position and viewing angle of the Cesium camera; The geographic data includes longitude, latitude and altitude information; The viewing angle data includes heading angle, pitch angle and roll angle information; When the Cesium three-dimensional map is linked with the VR panoramic photo, the Cesium three-dimensional map dynamically adds a three-dimensional model, image or vector map according to the perspective and location information of the VR panoramic photo.
3. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the steps of the method for linking VR and Cesium as described in claim 1 are implemented.
4. A non-transitory computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of a method for linking VR and Cesium as described in claim 1 are implemented.
