Three-dimensional display method, device, electronic device and storage medium

By using the view matrix and model matrix for matrix transformation in 3D display technology, the problem of inaccurate binocular parallax alignment is solved, and a better stereoscopic effect and user experience are achieved.

CN119110051BActive Publication Date: 2025-09-23ZHUHAI MOJIE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310672144.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-07
Publication Date
2025-09-23
Estimated Expiration
2043-06-07

AI Technical Summary

Technical Problem

In existing three-dimensional display technologies, three-dimensional display based on binocular parallax cannot accurately align binocular parallax, resulting in poor stereoscopic effect and poor user experience.

Method used

By using the first view matrix, the model matrix and the projection matrix to perform a matrix transformation on the three-dimensional position information of the target object to obtain a first projection position, and using the second view matrix, the model matrix and the projection matrix to perform a matrix transformation on the three-dimensional position information of the target object to obtain a second projection position, the target object is accurately displayed on the two screens, and binocular parallax alignment is achieved.

Benefits of technology

It greatly improves the stereoscopic effect of three-dimensional display and ensures an improved user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119110051B_ABST
    Figure CN119110051B_ABST
Patent Text Reader

Abstract

Embodiments of the present invention provide a three-dimensional display method, device, electronic device, and storage medium, belonging to the field of X-dimensional display. The method includes: obtaining three-dimensional position data of a target object; obtaining a model matrix and projection matrix associated with the target object, and obtaining a preset first view matrix and second view matrix; performing a matrix transformation on the three-dimensional position data according to the first view matrix, the model matrix, and the projection matrix to obtain a first projection position of the target object; performing a matrix transformation on the three-dimensional position data according to the second view matrix, the model matrix, and the projection matrix to obtain a second projection position of the target object; displaying the target object on a first screen according to the first projection position, and simultaneously displaying the target object on a second screen according to the second projection position. The technical solution of the embodiments of the present invention provides a stereoscopic effect of three-dimensional display.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of three-dimensional display technology, and in particular to a three-dimensional display method, device, electronic equipment and storage medium. Background Art

[0002] The real world is a three-dimensional world. With the development of society, the current conventional two-dimensional flat display can no longer meet human needs in some aspects. People hope that the display can truly restore and display the three-dimensional information of the space. Therefore, three-dimensional display came into being and has continued to develop, becoming a research hotspot in the current display field. Currently, three-dimensional display is mainly based on binocular parallax. In related technologies, three-dimensional display based on binocular parallax generally directly offsets the image data pixels to align the binocular parallax. However, directly offsetting the image data pixels cannot accurately align the binocular parallax, resulting in poor stereoscopic effect of the three-dimensional display and a poor user experience. Summary of the Invention

[0003] Embodiments of the present invention provide a three-dimensional display method, device, electronic device, and storage medium, aiming to improve the stereoscopic effect of three-dimensional display.

[0004] In a first aspect, an embodiment of the present invention provides a three-dimensional display method, applied to an electronic device, the electronic device including a first screen and a second screen, the method comprising:

[0005] Obtaining three-dimensional position data of the target object;

[0006] Obtaining a model matrix and a projection matrix associated with the target object, and obtaining a preset first view matrix and a second view matrix;

[0007] Performing matrix transformation on the three-dimensional position data according to the first view matrix, the model matrix, and the projection matrix to obtain a first projection position of the target object;

[0008] Performing matrix transformation on the three-dimensional position data according to the second view matrix, the model matrix, and the projection matrix to obtain a second projection position of the target object;

[0009] The target object is displayed on the first screen according to the first projection position, and the target object is displayed on the second screen according to the second projection position.

[0010] In a second aspect, an embodiment of the present invention further provides a three-dimensional display device, comprising:

[0011] an acquisition module, configured to acquire three-dimensional position data of a target object;

[0012] The acquisition module is further configured to acquire a model matrix and a projection matrix associated with the target object, and acquire a preset first view matrix and a second view matrix;

[0013] a matrix transformation module, configured to perform a matrix transformation on the three-dimensional position data according to the first view matrix, the model matrix, and the projection matrix to obtain a first projection position of the target object;

[0014] The matrix transformation module is further configured to perform a matrix transformation on the three-dimensional position data according to the second view matrix, the model matrix and the projection matrix to obtain a second projection position of the target object;

[0015] The display module is configured to display the target object on a first screen according to the first projection position, and simultaneously display the target object on a second screen according to the second projection position.

[0016] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a processor, a memory, a computer program stored in the memory and executable by the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein when the computer program is executed by the processor, the three-dimensional display method as described in the first aspect is realized.

[0017] In a fourth aspect, an embodiment of the present invention further provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the three-dimensional display method as described in the first aspect.

[0018] Embodiments of the present invention provide a three-dimensional display method, device, electronic device, and storage medium. The three-dimensional display method uses a first view matrix and a model matrix and a projection matrix associated with the target object to perform a matrix transformation on the three-dimensional position information of the target object, thereby accurately obtaining the first projection position of the target object. Simultaneously, a second view matrix and a model matrix and a projection matrix associated with the target object are used to perform a matrix transformation on the three-dimensional position information of the target object, thereby accurately obtaining the second projection position of the target object. The target object is then displayed on a first screen according to the first projection position, and is simultaneously displayed on a second screen according to the second projection position. This allows accurate alignment of binocular parallax, thereby greatly improving the stereoscopic effect of the three-dimensional display. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0020] Figure 1 This is a schematic block diagram of the structure of an electronic device provided by an embodiment of the present invention;

[0021] Figure 2 is a flow chart of a three-dimensional display method provided by an embodiment of the present invention;

[0022] Figure 3 yes Figure 2 A schematic flow chart of sub-steps of a three-dimensional display method;

