A Sensor Observation Method and System Based on Cesium

By constructing the view cone and customizing the sensor parameters, the problem of inflexible sensor viewing angle adjustment in the prior art is solved, and real-time observation of complex environments is achieved, and observation efficiency and flexibility are improved.

CN115439592BActive Publication Date: 2025-06-27XIDIAN UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211038356.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-29
Publication Date
2025-06-27
Estimated Expiration
2042-08-29

AI Technical Summary

Technical Problem

The existing technology does not support customizing sensors of different models to adjust the current viewing angle, making it difficult to observe various targets in complex environments from multiple angles in real time.

Method used

Use the PerspectiveFrustum function to build a view cone, customize the parameters of different types of sensors to adjust the observation angle, and observe the targets to be observed in the view cone, thereby simulating the sensor observation environment.

Benefits of technology

It supports customizing sensors of different models to adjust the current viewing angle, real-time multi-angle observation of various goals for complex environments, and has the characteristics of simple settings, quick switching of viewing angles, dynamic real-time preview and modifying the imaging range.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115439592B_ABST
    Figure CN115439592B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of geographic information systems, and discloses a sensor observation method and system based on Cesium. In this observation method, a viewing frustum is constructed using the PerspectiveFrustum function, and the parameters of different types of sensors are customized to adjust the observation perspective, and the target to be observed within the viewing frustum is observed, thereby simulating the sensor observation environment. The present invention solves the problems existing in the prior art, such as not supporting the customization of different types of sensors to adjust the current perspective and being difficult to observe various targets in a complex environment from multiple angles in real time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of geographic information systems, and specifically to a sensor observation method and system based on Cesium. Background Art

[0002] Although the geographic information system has developed very maturely, common geographic information systems only have several simple perspectives for observation. The most commonly used ones are the first-person roaming perspective or the tracking perspective, which are difficult to meet the observation requirements of complex observation simulation systems.

[0003] Cesium is an open-source js library for displaying three-dimensional earth and maps. Currently, existing technologies all use simple perspectives. For example, the Chinese patent "Video Picture Display Method, Device, Terminal and Storage Medium Based on GIS System" (Patent Application No.: 202010195665.8, Publication No. CN111563185A) only realizes the perspective of a dashcam mode. The high-fidelity roaming scenes of the scene are also free roaming and require manual intervention through the keyboard. The existing Cesium platform does not support customizing the adjustment of the current perspective according to different types of sensors, and it is difficult to observe various targets in a complex environment from multiple angles in real time. Summary of the Invention

[0004] To overcome the deficiencies of the prior art, the present invention provides a sensor observation method and system based on Cesium, which solves the problems in the prior art such as not supporting customizing the adjustment of the current perspective according to different types of sensors and being difficult to observe various targets in a complex environment from multiple angles in real time.

[0005] The technical solution adopted by the present invention to solve the above problems is as follows:

[0006] A sensor observation method based on Cesium uses the PerspectiveFrustum function to construct a viewing frustum, customizes the parameters of different types of sensors to adjust the observation perspective, and observes the target to be observed within the viewing frustum, thereby simulating the sensor observation environment.

[0007] As a preferred technical solution, customizing the parameters of different types of sensors includes the following steps:

[0008] SA, setting the basic parameters of the sensor;

[0009] SB, setting the position of the sensor;

[0010] SC, setting the orientation of the sensor;

[0011] SD, obtaining the imaging result of the sensor: based on the set basic parameters, position and / or orientation of the sensor, obtaining the imaging of the target to be observed obtained by the corresponding sensor.

[0012] As a preferred technical solution, step SA includes the following steps:

[0013] SA1. Adjust the imaging field of view angle. The adjustment method is: AspectRatio = tan(toRadius(HFOV / 2)) / tan(toRadius(VFOV / 2)); where, AspectRatio represents the aspect ratio of the frustum, HFOV represents the horizontal field of view angle, VFOV represents the vertical field of view angle, toRadius(HFOV / 2) represents converting the half horizontal field of view angle to radians, tan(toRadius(HFOV / 2)) represents the tangent value of the half horizontal field of view angle, toRadius(VFOV / 2) represents converting the half vertical field of view angle to radians, and tan(toRadius(VFOV / 2)) represents the tangent value of the half vertical field of view angle;

[0014] In the formula,

