Global ocean current display method and system based on naked eye 3D

Through the ray casting algorithm and Unity3D engine offset camera model combined with lenticular grating technology, the problem of two-dimensional visualization of ocean current data in the existing technology has been solved, and a naked-eye 3D ocean current display with high rendering speed and smooth animation effect has been achieved, directly presenting three-dimensional Global ocean current images improve the intuitiveness and accuracy of ocean current research.

CN118337976BActive Publication Date: 2024-09-06PEKING UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410751191.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-12
Publication Date
2024-09-06
Estimated Expiration
2044-06-12

AI Technical Summary

Technical Problem

In the existing technology, the visualization method of ocean current data is still two-dimensional, which is not three-dimensional and intuitive enough. It is difficult to achieve naked-eye 3D ocean current display with high rendering speed and smooth animation effect through existing methods.

Method used

The ray casting algorithm is used to obtain the speed and direction of ocean currents, the Unity3D engine is used to offset the camera model for three-dimensional rendering, and the lenticular grating technology is used to achieve naked-eye 3D display, directly presenting three-dimensional global ocean current images.

Benefits of technology

It realizes a three-dimensional ocean current image display that does not require special glasses or charts, enhances the intuitiveness and accuracy of ocean current dynamics, and contributes to efficient ocean current research.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118337976B
    Figure CN118337976B
Patent Text Reader

Abstract

The present invention provides a method and system for displaying earth ocean currents based on naked-eye 3D, which belongs to the field of computer vision technology. The method and system determine the displacement of pixel points according to the speed and direction of the ocean currents by utilizing a ray projection algorithm; and render a naked-eye 3D ocean current display effect with high rendering speed and smooth animation effect according to the displacement and color information of the pixel points by offsetting the camera model through the Unity3D engine. The present invention realizes the effect of directly presenting a three-dimensional global ocean current image without using any special glasses or other equipment such as a nautical chart camera; and can intuitively and accurately present the dynamics of the earth's ocean currents, which is conducive to efficient ocean current research.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer vision technology, and in particular relates to a naked-eye 3D-based global ocean current display method, system, electronic device and storage medium. Background Art

[0002] Ocean currents are large-scale ocean currents driven by a variety of factors, such as wind, the rotation of the earth, and differences in the density of seawater. Ocean currents have a significant impact on climate, marine life, marine pollution, and ocean navigation; the visualization of ocean currents helps to conduct ocean current research more intuitively and efficiently. However, because ocean current data is high-dimensional, dynamic, multi-source, and heterogeneous, it is difficult to dynamically present large amounts of data.

[0003] In the prior art, a dynamic visualization method and system for multi-source global ocean big data is disclosed (publication number: CN109299343A). The visualization method includes the following steps: 1) obtaining multi-source global ocean big data and performing preprocessing, wherein the multi-source global ocean big data includes non-directional static data and directional dynamic data; 2) constructing a simulated earth network. When the preprocessed data is mapped to the simulated earth network, for non-directional static data, a color mapping method is used to represent the change in the value size; for directional dynamic data, a color mapping method is used to represent the change in the value size, and the dynamic characteristics are simulated in a fluid form to achieve automatic visualization. Also disclosed is a global ocean current visualization method and system for a virtual battlefield (publication number: CN117611754A), comprising the following steps: step one, parsing the ocean field data to obtain the longitude and latitude velocity attributes of the ocean current; step two, constructing flow vectors based on the parsed longitude and latitude velocity attributes of the ocean current, and dumping the ocean current motion data into a global ocean current flow texture; step three, using a tile directional flow algorithm to obtain the ocean current normal vector based on the obtained flow vector and flow texture; step four, simplifying the illumination model and combining the obtained normal vector to obtain sea surface reflected light, sea surface refracted light and ambient diffuse reflected light, and generating a visualized global ocean current based on the obtained sea surface reflected light, sea surface refracted light and ambient diffuse reflected light.

[0004] The above existing technologies have basically achieved the visualization effect, but the visual display method is still two-dimensional and not three-dimensional and intuitive enough. If the existing ocean current data visualization is combined with 3D naked-eye imaging technology to achieve the naked-eye 3D presentation of the earth's ocean currents, the following problems still need to be solved:

[0005] 1) How to calculate the displacement of pixels based on the speed and direction of ocean currents; 2) How to render a naked-eye 3D ocean current display effect with high rendering speed and smooth animation effects based on the displacement and color information of pixels.

[0006] Therefore, there is an urgent need for a global ocean current display method and system based on naked-eye 3D. Summary of the invention

[0007] The present invention provides a naked-eye 3D-based earth ocean current display method, system, electronic device and storage medium, so as to overcome at least one technical problem existing in the prior art.

[0008] To achieve the above object, the present invention provides a method for displaying earth ocean currents based on naked-eye 3D, the method comprising:

[0009] Based on the earth's ocean current data, the ocean current speed, the ocean current direction, and the color corresponding to each voxel representing the ocean current are obtained; wherein the method for obtaining the color corresponding to each voxel includes: using a ray casting algorithm to obtain the pixel position of each particle for each voxel of the earth's ocean current data, and obtaining the brightness of each particle based on the pixel position of each particle; assigning a corresponding color to each voxel based on the brightness of each particle;

[0010] Simulate the light path projection gain and loss process for the color corresponding to each voxel; superimpose the light path projections simulated by all voxels according to the direction and length of the arrow representing the ocean current to form a three-dimensional image of the ocean current; wherein the arrow length of the arrow representing the ocean current is determined according to the ocean current speed, and the arrow direction of the arrow representing the ocean current is determined according to the ocean current direction;

[0011] Using the Unity3D engine to offset the camera model, the three-dimensional image of the ocean current is stereoscopically rendered;

[0012] The rendered three-dimensional image of ocean currents is displayed in naked-eye 3D using lenticular lens technology.

[0013] Further, a preferred method is to obtain the brightness of each particle based on the pixel position of each particle by the following formula:

[0014]

[0015] in, P is a point on the surface S, P' is the intersection point of the ray emitted by the light source and the surface, L(P′) Indicate point P′ Brightness, L O Represents a point light source O Brightness, L O is a constant; d′ Indicate point P′ To point light source O The distance d Indicate point P To point light source Odistance.

[0016] Further, the preferred method is that the ocean current velocity is obtained by the following formula:

[0017] .

[0018] Further, the preferred method is to use the Unity3D engine to offset the camera model to perform stereoscopic rendering on the ocean current three-dimensional image, and the method for obtaining the rendered ocean current three-dimensional image includes:

[0019] Determine the scope and scene of the visualized ocean current according to the visualization requirements; and create an offset camera for locating the position and orientation of the view in three-dimensional space;

[0020] According to the ocean current range and the ocean current three-dimensional image of the scene, a transformation matrix from the tangent space to the world space is calculated in the vertex shader, and the transformation matrix is ​​passed to the fragment shader;

[0021] Based on the fragment shader, the normal space corresponding to the static ocean current image is transformed into the world space;

[0022] Using the surface reflection technology, assuming that the offset camera is in the original position, the normal vector is , based on the following matrix, it is converted from world space to a rendered 3D image of the ocean current;

[0023] .

[0024] Further, the preferred method is that the method of combining the rendered ocean current three-dimensional image using the lenticular grating technology includes:

[0025] Determine the color of the pixel corresponding to each cylindrical lens according to the rendered three-dimensional image of the ocean current;

[0026] Based on the transparent conductive layer, an electric field corresponding to the pixel is determined according to the color of the pixel, and according to the electric field corresponding to the pixel, it is determined whether the light is focused by the cylindrical lens corresponding to the pixel; wherein a cylindrical lens layer is arranged in front of a naked-eye 3D liquid crystal display screen for displaying a rendered three-dimensional image of an ocean current, and an image plane of the liquid crystal display screen is located on the focal plane of the cylindrical lens layer; the transparent conductive layer is arranged between the cylindrical lens layer and the liquid crystal display screen;

[0027] When the light can be focused by the cylindrical lens, pixel points of the naked eye 3D image are formed; and the transparent conductive layer determines the brightness of each pixel point according to the electric field of the pixel.

[0028] Furthermore, a preferred method is, after the step of assigning a corresponding color to each voxel based on the brightness of each particle, further comprising optimizing the brightness of each particle obtained by using the inverse square distance method.

[0029] Further, the preferred method is that after the rendered ocean current three-dimensional image is displayed in naked eye 3D by using the lenticular lens grating technology, the naked eye 3D display is interactively adjusted according to the user's human eye data; including,

[0030] Use the camera to obtain the user's eye data;

[0031] Based on the eye data of the user, using a face recognition model to obtain the user's binocular spatial coordinate information;

[0032] The naked-eye 3D display image is corrected based on the binocular spatial coordinate information of the user.

[0033] In order to solve the above problems, the present invention also provides a naked-eye 3D-based earth current display system, the system comprising: a data acquisition unit, for acquiring the ocean current speed, the ocean current direction, and the color corresponding to each voxel representing the ocean current based on the earth current data; wherein the method for acquiring the color corresponding to each voxel comprises: using a ray casting algorithm to acquire the pixel position of each particle for each voxel of the earth current data, acquiring the brightness of each particle based on the pixel position of each particle; assigning a corresponding color to each voxel based on the brightness of each particle;

[0034] A rendering unit is used to simulate the light path projection gain and loss process for the color corresponding to each voxel; according to the direction and length of the arrow representing the ocean current, the light path projection simulated by all voxels is superimposed to form a three-dimensional image of the ocean current; wherein the arrow length of the arrow representing the ocean current is determined according to the ocean current speed, and the arrow direction of the arrow representing the ocean current is determined according to the ocean current direction; and the three-dimensional image of the ocean current is stereoscopically rendered using a Unity3D engine offset camera model;

