Real-time remote rendering method for mixed reality binocular stereo vision images

Through the real-time remote rendering method of mixed reality binocular stereoscopic vision images, the depth values ​​of physical world objects are sent to external computing devices for three-dimensional rendering, which solves the problem of insufficient computing power of existing devices and realizes high-precision and high-complexity three-dimensional models. Real-time rendering and interactive operations improve the computing power of the device.

CN114998559BActive Publication Date: 2024-10-29刘杰
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210759001.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-30
Publication Date
2024-10-29
Estimated Expiration
2042-06-30

AI Technical Summary

Technical Problem

Due to insufficient computing power, existing mixed reality and augmented reality devices cannot effectively calculate and render high-precision and high-complexity three-dimensional data models, resulting in increased development difficulty and reduced design accuracy.

Method used

Through the real-time remote rendering method of mixed reality binocular stereoscopic vision images, the depth values ​​of objects in the physical world are collected and sent to external computing devices, and external computing hardware is used for three-dimensional rendering and interactive operations to achieve real-time rendering and return of images to compensate for the equipment Lack of own computing power.

Benefits of technology

It realizes real-time calculation and rendering of high-precision and high-complexity three-dimensional models on mixed reality and augmented reality devices, improves the computing power of the device, and supports the computable and operable effects of high-precision data content in the industrial field.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114998559B_ABST
    Figure CN114998559B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of mixed reality technology and augmented reality technology, and specifically to a method for real-time remote rendering of mixed reality binocular stereoscopic vision images. The present invention uses an external computing hardware device to replace the calculation of the (CPU, GPU, memory, storage, etc.) devices on the wearable mixed reality (MR) or augmented reality (AR) glasses, and uses the external device to calculate and render in real time to achieve the same effect as running on the local machine, thereby solving the computable, executable presentation and operation effect of high-precision and high-complexity three-dimensional model data content in the industrial field.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of mixed reality technology and augmented reality technology, and more specifically, to a mixed reality binocular stereoscopic vision image real-time remote rendering method. Background Art

[0002] Wearable mixed reality (MR) or augmented reality (AR) glasses implemented by mixed reality (MR) or augmented reality (AR) technology use the built-in operating system or software functions to call the device's own CPU, GPU, memory, storage and other devices to render external three-dimensional data information on the binocular screen in real time to complete visual presentation and interactive operations. MR / AR is a rapidly developing field, widely used in industries such as industry, education and training, entertainment, real estate, and medical care, and is fully used in marketing, operations, logistics, services and other links.

[0003] In the existing technology, due to the insufficient computing power of MR / AR hardware, it is impossible to calculate and run high-precision and high-complexity 3D data model content in the industrial field. Because the existing MR mixed reality and AR augmented reality devices are mobile wearable devices, their computing power is limited compared with the hardware computing power of traditional computer devices, and they cannot calculate, render or run high-precision and high-complexity 3D data models produced by existing computer devices, resulting in the need to optimize the 3D data model in the actual development process, which not only increases the difficulty of development, but also reduces the accuracy of the original designed 3D data model. Summary of the invention

[0004] The wearable mixed reality (MR) or augmented reality (AR) glasses devices implemented by existing mixed reality technology (MR) or augmented reality technology (AR) have their own CPU, GPU, memory, storage and other computing capabilities that cannot calculate and run the high-precision and high-complexity three-dimensional model data content in the industrial field. The present invention uses a mixed reality binocular stereoscopic vision image real-time remote rendering method to outsource the local computing power, and uses an external more powerful computing hardware device to replace the (CPU, GPU, memory, storage, etc.) device computing on the wearable mixed reality (MR) or augmented reality (AR) glasses. The external device calculates and renders in real time to achieve the same effect as running on the local machine, thereby solving the computable, executable presentation and operation effect of high-precision and high-complexity three-dimensional model data content in the industrial field.

[0005] In order to achieve the above-mentioned object of the invention, the present invention proposes a mixed reality binocular stereoscopic vision image real-time remote rendering method, comprising the following steps:

[0006] S1, the MR / AR device end constructs spatial position information based on the depth values ​​of physical world objects collected by the camera, and sends the spatial position information to an external computing device, wherein the spatial position information includes a physical space three-dimensional grid data set, a world space coordinate system, a head space coordinate system, and a binocular camera perspective projection matrix;

[0007] S2, the external computing device receives the spatial position information sent from the MR / AR device, constructs a virtual three-dimensional world spatial coordinate system, and restores the MR / AR head spatial position in the virtual three-dimensional world spatial coordinate system; the external computing device creates and synchronizes the virtual three-dimensional rendering cameras corresponding to the left and right eyes in real time according to the binocular camera perspective projection matrix sent by the MR / AR device, calculates and renders the three-dimensional virtual content of the binocular image, and encodes the rendered image and the corresponding spatial data and transmits them back to the MR / AR device;

[0008] S3, the MR / AR device decodes and processes the data sent back by the external computing device, generates two-dimensional image serialization array data and interactive operation instruction data, draws the two-dimensional image serialization array into two-dimensional plane images for the left and right eyes, and updates and draws the plane images on the left and right eye screens of the MR / AR device. The interactive operation instructions are used for remote gesture control of the operation function of three-dimensional objects.

[0009] Furthermore, the construction of the above-mentioned physical space three-dimensional grid data set includes:

[0010] Initialize the MR / AR device. At the initial moment, the initial position of the head space coordinate system of the MR / AR device is XYZ (0, 0, 0), where X is the horizontal axis, Y is the vertical axis, and Z is the depth axis.