[0015] camera.frustum.aspectRatio = AspectRatio;

[0016] camera.frustum.fov = toRadius(VFOV);

[0017] Among them, frustum represents the frustum created using PerspectiveFrustum, frustum.aspectRatio represents the aspect ratio of the frustum, and frustum.fov represents the vertical field of view angle of the frustum;

[0018] SA2. Adjust the imaging pixels: According to the aspect ratio AspectRatio calculated by the sensor, readjust the pixel width and height of the sensor rendering window. The calculation process is as follows:

[0019] If screenWidth / screenHeight >= 1,

[0020] sensorWidth = screenHeight * AspectRatio / screenWidth;

[0021] sensorHeight = screenHeight;

[0022] If screenWidth / screenHeight < 1,

[0023] sensorWidth = screenWidth;

[0024] sensorHeight = screenWidth * AspectRatio / screenHeight;

[0025] Among them, screenWidth represents the pixel width of the rendering window, screenHeight represents the pixel height of the rendering window, sensorWidth represents the pixel width of the sensor window, and sensorHeight represents the pixel height of the sensor window.

[0026] As a preferred technical solution, in step SB, if only one direction is observed at a certain moment, a single sensor is set, and the position of the single sensor is fixed or changes with time; if multiple directions are observed at a certain moment, a batch of regular sensors is set, and the positions of the batch of regular sensors do not change with time. The batch of regular sensors refers to several sensors that are regularly distributed in space.

[0027] As a preferred technical solution, the method for setting the positions of the batch of regular sensors is as follows:

[0028] Set the sensors on the same spherical surface: With the center of the object coordinates in the scene as the center, the object can be movable or stationary. Generate the regular sensor positions according to the set azimuth angle, elevation angle, radius, number of elevation angles, and number of azimuth angles. All the regular sensor positions are on the same spherical surface, and at the same time, the redundant sensors with the same coordinates are removed; the specific calculation is as follows:

[0029] ,

[0030] ,

[0031] ;

[0032] Among them, r represents the radius of the spherical surface, startV represents the starting elevation angle, endV represents the ending elevation angle, startH represents the starting azimuth angle, endH represents the ending azimuth angle, m represents the number of elevation angles, n represents the number of azimuth angles, 0 ≤ i ≤ m - 1 and i is an integer, 0 ≤ j ≤ n - 1 and j is an integer, deltV is the interval between adjacent elevation angles, and deltH is the interval between adjacent azimuth angles; when startV == endV, m = 1, otherwise m > 1; when startH == endH, n = 1, otherwise n > 1;

[0033] If sensors outside the same spherical surface are also needed, then set the sensors outside the same spherical surface: With the center of the scene target coordinates as the center, add sensors, set the coordinates of the sensors, and process them according to the set azimuth angle, elevation angle, radius method or the x-offset, y-offset, z-offset processing method, and at the same time remove the redundant sensors with the same coordinates;

[0034] Then, update the batch regular coordinates, convert the coordinates of the object coordinate system to the Cartesian coordinate system, and according to the working time t0 of the batch regular sensor, obtain the coordinates and rotation matrix of the object at the moment t0, and combine with the relative coordinates to calculate the real-time sensor coordinates. The specific calculation is as follows:

[0035] ;

[0036] where rotateMatrix is the rotation matrix of the object at the moment t0, objectPosition is the coordinate of the object at the moment t0, offset k is the offset coordinate of the k-th sensor in the batch regular, and sensorPosition k is the corrected offset coordinate of the k-th sensor.

[0037] As a preferred technical solution, the method for setting the spatial position of a single sensor includes one of the following methods:

[0038] Set a fixed position: If it is necessary to set the position of a single sensor fixed, any fixed point in the observation environment is set as the fixed position;

[0039] Set a motion trajectory: If it is necessary to set the position of a single sensor to change with time, the time and position coordinates of each trajectory point are passed in; among them, the Lagrange interpolation algorithm is used to realize the smooth motion between the trajectory points when updating the position in real time;

[0040] Set as the relative coordinate of the object: Whether the object is stationary or moving, if it is set as the relative coordinate of the object, it is necessary to first obtain the real-time coordinate and real-time rotation matrix of the object, and combine with the relative coordinate to calculate the real-time sensor coordinate. The specific calculation is as follows:

[0041] ,

[0042] where rotateMatrix is the real-time rotation matrix of the object, objectPosition is the real-time coordinate of the object, and offset is the coordinate of the sensor relative to the object.

[0043] As a preferred technical solution, in step SC, the method for setting the spatial orientation of a single sensor includes one of the following methods:

[0044] Set to point to a fixed point: Set the sensor to point to a certain fixed position in the scene, and the sensor does not change with time. The setting method is:

[0045] ;

[0046] Among them, fixedPosition represents the set fixed position of the pointing, and sensorPosition represents the calculated current sensor position;

[0047] Set the fixed orientation: directly set the sensor orientation direction. The sensor orientation is a fixed direction within the scene and does not change with time. The setting method is as follows:

[0048] ;

[0049] Set to point to an object within the scene: Set to point to an object or have a fixed offset value relative to the object. The orientation calculation process is as follows:

[0050] ;

[0051] ;

[0052] Among them, objectPosition represents the real-time coordinates of the object being pointed to, sensorPosition is the current position of the sensor, targetPosition represents the position currently pointed to by the sensor, offset represents the fixed offset value of the position pointed to by the sensor relative to the object, and rotateMatrix represents the real-time rotation matrix of the object being pointed to.

[0053] As a preferred technical solution, step SC includes the following steps:

[0054] SC1, Conventional sensor processing: From the real-time position and orientation of the sensor, calculate the required right-axis and up-axis vectors of the sensor. The specific process is as follows:

[0055] ;

[0056] Among them, normal represents the ground normal vector, right represents the right-axis vector of the sensor, up is the up-axis vector of the sensor, and sensorPosition represents the real-time position of the sensor.

[0057] As a preferred technical solution, in step SC1, if the orientation of the stationary sensor is perpendicular to the ground in step SC1, the following processing is added:

[0058] ;

[0059] Among them, the orientation perpendicular to the ground includes looking down at the ground and looking up at the sky. PolarAxis represents the vector of the Earth's north axis direction, and right represents the right-axis vector of the sensor.

[0060] A sensor observation system based on Cesium, including a storage medium on which a computer program is stored. When the computer program is executed by a computer, it implements the described sensor observation method based on Cesium.

[0061] Compared with the prior art, the present invention has the following beneficial effects:

[0062] (1) The present invention supports customizing different types of sensors to adjust the current viewing angle and is difficult to observe various targets in a complex environment from multiple angles in real time;

[0063] (2) The present invention has the characteristics of simple setting, quick viewing angle switching, dynamic real-time preview and modification of the imaging range;

[0064] (3) The present invention supports modifying the working time, horizontal field of view, vertical field of view, etc. of the sensor, supports observing the scene environment at any angle and in any way, and provides four types of observation sensors: fixed-point observation, mounted observation, batch regular observation, and third-party perspective observation; it can observe stationary and moving targets and can configure the observation angles of any path. Description of the Drawings

[0065] Figure 1 It is a schematic diagram of a step of the sensor observation method based on Cesium described in the present invention;

[0066] Figure 2 It is a schematic diagram of the sensor field of view;

[0067] Figure 3 It is a schematic diagram of the sensor frustum;

[0068] Figure 4 It is a schematic diagram of the regular sensor position distribution in the object coordinate system;

[0069] Figure 5 It is a schematic diagram of the three axes of the sensor;

[0070] Figure 6 It is a schematic diagram of the three-axis calculation of the sensor;

[0071] Figure 7 It is a schematic diagram of the rendering window and the sensor window. Detailed Embodiments

[0072] The following will further elaborate on the present invention in detail in conjunction with embodiments and the accompanying drawings, but the implementation manners of the present invention are not limited thereto.

[0073] Embodiment 1

[0074] As Figures 1 to 7 shown, the present invention realizes a sensor system that supports multiple observation perspectives to meet the needs of observing complex observation environments.

[0075] Based on the Cesium platform, the present invention develops a sensor observation method and system based on Cesium, realizing a sensor system that supports multiple observation perspectives to meet the needs of observing complex observation environments. It aims to meet any observation perspective in real observation scenarios. The imaging resolution, horizontal and vertical field of view angles, and working hours of the sensor can be configured. This system can meet the free definition of the sensor system and realize real-time multi-angle observation of various targets in complex observation scenario environments.