[0023] Figure 4 is a flow chart of another three-dimensional display method provided by an embodiment of the present invention;

[0024] Figure 5 is an example diagram of a preset gesture in an embodiment of the present invention;

[0025] Figure 6 This is a schematic structural block diagram of a three-dimensional display device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0026] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0027] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, combined, or partially merged, so the actual execution order may vary depending on the actual situation.

[0028] It should be understood that the terms used in this specification are only for the purpose of describing particular embodiments and are not intended to limit the present invention. As used in the specification and appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0029] The real world is a three-dimensional world. With the development of society, the current conventional two-dimensional flat display can no longer meet human needs in some aspects. People hope that the display can truly restore and display the three-dimensional information of the space. Therefore, three-dimensional display came into being and has continued to develop, becoming a research hotspot in the current display field. Currently, three-dimensional display is mainly based on binocular parallax. In related technologies, three-dimensional display based on binocular parallax generally directly offsets the image data pixels to align the binocular parallax. However, directly offsetting the image data pixels cannot accurately align the binocular parallax, resulting in poor stereoscopic effect of the three-dimensional display and a poor user experience.

[0030] Embodiments of the present invention provide a three-dimensional display method, device, electronic device, and storage medium. The three-dimensional display method accurately obtains a first projection position of the target object by performing a matrix transformation on the three-dimensional position information of the target object using a first view matrix and a model matrix and projection matrix associated with the target object. Simultaneously, the method accurately obtains a second projection position of the target object by performing a matrix transformation on the three-dimensional position information of the target object using a second view matrix and a model matrix and projection matrix associated with the target object. The target object is then displayed on a first screen according to the first projection position, and simultaneously displayed on a second screen according to the second projection position. This method accurately aligns binocular parallax and significantly improves the stereoscopic effect of the three-dimensional display.

[0031] In the embodiment of the present invention, the electronic device includes but is not limited to a smartphone, a tablet computer, a laptop computer, a desktop computer, and a wearable device. The wearable device may be a smartwatch, a smart bracelet, an augmented reality (AR) device, or a virtual reality (VR) device. The AR device may be AR glasses, and the VR device may be VR glasses.

[0032] The following embodiments of the present invention are described in detail with reference to the accompanying drawings. In the absence of conflict, the following embodiments and features therein may be combined with each other.

[0033] Figure 1 This is a schematic block diagram of the structure of an electronic device provided by an embodiment of the present invention.

[0034] like Figure 1 As shown, the electronic device 100 includes a processor 101 and a memory 102 , and the processor 101 and the memory 102 are connected via a bus 103 , such as an I 2 C (Inter-integrated Circuit) bus.

[0035] Specifically, the processor 101 is used to provide computing and control capabilities to support the operation of the entire electronic device 100. The processor 101 can be a central processing unit (CPU) or a graphics processing unit (GPU). The processor 101 can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0036] Specifically, the memory 102 may be a Flash chip, a read-only memory (ROM) disk, an optical disk, a USB flash drive, or a mobile hard disk.

[0037] Those skilled in the art will understand that Figure 1 The structure shown in the figure is merely a block diagram of a portion of the structure related to the embodiment of the present invention, and does not constitute a limitation on the electronic device to which the embodiment of the present invention is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0038] The processor 101 is configured to run a computer program stored in the memory 102 and implement any one of the optical flow calculation methods provided by the embodiments of the present invention when executing the computer program.

[0039] In one embodiment, the processor 101 is configured to run a computer program stored in the memory 102 and implement the following steps when executing the computer program:

[0040] Obtaining three-dimensional position data of the target object;

[0041] Obtaining a model matrix and a projection matrix associated with the target object, and obtaining a preset first view matrix and a second view matrix;

[0042] Performing matrix transformation on the three-dimensional position data according to the first view matrix, the model matrix, and the projection matrix to obtain a first projection position of the target object;

[0043] Performing matrix transformation on the three-dimensional position data according to the second view matrix, the model matrix, and the projection matrix to obtain a second projection position of the target object;

[0044] The target object is displayed on the first screen according to the first projection position, and the target object is displayed on the second screen according to the second projection position.

[0045] In some embodiments, when obtaining the model matrix and projection matrix associated with the target object, the processor 101 is configured to implement:

[0046] Acquire a geometric relationship between the target object and the origin and coordinate axes of the world coordinate system, and construct a first translation matrix and a first rotation matrix based on the geometric relationship;

[0047] generating a model matrix associated with the target object according to the first translation matrix and the first rotation matrix;

[0048] According to the size of the first screen or the second screen, spatial parameters of a camera coordinate system are determined, and according to the spatial parameters, a projection matrix associated with the target object is constructed.

[0049] In some embodiments, when obtaining the preset first view matrix and the second view matrix, the processor 101 is configured to implement:

[0050] Obtaining identity information of a user currently using the electronic device;

[0051] Obtain a first view matrix and a second view matrix corresponding to the identity identification information.

[0052] In some embodiments, the identity identification information includes at least one of the following: iris information, fingerprint information, and gesture information.

[0053] In some embodiments, the processor 101 is configured to implement the following steps:

[0054] When the matrix calibration instruction is obtained, the preset object is displayed on the first screen according to the first view matrix, and the preset object is displayed on the second screen according to the second view matrix;

[0055] In response to a matrix calibration operation triggered by a user, calibrating the first view matrix and / or the second view matrix;

[0056] Adjusting the position and / or posture of the preset object in the first screen according to the calibrated first view matrix;

[0057] and / or, adjusting the position and / or posture of the preset object in the second screen according to the calibrated second view matrix;

[0058] In response to a calibration confirmation operation triggered by a user, the calibrated first view matrix and / or the calibrated second view matrix are stored.