[0011] With XYZ (0,0,0) as the origin, the camera is used to scan the depth values ​​of physical objects at different angles in real time, and the depth value points are used to form spatial triangles, spatial quadrilaterals and spatial three-dimensional data grids in sequence; with the origin as the center, the scan is continuously extended outward to construct a spatial three-dimensional data grid, and the new three-dimensional spatial data grid is linked and merged with the old three-dimensional spatial data grid to expand it into a physical space three-dimensional grid data set.

[0012] Furthermore, the above-mentioned construction of the head space coordinate system includes: calculating the position information of the current head space relative to the origin according to the spatial position of the initial origin XYZ (0,0,0), and constructing the current head space coordinate system matrix:

[0013]

[0014] Among them, PositionX, PositionY, and PositionZ respectively represent the positions on the horizontal axis x, vertical axis y, and depth axis z in the three-dimensional coordinate system; ScaleX, ScaleY, and ScaleZ respectively represent the scaling ratios on the horizontal axis x, vertical axis y, and depth axis z in the three-dimensional coordinate system; the initial parameters are PositionX: 0, PositionY: 0, PositionZ: 0, ScaleX: 1, ScaleY: 1, and ScaleZ: 1.

[0015] Furthermore, the construction of the binocular camera perspective projection matrix includes:

[0016] S1.a) Based on the average interpupillary distance of human eyes, the spatial coordinate system information of each eye is constructed: at the initial moment, based on XYZ (0, 0, 0), in the current head spatial coordinate system, the average interpupillary distance of human eyes is taken as the reference, the left eye is located at (-m / 2, 0, 0), the right eye is located at (m / 2, 0, 0), the rotation arc of the left and right eyes is (0, 0, 0), the scaling ratio is (1, 1, 1), and the spatial coordinate system information of each eye is constructed.

[0017] The left eye world coordinate system matrix is

[0018] The right eye world coordinate system matrix is

[0019] S1.b) Build and obtain the camera perspective projection matrix information for each eye:

[0020] Through the perspective projection matrix Construct and obtain the camera perspective projection matrix information for each eye, where the aspect ratio Near is the near clipping plane, Far is the far clipping plane, FOV is the field of view, W is the width ratio of the aspect ratio of the viewport, H is the height ratio of the aspect ratio of the viewport, screenW is the width value of the screen resolution aspect ratio, screenH is the width value of the screen resolution aspect ratio, and the aspect ratio of the aspect clipping plane is in the range of (0 to 1).

[0021] Furthermore, the above step S2 includes:

[0022] A virtual three-dimensional space coordinate system is constructed on the external computing device. At the initial moment, the initial position of the virtual three-dimensional space world coordinate system coincides with the initial position of the world space coordinate system of the MR / AR device, both of which are XYZ (0, 0, 0).

[0023] The external computing device receives the spatial position information sent by the MR / AR device, creates a virtual 3D world space coordinate system using the physical space 3D grid data set, creates a virtual head space coordinate system to restore and map the physical space head space coordinate system, receives the head data of the MR / AR device in real time, and continuously maps and binds the physical head space information to the virtual head space coordinate system;

[0024] Using the average interpupillary distance value of human eyes, construct virtual eyes, i.e., left and right rendering cameras, in the virtual head space coordinate system; using the binocular camera perspective projection matrix sent by the MR / AR device, construct the projection space of the left and right rendering cameras in the virtual head space coordinate system, and restore the viewing direction, angle, and screen rendering range of the left and right eyes of the MR / AR device in the external computing device;

[0025] At each moment or each frame, the spatial position information sent by the MR / AR device is received in real time, and the spatial coordinate system data of the left and right rendering cameras and the perspective projection matrix data of each rendering camera on the external computing device are updated synchronously in real time to keep the spatial position of the head of the MR / AR device and the direction, angle and rendering range of the left and right rendering cameras restored at all times.

[0026] Rendering image processing for left and right cameras;

[0027] Receive interactive command operation information, two-hand spatial position information, gesture recognition command information operation instructions sent from the MR / AR device in real time, and control the interactive control operation mode of the three-dimensional model data in the external computing device according to different interactive instructions.

[0028] Furthermore, the above-mentioned processing of rendering images for the left and right cameras includes:

[0029] Load high-precision 3D data models obtained from open resources;

[0030] According to the rendering range of the restored virtual left and right rendering cameras, the 3D rendering graphics API interface operation is performed on the 3D data model in the rendering to complete the calculation and rendering work;

[0031] Constructing editable two-dimensional texture maps corresponding to left and right rendering on the left and right rendering cameras, performing graphic calculation and rendering operations on the left and right two-dimensional texture maps for the three-dimensional model data within the rendering range specified by the current perspective projection matrix data information of the left and right rendering cameras, wherein the current perspective projection matrix data information is the binocular camera perspective projection matrix restored by the external computing device and transmitted by MR / AR; then performing a two-dimensional serialization operation on the two-dimensional texture map to obtain a two-dimensional image array after serialization of the virtual left and right rendering cameras;

[0032] The data information collected by the virtual left and right rendering cameras, that is, the serialized two-dimensional image array, is streamed, and the streamed two-dimensional image data and spatial coordinate system data are pressed into the data stream for network transmission back to the MR / AR device end.

[0033] Furthermore, the above operation instructions specifically include the following contents:

[0034] The movement command sends the current spatial position information of the hands according to the MR / AR device, and controls the 3D data model to follow the movement of the hands;

[0035] The zoom command controls the zoom ratio of the 3D data model based on the distance data of the current spatial position of the hands sent by the MR / AR device.

[0036] The rotation command sends the spatial rotation angle data information of the hand to the MR / AR device, and controls the three-dimensional data model to rotate simultaneously with the hand.