[0035] The display unit is used for performing naked-eye 3D display of the rendered ocean current three-dimensional image by using the cylindrical mirror grating technology.

[0036] In order to solve the above problems, the present invention also provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the steps in the above-mentioned naked-eye 3D-based earth ocean current display method.

[0037] In order to solve the above problems, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-mentioned naked-eye 3D-based earth ocean current display method.

[0038] The present invention discloses a method, system, electronic device and storage medium for displaying earth ocean currents based on naked-eye 3D. The method determines the displacement of pixel points according to the speed and direction of the ocean currents by using a ray projection algorithm. The Unity3D engine is then used to offset the camera model to render a naked-eye 3D ocean current display effect with high rendering speed and smooth animation effect according to the displacement and color information of the pixel points. The present invention achieves the effect of directly presenting a three-dimensional global ocean current image without using any special glasses or other equipment such as nautical charts and cameras. The method can intuitively and accurately present the dynamics of the earth's ocean currents, which is conducive to efficient ocean current research. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0040] Figure 1 A schematic diagram of a flow chart of a method for displaying earth's ocean currents based on naked-eye 3D provided by an embodiment of the present invention;

[0041] Figure 2 A schematic diagram of a module of a naked-eye 3D-based earth current display system provided by an embodiment of the present invention;

[0042] Figure 3 A schematic diagram of the internal structure of an electronic device for implementing a naked-eye 3D-based earth current display method provided by an embodiment of the present invention;

[0043] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0044] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0045] Figure 1 The method of displaying the earth's ocean currents based on naked-eye 3D is described in general. Figure 1 A schematic flow chart of a method for displaying earth's ocean currents based on naked-eye 3D provided in one embodiment of the present invention; the method may be executed by a system, which may be implemented by software and / or hardware.

[0046] like Figure 1 As shown, in this embodiment, the method for displaying earth ocean currents based on naked-eye 3D includes steps S110 to S140.

[0047] S110, obtaining ocean current speed, ocean current direction, and the color corresponding to each voxel representing the ocean current based on the earth's ocean current data; wherein the method for obtaining the color corresponding to each voxel includes: using a ray casting algorithm to obtain the pixel position of each particle for each voxel of the earth's ocean current data, and obtaining the brightness of each particle based on the pixel position of each particle; assigning a corresponding color to each voxel based on the brightness of each particle.

[0048] In a specific implementation process, particles in the ocean current model are assigned to multiple cores of a processor dedicated to graphics rendering, and each core of the processor is responsible for rendering a part of the particles. In each core, the pixel position and color of each particle can be calculated by using an optimized rendering algorithm.

[0049] Specifically, the ray casting algorithm is to cast a ray through the pixel and then calculate the pixel position and color of each particle on the ray. Suppose there is a point light source O and a surface S, point P is a point on the surface S, and the ray emitted to the light source intersects the surface at point P'. The distance from point P to the point light source is d, and the distance from point P' to the point light source is d'.

[0050] The brightness of each particle is obtained based on the pixel position of each particle by the following formula:

[0051]

[0052] in, P is a point on the surface S, P' is the intersection point of the ray emitted by the light source and the surface, L(P′) Indicate point P′ Brightness, L O Represents a point light source O Brightness, L O is a constant; d′ Indicate point P′ To point light source O The distance d Indicate point P To point light source O distance.

[0053] After assigning a corresponding color to each voxel based on the brightness of each particle, the brightness of each particle is optimized by using the inverse square of the distance. O Brightness, point P′ To point light source O The distance, point P To point light source O The distance between the light source and the surface is calculated. P' The brightness of each particle can be obtained by calculating the brightness of the particle (i.e., color). Since the color of a particle is usually inversely proportional to its distance, the brightness of each particle is optimized using the inverse square of the distance.

[0054] The present invention is based on a data-driven voxel color mapping method. First, each voxel in the Earth's ocean current data is associated with the pixel position of a particle through an advanced ray casting algorithm. Using these pixel positions, the algorithm can calculate the brightness of each particle and then assign a precise color value to each voxel, thereby achieving intuitive visualization of ocean current features.

[0055] In addition, it is also necessary to obtain the ocean current speed and direction based on the earth's ocean current data, and then build an ocean current model based on the ocean current speed and direction. In the specific implementation process, taking the ocean current speed of the North Equatorial Current as an example, first obtain the occurrence frequency and flow rate data of the North Equatorial Current through Table 1.

[0056] Table 1 Pacific Ocean current velocity table

[0057]

[0058] The ocean current velocity is obtained by the following formula:

[0059] .

[0060] That is to say, for the North Equatorial Current, the ocean current speed of the North Equatorial Current is:

[0061]

[0062] S120, simulating the light path projection gain and loss process for the color corresponding to each voxel; superimposing the light path projections simulated by all voxels according to the direction and length of the arrow representing the ocean current to form a three-dimensional image of the ocean current; wherein, the arrow length of the arrow representing the ocean current is determined according to the ocean current speed, and the arrow direction of the arrow representing the ocean current is determined according to the ocean current direction.