[0059] In some embodiments, when implementing the matrix calibration operation triggered by the user and calibrating the first view matrix and / or the second view matrix, the processor 101 is configured to implement:

[0060] calibrating the first view matrix in response to a movement operation of a first hand of a user;

[0061] And / or in response to a motion operation of a second hand of the user, calibrating the second view matrix.

[0062] In some embodiments, when adjusting the position and / or posture of the preset object in the first screen according to the calibrated first view matrix, the processor 101 is configured to implement:

[0063] Performing a matrix transformation on the preset three-dimensional position data according to the preset model matrix, the preset projection matrix, and the calibrated first view matrix to obtain a third projection position of the preset object;

[0064] The preset object is displayed on the first screen according to the third projection position, so as to adjust the position and / or posture of the preset object on the first screen.

[0065] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the electronic device described above can refer to the corresponding process in the aforementioned three-dimensional display method embodiment, and will not be repeated here.

[0066] The following will be combined Figure 1 The electronic device in the embodiment of the present invention provides a detailed introduction to the three-dimensional display method. Figure 1 The electronic device is only used to explain the three-dimensional display method provided by the embodiment of the present invention, but does not constitute a limitation on the application scenario of the three-dimensional display method provided by the embodiment of the present invention.

[0067] See also Figure 2 , Figure 2 It is a flowchart of a three-dimensional display method provided by an embodiment of the present invention.

[0068] like Figure 2 As shown, the three-dimensional display method includes steps S101 to S104.

[0069] Step S101: Acquire three-dimensional position data of a target object.

[0070] In this embodiment, the three-dimensional position data of the target object may include the vertex spatial coordinates and rotation angles of the target object, and the three-dimensional position data of the target object is determined based on the local coordinate system of the target object (also referred to as the model coordinate system). The local coordinate system of the target object is a spatial coordinate system based on the center of the target object. It is understood that the target object is the object currently being viewed by the electronic device, such as a tree, a commodity, etc. The target object can be one or more, and this is not specifically limited in the embodiment of the present invention.

[0071] In some embodiments, the method for obtaining the three-dimensional position data of the target object can be: obtaining the three-dimensional position data of the target object sent by a server. Or obtaining the three-dimensional position information of the target object sent by a user terminal. The server can be a standalone server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The user terminal can be a smartphone, tablet computer, laptop computer, or personal computer.

[0072] Step S102: Acquire a model matrix and a projection matrix associated with the target object, and acquire a preset first view matrix and a second view matrix.

[0073] In this embodiment, the model matrix (Model matrix) associated with the target object is used to define the conversion relationship between the target object's own local space (Local Space) and world space (World Space). The view matrix (View matrix) is used to define the conversion relationship between world space (World Space) and visual space. The projection matrix (Projection matrix) associated with the target object is used to define the conversion relationship between visual space and clip space (Clip Space). Among them, the preset first view matrix is ​​used to define the first conversion relationship between world space and visual space, and the preset second view matrix is ​​used to define the second conversion relationship between world space and visual space. The first conversion relationship is different from the second conversion relationship. The first view matrix and the second view matrix are pre-constructed view matrices.

[0074] In some embodiments, the method for obtaining the model matrix and projection matrix associated with the target object can be: obtaining the geometric relationship between the target object and the origin and coordinate axis of the world coordinate system, and constructing a first translation matrix and a first rotation matrix based on the geometric relationship; generating a model matrix associated with the target object based on the first translation matrix and the first rotation matrix; determining the spatial parameters of the camera coordinate system based on the size of the first screen or the second screen, and constructing a projection matrix associated with the target object based on the spatial parameters. The first screen and the second screen have the same size. For example, the sizes of the first screen and the second screen are both (w, h), where w is the width and h is the height. It can be understood that when the electronic device is AR glasses, the first screen can be a virtual screen corresponding to one of the frames of the AR glasses, and the second screen can be a virtual screen corresponding to the other frame of the AR glasses.

[0075] In some embodiments, as Figure 3 As shown, step S102 includes: sub-step S1021 to sub-step S1022.

[0076] Sub-step S1021: obtaining the identity information of the user currently using the electronic device.

[0077] In this embodiment, the identity information includes at least one of the following: iris information, fingerprint information, and gesture information. The electronic device may include a first camera, a second camera, and / or a fingerprint sensor, wherein the first camera is configured to capture an image of the user's pupils, the second camera is configured to capture an image of the user's hands, and the fingerprint sensor is configured to capture fingerprint features of the user.

[0078] In some embodiments, the identity information of the user currently using the electronic device may be obtained by: obtaining a pupil image captured by a first camera and analyzing the pupil image to obtain iris information of the user currently using the electronic device. Alternatively, the pupil image captured by the first camera may be obtained and sent to a server; upon receiving the pupil image, the server analyzes the pupil image to obtain iris information and sends the iris information to the electronic device; and the electronic device receives the iris information sent by the server, thereby obtaining the iris information of the user currently using the electronic device.

[0079] In some embodiments, the method for obtaining the identity information of the user currently using the electronic device may be: obtaining multiple frames of hand images captured by the second camera; performing gesture recognition on each frame of the hand image to obtain multiple gesture actions, and determining the multiple gesture actions as gesture information of the user currently using the electronic device. Alternatively, multiple frames of hand images captured by the second camera are obtained and sent to a server; upon receiving the multiple frames of hand images, the server performs gesture recognition on each frame of the hand image to obtain multiple gesture actions, and sends the multiple gesture actions to the electronic device; the electronic device receives the multiple gesture actions sent by the server and determines the multiple gesture actions as gesture information of the user currently using the electronic device.

[0080] Sub-step S1022: Acquire a first view matrix and a second view matrix corresponding to the identity identification information.