[0037] Furthermore, the above-mentioned updating and drawing of the plane image onto the left and right eye screens of the MR / AR device includes:

[0038] Traverse every pixel on the physical screen of the MR / AR device and set one of the pixels as Vertex;

[0039] Transform the screen pixel point Vertex from the two-dimensional screen space to the homogeneous space coordinate system of the three-dimensional projection, and define the position of the pixel point Vertex in the homogeneous space as the pixel point position vertexPositionInProjectionSpace in the homogeneous space coordinate system;

[0040] The pixel position in the homogeneous space coordinate system is transformed into the camera space coordinate system by using the perspective projection matrix of the binocular camera of the current MR / AR device. The pixel position in the homogeneous space coordinate system is defined as the pixel position in the camera space coordinate system VertexPositionInCameraSpace.

[0041] The pixel position in the camera space coordinate system is transformed into the world space coordinate system of the MR / AR device through the transformation matrix from the camera space to the world space coordinate system of the current camera of the MR / AR device, and is defined as the position VertexPositionInWorldSpace in the world space coordinate system of the MR / AR device; the origin of the 3D virtual world space coordinate system created by the external device coincides with the origin of the world space coordinate system of the MR / AR device, both of which are XYZ(0,0,0), and the screen pixel coordinate position of the MR / AR device has been transformed into the world space coordinate system. The virtual head position of the external computing device in the world space coordinate system is compared with the head position of the current wearer of the MR / AR device in the world space coordinate system to obtain an offset vector value offsetVector, wherein the offset vector value offsetVector=n*d, wherein n is the spatial direction deviation between the real-time rendering frame image of the external computing device and the current head position of the MR / AR device, and d is the distance deviation between the real-time rendering frame image of the external computing device and the current head space position of the MR / AR device. The position of the screen pixel point Vertex in the world space coordinate system is corrected according to the offset vector value to obtain the corrected screen pixel point position vertexPositionInWorldSpace in the world space coordinate system;

[0042] Use the world space to camera space transformation matrix corresponding to this frame of image in the data returned by the external computing device to transform the pixel position in the corrected world space coordinate system to the virtual 3D rendering camera space coordinate system when the external computing device renders this frame of image, and define it as the pixel position VertexPositionInRECCameraSpace in the virtual 3D rendering camera space coordinate system;

[0043] The perspective projection matrix of the virtual 3D camera used when rendering this frame of image on the external computing device is multiplied by the pixel position matrix in the virtual 3D rendering camera space coordinate system to obtain the position of the current screen pixel vertex of the MR / AR device in the screen space of the virtual camera when rendering this frame of image on the external computing device;

[0044] In the MR / AR device, the shader traversal determines whether each pixel in the physical screen is within the virtual camera screen space of the external computing device when the original calculation is used to render this frame of image, and determines whether to exclude the display of this pixel. If it is within the range, the pixel is displayed; if not, it is not shaded and displayed.

[0045] Furthermore, the data transmitted back to the MR / AR device include: timestamp, screen pixel width and height, virtual head space coordinate system matrix, virtual left eye camera space coordinate system matrix, virtual left eye camera perspective projection matrix, virtual right eye camera space coordinate system matrix, virtual right eye camera perspective projection matrix, two-dimensional image rendered by virtual left eye camera, and two-dimensional image rendered by virtual right eye camera.

[0046] The present invention has the following beneficial effects:

[0047] 1) The “spatial position distortion image algorithm” is used to solve the problem that the remote holographic image cannot be fixed in space due to time difference.

[0048] 2) Mixed reality binocular stereo vision image real-time remote rendering technology allows MR mixed reality and AR augmented reality devices to use the computing power of external computing devices to enhance and make up for the lack of their own computing power, and realize real-time calculation and rendering tasks of high-precision and high-complexity three-dimensional model data content in the industrial field. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 A schematic diagram of a change in data accuracy caused by optimization of three-dimensional model data in the background technology;

[0050] Figure 2 A schematic diagram showing that a remotely rendered holographic image exhibits severe "shaking and jittering" when the human head moves in space;

[0051] Figure 3 Schematic diagram showing that the remotely rendered holographic image is seriously shaking and jittering due to the time difference in network data transmission;

[0052] Figure 4 It is a technical principle diagram of the present invention;

[0053] Figure 5 This is a schematic diagram of the principle of converting the vertex position of the physical screen space pixel point of the MR / AR device into the projected homogeneous space coordinate system in the "spatial position distortion image algorithm";

[0054] Figure 6 This is a schematic diagram of the principle of converting the pixel position in the homogeneous space coordinate system to the camera space coordinate system in the "spatial position distortion image algorithm";

[0055] Figure 7 This is a schematic diagram of the principle of converting the pixel position in the camera space coordinate system to the camera world space coordinate system in the "spatial position distortion image algorithm";

[0056] Figure 8A schematic diagram of the principle of using the world space to camera space transformation matrix information in the data sent back by the external computing device in the "spatial position warped image algorithm" to convert the pixel point position in the world space coordinate system of the MR / AR device to the virtual 3D rendering camera space coordinate system in the external computing device;

[0057] Fig. 9 This is a schematic diagram of the principle of converting the pixel position in the virtual 3D rendering camera space coordinate system in the external computing device into the screen space coordinate system of the external device virtual camera through the perspective projection matrix when rendering this frame of image on the external computing device in the "spatial position distorted image algorithm". DETAILED DESCRIPTION

[0058] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments. Figure 1 As shown, the optimization of three-dimensional model data in the background technology causes a change in data accuracy.