[0063] In the specific implementation process, an ocean current model is built in accordance with the existing technology, and then a ray projection method is used to form a three-dimensional image of the ocean current. In addition, in the process of forming the three-dimensional image of the ocean current, in order to represent the ocean current in 3D space, an arrow diagram is used: an arrow is used to represent a velocity vector, and the length and direction of the arrow represent the velocity and direction of the ocean current respectively.

[0064] The implementation method of building an ocean current model can be, but is not limited to, the following methods: spatial feature analysis of the extracted marine environment data, exploring the distribution of wind and waves in the sea area, including statistical analysis, interpolation methods, spatial interpolation algorithms, etc., to obtain the wind and wave parameter values ​​at different locations in the sea area, and based on the results of spatial feature analysis, generate sea area wind and wave characteristic distribution data. Sea area wind and wave characteristic distribution data is rasterized grid data or vector data, which is used to describe the values ​​or distribution of wind and wave parameters such as wind speed, wind direction, wave height, etc. at different locations in the sea area. According to the selected The method is to reshape the wind and wave field of the sea area wind and wave characteristic distribution data, including using statistical interpolation methods to fill and interpolate discrete data, using numerical simulation methods to perform numerical simulation of the wind and wave field, or using physical model-based methods to perform physical reconstruction of the wind and wave field. Through wind and wave field reshaping, a sea area wind and wave field model is generated to provide the distribution of wind speed, wind direction, wave height and other wind and wave parameters at different locations in the sea area to support the design and decision-making in the fields of marine engineering and maritime transportation. The ocean current simulation method is used to perform evolution simulation analysis on the extracted marine environment data. Including methods based on numerical models, such as ocean circulation models, numerical tidal models, etc., and methods based on statistical methods, such as statistical models, regression models, etc., through the simulation and analysis of ocean current evolution, the simulation data of ocean current evolution is obtained, including the temporal and spatial distribution of ocean current fields, ocean current speed, ocean current direction and other information, which is used to describe the evolution and change characteristics of ocean currents in the sea area. According to the simulation data of ocean current evolution and computing requirements, a suitable distributed computing driving method is selected, including the use of parallel computing, cluster computing and other technologies to accelerate the data processing and model building process. Distributed computing driven reconstruction refers to the use of distributed computing technology to decompose the computing task into multiple subtasks and execute these subtasks in parallel on multiple computing nodes to accelerate the computing process and improve computing efficiency. According to the selected distributed computing driving method, the ocean current evolution simulation data is reconstructed, including data segmentation, distributed computing task scheduling, data parallel processing and other steps to improve computing efficiency and accuracy. Through distributed computing driven reconstruction, a sea area ocean current field model is generated to provide the distribution of ocean current parameters such as ocean current speed and current direction at different locations in the sea area. In summary, the present invention can generate realistic visual effects for each voxel by simulating the gains and losses in the light path projection process. Combined with the speed and direction information of the ocean current, the algorithm can accurately construct a three-dimensional arrow representing the dynamics of the ocean current, where the length of the arrow is proportional to the speed of the ocean current and the direction of the arrow is consistent with the direction of the ocean current.

[0065] S130: Utilize the Unity3D engine to offset the camera model and perform stereoscopic rendering on the three-dimensional image of the ocean current.

[0066] It should be noted that the offset camera model of the Unity3D engine is also called a parallel camera model. It generates two slightly offset images by shooting the left eye and the right eye respectively. These images can be synthesized into a 3D stereo image in the observer's brain to produce a stereoscopic effect. For the separate formation of the left eye perspective image and the right eye perspective image, those skilled in the art can implement it according to the prior art, and will not go into details here. The relationship between the offset camera model and the visualization model is that the offset camera model is an implementation method of the visualization model. It realizes the offset operation of the visualization result by setting and adjusting the position and orientation of the camera, thereby meeting different visualization requirements. Through the implementation of the offset camera model, the ocean current data can be presented to the user in a more three-dimensional and dynamic way, enhancing the user's understanding and perception of the ocean current phenomenon.

[0067] The method of performing stereoscopic rendering on the ocean current three-dimensional image by using the Unity3D engine offset camera model to obtain the rendered ocean current three-dimensional image comprises the following steps:

[0068] S131. Determine the scope and scene of the visualized ocean current according to the visualization requirements, and create an offset camera for locating the position and orientation of the viewing angle in the three-dimensional space. That is, according to the design requirements, select a certain area on the earth's surface or a certain ocean for a specific time period for visualization.

[0069] S132. According to the ocean current range and the three-dimensional image of the ocean current in the scene, a transformation matrix from the tangent space to the world space is calculated in the vertex shader, and the transformation matrix is ​​passed to the fragment shader; based on the fragment shader, the normal space corresponding to the static ocean current image is transformed to the world space.