[0081] In this embodiment, the spatial distance between the first view matrix and the second view matrix can represent the interpupillary distance of the user's eyes. In this way, by obtaining the identity information of the user currently using the electronic device and obtaining the first view matrix and the second view matrix corresponding to the identity information, the problem of poor three-dimensional display effect caused by different interpupillary distances of different users can be solved.

[0082] In some embodiments, the first view matrix and the second view matrix corresponding to the identity information are obtained from a pre-established identity-view relationship table. During the use of the electronic device, the identity information of different users and the first view matrix and the second view matrix configured by each user may be collected. An identity-view relationship table may then be established based on the identity information of different users and the first view matrix and the second view matrix configured by each user. The identity-view relationship table is used to describe the correspondence between the identity information, the first view matrix, and the second view matrix.

[0083] For example, the pre-established identity-view relationship table is shown in Table 1. It can be seen from Table 1 that the first view matrix and the second view matrix corresponding to iris information A are View matrix A and View matrix D respectively, the first view matrix and the second view matrix corresponding to iris information B are View matrix B and View matrix E respectively, and the first view matrix and the second view matrix corresponding to iris information C are View matrix C and View matrix F respectively.

[0084] Table 1

[0085] Identity information First view matrix Second view matrix Iris Information A View matrix A View matrix D Iris Information B View matrix B View matrix E Iris Information C View matrix C View matrix F

[0086] For example, if the identity information of the user currently using the electronic device is iris information B, the View matrix B and View matrix E corresponding to the iris information B can be obtained from Table 1 as the first view matrix and the second view matrix respectively.

[0087] Step S103: performing matrix transformation on the three-dimensional position data according to the first view matrix, the model matrix and the projection matrix to obtain a first projection position of the target object.

[0088] In this embodiment, the three-dimensional position data of the target object can be multiplied by the model matrix to obtain the three-dimensional position data of the target object in the world space, and then the three-dimensional position data of the target object in the world space can be multiplied by the first view matrix to obtain the first position information of the target object in the visual space. Finally, the first position information of the target object in the visual space can be multiplied by the projection matrix to obtain the first projection position of the target object (the position information of the target object in the clipping space). In this way, the process of converting the three-dimensional position data in the local coordinate system into the position information in the clipping space is realized. This process can be called MVP (Model, View, Projection) matrix transformation, which can adopt the knowledge of geometric transformation translation, rotation, scaling, etc. in graphics.

[0089] Step S104 : performing matrix transformation on the three-dimensional position data according to the second view matrix, the model matrix, and the projection matrix to obtain a second projection position of the target object.

[0090] In this embodiment, the three-dimensional position data of the target object can be multiplied by the model matrix to obtain the three-dimensional position data of the target object in the world space, and then the three-dimensional position data of the target object in the world space can be multiplied by the second view matrix to obtain the second position information of the target object in the visual space. Finally, the second position information of the target object in the visual space can be multiplied by the projection matrix to obtain the second projection position of the target object (the position information of the target object in the clipping space).

[0091] Step S105 : displaying the target object on the first screen according to the first projection position, and displaying the target object on the second screen according to the second projection position.

[0092] In this embodiment, the first projection position is converted to a first coordinate in the screen space corresponding to the first screen, and the target object is displayed at the position corresponding to the first coordinate on the first screen. Simultaneously, the second projection position is converted to a second coordinate in the screen space corresponding to the second screen, and the target object is displayed at the position corresponding to the second coordinate on the second screen.

[0093] The first projection position and the second projection position are the positions of the target object in the clipping space. You can first perform perspective division on the first projection position to obtain first NDC (Normalized Device Coordinates) coordinates, and then convert the first NDC coordinates into first coordinates in the screen space corresponding to the first screen. Similarly, you can first perform perspective division on the second projection position to obtain second NDC coordinates, and then convert the second NDC coordinates into second coordinates in the screen space corresponding to the second screen.

[0094] In some embodiments, the electronic device includes a central processing unit (CPU) and a graphics processing unit (GPU). The three-dimensional display method provided in the embodiment of the present invention can be executed by the central processing unit of the electronic device or by the graphics processing unit of the electronic device, and the embodiment of the present invention does not specifically limit this. By executing the three-dimensional display method provided in the embodiment of the present invention by the graphics processing unit of the electronic device, the main control computing power resources can be saved.

[0095] The three-dimensional display method provided in the above embodiment uses a first view matrix and a model matrix and a projection matrix associated with the target object to perform a matrix transformation on the three-dimensional position information of the target object, so as to accurately obtain the first projection position of the target object. At the same time, by using a second view matrix and a model matrix and a projection matrix associated with the target object, the three-dimensional position information of the target object is subjected to a matrix transformation, so as to accurately obtain the second projection position of the target object. Then, the target object is displayed on the first screen according to the first projection position, and the target object is displayed on the second screen according to the second projection position. This enables accurate alignment of binocular parallax, thereby greatly improving the stereoscopic effect of the three-dimensional display.

[0096] See also Figure 4 , Figure 4 It is a flowchart of another three-dimensional display method provided by an embodiment of the present invention.

[0097] like Figure 4 As shown, the three-dimensional display method includes steps S201 to S205.

[0098] Step S201: When a matrix calibration instruction is obtained, a preset object is displayed on a first screen according to a first view matrix, and a preset object is displayed on a second screen according to a second view matrix.

[0099] In this embodiment, a user can control the electronic device to enter the matrix calibration process when using the electronic device for 3D display for the first time, or when discovering that the target object displayed by the electronic device is not consistent with the image. It is understood that the user can also control the electronic device to enter the matrix calibration process at any time, and this embodiment of the present invention does not specifically limit this. The preset object can be set by the user based on actual circumstances, and this embodiment of the present invention does not specifically limit this. For example, the preset object can be a crosshair cursor, a four-pointed star, a five-pointed star, or a six-pointed star.