[0076] The present invention uses the PerspectiveFrustum of the viewing frustum to set the parameters of the sensor perspective. Only the environment within the viewing frustum can be imaged to simulate the observation scenario environment observable by the sensor. The relevant parameters include the imaging pixels of the sensor, the horizontal field of view angle of the field of view, the vertical field of view angle, the power-on time, and the power-off time. During non-working hours, the sensor imaging is a black screen.

[0077] including Figure 1 the shown process;

[0078] SA, the conversion of the horizontal and vertical field of view angles of the sensor:

[0079] (1) Add and set the basic parameters of the sensor;

[0080] Refer to Figure 2 , SA1, adjust the imaging field of view angle, and the adjustment method is: AspectRatio = tan(toRadius(HFOV / 2)) / tan(toRadius(VFOV / 2)); where, AspectRatio represents the aspect ratio of the viewing frustum, HFOV represents the horizontal field of view angle, VFOV represents the vertical field of view angle, toRadius(HFOV / 2) represents converting the half horizontal field of view angle to radians, tan(toRadius(HFOV / 2)) represents the tangent value of the half horizontal field of view angle, toRadius(VFOV / 2) represents converting the half vertical field of view angle to radians, and tan(toRadius(VFOV / 2)) represents the tangent value of the half vertical field of view angle;

[0081] In the formula,

[0082] camera.frustum.aspectRatio = AspectRatio;

[0083] camera.frustum.fov = toRadius(VFOV);

[0084] Among them, frustum represents the viewing frustum created using PerspectiveFrustum, frustum.aspectRatio represents the aspect ratio of the viewing frustum, and frustum.fov represents the vertical field of view of the viewing frustum;

[0085] Adjust the imaging area according to the horizontal field of view and the vertical field of view.

[0086] SA2, adjust the imaging pixels: According to the aspect ratio AspectRatio calculated by the sensor, readjust the pixel width and height of the sensor rendering window. The calculation process is as follows:

[0087] If screenWidth / screenHeight >= 1,

[0088] sensorWidth = screenHeight * AspectRatio / screenWidth;

[0089] sensorHeight = screenHeight;

[0090] If screenWidth / screenHeight < 1,

[0091] sensorWidth = screenWidth;

[0092] sensorHeight = screenWidth * AspectRatio / screenHeight;

[0093] Among them, screenWidth represents the pixel width of the rendering window, screenHeight represents the pixel height of the rendering window, sensorWidth represents the pixel width of the sensor window, and sensorHeight represents the pixel height of the sensor window.

[0094] It also includes: setting of power-on and power-off events. During non-working hours, black screen processing is required, and during working hours, screen-on processing is required.

[0095] SB, set the sensor position;

[0096] Specifically, it includes the following situations:

[0097] Set the position of each sensor, which is fixed or can change over time; for a batch of regular sensors, it does not change over time and is regularly distributed in space. After calculating the position of the local coordinate system, convert the coordinates of the local coordinate system to the Cartesian coordinate system of Cesium.

[0098] (2a) Spatial position distribution of batch regular sensors:

[0099] The batch regular sensors are composed of a spatial distribution, which can observe the specific situation of the scene target model at a certain moment from 360°. The specific generation algorithm includes two steps, as shown below:

[0100] Set sensors on the same spherical surface: With the object coordinate center in the scene as the center, the object can be moving or stationary. According to the set azimuth angle, elevation angle, radius, number of elevation angles, and number of azimuth angles, generate the positions of regular sensors. All the positions of regular sensors are on the same spherical surface, and at the same time, remove the redundant sensors with the same coordinates; the specific calculation is as follows:

[0101] ,

[0102] ,

[0103] ;

[0104] Among them, r represents the radius of the spherical surface, startV represents the starting elevation angle, endV represents the ending elevation angle, startH represents the starting azimuth angle, endH represents the ending elevation angle, m represents the number of elevation angles, n represents the number of azimuth angles, 0 ≤ i ≤ m - 1 and i is an integer, 0 ≤ j ≤ n - 1 and j is an integer, deltV is the interval between adjacent elevation angles, deltH is the interval between adjacent azimuth angles; when startV == endV, m = 1, otherwise m > 1; when startH == endH, n = 1, otherwise n > 1;

