Multi-view scene demonstration method and device and electronic equipment
By acquiring and rendering virtual camera visual data from multiple sub-view angles, the problem of only tracking satellites from one perspective in the prior art is solved, and multi-view tracking demonstration is realized, improving observation and user experience.
Patent Information
- Application Number
- CN202411012329.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2024-12-03
Smart Images

Figure CN119068101A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a method, device and electronic equipment for multi-viewing scene presentation. Background Art
[0002] In the prior art, the satellite tracking demonstration is usually demonstrated directly using the Cesium framework structure, wherein Cesium is a cross-platform, cross-browser javascript library for displaying three-dimensional earth and maps. Cesium supports 2D, 2.5D, and 3D forms of geographic (map) data display, can draw various geometric figures, highlight areas, support importing pictures, and even 3D models and other data visualization displays, can be used for dynamic data visualization and provide good touch support, support most browsers and mobile browsers, and support dynamic streaming data display based on timeline. However, the Cesium framework structure only provides a main perspective. Therefore, directly using Cesium to track satellites can only achieve satellite tracking demonstration from one perspective, but cannot achieve satellite tracking demonstration from multiple perspectives. This also results in observers being able to observe the operation of satellites from only one perspective, but not from multiple perspectives, resulting in observers being unable to observe the operation of satellites well, and the user experience is poor. Summary of the invention
[0003] The embodiments of the present invention provide a method, device and electronic device for multi-perspective scene demonstration to solve the problem in the prior art that satellite tracking demonstration can only be achieved from one perspective, but cannot be achieved from multiple perspectives, resulting in observers being unable to observe the operation of the satellite well and the user experience being poor.
[0004] The specific technical solutions are as follows:
[0005] In a first aspect, an embodiment of the present invention provides a method for multi-view scene presentation, the method comprising:
[0006] Monitor scene rendering instructions;
[0007] When the scene rendering instruction is detected, the visual data of the virtual camera corresponding to each preset secondary viewing angle is obtained in sequence; the secondary viewing angle is another viewing angle set according to observation requirements in addition to the main viewing angle;
[0008] Rendering images on display windows corresponding to each secondary perspective respectively according to visual data of the virtual camera corresponding to each secondary perspective;
[0009] When the visual data of the virtual cameras corresponding to all secondary perspectives are rendered, the visual data of the virtual camera corresponding to the primary perspective is obtained;
[0010] An image is rendered on a display window corresponding to the main viewing angle according to visual data of the virtual camera corresponding to the main viewing angle.
[0011] Optionally, the demonstration scene is a satellite tracking demonstration scene;
[0012] The steps to set up a secondary view for the satellite tracking demo scene include:
[0013] Get the main scene content of the satellite tracking demonstration scene;
[0014] Obtaining two-row orbit elements of the target satellite, and calculating the position coordinates of the target satellite according to the two-row orbit elements of the target satellite;
[0015] Acquiring entity data information of the target satellite according to identification information of the target satellite;
[0016] Generate a corresponding display window for each secondary viewing angle according to the main scene content of the satellite tracking demonstration scene, the coordinate position of the target satellite, and the entity data information;
[0017] A virtual camera is created in the display window, and the position and viewing angle of the virtual camera are adjusted so that the viewing angle of the virtual camera is consistent with the viewing angle of the secondary viewing angle corresponding to the display window.
[0018] Optionally, the framework structure of the satellite tracking demonstration scene is Cesium;
[0019] The steps to set up a secondary view for the satellite tracking demo scene include:
[0020] Call the Viewer class corresponding to the main scene of the satellite tracking demonstration scene;
[0021] Use the Viewer class corresponding to the main scene to create a corresponding initial display window for each secondary perspective; wherein the content of the initial display window corresponding to each secondary perspective is synchronized with the content of the main scene;
[0022] Obtaining two-row orbit elements of the target satellite, and calculating the position coordinates of the target satellite according to the two-row orbit elements of the target satellite;
[0023] According to the identification information of the target satellite, obtain the entity class of the target satellite from the entities class in Cesium;
[0024] According to the entity class of the target satellite and the coordinate position of the target satellite, the target satellite and the orbit of the target satellite are respectively created in the initial display window corresponding to each secondary viewing angle, so as to obtain the display window corresponding to each secondary viewing angle;
[0025] A virtual camera is created in the display window, and the position and viewing angle of the virtual camera are adjusted so that the viewing angle of the virtual camera is consistent with the viewing angle of the secondary viewing angle corresponding to the display window.
[0026] Optionally, the method further includes:
[0027] Creating a canvas in each of the display windows;
[0028] The step of rendering an image on a display window corresponding to each secondary perspective according to the visual data of the virtual camera corresponding to each secondary perspective comprises:
[0029] According to the visual data of the virtual camera corresponding to each secondary perspective, an image is rendered on the canvas in the display window corresponding to each secondary perspective.
[0030] Optionally, the method further includes:
[0031] An external interface is set for the display window corresponding to each secondary viewing angle, so as to control the display window corresponding to the secondary viewing angle.
[0032] Optionally, the external interface includes:
[0033] start interface, stop interface and destroy interface;
[0034] The start interface is used to jump the view to the display window of the secondary view corresponding to the start interface, and start the rendering process of the secondary view;
[0035] The stop interface is used to close the display window of the current secondary view;
[0036] The destory interface is used to control the destruction of the display window of the secondary perspective corresponding to the destory interface.
[0037] In a second aspect, an embodiment of the present invention provides a device for multi-view scene presentation, the device comprising:
[0038] Monitoring module, used to monitor scene rendering instructions;
[0039] A first acquisition module is used to sequentially acquire visual data of a virtual camera corresponding to each preset secondary viewing angle when the scene rendering instruction is detected; the secondary viewing angle is another viewing angle set according to observation requirements in addition to the primary viewing angle;
[0040] A first rendering module, used for rendering an image on a display window corresponding to each secondary perspective according to visual data of a virtual camera corresponding to each secondary perspective;
[0041] A second acquisition module is used to acquire the visual data of the virtual camera corresponding to the main view when the visual data of the virtual cameras corresponding to all the secondary viewpoints are rendered;
[0042] The second rendering module is used to render an image on a display window corresponding to the main viewing angle according to the visual data of the virtual camera corresponding to the main viewing angle.
[0043] Optionally, the demonstration scene is a satellite tracking demonstration scene; the device also includes a setting module, which is used to:
[0044] Get the main scene content of the satellite tracking demonstration scene;
[0045] Obtaining two-row orbit elements of the target satellite, and calculating the position coordinates of the target satellite according to the two-row orbit elements of the target satellite;
[0046] Acquiring entity data information of the target satellite according to identification information of the target satellite;
[0047] Generate a corresponding display window for each secondary viewing angle according to the main scene content of the satellite tracking demonstration scene, the coordinate position of the target satellite, and the entity data information;
[0048] A virtual camera is created in the display window, and the position and viewing angle of the virtual camera are adjusted so that the viewing angle of the virtual camera is consistent with the viewing angle of the secondary viewing angle corresponding to the display window.
[0049] Optionally, the framework of the satellite tracking demo scene is Cesium; set up modules, specifically for:
[0050] Call the Viewer class corresponding to the main scene of the satellite tracking demonstration scene;
[0051] Use the Viewer class corresponding to the main scene to create a corresponding initial display window for each secondary perspective; wherein the content of the initial display window corresponding to each secondary perspective is synchronized with the content of the main scene;
[0052] Obtaining two-row orbit elements of the target satellite, and calculating the position coordinates of the target satellite according to the two-row orbit elements of the target satellite;
[0053] According to the identification information of the target satellite, obtain the entity class of the target satellite from the entities class in Cesium;
[0054] According to the entity class of the target satellite and the coordinate position of the target satellite, the target satellite and the orbit of the target satellite are respectively created in the initial display window corresponding to each secondary viewing angle, so as to obtain the display window corresponding to each secondary viewing angle;
[0055] A virtual camera is created in the display window, and the position and viewing angle of the virtual camera are adjusted so that the viewing angle of the virtual camera is consistent with the viewing angle of the secondary viewing angle corresponding to the display window.
[0056] Optionally, the device further includes a creation module, configured to create a canvas in each display window;
[0057] The first rendering module is specifically used for:
[0058] According to the visual data of the virtual camera corresponding to each secondary perspective, an image is rendered on the canvas in the display window corresponding to each secondary perspective.
[0059] Optionally, the device further includes an interface setting module, which is used to:
[0060] An external interface is set for the display window corresponding to each secondary viewing angle, so as to control the display window corresponding to the secondary viewing angle.
[0061] Optionally, the external interface includes:
[0062] start interface, stop interface and destroy interface;
[0063] The start interface is used to jump the view to the display window of the secondary view corresponding to the start interface, and start the rendering process of the secondary view;
[0064] The stop interface is used to close the display window of the current secondary view;
[0065] The destory interface is used to control the destruction of the display window of the secondary perspective corresponding to the destory interface.
[0066] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0067] The memory is used to store computer programs;
[0068] The processor is used to implement the method steps of multi-perspective scene presentation described in the first aspect when executing the program stored in the memory.
[0069] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps for multi-perspective scene presentation described in the first aspect above are implemented.
[0070] In summary, the method provided in the embodiment of the present invention can realize monitoring scene rendering instructions; when a scene rendering instruction is detected, the visual data of the virtual camera corresponding to each preset secondary perspective is obtained in turn; according to the visual data of the virtual camera corresponding to each secondary perspective, the image is rendered on the display window corresponding to each secondary perspective; when the visual data of the virtual cameras corresponding to all secondary perspectives are rendered, the visual data of the virtual camera corresponding to the main perspective is obtained; according to the visual data of the virtual camera corresponding to the main perspective, the image is rendered on the display window corresponding to the main perspective. It can be seen that the method provided by the embodiment of the present invention can adjust the viewing angle to each preset secondary viewing angle before rendering the main scene corresponding to the main viewing angle, and obtain the rendering data corresponding to each secondary viewing angle respectively, and render the rendering data corresponding to each secondary viewing angle respectively on the display window corresponding to each secondary viewing angle. After the rendering data of all secondary viewing angles are rendered, the camera's viewing angle is returned to the main viewing angle, the rendering data corresponding to the main viewing angle is obtained, and the rendering data of the main viewing angle is rendered on the display window corresponding to the main viewing angle, thereby realizing the tracking and demonstration of the satellite from multiple viewing angles, solving the existing problem that the satellite tracking and demonstration can only be realized from one viewing angle, but cannot be realized from multiple viewing angles, resulting in the observer being unable to observe the operation of the satellite well and the user experience being poor.
[0071] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings.
[0072] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0074] Figure 1 A schematic diagram of a flow chart of a method for multi-view scene presentation provided by an embodiment of the present invention;
[0075] Figure 2 Another schematic flow chart of a method for multi-view scene presentation provided by an embodiment of the present invention;
[0076] Figure 3 A schematic diagram of the structure of a device for multi-view scene presentation provided by an embodiment of the present invention;
[0077] Figure 4A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0078] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0079] Figure 1 A schematic diagram of a flow chart of a method for multi-view scene presentation provided by an embodiment of the present invention, such as Figure 1 As shown, the method includes:
[0080] S101: monitoring scene rendering instructions;
[0081] For example, in a three-dimensional visualization platform based on the Cesium framework, it may be possible to monitor the Cesium main scene rendering event prerender. The event prerender is a notification before rendering the main perspective. In an embodiment of the present invention, when the main scene rendering event prerender is detected, the rendering data will be first obtained from each customized camera (the camera corresponding to the preset secondary perspective), and the obtained rendering data will be rendered to an off-screen canvas or framebuffer respectively; after the rendering data of all cameras are rendered, the rendering data in the camera corresponding to the main perspective will be rendered. FrameBuffer, also known as frame cache, is a cache (memory) after the Linux kernel abstracts the video memory. The purpose is to provide a set of direct screen writing interfaces for user-mode processes without having to worry about the location of the physical video memory, paging mechanism and other specific details.
[0082] S102: when a scene rendering instruction is detected, visual data of a virtual camera corresponding to each preset secondary perspective is obtained in sequence; the secondary perspective is another perspective set according to observation requirements in addition to the main perspective;
[0083] In a specific embodiment, the demonstration scene may be a satellite tracking demonstration scene;
[0084] The steps to set up a secondary view for the satellite tracking demo scene include:
[0085] Get the main scene content of the satellite tracking demonstration scene;
[0086] Obtain two-row orbital elements of the target satellite, and calculate the position coordinates of the target satellite according to the two-row orbital elements of the target satellite;
[0087] Acquire entity data information of the target satellite according to the identification information of the target satellite;
[0088] According to the main scene content of the satellite tracking demonstration scene, the coordinate position of the target satellite, and the entity data information, a corresponding display window is generated for each secondary perspective;
[0089] A virtual camera is created in the display window, and the position and viewing angle of the virtual camera are adjusted so that the viewing angle of the virtual camera is consistent with the viewing angle of the secondary viewing angle corresponding to the display window.
[0090] The perspective of the secondary view is determined by the developer based on the actual observation screen. After generating the corresponding display window for each secondary view, it is also necessary to create a virtual camera in the display window and adjust the position and perspective of the virtual camera so that the screen presented by the perspective of the virtual camera is consistent with the actual observation screen.
[0091] In a specific embodiment, the framework structure of the satellite tracking demonstration scene is Cesium; the step of setting a secondary viewing angle for the satellite tracking demonstration scene under the Cesium framework structure may include:
[0092] Call the Viewer class corresponding to the main scene of the satellite tracking demonstration scene;
[0093] Use the Viewer class corresponding to the main scene to create a corresponding initial display window for each secondary perspective; wherein the content of the initial display window corresponding to each secondary perspective is synchronized with the content of the main scene;
[0094] Obtain two-row orbital elements of the target satellite, and calculate the position coordinates of the target satellite according to the two-row orbital elements of the target satellite;
[0095] According to the identification information of the target satellite, obtain the entity class of the target satellite from the entities class in Cesium;
[0096] According to the entity class of the target satellite and the coordinate position of the target satellite, the target satellite and the target satellite orbit are respectively created in the initial display window corresponding to each secondary view, so as to obtain the display window corresponding to each secondary view;
[0097] A virtual camera is created in the display window, and the position and viewing angle of the virtual camera are adjusted so that the viewing angle of the virtual camera is consistent with the viewing angle of the secondary viewing angle corresponding to the display window.
[0098] Viewer is a component in Cesium used to display 3D scenes. It provides all the basic functions required to create and control 3D scenes, including loading 3D models, adding image overlays, setting camera position and direction, processing user input, etc. Call Viewer to create a display window for the secondary perspective to facilitate off-screen rendering. In the present invention, off-screen rendering refers to the process of adjusting the perspective to each preset secondary perspective before rendering the main scene corresponding to the main perspective, and obtaining the rendering data corresponding to each secondary perspective respectively, and rendering the rendering data corresponding to each secondary perspective respectively on the display window corresponding to each secondary perspective, and after all the rendering data of the secondary perspectives are rendered, the camera's perspective is returned to the main perspective, the rendering data corresponding to the main perspective is obtained, and the rendering data of the main perspective is rendered on the display window corresponding to the main perspective.
[0099] The target satellite entity is loaded into the scene through the entities in the viewer. Entities is a collection object of entities. Entities in Cesium is used to manage and monitor an associative array of a set of entities. In Cesium, entity is the base class used to describe objects with geometric shapes and attributes. Entities can be points, lines, surfaces, models, etc. They can contain additional information such as names, descriptions, and tags.
[0100] The virtual camera in Cesium is used to control the field of view in the scene.
[0101] Two-line orbital elements (TLEs) are a set of orbital parameters used to predict the position and velocity of an Earth orbiting spacecraft based on general perturbation theory. Using the two-line orbital elements, the real-time position of the satellite can be calculated.
[0102] S103: Rendering an image on a display window corresponding to each secondary perspective according to the visual data of the virtual camera corresponding to each secondary perspective;
[0103] Specifically, a canvas may be created in each display window; for example, a canvas based on canvas may be created in each display window. Canvas is a place for drawing, allowing JavaScript to dynamically draw graphics on it. The steps of rendering an image in a display window corresponding to each secondary view according to the visual data of the virtual camera corresponding to each secondary view may include:
[0104] According to the visual data of the virtual camera corresponding to each secondary perspective, an image is rendered on the canvas in the display window corresponding to each secondary perspective.
[0105] In the embodiment of the present invention, rendering is a process of rendering visual data using visual data in a virtual camera through Cesium's WebGL (that is, rendering the 3D scene tracked by the satellite to an off-screen framebuffer, including map content, sky, and various entity objects), and then converting the visual data into an image as a texture and drawing it onto a canvas.
[0106] WebGL (full name Web Graphics Library) is a 3D drawing protocol. This drawing technology standard allows JavaScript and OpenGL ES2.0 to be combined together. By adding a JavaScript binding to OpenGL ES2.0, WebGL can provide hardware 3D accelerated rendering for HTML5 Canvas, so that Web developers can use the system graphics card to display 3D scenes and models more smoothly in the browser, and create complex navigation and data visualization.
[0107] S104: When the visual data of the virtual cameras corresponding to all the secondary perspectives are rendered, the visual data of the virtual camera corresponding to the primary perspective is obtained;
[0108] S105: Rendering an image on a display window corresponding to the main viewing angle according to the visual data of the virtual camera corresponding to the main viewing angle.
[0109] The method provided in the embodiment of the present invention further includes:
[0110] An external interface is set for the display window corresponding to each secondary viewing angle, so as to control the display window corresponding to the secondary viewing angle.
[0111] In a specific embodiment, the external interface may include:
[0112] start interface, stop interface and destroy interface;
[0113] The start interface is used to jump the view to the display window of the secondary view corresponding to the start interface and start the rendering process of the secondary view;
[0114] The stop interface is used to close the display window of the current secondary view;
[0115] The destory interface is used to control the destruction of the display window of the secondary perspective corresponding to the destory interface.
[0116] In summary, the method provided in the embodiment of the present invention can realize monitoring scene rendering instructions; when a scene rendering instruction is detected, the visual data of the virtual camera corresponding to each preset secondary perspective is obtained in turn; according to the visual data of the virtual camera corresponding to each secondary perspective, the image is rendered on the display window corresponding to each secondary perspective; when the visual data of the virtual cameras corresponding to all secondary perspectives are rendered, the visual data of the virtual camera corresponding to the main perspective is obtained; according to the visual data of the virtual camera corresponding to the main perspective, the image is rendered on the display window corresponding to the main perspective. It can be seen that the method provided by the embodiment of the present invention can adjust the viewing angle to each preset secondary viewing angle before rendering the main scene corresponding to the main viewing angle, and obtain the rendering data corresponding to each secondary viewing angle respectively, and render the rendering data corresponding to each secondary viewing angle respectively on the display window corresponding to each secondary viewing angle. After the rendering data of all secondary viewing angles are rendered, the camera's viewing angle is returned to the main viewing angle, the rendering data corresponding to the main viewing angle is obtained, and the rendering data of the main viewing angle is rendered on the display window corresponding to the main viewing angle, thereby realizing the tracking and demonstration of the satellite from multiple viewing angles, solving the existing problem that the satellite tracking and demonstration can only be realized from one viewing angle, but cannot be realized from multiple viewing angles, resulting in the observer being unable to observe the operation of the satellite well and the user experience being poor.
[0117] The following is a practical example to further illustrate the method provided by the embodiment of the present invention in more detail.
[0118] In this embodiment, the demonstration scene is a satellite tracking demonstration scene, which is presented in a three-dimensional visualization platform based on the Cesium framework. This embodiment is to realize a multi-perspective observation satellite tracking demonstration scene. Since Cesium only provides one main perspective, in order to realize a multi-perspective observation satellite tracking demonstration scene, the method provided in the embodiment of the present invention, before rendering the main scene corresponding to the main perspective, first adjusts the perspective to each preset secondary perspective, and obtains the rendering data corresponding to each secondary perspective respectively, and renders the rendering data corresponding to each secondary perspective respectively on the display window corresponding to each secondary perspective. After all the rendering data of the secondary perspectives are rendered, the camera's perspective is returned to the main perspective, and the rendering data corresponding to the main perspective is obtained, and the rendering data of the main perspective is rendered on the display window corresponding to the main perspective. Thereby achieving the purpose of multi-perspective observation of satellites.
[0119] In an embodiment of the present invention, the secondary viewing angle can be set for the satellite tracking demonstration scene by the following steps:
[0120] Call the Viewer class corresponding to the main scene of the satellite tracking demonstration scene;
[0121] Use the Viewer class corresponding to the main scene to create a corresponding initial display window for each secondary perspective; wherein the content of the initial display window corresponding to each secondary perspective is synchronized with the content of the main scene;
[0122] Obtain two-row orbital elements of the target satellite, and calculate the position coordinates of the target satellite according to the two-row orbital elements of the target satellite;
[0123] According to the identification information of the target satellite, obtain the entity class of the target satellite from the entities class in Cesium;
[0124] According to the entity class of the target satellite and the coordinate position of the target satellite, the target satellite and the target satellite orbit are respectively created in the initial display window corresponding to each secondary view, so as to obtain the display window corresponding to each secondary view;
[0125] A virtual camera is created in the display window, and the position and viewing angle of the virtual camera are adjusted so that the viewing angle of the virtual camera is consistent with the viewing angle of the secondary viewing angle corresponding to the display window.
[0126] In this embodiment, a canvas is also created in each display window.
[0127] like Figure 2 As shown, the method for multi-view scene presentation provided by this embodiment includes:
[0128] S201: monitoring scene rendering instructions;
[0129] Specifically, it monitors the Cesium main scene rendering event prerender, where the event prerender is a notification before rendering the main perspective.
[0130] S202: When a scene rendering instruction is detected, the visual data of the virtual camera corresponding to each preset secondary perspective is obtained in sequence;
[0131] The secondary viewing angle is another viewing angle set according to observation requirements in addition to the main viewing angle.
[0132] S203: Rendering an image on a canvas in a display window corresponding to each secondary perspective according to the visual data of the virtual camera corresponding to each secondary perspective;
[0133] S204: Detect whether the visual data of the virtual cameras corresponding to all secondary perspectives have been rendered; if yes, execute step S205; if no, execute step S203;
[0134] S205: Acquire visual data of the virtual camera corresponding to the main viewing angle;
[0135] S206: Rendering an image on a display window corresponding to the main viewing angle according to the visual data of the virtual camera corresponding to the main viewing angle.
[0136] In this embodiment, external interfaces are also set for the display window corresponding to each secondary perspective: a start interface, a stop interface and a destory interface, so as to increase the flexibility of the demonstration platform; wherein the start interface is used to jump the perspective to the display window of the secondary perspective corresponding to the start interface, and start the rendering process of the secondary perspective; the stop interface is used to close the display window of the current secondary perspective; the destory interface is used to control the destruction of the display window of the secondary perspective corresponding to the destory interface.
[0137] It can be seen that the method provided by the embodiment of the present invention can adjust the viewing angle to each preset secondary viewing angle before rendering the main scene corresponding to the main viewing angle, and obtain the rendering data corresponding to each secondary viewing angle respectively, and render the rendering data corresponding to each secondary viewing angle on the display window corresponding to each secondary viewing angle respectively. After the rendering data of all secondary viewing angles are rendered, the camera's viewing angle is returned to the main viewing angle, the rendering data corresponding to the main viewing angle is obtained, and the rendering data of the main viewing angle is rendered on the display window corresponding to the main viewing angle, thereby realizing the tracking and demonstration of the satellite from multiple viewing angles, solving the existing problem that the satellite tracking and demonstration can only be realized from one viewing angle, but cannot be realized from multiple viewing angles, resulting in the observer being unable to observe the operation of the satellite well and the user experience being poor.
[0138] and Figure 1 Corresponding to the embodiment shown, the embodiment of the present invention also provides a device for multi-view scene presentation. Figure 3 As shown, the device includes: a detection module 301, a first acquisition module 302, a first rendering module 303, a second acquisition module 304, and a second rendering module 305, wherein:
[0139] Monitoring module 301, used for monitoring scene rendering instructions;
[0140] The first acquisition module 302 is used to sequentially acquire the visual data of the virtual camera corresponding to each preset secondary perspective when a scene rendering instruction is detected; the secondary perspective is another perspective set according to observation requirements in addition to the main perspective;
[0141] A first rendering module 303, used to render an image on a display window corresponding to each secondary view according to the visual data of the virtual camera corresponding to each secondary view;
[0142] The second acquisition module 304 is used to acquire the visual data of the virtual camera corresponding to the main view when the visual data of the virtual cameras corresponding to all the secondary viewpoints are rendered;
[0143] The second rendering module 305 is used to render an image on a display window corresponding to the main viewing angle according to the visual data of the virtual camera corresponding to the main viewing angle.
[0144] Optionally, the demonstration scene is a satellite tracking demonstration scene; the device also includes a setting module, which is used to:
[0145] Get the main scene content of the satellite tracking demonstration scene;
[0146] Obtain two-row orbital elements of the target satellite, and calculate the position coordinates of the target satellite according to the two-row orbital elements of the target satellite;
[0147] Acquire entity data information of the target satellite according to the identification information of the target satellite;
[0148] According to the main scene content of the satellite tracking demonstration scene, the coordinate position of the target satellite, and the entity data information, a corresponding display window is generated for each secondary perspective;
[0149] A virtual camera is created in the display window, and the position and viewing angle of the virtual camera are adjusted so that the viewing angle of the virtual camera is consistent with the viewing angle of the secondary viewing angle corresponding to the display window.
[0150] Optionally, the framework of the satellite tracking demo scene is Cesium; set up modules, specifically for:
[0151] Call the Viewer class corresponding to the main scene of the satellite tracking demonstration scene;
[0152] Use the Viewer class corresponding to the main scene to create a corresponding initial display window for each secondary perspective; wherein the content of the initial display window corresponding to each secondary perspective is synchronized with the content of the main scene;
[0153] Obtain two-row orbital elements of the target satellite, and calculate the position coordinates of the target satellite according to the two-row orbital elements of the target satellite;
[0154] According to the identification information of the target satellite, obtain the entity class of the target satellite from the entities class in Cesium;
[0155] According to the entity class of the target satellite and the coordinate position of the target satellite, the target satellite and the target satellite orbit are respectively created in the initial display window corresponding to each secondary view, so as to obtain the display window corresponding to each secondary view;
[0156] A virtual camera is created in the display window, and the position and viewing angle of the virtual camera are adjusted so that the viewing angle of the virtual camera is consistent with the viewing angle of the secondary viewing angle corresponding to the display window.
[0157] Optionally, the device further includes a creation module, which is used to create a canvas in each display window;
[0158] The first rendering module 303 is specifically used for:
[0159] According to the visual data of the virtual camera corresponding to each secondary perspective, an image is rendered on the canvas in the display window corresponding to each secondary perspective.
[0160] Optionally, the device further includes an interface setting module, which is used to:
[0161] An external interface is set for the display window corresponding to each secondary viewing angle, so as to control the display window corresponding to the secondary viewing angle.
[0162] Optional external interfaces include: start interface, stop interface and destroy interface;
[0163] The start interface is used to jump the view to the display window of the secondary view corresponding to the start interface and start the rendering process of the secondary view;
[0164] The stop interface is used to close the display window of the current secondary view;
[0165] The destory interface is used to control the destruction of the display window of the secondary perspective corresponding to the destory interface.
[0166] It can be seen that the device provided by the embodiment of the present invention can adjust the viewing angle to each preset secondary viewing angle before rendering the main scene corresponding to the main viewing angle, and respectively obtain the rendering data corresponding to each secondary viewing angle, and render the rendering data corresponding to each secondary viewing angle on the display window corresponding to each secondary viewing angle. After the rendering data of all secondary viewing angles are rendered, the camera's viewing angle is returned to the main viewing angle, the rendering data corresponding to the main viewing angle is obtained, and the rendering data of the main viewing angle is rendered on the display window corresponding to the main viewing angle, thereby realizing the tracking and demonstration of the satellite from multiple viewing angles, solving the existing problem that the satellite tracking and demonstration can only be realized from one viewing angle, but cannot be realized from multiple viewing angles, resulting in the observer being unable to observe the operation of the satellite well and the user experience being poor.
[0167] and Figure 1 Corresponding to the embodiment shown, the embodiment of the present invention further provides an electronic device, see Figure 4 , including a processor 401, a communication interface 402, a memory 403 and a communication bus 404, wherein the processor 401, the communication interface 402, and the memory 403 communicate with each other through the communication bus 404;
[0168] Memory 403, used for storing computer programs;
[0169] The processor 401 is used to implement the method steps of any multi-view scene presentation described in the above embodiments when executing the program stored in the memory.
[0170] It can be seen that the electronic device provided by the embodiment of the present invention can adjust the viewing angle to each preset secondary viewing angle before rendering the main scene corresponding to the main viewing angle, and respectively obtain the rendering data corresponding to each secondary viewing angle, and render the rendering data corresponding to each secondary viewing angle on the display window corresponding to each secondary viewing angle. After the rendering data of all secondary viewing angles are rendered, the camera's viewing angle is returned to the main viewing angle, the rendering data corresponding to the main viewing angle is obtained, and the rendering data of the main viewing angle is rendered on the display window corresponding to the main viewing angle, thereby realizing the tracking and demonstration of the satellite from multiple viewing angles, solving the existing problem that the satellite tracking and demonstration can only be realized from one viewing angle, but cannot be realized from multiple viewing angles, resulting in the observer being unable to observe the operation of the satellite well and the user experience being poor.
[0171] and Figure 1 Corresponding to the embodiment shown, an embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method steps of any multi-perspective scene presentation described in the above embodiments are implemented.
[0172] It can be seen that the storage medium provided in the embodiment of the present invention can adjust the viewing angle to each preset secondary viewing angle before rendering the main scene corresponding to the main viewing angle, and obtain the rendering data corresponding to each secondary viewing angle respectively, and render the rendering data corresponding to each secondary viewing angle on the display window corresponding to each secondary viewing angle respectively. After the rendering data of all secondary viewing angles are rendered, the camera's viewing angle is returned to the main viewing angle, the rendering data corresponding to the main viewing angle is obtained, and the rendering data of the main viewing angle is rendered on the display window corresponding to the main viewing angle, thereby realizing the tracking and demonstration of the satellite from multiple viewing angles, solving the existing problem that the satellite tracking and demonstration can only be realized from one viewing angle, but cannot be realized from multiple viewing angles, resulting in the observer being unable to observe the operation of the satellite well and the user experience being poor.
[0173] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.
[0174] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0175] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0176] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0177] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for multi-view scene presentation, characterized in that: The method comprises: Monitor scene rendering instructions; When the scene rendering instruction is detected, the visual data of the virtual camera corresponding to each preset secondary viewing angle is obtained in sequence; the secondary viewing angle is another viewing angle set according to observation requirements in addition to the main viewing angle; Rendering images on display windows corresponding to each secondary perspective respectively according to visual data of the virtual camera corresponding to each secondary perspective; When the visual data of the virtual cameras corresponding to all secondary perspectives are rendered, the visual data of the virtual camera corresponding to the primary perspective is obtained; An image is rendered on a display window corresponding to the main viewing angle according to visual data of the virtual camera corresponding to the main viewing angle.
2. The method according to claim 1, characterized in that The demonstration scene is a satellite tracking demonstration scene; The steps to set up a secondary view for the satellite tracking demo scene include: Get the main scene content of the satellite tracking demonstration scene; Obtaining two-row orbit elements of the target satellite, and calculating the position coordinates of the target satellite according to the two-row orbit elements of the target satellite; Acquiring entity data information of the target satellite according to identification information of the target satellite; Generate a corresponding display window for each secondary viewing angle according to the main scene content of the satellite tracking demonstration scene, the coordinate position of the target satellite, and the entity data information; A virtual camera is created in the display window, and the position and viewing angle of the virtual camera are adjusted so that the viewing angle of the virtual camera is consistent with the viewing angle of the secondary viewing angle corresponding to the display window.
3. The method according to claim 2, characterized in that The framework structure of the satellite tracking demonstration scene is Cesium; The steps to set up a secondary view for the satellite tracking demo scene include: Call the Viewer class corresponding to the main scene of the satellite tracking demonstration scene; Use the Viewer class corresponding to the main scene to create a corresponding initial display window for each secondary perspective; wherein the content of the initial display window corresponding to each secondary perspective is synchronized with the content of the main scene; Obtaining two-row orbit elements of the target satellite, and calculating the position coordinates of the target satellite according to the two-row orbit elements of the target satellite; According to the identification information of the target satellite, obtain the entity class of the target satellite from the entities class in Cesium; According to the entity class of the target satellite and the coordinate position of the target satellite, the target satellite and the orbit of the target satellite are respectively created in the initial display window corresponding to each secondary viewing angle, so as to obtain the display window corresponding to each secondary viewing angle; A virtual camera is created in the display window, and the position and viewing angle of the virtual camera are adjusted so that the viewing angle of the virtual camera is consistent with the viewing angle of the secondary viewing angle corresponding to the display window.
4. The method according to claim 1, characterized in that The method further comprises: Creating a canvas in each of the display windows; The step of rendering an image on a display window corresponding to each secondary perspective according to the visual data of the virtual camera corresponding to each secondary perspective comprises: According to the visual data of the virtual camera corresponding to each secondary perspective, an image is rendered on the canvas in the display window corresponding to each secondary perspective.
5. The method according to claim 1, characterized in that The method further comprises: An external interface is set for the display window corresponding to each secondary viewing angle, so as to control the display window corresponding to the secondary viewing angle.
6. The method according to claim 4, characterized in that The external interface includes: start interface, stop interface and destroy interface; The start interface is used to jump the view to the display window of the secondary view corresponding to the start interface, and start the rendering process of the secondary view; The stop interface is used to close the display window of the current secondary view; The destory interface is used to control the destruction of the display window of the secondary perspective corresponding to the destory interface.
7. A device for multi-view scene demonstration, characterized in that: The device comprises: Monitoring module, used to monitor scene rendering instructions; A first acquisition module is used to sequentially acquire visual data of a virtual camera corresponding to each preset secondary viewing angle when the scene rendering instruction is detected; the secondary viewing angle is another viewing angle set according to observation requirements in addition to the primary viewing angle; A first rendering module, used for rendering an image on a display window corresponding to each secondary perspective according to visual data of a virtual camera corresponding to each secondary perspective; A second acquisition module is used to acquire the visual data of the virtual camera corresponding to the main view when the visual data of the virtual cameras corresponding to all the secondary viewpoints are rendered; The second rendering module is used to render an image on a display window corresponding to the main viewing angle according to the visual data of the virtual camera corresponding to the main viewing angle.
8. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used to store computer programs; The processor is used to implement the method steps described in any one of claims 1-6 when executing the program stored in the memory.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 6 are implemented.