[0059] like Figure 2 As shown in , since humans cannot absolutely keep their head position in space unchanged, there must be a spatial position difference between the MR / AR device and the external computing device during real-time remote rendering; Figure 3 As shown, there is inevitably a time difference in network data transmission between the MR / AR device and the external computing device. The above two reasons cause the holographic image to be unable to be fixed in the physical space, and there will be serious "shaking and shaking", just like the visual effect produced by an "earthquake", making users perceive that the image is not holographic, causing binocular vision perception deviation to seriously affect mixed reality holographic imaging.

[0060] like Figure 4 The technical principle diagram of the present invention is shown. The present invention is a mixed reality binocular stereoscopic vision image real-time remote rendering method, comprising the following steps:

[0061] S1, the MR / AR device end constructs spatial position information based on the depth values ​​of physical world objects collected by the camera, and sends the spatial position information to an external computing device, wherein the spatial position information includes a physical space three-dimensional grid data set, a world space coordinate system, a head space coordinate system, and a binocular camera perspective projection matrix;

[0062] S2, the external computing device receives the spatial position information sent from the MR / AR device, constructs a virtual three-dimensional world spatial coordinate system, and restores the MR / AR head spatial position in the virtual three-dimensional world spatial coordinate system; the external computing device creates and synchronizes the virtual three-dimensional rendering cameras corresponding to the left and right eyes in real time according to the binocular camera perspective projection matrix sent by the MR / AR device, calculates and renders the three-dimensional virtual content of the binocular image, and encodes the rendered image and the corresponding spatial data and transmits them back to the MR / AR device;

[0063] S3, the MR / AR device decodes and processes the data sent back by the external computing device, generates two-dimensional image serialization array data and interactive operation instruction data, draws the two-dimensional image serialization array into two-dimensional plane images for the left and right eyes, and updates and draws the plane images on the left and right eye screens of the MR / AR device. The interactive operation instructions are used for remote gesture control of the operation function of three-dimensional objects.

[0064] As a preferred embodiment of the present invention, the data transmitted back to the MR / AR device end includes (per frame): timestamp, screen pixel width and height, virtual head space coordinate system matrix (also called virtual head local space coordinate system to world space coordinate system matrix), virtual left eye camera space coordinate system matrix (also called virtual left eye camera local space coordinate system to world space coordinate system matrix), virtual left eye camera perspective projection matrix, virtual right eye camera space coordinate system matrix (also called virtual right eye camera local space coordinate system to world space coordinate system matrix), virtual right eye camera perspective projection matrix, two-dimensional image rendered by virtual left eye camera, two-dimensional image rendered by virtual right eye camera (left and right eye two-dimensional images are encoded and processed by H.264 compression algorithm and then sent).

[0065] The present invention adopts a network transmission function and an H.264 decoder encapsulated on the basis of the Media Foundation multimedia framework API interface, decodes and processes the network data sent back from the external computing device, decodes the data stream, and decodes to generate two-dimensional image serialization array data and interactive operation instruction data. The MR / AR device GPU hardware is used, and the DirectX11 three-dimensional rendering graphics API interface is called to draw the two-dimensional image serialization array into a two-dimensional plane image for the left and right eyes, and the image is updated and drawn on the left and right eye screens of the MR / AR device.

[0066] As a preferred embodiment of the present invention, constructing a three-dimensional gridded data set of physical space in the above step S1) includes the following contents:

[0067] S1.1) Initialize the MR / AR device. At the initial moment, the initial positions (origins) of the head space coordinate system and the world space coordinate system of the MR / AR device are both XYZ (0, 0, 0), where X is the horizontal axis, Y is the vertical axis, and Z is the depth axis;

[0068] S1.2) With XYZ (0,0,0) as the origin, the camera is used to scan and collect the depth values ​​of physical world objects at different angles in real time, and the depth value points are used to sequentially form spatial triangular faces, spatial quadrilateral faces and spatial three-dimensional data grids; with the origin as the center, the scan is continuously extended outward to construct a spatial three-dimensional data grid, and the new three-dimensional spatial data grid is linked and merged with the old three-dimensional spatial data grid to expand it into a physical space three-dimensional grid data set.

[0069] As a preferred embodiment of the present invention, the process of constructing a spatial three-dimensional data grid is as follows:

[0070] The depth camera is used to scan and collect the three-dimensional depth point values ​​of the physical world at different angles in real time. Every three depth points form a spatial triangle surface, every two spatial triangle surfaces form a spatial quadrilateral surface, and multiple spatial quadrilateral surfaces form a spatial three-dimensional data grid. With the origin as the center, the scanning data information is continuously extended outward, and the newly generated three-dimensional spatial grid data is linked and integrated with the old three-dimensional spatial data grid information every 3 seconds, thereby expanding the physical three-dimensional spatial data information.

[0071] The new three-dimensional spatial data grid and the old three-dimensional spatial data grid are linked and fused with each other based on the spatial coordinate system position of the vertex data of each triangle. The storage topology structures of the new and old three-dimensional data networks are compared in turn, and the old vertex data of the approximate spatial position are replaced by the new vertex data. On MR devices such as HoloLens2, the present invention directly uses the spatial three-dimensional grid data provided by the device for processing.

[0072] As a preferred embodiment of the present invention, the construction of the head space coordinate system in the above step S1) includes the following: calculating the position information of the current head space relative to the origin according to the spatial position of the initial origin XYZ (0,0,0), and constructing the current head space coordinate system matrix

[0073]

[0074] The initial moment is

[0075] Among them, PositionX, PositionY, and PositionZ represent the positions on the horizontal axis x, vertical axis y, and axis depth axis z in the three-dimensional coordinate system, respectively; ScaleX, ScaleY, and ScaleZ represent the scaling ratios on the horizontal axis x, vertical axis y, and axis depth axis z in the three-dimensional coordinate system, respectively; the initial parameters are PositionX:0, PositionY:0, PositionZ:0, ScaleX:1, ScaleY:1, and ScaleZ:1;