[0100] In some embodiments, a method for displaying a preset object on a first screen according to a first view matrix and displaying the preset object on a second screen according to a second view matrix may be: performing a matrix transformation on preset three-dimensional position data according to a preset model matrix, a preset projection matrix, and a first view matrix to obtain first vertex position coordinates of the preset object, and displaying the preset object on the first screen according to the first vertex position coordinates; and simultaneously performing a matrix transformation on the preset three-dimensional position data according to the preset model matrix, the preset projection matrix, and the second view matrix to obtain second vertex position coordinates of the preset object, and displaying the preset object on the second screen according to the second vertex position coordinates. The preset three-dimensional position data is the spatial coordinates and rotation angle of the preset object in a local coordinate system, and the first vertex position coordinates and the second vertex position coordinates are the position coordinates of the preset object in a clipping space.

[0101] Step S202: In response to a matrix calibration operation triggered by the user, calibrate the first view matrix and / or the second view matrix.

[0102] In this embodiment, the electronic device can recognize the user's hand motion operation through a camera, and then calibrate the first view matrix and / or the second view matrix based on the user's hand motion operation. Alternatively, the user can trigger a matrix calibration operation through a user terminal that is communicatively connected to the electronic device, thereby calibrating the first view matrix and / or the second view matrix.

[0103] In some embodiments, in response to a matrix calibration operation triggered by a user, the first view matrix and / or the second view matrix may be calibrated by: calibrating the first view matrix in response to a motion operation of a first hand of the user; and / or calibrating the second view matrix in response to a motion operation of a second hand of the user. The first hand may be the user's left hand, and the second hand may be the user's right hand, or the first hand may be the user's right hand, and the second hand may be the user's left hand. The motion operation of the first hand may be a sliding operation or a rotating operation, and the motion operation of the second hand may be a sliding operation or a selecting operation.

[0104] In some embodiments, in response to the motion of the user's first hand, the first view matrix may be calibrated by adjusting position information in the first view matrix in response to a slide operation of the user's first hand, or by adjusting the yaw, pitch, or roll angle in the first view matrix in response to a rotation operation of the user's first hand. In response to the motion of the user's second hand, the second view matrix may be calibrated by adjusting position information in the second view matrix in response to a slide operation of the user's second hand, or by adjusting the yaw, pitch, or roll angle in the second view matrix in response to a rotation operation of the user's second hand.

[0105] In some embodiments, in response to a sliding operation of the user's first hand, the manner of adjusting the position information in the first view matrix includes at least one of the following: in response to a sliding operation of the user's first hand in a first direction, increasing the horizontal coordinate of the position information in the first view matrix by a preset value; in response to a sliding operation of the user's first hand in a second direction, decreasing the horizontal coordinate of the position information in the first view matrix by a preset value; or in response to a sliding operation of the user's first hand in a third direction, increasing the vertical coordinate of the position information in the first view matrix by a preset value; in response to a sliding operation of the user's first hand in a fourth direction, decreasing the vertical coordinate of the position information in the first view matrix by a preset value; in response to a sliding operation of the user's first hand in a fifth direction, increasing the vertical coordinate of the position information in the first view matrix by a preset value; in response to a sliding operation of the user's first hand in a sixth direction, decreasing the vertical coordinate of the position information in the first view matrix by a preset value.

[0106] The first direction, the second direction, the third direction, the fourth direction, the fifth direction, and the sixth direction are different, and the first direction is opposite to the second direction, the third direction is opposite to the fourth direction, and the fifth direction is opposite to the sixth direction. For example, a sliding operation of the first hand in the first direction is a sliding of the first hand to the right, and a sliding operation of the first hand in the second direction is a sliding of the first hand to the left. A sliding operation of the first hand in the third direction is a sliding of the first hand forward, and a sliding operation of the first hand in the fourth direction is a sliding of the first hand backward. A sliding operation of the first hand in the fifth direction is a sliding of the first hand upward, and a sliding operation of the first hand in the sixth direction is a sliding of the first hand downward.

[0107] In some embodiments, in response to the rotation operation of the user's first hand, the yaw angle, pitch angle or rotation angle in the first view matrix is ​​adjusted in the following manner: in response to the rotation operation of the user's first hand around the seventh direction of the vertical axis, the yaw angle in the first view matrix is ​​increased by a preset angle; or in response to the rotation operation of the user's first hand around the eighth direction of the vertical axis, the yaw angle in the first view matrix is ​​reduced by a preset angle; or in response to the rotation operation of the user's first hand around the ninth direction of the horizontal axis, the pitch angle in the first view matrix is ​​increased by a preset angle; or in response to the rotation operation of the user's first hand around the tenth direction of the horizontal axis, the pitch angle in the first view matrix is ​​reduced by a preset angle; or in response to the rotation operation of the user's first hand around the eleventh direction of the vertical axis, the rotation angle in the first view matrix is ​​increased by a preset angle; or in response to the rotation operation of the user's first hand around the twelfth direction of the vertical axis, the rotation angle in the first view matrix is ​​reduced by a preset angle.

[0108] Among them, the seventh direction, the eighth direction, the ninth direction, the tenth direction, the eleventh direction, and the twelfth direction are different, and the seventh direction is opposite to the eighth direction, the ninth direction is opposite to the tenth direction, and the eleventh direction is opposite to the twelfth direction. For example, the rotation operation of the first hand around the vertical axis in the seventh direction is a clockwise rotation of the first hand around the vertical axis, and the rotation operation of the first hand around the vertical axis in the eighth direction is a counterclockwise rotation of the first hand around the vertical axis. The rotation operation of the first hand around the transverse axis in the ninth direction is a backward rotation of the first hand around the transverse axis, and the rotation operation of the first hand around the transverse axis in the tenth direction is a forward rotation of the first hand around the longitudinal axis. The rotation operation of the first hand around the transverse axis in the eleventh direction is an upward rotation of the first hand around the longitudinal axis, and the rotation operation of the first hand around the transverse axis in the twelfth direction is a downward rotation of the first hand around the longitudinal axis.