[0070] The static ocean current image requires a fragment shader to transform the normal from tangent space to world space. The transformation matrix is ​​the tangent space coordinate axis written by column, and the matrix is ​​stored in tTow1, tTow2, tTow3 by row. This is implemented by the following code:

[0071] Vertex shader code

[0072] o.tTow1 = float4(WTangent.x,WBinormal.x,WNormal.x,worldPos.x);

[0073] o.tTow2 = float4(WTangent.y,WBinormal.y,WNormal.x,worldPos.y);

[0074] o.tTow3 = float4(WTangent.z,WBinormal.z,WNormal.x,worldPos.z);

[0075] Fragment Shader

[0076] float3 bump = UnpackNormal(tex2D(_bump,i,xy));

[0077] float3 bumpW = normalize(half3(dot(o.tTow1.xyz,bump),half3(dot(o.tTow2.xyz,bump),half3(dot(o.tTow3.xyz,bump)));

[0078] Lighting and view direction etc. from model space to tangent space

[0079] It should be noted that v.tangent.w is multiplied by the cross product result, and W is used to determine the final direction of the secondary tangent, because the vertical direction is related to the left and right hands.

[0080] float3 binormal = cross(normalize(v,normal),normalize(v.tangent.xyz))*v.tangent.w;

[0081] float3X3 rotation = float3X3(tangent.xyz,binormal,normal); / / Transformation matrix

[0082] lightDir = mul(rotation,lightDir).xyz;

[0083] ViewDir = mul(rotation,ViewDir).xyz.

[0084] S133, using the surface reflection technology, assuming that the offset camera is in the original position, the normal vector is , based on the following matrix, transforms from world space to a rendered 3D image of the ocean current.

[0085] Specifically, assuming that the offset camera is still in place, the surface reflection technology is used to move the reflection point P to the opposite side Q, where N is the normal vector, Q = P-2N | OP |; it is known that any point on the ocean surface is perpendicular to the normal vector, , use the surface's transform.up as the normal vector , water surface position As .

[0086] The equation in, For any point P, the distance to OP is the vector Projection in the N direction.

[0087]

[0088]

[0089] We can get the following matrix

[0090] .

[0091] Based on the above matrix, the image is transformed from world space to a 3D image of ocean currents.

[0092] S140, using lenticular grating technology to perform naked-eye 3D display on the rendered ocean current three-dimensional image.

[0093] The method for combining the rendered ocean current three-dimensional image using the lenticular lens grating technology comprises the following steps:

[0094] S141, determining the color of the pixel corresponding to each cylindrical lens according to the rendered three-dimensional image of the ocean current;

[0095] S142, based on the transparent conductive layer, determining the electric field corresponding to the pixel according to the color of the pixel, and judging whether the light is focused by the cylindrical lens corresponding to the pixel according to the electric field corresponding to the pixel; wherein, a cylindrical lens layer is arranged in front of a naked-eye 3D liquid crystal display screen for displaying a rendered ocean current three-dimensional image, and the image plane of the liquid crystal display screen is located on the focal plane of the cylindrical lens layer; the transparent conductive layer is arranged between the cylindrical lens layer and the liquid crystal display screen; that is, when the pixel is black, the light does not pass through, and when the pixel is white, the light passes through and is focused to a point by the cylindrical lens to form a pixel point of the 3D image. By arranging the cylindrical lenses and adjusting the focal length, the viewing angle and depth of the 3D image can be changed, thereby achieving different 3D effects.

[0096] S143, when the light can be focused by the cylindrical lens, the pixel points of the naked eye 3D image are formed; and the transparent conductive layer determines the brightness of each pixel point according to the electric field of the pixel. The image is displayed on the liquid crystal display screen, and the image is presented to the audience through the cylindrical lens.

[0097] That is to say, the three-dimensional image of the ocean current obtained by stereoscopic rendering is combined with a display device through the cylindrical mirror grating technology, so as to realize the naked-eye 3D display effect for the user. It should be noted that in the specific implementation process, the transparent conductive layer can be an ITO (indium tin oxide) coating. In short, the powerful function of the Unity3D engine is used to stereoscopically render the constructed three-dimensional image of the ocean current to achieve a sense of depth and stereoscopic feeling. In addition, by applying the cylindrical mirror grating technology, naked-eye 3D display can be achieved without any auxiliary equipment, which greatly enhances the visual effect and broadens the application scenarios. It also includes interactively adjusting the naked-eye 3D display of the earth's ocean currents according to the user's human eye data; the method includes, S151, using a camera to obtain the user's human eye data; S152, based on the user's human eye data, using a face recognition model to obtain the user's binocular spatial coordinate information; S153, based on the user's binocular spatial coordinate information, the naked-eye 3D display image of the earth's ocean currents is corrected. That is to say, in order to further improve the display effect of naked-eye 3D, the display device used to display the naked-eye 3D display image of the earth's ocean currents is not just an LCD screen, but a collection of interactive devices. Through the system's integrated high-precision stereo depth camera and deep learning-based face recognition technology, the three-dimensional spatial coordinate information of the user's eyes is recognized in real time, and the coordinate information is transmitted to the naked-eye 3D signal processing board. The naked-eye 3D algorithm performs 3D image rendering based on the coordinate information of the user's eyes, ensuring that the user's left and right eyes can see the correct left and right eye images at any time, that is, see the best 3D effect.

[0098] In addition, in order to further enhance the user's ocean current viewing experience, a rich set of interactive functions can be provided for the user. These functions may include zooming, translation, rotation, and so on. Specifically, the Unity 3D engine achieves zooming by obtaining mouse wheel events to control the Scale property of the ocean currents on the earth's surface. The Scale property is a vector that indicates the scale ratio of an object on the X, Y, and Z axes. By changing the value of this vector, the overall zooming of the object can be achieved; when the user needs to zoom in or out on the impact range of the earth's ocean currents, the system can adaptively adjust the camera's field of view to achieve zooming on the earth's ocean currents. The Unity 3D engine achieves translation by obtaining mouse wheel events to control the Position property of the Transform component of the ocean currents on the earth's surface. The Position property is a vector that indicates the coordinates of an object in three-dimensional space. When the observer needs to view the ocean current conditions in different regions of the earth, the object can be translated by changing the value of this vector. The Unity 3D engine achieves rotation by obtaining mouse wheel events to control the Rotation property of the Transform component of the ocean currents on the earth's surface. The Rotation property is a quaternion that indicates the rotation angle of an object in three-dimensional space. When the observer needs to observe different angles and directions of the Earth's ocean currents, the object can be rotated by changing the value of this quaternion.

[0099] In summary, the method for displaying the earth's ocean currents based on naked-eye 3D of the present invention determines the displacement of pixels according to the speed and direction of the ocean currents by utilizing a ray casting algorithm; and then uses the Unity3D engine to offset the camera model to render a naked-eye 3D ocean current display effect with high rendering speed and smooth animation effect according to the displacement and color information of the pixels. The present invention achieves the effect of directly presenting a three-dimensional global ocean current image without the need to use any special glasses or other equipment such as nautical charts and cameras; the present invention can intuitively and accurately present the dynamics of the earth's ocean currents, which is conducive to efficient ocean current research.

[0100] like Figure 2 As shown, the present invention provides a naked-eye 3D-based earth current display system 200, which can be installed in an electronic device. According to the functions implemented, the naked-eye 3D-based earth current display system 200 can include a data acquisition unit 210, a rendering unit 220, and a display unit 230. The unit of the present invention can also be called a module, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.

[0101] In this embodiment, the functions of each module / unit are as follows:

[0102] In order to solve the above problems, the present invention further provides a naked-eye 3D-based earth current display system, the system comprising: a data acquisition unit 210, for acquiring the ocean current speed, the ocean current direction, and the color corresponding to each voxel representing the ocean current based on the earth current data; wherein the method for acquiring the color corresponding to each voxel comprises: acquiring the pixel position of each particle for each voxel of the earth current data using a ray casting algorithm, acquiring the brightness of each particle based on the pixel position of each particle; assigning a corresponding color to each voxel based on the brightness of each particle;

[0103] The rendering unit 220 is used to simulate the light path projection gain and loss process for the color corresponding to each voxel; according to the direction and length of the arrow representing the ocean current, the light path projection simulated by all voxels is superimposed to form a three-dimensional image of the ocean current; wherein the arrow length of the arrow representing the ocean current is determined according to the ocean current speed, and the arrow direction of the arrow representing the ocean current is determined according to the ocean current direction; and the three-dimensional image of the ocean current is stereoscopically rendered using a Unity3D engine offset camera model;

[0104] The display unit 230 is used to perform naked-eye 3D display of the rendered ocean current three-dimensional image using lenticular grating technology.

[0105] The earth ocean current display system 200 based on naked-eye 3D of the present invention determines the displacement of pixel points according to the speed and direction of the ocean current by utilizing a ray casting algorithm; and then utilizes the Unity3D engine to offset the camera model according to the displacement and color information of the pixel points, which not only greatly improves the rendering speed, but also ensures the smoothness and naturalness of the animation effect. The present invention achieves the effect of directly presenting a three-dimensional global ocean current image without the use of any special glasses or other equipment such as nautical charts and cameras; the present invention can intuitively and accurately present the dynamics of the earth's ocean currents, which is conducive to efficient ocean current research.

[0106] like Figure 3 As shown, the present invention also provides an electronic device 3 for displaying the earth's ocean currents based on naked-eye 3D.

[0107] The electronic device 3 may include a processor 30, a memory 31 and a bus, and may also include a computer program stored in the memory 31 and executable on the processor 30, such as a naked-eye 3D-based earth current display program 32. The memory 31 may also include both an internal storage unit of the naked-eye 3D-based earth current display system and an external storage device. The memory 31 may be used not only to store application software and various data, such as codes of the naked-eye 3D-based earth current display program, but also to temporarily store data that has been output or is to be output.

[0108] The memory 31 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. The memory 31 may be an internal storage unit of the electronic device 3 in some embodiments, such as a mobile hard disk of the electronic device 3. The memory 31 may also be an external storage device of the electronic device 3 in other embodiments, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 3. Further, the memory 41 may also include both an internal storage unit and an external storage device of the electronic device 3. The memory 31 may not only be used to store application software and various types of data installed in the electronic device 3, such as the code of the earth ocean current display program based on naked-eye 3D, etc., but also be used to temporarily store data that has been output or is to be output.

[0109] The processor 30 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and a combination of various control chips, etc. The processor 30 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 31 (such as a program for displaying the earth's ocean currents based on naked-eye 3D, etc.), and calls data stored in the memory 31, so as to execute various functions of the electronic device 3 and process data.

[0110] The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 31 and at least one processor 30, etc.

[0111] Figure 3 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 3The structure shown does not constitute a limitation on the electronic device 3, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0112] For example, although not shown, the electronic device 3 may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 30 through a power management system, so that the power management system can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators. The electronic device 3 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0113] Furthermore, the electronic device 3 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 3 and other electronic devices.

[0114] Optionally, the electronic device 3 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 3 and to display a visual user interface.

[0115] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0116] The naked-eye 3D-based earth current display program 32 stored in the memory 31 in the electronic device 3 is a combination of multiple instructions. When running in the processor 30, it can achieve: obtaining the ocean current speed, ocean current direction, and the color corresponding to each voxel representing the ocean current based on the earth ocean current data; wherein, the method for obtaining the color corresponding to each voxel includes: using a ray projection algorithm to obtain the pixel position of each particle for each voxel of the earth ocean current data, and obtaining the brightness of each particle based on the pixel position of each particle; assigning a corresponding color to each voxel based on the brightness of each particle; simulating the light path projection gain and loss process for the color corresponding to each voxel; according to the direction and length of the arrow representing the ocean current, superimposing the light path projection simulated by all voxels to form a three-dimensional image of the ocean current; wherein, the arrow length of the arrow representing the ocean current is determined according to the ocean current speed, and the arrow direction of the arrow representing the ocean current is determined according to the ocean current direction; using the Unity3D engine to offset the camera model to stereoscopically render the three-dimensional image of the ocean current; using cylindrical mirror grating technology to perform naked-eye 3D display on the rendered three-dimensional image of the ocean current.