[0076] As a preferred embodiment of the present invention, the construction of the binocular camera perspective projection matrix in the above step S1) includes the following contents:

[0077] S1.a) Based on the average interpupillary distance of human eyes, the spatial coordinate system information of each eye is constructed: at the initial moment, based on XYZ (0, 0, 0), in the current head spatial coordinate system, the average interpupillary distance of human eyes is taken as the reference, the left eye is located at (-m / 2, 0, 0), the right eye is located at (m / 2, 0, 0), the rotation arc of the left and right eyes is (0, 0, 0), the scaling ratio is (1, 1, 1), and the spatial coordinate system information of each eye is constructed.

[0078] The left eye world coordinate system matrix is

[0079] The right eye world coordinate system matrix is

[0080] S1.b) Build and obtain the camera perspective projection matrix information for each eye:

[0081] Through the perspective projection matrix Construct and obtain the camera perspective projection matrix information for each eye, where the aspect ratio Near is the near clipping plane, Far is the far clipping plane, FOV is the field of view, W is the width ratio of the aspect ratio of the viewport, H is the height ratio of the aspect ratio of the viewport, screenW is the width value of the screen resolution aspect ratio, screenH is the width value of the screen resolution aspect ratio, and the aspect ratio of the aspect clipping plane is in the range of (0 to 1).

[0082] As a preferred embodiment of the present invention, the average human interpupillary distance of 0.064 meters is taken as a benchmark, the near clip plane (Near) is 0.3, the far clip plane (Far) is 20 meters, the field of view (FOV) is 60, and the aspect ratio is 1.775.

[0083] As a preferred embodiment of the present invention, in the above step S1), based on the head space coordinate information, the left eye and right eye space position information and the binocular camera perspective projection matrix, a left camera is constructed at the left eye space position to capture the left view, and a right camera is constructed at the right eye space position to capture the right view; the (average human) interpupillary distance value is used as a parameter, and the perspective projection matrix of the left and right cameras is set to obtain the focal length value, and the virtual binoculars of the near object are rotated inwardly for focusing, and when the object distance exceeds the numerical constant, the virtual binoculars rotate outward until the virtual binocular sight lines are parallel, indicating that the observed object is infinitely far away, and the visual effect of the viewed object being "larger near and smaller far" is obtained. As a preferred embodiment of the present invention, the above numerical constant is set to 20 meters.

[0084] As a preferred embodiment of the present invention, there are two methods to obtain the visual effect of "near objects are larger and far objects are smaller", which are as follows:

[0085] 1.1) According to the similar triangle theorem and the Pythagorean theorem, calculate the distance between the observed object (focus point P) and the near clipping plane of the left and right eye cameras, and the angle between the current orientation vector of the left and right eye cameras and the vector formed by the spatial position of the left and right eye cameras and the observed object (focus point P). By rotating the angle of the camera, the left and right eye cameras are focused on the observed object (focus point P) at the same time. Whether the focus point P is the surface of the object or the center of the 3D object, there will be different visual distance effects. In order to reduce the difficulty of calculation, we use the method of emitting particle rays to obtain the surface focus point (focus point P) of the observed object, so as to restore the human visual difference and obtain the visual effect of "near is big and far is small" of the viewed object;

[0086] 2) The distance of the object to be photographed is obtained by emitting particle rays, and the focus rotation angle of the left and right eye cameras is obtained to achieve the visual effect of "near is big and far is small".

[0087] As a preferred embodiment of the present invention, the above step S2) includes the following contents:

[0088] S2.1) constructing a virtual three-dimensional space coordinate system on the external computing device, where the initial position (origin) of the virtual three-dimensional world space coordinate system coincides with the initial position (origin) of the world space coordinate system of the MR / AR device at the initial moment, both of which are XYZ (0,0,0);

[0089] S2.2) The external computing device receives the spatial position information sent by the MR / AR device, creates a virtual 3D world space coordinate system using the physical space 3D grid data set, creates a virtual head space coordinate system to restore and map the physical space head space coordinate system, receives the head data of the MR / AR device in real time, and continuously maps and binds the physical head space information to the virtual head space coordinate system;

[0090] S2.3) constructing virtual binoculars, i.e., left and right rendering cameras, in a virtual head space coordinate system using the average interpupillary distance value of human binoculars; constructing the projection space of the left and right rendering cameras in the virtual head space coordinate system using the binocular camera perspective projection matrix sent by the MR / AR device, and restoring the viewing direction, angle, and screen rendering range of the left and right eyes of the MR / AR device in an external computing device;

[0091] S2.4) At each moment or each frame, the spatial position information sent by the MR / AR device is received in real time, and the spatial coordinate system data of the left and right rendering cameras and the perspective projection matrix data of each rendering camera on the external computing device are synchronously updated in real time to keep the head spatial position of the MR / AR device and the direction, angle and rendering range of the left and right rendering cameras restored at all times.

[0092] S2.5) processing the left and right camera rendered images;

[0093] S2.6) Receive in real time the interactive command operation information, the spatial position information of both hands, and the gesture recognition command information operation instructions sent from the MR / AR device end, and control the interactive control operation mode of the three-dimensional model data in the external computing device end according to different interactive instructions.

[0094] As a preferred embodiment of the present invention, the image rendering process in the above step S2.5) specifically includes the following contents:

[0095] S2.5.1) Loading high-precision three-dimensional data models obtained from open resources;