[0105] If sensors outside the same spherical surface are also needed, then set sensors outside the same spherical surface: With the scene target coordinate center as the center, add sensors, set the coordinates of the sensors, and according to the set azimuth angle, elevation angle, radius method or the x-offset, y-offset, z-offset processing method, and at the same time, remove the redundant sensors with the same coordinates;

[0106] Refer to Figure 4 , in order to transform the coordinates in the object coordinate system to the scene Cartesian coordinate system, because the coordinates used when calculating the orientation are all the coordinates in the scene Cartesian coordinate system. Update the batch regular coordinates, convert the coordinates in the object coordinate system to the Cartesian coordinate system, according to the working time t0 of the batch regular sensors, obtain the coordinates and rotation matrix of the object at the t0 moment, and combine with the relative coordinates to calculate the real-time sensor coordinates. The specific calculation is as follows:

[0107] ;

[0108] Among them, rotateMatrix is the rotation matrix of the object at time t0, objectPosition is the coordinate of the object at time t0, and offset k is the offset coordinate of the k-th sensor in the batch rule, and sensorPosition k is the offset coordinate of the k-th sensor after correction.

[0109] As a preferred technical solution, the method for setting the spatial position of a single sensor includes one of the following methods:

[0110] Set to a fixed position:

[0111] The fixed position can be set to any fixed point within the observation scene environment. At this time, the sensor type can be classified as a fixed-point sensor.

[0112] Set to a motion trajectory:

[0113] For the motion trajectory, the time and position coordinates of each trajectory point need to be passed in. When updating the position in real time, the Lagrange interpolation algorithm is used to achieve smooth motion between trajectory points.

[0114] Set to the relative coordinate of the object: Whether the object is stationary or moving, if it is set to the relative coordinate of the object, the real-time coordinate and real-time rotation matrix of the object need to be obtained first. Combining with the relative coordinate, the real-time sensor coordinate is calculated. Such a sensor can be called a mounted sensor. The specific calculation is as follows:

[0115] ,

[0116] Among them, rotateMatrix is the real-time rotation matrix of the object, objectPosition is the real-time coordinate of the object, and offset is the coordinate of the sensor relative to the object.

[0117] Preferably, the method for calculating the sensor position in SB: SB updates the position of the current sensor using the imported sensor coordinate method, and SB updates the position of the current sensor using the real-time sensor coordinate method.

[0118] SC, set the sensor orientation;

[0119] This step is used to set the orientation of the sensor. The orientation can point to a fixed point, a fixed orientation, or a relative fixed offset that can also track the target. The calculation of the real-time base vectors (direction, right, up) of the sensor refers to Figure 6 .

[0120] The method for setting the spatial orientation of a single sensor includes one of the following methods:

[0121] Set the pointing to a fixed point: Set the sensor to face a certain fixed position in the scene. The sensor does not change over time. The setting method is as follows:

[0122] ;

[0123] Among them, fixedPosition represents the fixed position of the set pointing, and sensorPosition represents the calculated current position of the sensor;

[0124] Set the fixed orientation: Directly set the sensor orientation direction. The sensor orientation is a certain fixed direction in the scene and does not change over time. The setting method is as follows:

[0125] ;

[0126] Set to point to an object in the scene: Set to point to an object or have a fixed offset value relative to the object. The orientation calculation process is as follows:

[0127] ;

[0128]

[0129] Among them, objectPosition represents the real-time coordinates of the pointed object, sensorPosition represents the current position of the sensor, targetPosition represents the position pointed by the current sensor, offset represents the fixed offset value of the position pointed by the sensor relative to the object, and rotateMatrix represents the real-time rotation matrix of the pointed object.

[0130] More specifically:

[0131] SC1, Conventional sensor processing:

[0132] From the current position and the locked position, the direction vector in the current Cartesian coordinate system can be calculated. The locked position can be the coordinates of a fixed point or the coordinates of a moving target model. To simplify the movement, assume that the model sensor does not flip. Then, use the cross product of the surface normal direction normal and the direction of direction to calculate the right direction vector. Then, use the cross product of direction and right to calculate the up vector of the sensor.

[0133] That is, from the real-time position and orientation of the sensor, calculate the required right axis and up axis vectors of the sensor. The specific process is as follows:

[0134] ;