[0117] Specifically, the specific implementation method of the processor 30 for the above instructions can refer to Figure 1 The description of the relevant steps in the corresponding embodiment is not repeated here. Furthermore, if the module / unit integrated in the electronic device 3 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable medium may include: any entity or system capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0118] The embodiment of the present invention also provides a computer-readable storage medium, which can be non-volatile or volatile, and stores a computer program. When the computer program is executed by a processor, it is implemented as follows: based on the earth's ocean current data, the ocean current speed, the ocean current direction, and the color corresponding to each voxel representing the ocean current are obtained; wherein, the method for obtaining the color corresponding to each voxel includes: using a ray projection algorithm to obtain the pixel position of each particle for each voxel of the earth's ocean current data, and obtaining the brightness of each particle based on the pixel position of each particle; assigning a corresponding color to each voxel based on the brightness of each particle; simulating the light path projection gain and loss process for the color corresponding to each voxel; according to the direction and length of the arrow representing the ocean current, superimposing the light path projection simulated by all voxels to form a three-dimensional image of the ocean current; wherein, the arrow length of the arrow representing the ocean current is determined according to the ocean current speed, and the arrow direction of the arrow representing the ocean current is determined according to the ocean current direction; using the Unity3D engine to offset the camera model to stereoscopically render the three-dimensional image of the ocean current; using cylindrical mirror grating technology to perform naked-eye 3D display on the rendered three-dimensional image of the ocean current.