[0096] S2.5.2) performing 3D rendering graphics API interface operations on the 3D data model in the rendering according to the rendering range of the restored virtual left and right rendering cameras to complete the calculation and rendering work;

[0097] S2.5.3) constructing editable two-dimensional texture maps corresponding to left and right rendering on the left and right rendering cameras, and performing graphics calculation and rendering operations on the left and right two-dimensional texture maps for the three-dimensional model data within the rendering range specified by the current perspective projection matrix data information of the left and right rendering cameras, wherein the current perspective projection matrix data information is the binocular camera perspective projection matrix restored by the external computing device end and transmitted by MR / AR; then performing a two-dimensional serialization operation on the two-dimensional texture map to obtain a two-dimensional image array after serialization of the virtual left and right rendering cameras;

[0098] S2.5.4) The data information collected by the virtual left and right rendering cameras, that is, the serialized two-dimensional image array, is streamed, and the streamed two-dimensional image data and spatial coordinate system data are pressed into the data stream for network transmission back to the MR / AR device end.

[0099] As a preferred embodiment of the present invention, the present invention selects the MediaFoundation multimedia framework API interface built into the Windows 10 operating system, and generates a multimedia operation API interface with network transmission function through development and encapsulation (or adopts the open source VLC multimedia video processing framework, or adopts the open source FFMPEG multimedia video processing framework, and the relevant multimedia video processing framework protocol or API interface is not limited to the above-mentioned) and adopts the H.264 encoder to stream the two-dimensional image array.

[0100] As a preferred embodiment of the present invention, the operation instructions in the above step S2.6) specifically include the following contents:

[0101] The movement command sends the current spatial position information of the hands according to the MR / AR device, and controls the 3D data model to follow the movement of the hands;

[0102] The zoom command controls the zoom ratio of the 3D data model based on the distance data of the current spatial position of the hands sent by the MR / AR device.

[0103] The rotation command sends the spatial rotation angle data information of the hand to the MR / AR device, and controls the three-dimensional data model to rotate simultaneously with the hand.

[0104] The present invention specifically includes the following steps of updating and drawing the plane image onto the left and right eye screens of the MR / AR device:

[0105] Traverse every pixel on the physical screen of the MR / AR device and set one of the pixels as Vertex;

[0106] like Figure 5 As shown, the screen pixel point Vertex is transformed from the two-dimensional screen space to the homogeneous space coordinate system of the three-dimensional projection, and the position of the pixel point Vertex in the homogeneous space is defined as the pixel point position vertexPositionInProjectionSpace in the homogeneous space coordinate system;

[0107] like Figure 6 As shown, the pixel point position vertexPositionInProjectionSpace in the homogeneous space coordinate system is transformed into the camera space coordinate system using the perspective projection matrix of the binocular camera of the current MR / AR device, and is defined as the pixel point position VertexPositionInCameraSpace in the camera space coordinate system;

[0108] like Figure 7As shown, the pixel position in the camera space coordinate system is

[0109] VertexPositionInCameraSpace, through the transformation matrix from the camera space to the world space of the current camera of the MR / AR device, transforms the pixel point position VertexPositionInCameraSpace in the camera space coordinate system to the world space coordinate system of the MR / AR device, and defines it as the position VertexPositionInWorldSpace in the world space coordinate system of the MR / AR device; the origin of the 3D virtual world space coordinate system created by the external device coincides with the origin of the world space coordinate system of the MR / AR device, both of which are XYZ(0,0,0), and the screen pixel point coordinate position of the MR / AR device has been transformed to the world space coordinate system, and the origin of the world space coordinate system in the MR / AR device is defined as VertexPositionInWorldSpace. The virtual head position of the external computing device is compared with the head position of the current wearer of the MR / AR device based on the world space coordinate system to obtain an offset vector value offsetVector, wherein the offset vector value offsetVector=n*d, wherein n (vector value) is the spatial direction deviation (facing direction) between the real-time rendering frame image of the external computing device and the current head position of the MR / AR device, and d is the distance deviation between the real-time rendering frame image of the external computing device and the current head space position of the MR / AR device. The position of the screen pixel point Vertex in the world space coordinate system is corrected according to the offset vector value offsetVector to obtain the corrected screen pixel point position vertexPositionInWorldSpace in the world space coordinate system;

[0110] like Figure 8 As shown, the world space to camera space transformation matrix corresponding to this frame image in the data returned by the external computing device is used to transform the pixel point position vertexPositionInWorldSpace in the corrected world space coordinate system to the virtual 3D rendering camera space coordinate system when the external computing device renders this frame image, and is defined as the pixel point position VertexPositionInRECCameraSpace in the virtual 3D rendering camera space coordinate system;

[0111] The perspective projection matrix of the virtual 3D camera used when rendering this frame of image on the external computing device is multiplied by the pixel point position VertexPositionInRECCameraSpace matrix in the virtual 3D rendering camera space coordinate system to obtain the position of the pixel point vertex on the current screen of the MR / AR device in the screen space of the virtual camera when rendering this frame of image on the external computing device.

[0112] like Fig. 9 As shown, in the MR / AR device, a shader traversal is used to determine whether each pixel point in the physical screen is within the virtual camera screen space of the external computing device when the original calculation is used to render this frame of image, and whether to exclude the display of this pixel point. If it is within the range, the pixel point is displayed, and if not, it is not shaded and displayed.

[0113] The above method utilizes the "spatial position distortion algorithm" in the Shader to restore and solve the problem of holographic image jitter after remote rendering on the MR / AR device.

[0114] The present invention allows MR mixed reality and AR augmented reality devices to enhance and make up for the lack of their own computing capabilities with the help of the computing power of external computing devices, and to support the real-time computing and rendering tasks of high-precision and high-complexity three-dimensional model data content in the industrial field. The actual measured results of this technology on Microsoft mixed reality device HoloLens1 are shown in Tables 1-1 and 1-2:

[0115] Table 1-1 Comparison of model triangle counts

[0116]

[0117] Table 1-2 Comparison of model texture memory usage

[0118]

Claims

1. A mixed reality binocular stereo vision image real-time remote rendering method, It is characterized in that The following steps are involved: S1, the MR / AR device constructs spatial position information based on the depth values ​​of physical world objects collected by the camera, and sends the spatial position information to an external computing device, wherein the spatial position information includes a physical space three-dimensional grid data set, a world space coordinate system, a head space coordinate system, and a binocular camera perspective projection matrix; S2, the external computing device receives the spatial position information sent from the MR / AR device, constructs a virtual three-dimensional world spatial coordinate system, and restores the MR / AR head spatial position in the virtual three-dimensional world spatial coordinate system; the external computing device creates and synchronizes the virtual three-dimensional rendering cameras corresponding to the left and right eyes in real time according to the binocular camera perspective projection matrix sent by the MR / AR device, calculates and renders the three-dimensional virtual content of the binocular image, and encodes the rendered image and the corresponding spatial data and transmits them back to the MR / AR device; The step S2 comprises: A virtual three-dimensional space coordinate system is constructed on the external computing device. At the initial moment, the initial position of the virtual three-dimensional space world coordinate system coincides with the initial position of the world space coordinate system of the MR / AR device, both of which are XYZ (0, 0, 0). The external computing device receives the spatial position information sent by the MR / AR device, creates a virtual 3D world space coordinate system using the physical space 3D grid data set, creates a virtual head space coordinate system to restore and map the physical space head space coordinate system, receives the head data of the MR / AR device in real time, and continuously maps and binds the physical head space information to the virtual head space coordinate system; Using the average interpupillary distance value of human eyes, construct virtual eyes, i.e., left and right rendering cameras, in the virtual head space coordinate system; using the binocular camera perspective projection matrix sent by the MR / AR device, construct the projection space of the left and right rendering cameras in the virtual head space coordinate system, and restore the viewing direction, angle, and screen rendering range of the left and right eyes of the MR / AR device in the external computing device; At each moment or each frame, the spatial position information sent by the MR / AR device is received in real time, and the spatial coordinate system data of the left and right rendering cameras and the perspective projection matrix data of each rendering camera on the external computing device are updated in real time, so as to always restore the head spatial position of the MR / AR device and the direction, angle and rendering range of the left and right rendering cameras; Rendering image processing for left and right cameras; Receive interactive command operation information, two-hand spatial position information, gesture recognition command information operation instructions sent from the MR / AR device in real time, and control the interactive control operation mode of the three-dimensional model data in the external computing device according to different interactive instructions; S3, the MR / AR device decodes and processes the data sent back by the external computing device, generates two-dimensional image serialization array data and interactive operation instruction data, draws the two-dimensional image serialization array into two-dimensional plane images for the left and right eyes, and updates the plane images to the left and right eye screens of the MR / AR device. The interactive operation instructions are used for remote gesture control of the operation function of three-dimensional objects.

2. The method for real-time remote rendering of mixed reality binocular stereoscopic vision images according to claim 1, It is characterized in that The construction of the physical space three-dimensional grid data set includes: Initialize the MR / AR device. At the initial moment, the initial position of the head space coordinate system of the MR / AR device is XYZ (0, 0, 0), where X is the horizontal axis, Y is the vertical axis, and Z is the depth axis. With XYZ (0,0,0) as the origin, the camera is used to scan the depth values ​​of physical objects at different angles in real time, and the depth value points are used to form spatial triangles, spatial quadrilaterals and spatial three-dimensional data grids in sequence; with the origin as the center, the scan is continuously extended outward to construct a spatial three-dimensional data grid, and the new three-dimensional spatial data grid is linked and merged with the old three-dimensional spatial data grid to expand it into a physical space three-dimensional grid data set.

3. The method for real-time remote rendering of mixed reality binocular stereoscopic vision images according to claim 1, It is characterized in that The construction of the head space coordinate system includes: According to the spatial position of the initial origin XYZ (0,0,0), calculate the position information of the current head space relative to the origin, and construct the current head space coordinate system matrix: Among them, PositionX, PositionY, and PositionZ respectively represent the positions on the horizontal axis x, vertical axis y, and depth axis z in the three-dimensional coordinate system; ScaleX, ScaleY, and ScaleZ respectively represent the scaling ratios on the horizontal axis x, vertical axis y, and depth axis z in the three-dimensional coordinate system; the initial parameters are PositionX: 0, PositionY: 0, PositionZ: 0, ScaleX: 1, ScaleY: 1, and ScaleZ:

1.

4. The method for real-time remote rendering of mixed reality binocular stereoscopic vision images according to claim 1, It is characterized in that The construction of the binocular camera perspective projection matrix includes: S1.a) Based on the average interpupillary distance of human eyes, the spatial coordinate system information of each eye is constructed: at the initial moment, based on XYZ (0, 0, 0), in the current head spatial coordinate system, the average interpupillary distance of human eyes is taken as the reference, the left eye is located at (-m / 2, 0, 0), the right eye is located at (m / 2, 0, 0), the rotation arc of the left and right eyes is (0, 0, 0), the scaling ratio is (1, 1, 1), and the spatial coordinate system information of each eye is constructed. The left eye world coordinate system matrix is The right eye world coordinate system matrix is S1.b) Build and obtain the camera perspective projection matrix information for each eye: Through the perspective projection matrix Construct and obtain the camera perspective projection matrix information for each eye, where the aspect ratio Near is the near clipping plane, Far is the far clipping plane, FOV is the field of view, W is the width ratio of the viewport's aspect ratio, H is the height ratio of the viewport's aspect ratio, screenW is the width value of the screen resolution aspect ratio, screenH is the height value of the screen resolution aspect ratio, and the aspect ratio of the Aspect clipping plane is in the range of 0 to 1.