[0135] Among them, normal represents the surface normal vector, right represents the right axis vector of the sensor, up represents the upper axis vector of the sensor, and sensorPosition represents the real-time position of the sensor. The surface normal is calculated using ellipsoid.geodeticSurfaceNormal(sensorPosition), where ellipsoid is a built-in ellipsoid tool class in Cesium.

[0136] Further, as follows;

[0137] Processing of a stationary sensor facing vertically downwards towards the ground:

[0138] In step SC1, if the stationary sensor in step SC1 faces vertically downwards towards the ground, the following processing is added:

[0139] ;

[0140] Among them, facing vertically downwards towards the ground includes looking down at the ground and looking up at the sky. PolarAxis represents the vector in the direction of the Earth's north axis, and right represents the right axis vector of the sensor.

[0141] For a stationary sensor in SC1, if it faces vertically downwards towards the ground, additional restrictions need to be added for separate processing. A sensor facing vertically downwards towards the ground is mainly divided into two types: looking down at the ground or looking up at the sky. A moving sensor can obtain the current real-time base vectors based on adjacent frames, but for a stationary sensor looking down at the ground, additional processing is required because the surface normal and direction are either reverse vectors or the same direction vectors. Therefore, additional processing is needed. Currently, the convention for this processing method is to perform a cross product with the north direction to ensure default imaging, and the orientation of the camera points towards the north.

[0142] Preferably, in the present invention, the orientation of the current sensor is updated using the imported sensor attitude method in SC, and the orientation of the current sensor is updated using the real-time sensor attitude method in SC.

[0143] SD, obtaining the imaging result of the sensor;

[0144] Switching to the sensor view can obtain the imaging of the corresponding sensor, and video export can also be achieved through screen recording. Pure sensor imaging needs to be obtained in the sensor view. After activating the sensor, the imaging window, power-on and power-off events, etc. need to be reset according to the parameters of the currently activated sensor.

[0145] SD1, processing of power-on and power-off:

[0146] During non - working hours, the screen needs to be blacked out. Use a pure - black label with the same size as the viewport to cover it and hide it during working hours. At the same time, when rendering each frame, detect whether the current sensor is in the working state. If it is not in the working state, perform black - screen processing.

[0147] SD2, hiding of other elements:

[0148] Under the sensor's perspective, only the pure sensor imaging effect should be presented. Non - essential information prompts need to be hidden, including the compass, real - time longitude and latitude information, trajectory lines, etc.

[0149] SD3, shielding of operations:

[0150] Under the sensor's perspective, only time adjustment is supported. It is not allowed to use operations such as mouse and keyboard operations to change the sensor's position and orientation parameters. Therefore, all the above operations need to be shielded under the sensor's perspective. When it is not a custom sensor perspective, it needs to be reopened to allow operations.

[0151] Preferably, the present invention achieves the expected combination method by setting the position and orientation. By mounting the sensor on the model coordinates (allowing an offset relative to the model center), and specifying the orientation as the front of the model, an imaging effect similar to that of a dashcam can be achieved, that is, the first - person perspective of the model's movement. By setting the sensor at a fixed position and specifying the orientation as the moving model, the sensor effect of tracking a moving target can be achieved. By mounting the sensor on the model coordinates (allowing a height offset relative to the model center's z - value) and specifying the orientation as directly above or below the model, the sensor effect of real - time relative tracking of the model's movement can be achieved.

[0152] It is worth noting that:

[0153] The sensor position in SB can also be obtained by importing historical coordinate data recorded by real targets;

[0154] The sensor orientation in SC can also be obtained by importing historical attitude data (including Euler angles, quaternions, rotation matrices, etc.) recorded by real targets;

[0155] The sensor position in SB can also be obtained by accessing externally real - time incoming target coordinate data;

[0156] The sensor orientation in SC can also be obtained by accessing externally real - time incoming target attitude data (including Euler angles, quaternions, rotation matrices, etc.).

[0157] It is worth noting that: The steps SA, SB, and SC of the present invention are not limited to the order exemplified in this embodiment. In fact, the steps SA, SB, and SC can be executed in any order or simultaneously. Therefore, the order between the steps SA, SB, and SC shown in this embodiment should not be regarded as a limitation of the present invention.