[0119] Specifically, the specific implementation method when the computer program is executed by the processor can refer to the description of the relevant steps in the embodiment of the earth ocean current display method based on naked-eye 3D, which will not be repeated here.

[0120] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0121] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0122] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0123] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0124] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.

[0125] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or systems stated in a system claim can also be implemented by one unit or system through software or hardware. Secondary words are used to indicate names, but not to indicate any particular order.

[0126] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A method for displaying earth ocean currents based on naked eye 3D, characterized in that: include: Based on the earth's ocean current data, the ocean current speed, the ocean current direction, and the color corresponding to each voxel representing the ocean current are obtained; wherein the method for obtaining the color corresponding to each voxel includes: using a ray casting algorithm to obtain the pixel position of each particle for each voxel of the earth's ocean current data, and obtaining the brightness of each particle based on the pixel position of each particle; assigning a corresponding color to each voxel based on the brightness of each particle; Simulate the light path projection gain and loss process for the color corresponding to each voxel; superimpose the light path projections simulated by all voxels according to the direction and length of the arrow representing the ocean current to form a three-dimensional image of the ocean current; wherein the arrow length of the arrow representing the ocean current is determined according to the ocean current speed, and the arrow direction of the arrow representing the ocean current is determined according to the ocean current direction; Using the Unity3D engine to offset the camera model, the three-dimensional image of the ocean current is stereoscopically rendered; The rendered three-dimensional image of ocean currents is displayed in naked-eye 3D using lenticular grating technology; The method for obtaining the rendered 3D image of the ocean current by stereoscopically rendering the 3D image of the ocean current using the Unity3D engine offset camera model includes: determining the visualized ocean current range and scene according to the visualization requirements; and creating an offset camera for locating the position and orientation of the viewing angle in the 3D space; calculating the transformation matrix from the tangent space to the world space in the vertex shader according to the 3D image of the ocean current range and scene, and transferring the transformation matrix to the fragment shader; transforming the normal space corresponding to the static ocean current image to the world space based on the fragment shader; using the surface reflection technology, assuming that the offset camera is in the original position, the normal vector is , based on the following matrix, it is converted from world space to a rendered 3D image of the ocean current; The method for displaying a rendered three-dimensional ocean current image in naked-eye 3D using a cylindrical lens grating technology comprises: determining the color of a pixel corresponding to each cylindrical lens according to the rendered three-dimensional ocean current image; determining the electric field corresponding to the pixel according to the color of the pixel based on a transparent conductive layer, and determining whether the light is optically focused by the cylindrical lens corresponding to the pixel according to the electric field corresponding to the pixel; wherein a cylindrical lens layer is arranged in front of a naked-eye 3D liquid crystal display screen for displaying the rendered three-dimensional ocean current image, and an image plane of the liquid crystal display screen is located on the focal plane of the cylindrical lens layer; the transparent conductive layer is arranged between the cylindrical lens layer and the liquid crystal display screen; when the light can be optically focused by the cylindrical lens, a pixel point of the naked-eye 3D image is formed; and the transparent conductive layer determines the brightness of each pixel point according to the electric field of the pixel.