5. The method for real-time remote rendering of mixed reality binocular stereoscopic vision images according to claim 1, It is characterized in that The processing of rendering images for the left and right cameras includes: Load high-precision 3D data models obtained from open resources; According to the rendering range of the restored virtual left and right rendering cameras, the 3D rendering graphics API interface operation is performed on the 3D data model in the rendering to complete the calculation and rendering work; Constructing editable two-dimensional texture maps corresponding to left and right rendering on the left and right rendering cameras, performing graphic calculation and rendering operations on the left and right two-dimensional texture maps for the three-dimensional model data within the rendering range specified by the current perspective projection matrix data information of the left and right rendering cameras, wherein the current perspective projection matrix data information is the binocular camera perspective projection matrix restored by the external computing device and transmitted by MR / AR; then performing a two-dimensional serialization operation on the two-dimensional texture map to obtain a two-dimensional image array after serialization of the virtual left and right rendering cameras; The data information collected by the virtual left and right rendering cameras, that is, the serialized two-dimensional image array, is streamed, and the streamed two-dimensional image data and spatial coordinate system data are pressed into the data stream for network transmission back to the MR / AR device end.

6. The method for real-time remote rendering of mixed reality binocular stereoscopic vision images according to claim 1, It is characterized in that The operation instructions specifically include the following contents: The movement command sends the current spatial position information of the hands according to the MR / AR device, and controls the 3D data model to follow the movement of the hands; The zoom command controls the zoom ratio of the 3D data model based on the distance data of the current spatial position of the hands sent by the MR / AR device. The rotation command sends the spatial rotation angle data information of the hand to the MR / AR device, and controls the three-dimensional data model to rotate simultaneously with the hand.

7. The method for real-time remote rendering of mixed reality binocular stereoscopic vision images according to claim 1, It is characterized in that The updating and drawing of the planar image onto the left and right eye screens of the MR / AR device includes: Traverse every pixel on the physical screen of the MR / AR device and set one of the pixels as Vertex; Transform the screen pixel point Vertex from the two-dimensional screen space to the homogeneous space coordinate system of the three-dimensional projection, and define the position of the pixel point Vertex in the homogeneous space as the pixel point position vertexPositionInProjectionSpace in the homogeneous space coordinate system; Use the current MR / AR device binocular camera perspective projection matrix to transform the screen pixel point Vertex position in the homogeneous space coordinate system to the camera space coordinate system and define it as the pixel point position in the camera space coordinate system VertexPositionInCameraSpace; The pixel position in the camera space coordinate system is transformed into the world space coordinate system of the MR / AR device through the transformation matrix from the camera space to the world space coordinate system of the current camera of the MR / AR device, and is defined as the position VertexPositionInWorldSpace in the world space coordinate system of the MR / AR device; the origin of the 3D virtual world space coordinate system created by the external device coincides with the origin of the world space coordinate system of the MR / AR device, both of which are XYZ(0,0,0), and the screen pixel coordinate position of the MR / AR device has been transformed into the world space coordinate system. The virtual head position of the external computing device in the world space coordinate system is compared with the head position of the current wearer of the MR / AR device in the world space coordinate system to obtain an offset vector value offsetVector, wherein the offset vector value offsetVector=n*d, wherein n is the spatial direction deviation between the real-time rendering frame image of the external computing device and the current head position of the MR / AR device, and d is the distance deviation between the real-time rendering frame image of the external computing device and the current head space position of the MR / AR device. The position of the screen pixel point Vertex in the world space coordinate system is corrected according to the offset vector value to obtain the corrected screen pixel point position vertexPositionInWorldSpace in the world space coordinate system; Use the world space to camera space transformation matrix corresponding to this frame of image in the data returned by the external computing device to transform the pixel position in the corrected world space coordinate system to the virtual 3D rendering camera space coordinate system when the external computing device renders this frame of image, and define it as the pixel position VertexPositionInRECCameraSpace in the virtual 3D rendering camera space coordinate system; The perspective projection matrix of the virtual 3D camera used when rendering this frame of image on the external computing device is multiplied by the pixel position matrix in the virtual 3D rendering camera space coordinate system to obtain the position of the current screen pixel vertex of the MR / AR device in the screen space of the virtual camera when rendering this frame of image on the external computing device; In the MR / AR device, the shader traversal determines whether each pixel in the physical screen is within the virtual camera screen space of the external computing device when the original calculation is used to render this frame of image, and determines whether to exclude the display of this pixel. If it is within the space, the pixel is displayed; if not, it is not shaded and displayed.

8. The method for real-time remote rendering of mixed reality binocular stereoscopic vision images according to claim 1, It is characterized in that The data transmitted back to the MR / AR device include: timestamp, screen pixel width and height, virtual head space coordinate system matrix, virtual left eye camera space coordinate system matrix, virtual left eye camera perspective projection matrix, virtual right eye camera space coordinate system matrix, virtual right eye camera perspective projection matrix, two-dimensional image rendered by virtual left eye camera, and two-dimensional image rendered by virtual right eye camera.

Citation Information

Patent Citations

  • Built-in real tri-dimension driving method for computer display card

    CN101477702A

  • Implanted true-three-dimensional stereo rendering method facing to ERDAS Virtual GIS

    CN101540056A