[0158] The present invention is characterized by simple setting, quick perspective switching, dynamic real-time preview and modification of the imaging range. It supports modifying the working time of the sensor, horizontal field of view, vertical field of view, etc. It supports observing the scene environment at any angle and in any way, and provides four types of observation sensor types: fixed-point observation, mounted observation, batch regular observation, and third-party perspective observation. It can observe stationary and moving targets and configure the observation angles of any path, etc.

[0159] The implementation idea of the present invention can be applied to various geographic information systems and rendering engines to realize observing the scene environment and targets at any angle and in any way.

[0160] As described above, the present invention can be preferably realized.

[0161] All the features disclosed in all the embodiments in this specification, or all the steps in the methods or processes implicitly disclosed, except for mutually exclusive features and / or steps, can be combined and / or extended and replaced in any way.

[0162] As mentioned above, it is only a preferred embodiment of the present invention, and there is no any form of limitation to the present invention. According to the technical essence of the present invention, any simple modification, equivalent replacement and improvement made to the above embodiments within the spirit and principle of the present invention still fall within the protection scope of the technical solution of the present invention.

Claims

1. A sensor observation method based on Cesium, characterized in that, Use the PerspectiveFrustum function to construct a viewing frustum, customize the parameters of different types of sensors to adjust the viewing angle, and observe the target to be observed within the viewing frustum, so as to simulate the sensor observation environment; Customizing the parameters of different types of sensors includes the following steps: SA, set the basic parameters of the sensor; SB, set the sensor position; SC, set the sensor orientation; SD, obtain the sensor imaging result: based on the set basic parameters of the sensor, sensor position, and / or sensor orientation, obtain the imaging of the target to be observed obtained by the corresponding sensor; In step SB, if only one direction is observed at a certain moment, a single sensor is set, and the position of the single sensor is fixed or changes with time; if multiple directions are observed at a certain moment, a batch of regular sensors is set, and the positions of the batch of regular sensors do not change with time. A batch of regular sensors refers to several sensors that are regularly distributed in space; Step SC includes the following steps: SC1, conventional sensor processing: Calculate the required right-axis and up-axis vectors of the sensor from the real-time position and orientation of the sensor. The specific process is as follows: ; Where normal represents the surface normal vector, right represents the right-axis vector of the sensor, up is the up-axis vector of the sensor, and sensorPosition represents the real-time position of the sensor.

2. The method for sensor observation based on Cesium according to claim 1, wherein Step SA includes the following steps: SA1, adjust the imaging field of view. The adjustment method is: AspectRatio = tan(toRadius(HFOV / 2)) / tan(toRadius(VFOV / 2)); where AspectRatio represents the aspect ratio of the viewing frustum, HFOV represents the horizontal field of view, VFOV represents the vertical field of view, toRadius(HFOV / 2) represents converting the half horizontal field of view to radians, tan(toRadius(HFOV / 2)) represents the tangent value of the half horizontal field of view, toRadius(VFOV / 2) represents converting the half vertical field of view to radians, and tan(toRadius(VFOV / 2)) represents the tangent value of the half vertical field of view; In the formula, camera.frustum.aspectRatio = AspectRatio; camera.frustum.fov = toRadius(VFOV); Where frustum represents the viewing frustum created using PerspectiveFrustum, frustum.aspectRatio represents the aspect ratio of the viewing frustum, and frustum.fov represents the vertical field of view of the viewing frustum; SA2, adjust the imaging pixels: According to the aspect ratio AspectRatio calculated by the sensor, readjust the pixel width and height of the sensor rendering window. The calculation process is as follows: If screenWidth / screenHeight>=1, sensorWidth = screenHeight * AspectRatio / screenWidth; sensorHeight = screenHeight; When screenWidth / screenHeight < 1, sensorWidth = screenWidth; sensorHeight = screenWidth * AspectRatio / screenHeight; where screenWidth represents the pixel width of the rendering window, screenHeight represents the pixel height of the rendering window, sensorWidth represents the pixel width of the sensor window, and sensorHeight represents the pixel height of the sensor window.