[0109] In some embodiments, in response to a sliding operation of the user's second hand, the manner of adjusting the position information in the second view matrix may include at least one of the following: in response to a sliding operation of the user's second hand in a first direction, increasing the horizontal coordinate of the position information in the second view matrix by a preset value; in response to a sliding operation of the user's second hand in a second direction, decreasing the horizontal coordinate of the position information in the second view matrix by a preset value; or in response to a sliding operation of the user's second hand in a third direction, increasing the vertical coordinate of the position information in the second view matrix by a preset value; in response to a sliding operation of the user's second hand in a fourth direction, decreasing the vertical coordinate of the position information in the second view matrix by a preset value; in response to a sliding operation of the user's second hand in a fifth direction, increasing the vertical coordinate of the position information in the second view matrix by a preset value; in response to a sliding operation of the user's second hand in a sixth direction, decreasing the vertical coordinate of the position information in the second view matrix by a preset value.

[0110] For example, a first-direction sliding operation of the second hand causes the second hand to slide rightward, a second-direction sliding operation of the second hand causes the second hand to slide leftward, a third-direction sliding operation of the second hand causes the second hand to slide forward, a fourth-direction sliding operation of the second hand causes the second hand to slide backward, a fifth-direction sliding operation of the second hand causes the second hand to slide upward, and a sixth-direction sliding operation of the second hand causes the second hand to slide downward.

[0111] In some embodiments, in response to the rotation operation of the user's second hand, the yaw angle, pitch angle or rotation angle in the second view matrix is ​​adjusted in the following manner: in response to the rotation operation of the user's second hand around the seventh direction of the vertical axis, the yaw angle in the second view matrix is ​​increased by a preset angle; or in response to the rotation operation of the user's second hand around the eighth direction of the vertical axis, the yaw angle in the second view matrix is ​​decreased by a preset angle; or in response to the rotation operation of the user's second hand around the ninth direction of the horizontal axis, the pitch angle in the second view matrix is ​​increased by a preset angle; or in response to the rotation operation of the user's second hand around the tenth direction of the horizontal axis, the pitch angle in the second view matrix is ​​decreased by a preset angle; or in response to the rotation operation of the user's second hand around the eleventh direction of the vertical axis, the rotation angle in the second view matrix is ​​increased by a preset angle; or in response to the rotation operation of the user's second hand around the twelfth direction of the vertical axis, the rotation angle in the second view matrix is ​​decreased by a preset angle.

[0112] For example, the second hand's seventh rotation around the vertical axis causes the second hand to rotate right around the vertical axis, and the second hand's eighth rotation around the vertical axis causes the second hand to rotate left around the vertical axis. The second hand's ninth rotation around the transverse axis causes the second hand to rotate backward around the transverse axis, and the second hand's tenth rotation around the transverse axis causes the second hand to rotate forward around the vertical axis. The second hand's eleventh rotation around the transverse axis causes the second hand to rotate upward around the vertical axis, and the second hand's twelfth rotation around the transverse axis causes the second hand to rotate downward around the vertical axis.

[0113] In some embodiments, a user terminal communicatively connected to an electronic device displays a matrix calibration page, the matrix calibration page including a first touch area and a second touch area, the first touch area being used to calibrate a first view matrix, and the second touch area being used to calibrate a second view matrix. In response to a user touching a position calibration button in the first touch area, the user terminal sends a corresponding first position update instruction to the electronic device. Upon receiving the first position update instruction, the electronic device updates position information in the first view matrix according to the first position update instruction. Alternatively, in response to a user touching a yaw angle calibration button in the first touch area, the user terminal sends a corresponding first yaw angle update instruction to the electronic device. Upon receiving the first yaw angle update instruction, the electronic device updates the yaw angle in the first view matrix according to the first yaw angle update instruction. Alternatively, in response to a user touching a pitch angle calibration button in the first touch area, the user terminal sends a corresponding first pitch angle update instruction to the electronic device. Upon receiving the first pitch angle update instruction, the electronic device updates the pitch angle in the first view matrix according to the first pitch angle update instruction. Alternatively, the user terminal sends a corresponding first rotation angle update instruction to the electronic device in response to the user's touch operation on the rotation angle calibration button in the first touch area; when the electronic device receives the first rotation angle update instruction sent by the electronic device, it updates the rotation angle in the first view matrix according to the first rotation angle update instruction.

[0114] In some embodiments, in response to a user touch operation on a position calibration button in the second touch area, the user terminal sends a corresponding second position update instruction to the electronic device; upon receiving the second position update instruction sent by the electronic device, the electronic device updates the position information in the second view matrix according to the second position update instruction. Alternatively, in response to a user touch operation on a yaw angle calibration button in the second touch area, the user terminal sends a corresponding second yaw angle update instruction to the electronic device; upon receiving the second yaw angle update instruction sent by the electronic device, the electronic device updates the yaw angle in the second view matrix according to the second yaw angle update instruction. Alternatively, in response to a user touch operation on a pitch angle calibration button in the second touch area, the user terminal sends a corresponding second pitch angle update instruction to the electronic device; upon receiving the second pitch angle update instruction sent by the electronic device, the electronic device updates the pitch angle in the second view matrix according to the second pitch angle update instruction. Alternatively, the user terminal sends a corresponding second rotation angle update instruction to the electronic device in response to the user's touch operation on the rotation angle calibration button in the second touch area; when the electronic device receives the second rotation angle update instruction sent by the electronic device, it updates the rotation angle in the second view matrix according to the second rotation angle update instruction.