2. The method for displaying earth ocean currents based on naked eye 3D according to claim 1, characterized in that: The brightness of each particle is obtained based on the pixel position of each particle by the following formula: in, P is a point on the surface S, P' is the intersection point of the ray emitted by the light source and the surface, L(P′) Indicate point P′ Brightness, L O Represents a point light source O Brightness, L O is a constant; d′ Indicate point P′ To point light source O The distance d Indicate point P To point light source O distance.

3. The method for displaying earth ocean currents based on naked eye 3D according to claim 1, characterized in that: The ocean current velocity is obtained by the following formula:

4. The method for displaying earth ocean currents based on naked eye 3D according to claim 1, characterized in that: After the step of assigning a corresponding color to each voxel based on the brightness of each particle, the method further includes optimizing the brightness of each particle obtained by using the inverse square of the distance.

5. The method for displaying earth ocean currents based on naked eye 3D according to claim 1, characterized in that: After the rendered ocean current three-dimensional image is displayed in naked eye 3D by using the lenticular lens grating technology, the naked eye 3D display is interactively adjusted according to the user's human eye data; wherein, Use the camera to obtain the user's eye data; Based on the eye data of the user, using a face recognition model to obtain the user's binocular spatial coordinate information; The naked-eye 3D display image is corrected based on the binocular spatial coordinate information of the user.

6. A naked-eye 3D-based earth current display system, characterized in that: For implementing the naked-eye 3D-based earth current display method of claim 1, the system comprises: A data acquisition unit is used to acquire ocean current speed, ocean current direction, and the color corresponding to each voxel representing the ocean current based on the earth's ocean current data; wherein the method for acquiring the color corresponding to each voxel comprises: using a ray casting algorithm to acquire the pixel position of each particle for each voxel of the earth's ocean current data, and acquiring the brightness of each particle based on the pixel position of each particle; and assigning a corresponding color to each voxel based on the brightness of each particle; A rendering unit is used to simulate the light path projection gain and loss process for the color corresponding to each voxel; according to the direction and length of the arrow representing the ocean current, the light path projection simulated by all voxels is superimposed to form a three-dimensional image of the ocean current; wherein the arrow length of the arrow representing the ocean current is determined according to the ocean current speed, and the arrow direction of the arrow representing the ocean current is determined according to the ocean current direction; and the three-dimensional image of the ocean current is stereoscopically rendered using a Unity3D engine offset camera model; The display unit is used for performing naked-eye 3D display of the rendered three-dimensional image of the ocean current by using the lenticular lens grating technology.

7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps in the naked-eye 3D-based earth ocean current display method as described in any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for displaying earth ocean currents based on naked-eye 3D as claimed in any one of claims 1 to 5 is implemented.

Citation Information

Cited By

  • Ocean current three-dimensional visual presentation method based on moving line

    CN119991949A