3. The method for sensor observation based on Cesium according to claim 1, wherein The method for setting the positions of a batch of regular sensors is as follows: Set sensors on the same spherical surface: centered on the object coordinate center in the scene, the object can be movable or stationary. Generate regular sensor positions according to the set azimuth angle, elevation angle, radius, number of elevation angles, and number of azimuth angles. All regular sensor positions are on the same spherical surface, and at the same time, remove the redundant sensors with the same coordinates; the specific calculation is as follows: , , ; where r represents the spherical radius, startV represents the starting elevation angle, endV represents the ending elevation angle, startH represents the starting azimuth angle, endH represents the ending azimuth angle, m represents the number of elevation angles, n represents the number of azimuth angles, 0 ≤ i ≤ m - 1 and i is an integer, 0 ≤ j ≤ n - 1 and j is an integer, deltV is the interval between adjacent elevation angles, and deltH is the interval between adjacent azimuth angles; when startV == endV, m = 1, otherwise m > 1; when startH == endH, n = 1, otherwise n > 1; If sensors outside the same spherical surface are also needed, then set sensors outside the same spherical surface: centered on the scene target coordinate center, add sensors, set the coordinates of the sensors, and process them according to the set azimuth angle, elevation angle, radius method or the x-offset, y-offset, z-offset processing method, and at the same time, remove the redundant sensors with the same coordinates; Then, update the batch of regular coordinates, convert the coordinates in the object coordinate system to the Cartesian coordinate system, and according to the working time t0 of the batch of regular sensors, obtain the coordinates and rotation matrix of the object at the t0 moment, and combine with the relative coordinates to calculate the real-time sensor coordinates. The specific calculation is as follows: ; Among them, rotateMatrix is the rotation matrix of the object at time t0, objectPosition is the coordinate of the object at time t0, offset k is the offset coordinate of the k-th sensor in the batch rule, sensorPosition k is the offset coordinate of the k-th sensor after correction.

4. A sensor observation method based on Cesium according to claim 1, wherein The method for setting the spatial position of a single sensor includes one of the following methods: Set a fixed position: If it is necessary to set the position of a single sensor fixed, then set any fixed point in the observation environment as the fixed position; Set a motion trajectory: If it is necessary to set the position of a single sensor to change with time, then input the time and position coordinates of each trajectory point; among them, the Lagrange interpolation algorithm is used to achieve smooth motion between trajectory points when updating the position in real time; Set as the relative coordinates of the object: Whether the object is stationary or moving, if it is set as the relative coordinates of the object, the real-time coordinates and real-time rotation matrix of the object need to be obtained first, and combined with the relative coordinates, the real-time sensor coordinates are calculated. The specific calculation is as follows: , Among them, rotateMatrix is the real-time rotation matrix of the object, objectPosition is the real-time coordinates of the object, and offset is the coordinates of the sensor relative to the object.

5. A sensor observation method based on Cesium according to claim 1, characterized in that, In step SC, the method of setting the spatial orientation of a single sensor includes one of the following methods: Set to point to a fixed point: Set the sensor to face a certain fixed position in the scene, and the sensor does not change with time. The setting method is: ; Among them, fixedPosition represents the fixed position to be pointed, and sensorPosition represents the calculated current position of the sensor; Set a fixed orientation: Directly set the sensor orientation direction, and the sensor orientation is a certain fixed direction in the scene, which does not change with time. The setting method is: ; Set to point to an object in the scene: Set to point to an object or have a fixed offset value relative to the object. The orientation calculation process is as follows: ; ; Among them, objectPosition represents the real-time coordinates of the object to be pointed, sensorPosition is the current position of the sensor, targetPosition represents the position pointed by the current sensor, offset represents the fixed offset value of the position pointed by the sensor relative to the object, and rotateMatrix represents the real-time rotation matrix of the object to be pointed.

6. The method for sensor observation based on Cesium according to claim 1, wherein In step SC1, if the stationary sensor orientation in step SC1 is perpendicular to the ground, the following processing is added: ; Among them, the orientation perpendicular to the ground includes looking down at the ground and looking up at the sky. PolarAxis represents the direction vector of the Earth's north axis, and right represents the right axis vector of the sensor.

7. A sensor observation system based on Cesium, characterized in that, It includes a storage medium, on which a computer program is stored. When the computer program is executed by a computer, it implements a sensor observation method based on Cesium as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Video picture display method and device based on GIS system, terminal and storage medium

    CN111563185A

  • An interactive meteorological detection capability three-dimensional visual display system

    CN109684431A

  • High-voltage transmission line corridor three-dimensional reconstruction method based on Cesium three-dimensional earth framework

    CN113192193A