[0115] Step S203: adjusting the position and / or posture of the preset object in the first screen according to the calibrated first view matrix.

[0116] In this embodiment, after calibrating the first view matrix, the electronic device can perform matrix transformation on the preset three-dimensional position data according to the preset model matrix, the preset projection matrix and the calibrated first view matrix to obtain the third projection position of the preset object, and display the preset object on the first screen according to the third projection position to adjust the position and / or posture of the preset object on the first screen.

[0117] Step S204: Adjust the position and / or posture of the preset object in the second screen according to the calibrated second view matrix.

[0118] In this embodiment, after calibrating the second view matrix, the electronic device can perform matrix transformation on the preset three-dimensional position data according to the preset model matrix, the preset projection matrix and the calibrated second view matrix to obtain the fourth projection position of the preset object, and display the preset object on the second screen according to the fourth projection position to adjust the position and / or posture of the preset object on the second screen.

[0119] Step S205 : In response to a calibration confirmation operation triggered by the user, the calibrated first view matrix and / or the calibrated second view matrix are stored.

[0120] In this embodiment, after adjusting the position and / or posture of the preset object in at least one of the first screen and the second screen, the user can observe whether the preset object is in the image. When the user observes that the preset object is in the image, the user can trigger a calibration confirmation operation to instruct the electronic device to end the matrix calibration and instruct the electronic device to store the calibrated first view matrix and / or the calibrated second view matrix.

[0121] In some embodiments, in response to a calibration confirmation operation triggered by a user, the calibrated first view matrix and / or the calibrated second view matrix may be stored in a manner as follows: obtaining a gesture recognized by the second camera, and when the gesture is a preset gesture, determining that the user has triggered the calibration confirmation operation, and storing the calibrated first view matrix and / or the calibrated second view matrix. The preset gesture may be set based on actual conditions, and the embodiments of the present invention do not specifically limit this. For example, the preset gesture is as follows: Figure 5 The OK gesture shown.

[0122] In some embodiments, steps S201 to S205 may be performed after step S105. For example, after the electronic device displays the target object on the first screen and the second screen, if the user observes that the target object is not in the correct image, the user can control the electronic device to enter a matrix calibration process, and the electronic device executes steps S201 to S205. Alternatively, the electronic device may execute the following steps: in response to a user-triggered matrix calibration operation, calibrate the first view matrix and / or the second view matrix; adjust the position and / or posture of the target object on the first screen based on the calibrated first view matrix; and / or adjust the position and / or posture of the target object on the second screen based on the calibrated second view matrix; and in response to a user-triggered calibration confirmation operation, store the calibrated first view matrix and / or the calibrated second view matrix.

[0123] The three-dimensional display method provided in the above embodiment calibrates the first view matrix and / or the second view matrix, so that the first view matrix and the second view matrix can meet the different requirements of the interpupillary distance between the eyes of different users. It can also avoid the problem of poor stereoscopic effect of the three-dimensional display due to the offset and deformation of the positions of the first screen and the second screen, thereby greatly improving the stereoscopic effect of the three-dimensional display.

[0124] See also Figure 6 , Figure 6 This is a schematic structural block diagram of a three-dimensional display device provided by an embodiment of the present invention.

[0125] like Figure 6 As shown, the three-dimensional display device 200 includes:

[0126] An acquisition module 210 is configured to acquire three-dimensional position data of a target object;

[0127] The acquisition module 210 is further configured to acquire a model matrix and a projection matrix associated with the target object, and acquire a preset first view matrix and a second view matrix;

[0128] a matrix transformation module 220 configured to perform a matrix transformation on the three-dimensional position data according to the first view matrix, the model matrix, and the projection matrix to obtain a first projection position of the target object;

[0129] The matrix transformation module 220 is further configured to perform a matrix transformation on the three-dimensional position data according to the second view matrix, the model matrix and the projection matrix to obtain a second projection position of the target object;

[0130] The display module 230 is configured to display the target object on a first screen according to the first projection position, and simultaneously display the target object on a second screen according to the second projection position.

[0131] In some embodiments, the acquisition module 210 is further configured to:

[0132] Acquire a geometric relationship between the target object and the origin and coordinate axes of the world coordinate system, and construct a first translation matrix and a first rotation matrix based on the geometric relationship;

[0133] generating a model matrix associated with the target object according to the first translation matrix and the first rotation matrix;

[0134] According to the size of the first screen or the second screen, spatial parameters of a camera coordinate system are determined, and according to the spatial parameters, a projection matrix associated with the target object is constructed.

[0135] In some embodiments, the acquisition module 210 is further configured to:

[0136] Obtaining identity information of a user currently using the electronic device;

[0137] Obtain a first view matrix and a second view matrix corresponding to the identity identification information.

[0138] In some embodiments, the identity identification information includes at least one of the following: iris information, fingerprint information, and gesture information.

[0139] In some embodiments, the 3D display device 200 further includes a matrix calibration module, and the matrix calibration module is configured to:

[0140] When the matrix calibration instruction is obtained, the preset object is displayed on the first screen according to the first view matrix, and the preset object is displayed on the second screen according to the second view matrix;

[0141] In response to a matrix calibration operation triggered by a user, calibrating the first view matrix and / or the second view matrix;

[0142] Adjusting the position and / or posture of the preset object in the first screen according to the calibrated first view matrix;

[0143] and / or, adjusting the position and / or posture of the preset object in the second screen according to the calibrated second view matrix;

[0144] In response to a calibration confirmation operation triggered by a user, the calibrated first view matrix and / or the calibrated second view matrix are stored.

[0145] In some embodiments, the matrix calibration module is further configured to:

[0146] calibrating the first view matrix in response to a movement operation of a first hand of a user;

[0147] And / or in response to a motion operation of a second hand of the user, calibrating the second view matrix.

[0148] In some embodiments, the matrix calibration module is further configured to:

[0149] Performing a matrix transformation on the preset three-dimensional position data according to the preset model matrix, the preset projection matrix, and the calibrated first view matrix to obtain a third projection position of the preset object;

[0150] The preset object is displayed on the first screen according to the third projection position, so as to adjust the position and / or posture of the preset object on the first screen.

[0151] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the three-dimensional display device described above can refer to the corresponding process in the aforementioned three-dimensional display method embodiment, and will not be repeated here.

[0152] An embodiment of the present invention further provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement any three-dimensional display method provided in the description of the embodiment of the present invention.

[0153] The storage medium may be an internal storage unit of the electronic device described in the aforementioned embodiment, such as a hard disk or memory of the electronic device. The storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device.

[0154] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware embodiment, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As is well known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable, and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media generally embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0155] It should be understood that the term "and / or" used in the present specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system that includes a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements that are inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system that includes the element.

[0156] The serial numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments. The above description is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be based on the scope of protection of the claims.

Claims

1. A three-dimensional display method, characterized in that: Applied to an electronic device, the electronic device includes a first screen and a second screen, and the method includes: Obtaining three-dimensional position data of the target object; Obtaining a model matrix and a projection matrix associated with the target object, and obtaining a preset first view matrix and a second view matrix; Performing matrix transformation on the three-dimensional position data according to the first view matrix, the model matrix, and the projection matrix to obtain a first projection position of the target object; Performing matrix transformation on the three-dimensional position data according to the second view matrix, the model matrix, and the projection matrix to obtain a second projection position of the target object; displaying the target object on the first screen according to the first projection position, and displaying the target object on the second screen according to the second projection position; Wherein, obtaining the projection matrix associated with the target object includes: According to the size of the first screen or the second screen, spatial parameters of a camera coordinate system are determined, and according to the spatial parameters, a projection matrix associated with the target object is constructed.

2. The three-dimensional display method according to claim 1, characterized in that: The acquiring of a model matrix associated with the target object includes: Acquire a geometric relationship between the target object and the origin and coordinate axes of the world coordinate system, and construct a first translation matrix and a first rotation matrix based on the geometric relationship; A model matrix associated with the target object is generated according to the first translation matrix and the first rotation matrix.

3. The three-dimensional display method according to claim 1, wherein: The obtaining of the preset first view matrix and the second view matrix includes: Obtaining identity information of a user currently using the electronic device; Obtain a first view matrix and a second view matrix corresponding to the identity identification information.

4. The three-dimensional display method according to claim 3, wherein: The identity identification information includes at least one of the following: iris information, fingerprint information and gesture information.

5. The three-dimensional display method according to any one of claims 1 to 4, characterized in that: The method further comprises: When the matrix calibration instruction is obtained, the preset object is displayed on the first screen according to the first view matrix, and the preset object is displayed on the second screen according to the second view matrix; In response to a matrix calibration operation triggered by a user, calibrating the first view matrix and / or the second view matrix; Adjusting the position and / or posture of the preset object in the first screen according to the calibrated first view matrix; and / or, adjusting the position and / or posture of the preset object in the second screen according to the calibrated second view matrix; In response to a calibration confirmation operation triggered by a user, the calibrated first view matrix and / or the calibrated second view matrix are stored.

6. The three-dimensional display method according to claim 5, characterized in that: The step of calibrating the first view matrix and / or the second view matrix in response to the matrix calibration operation triggered by the user includes: calibrating the first view matrix in response to a movement operation of a first hand of a user; And / or in response to a motion operation of a second hand of the user, calibrating the second view matrix.

7. The three-dimensional display method according to claim 5, characterized in that: The adjusting the position and / or posture of the preset object in the first screen according to the calibrated first view matrix includes: Performing a matrix transformation on the preset three-dimensional position data according to the preset model matrix, the preset projection matrix, and the calibrated first view matrix to obtain a third projection position of the preset object; The preset object is displayed on the first screen according to the third projection position, so as to adjust the position and / or posture of the preset object on the first screen.

8. A three-dimensional display device, characterized in that: The three-dimensional display device comprises: an acquisition module, configured to acquire three-dimensional position data of a target object; The acquisition module is further configured to acquire a model matrix and a projection matrix associated with the target object, and acquire a preset first view matrix and a second view matrix; a matrix transformation module, configured to perform a matrix transformation on the three-dimensional position data according to the first view matrix, the model matrix, and the projection matrix to obtain a first projection position of the target object; The matrix transformation module is further configured to perform a matrix transformation on the three-dimensional position data according to the second view matrix, the model matrix and the projection matrix to obtain a second projection position of the target object; a display module configured to display the target object on a first screen according to the first projection position, and simultaneously display the target object on a second screen according to the second projection position; The acquisition module is further configured to determine spatial parameters of a camera coordinate system according to a size of the first screen or the second screen, and to construct a projection matrix associated with the target object according to the spatial parameters.

9. An electronic device, characterized in that: The electronic device includes a processor, a memory, a computer program stored on the memory and executable by the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein when the computer program is executed by the processor, the three-dimensional display method according to any one of claims 1 to 7 is realized.

10. A storage medium for computer-readable storage, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the three-dimensional display method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • 2.5-dimensional image automatic true stereo display method, device and equipment and storage medium

    CN115457200A