Three-dimensional content display method and electronic device

By mapping the display data of electronic devices to a virtual display screen for 3D rendering, the high cost of 3D display in existing technologies is solved, system-level 3D conversion is achieved, development and maintenance costs are reduced, and the normal display of the main screen is maintained.

CN123157100APending Publication Date: 2026-11-24BEIJING BOUNDLESS WALKER TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611417108.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-11
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

In the existing technology, the 3D display of 2D images on electronic devices requires the separate development of 3D rendering functions for each application, resulting in high development and maintenance costs, and the 3D rendering functions of different applications cannot be shared.

Method used

By acquiring display data from electronic devices, including display content data and system screen data, mapping it to a virtual display screen, and performing 3D rendering based on the virtual display screen to generate 3D images, a system-level 3D conversion is achieved without the need for separate adaptation to any application.

Benefits of technology

It achieves the overall three-dimensional conversion of all display content at the system level of electronic devices, reducing development and maintenance costs. Furthermore, the three-dimensional rendering process is isolated from the main screen display and does not affect the normal two-dimensional display.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123157100A_ABST
    Figure CN123157100A_ABST
Patent Text Reader

Abstract

The technical scheme relates to the field of three-dimensional imaging, and provides a three-dimensional content display method and electronic equipment.The three-dimensional content display method comprises the following steps: acquiring display data of the electronic equipment, wherein the display data comprises display content data and system picture data; mapping the display data to a virtual display screen; performing three-dimensional rendering based on the display data in the virtual display screen, so as to generate a three-dimensional image corresponding to the display data; and outputting the three-dimensional image to the display screen for display, which realizes the overall three-dimensional conversion of all display contents of the system level of the electronic equipment, does not need to separately adapt any application, and reduces the development and maintenance costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This technical solution belongs to the field of three-dimensional imaging, and in particular relates to three-dimensional content display methods and electronic devices. Background Technology

[0002] By rendering a two-dimensional image (such as an application interface) displayed on an electronic device into a three-dimensional image, a three-dimensional image can be obtained and displayed on a three-dimensional display device. However, in related solutions, to achieve the three-dimensional display of a two-dimensional image on an electronic device, it is necessary to develop separate three-dimensional rendering functions for each application installed on the electronic device. Furthermore, the three-dimensional rendering functions of different applications cannot be shared, resulting in high development and maintenance costs. Summary of the Invention

[0003] The first aspect of this technical solution embodiment provides a three-dimensional content display method, including: Acquire display data from an electronic device, the display data including display content data and system screen data; Map the display data to a virtual display screen; Three-dimensional rendering is performed based on the display data in the virtual display screen to generate a three-dimensional image corresponding to the display data; The 3D image is output to the display screen for display.

[0004] A second aspect of this technical solution embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the three-dimensional content display method as described in the first aspect above.

[0005] A third aspect of this technical solution embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the three-dimensional content display method as described in the first aspect above.

[0006] The fourth aspect of this technical solution embodiment provides a computer program product that, when run on an electronic device, causes the electronic device to execute the three-dimensional content display method described in any of the first aspects above.

[0007] Compared with the prior art, the beneficial effects of this technical solution embodiment are as follows: by acquiring complete display data containing display content data and system screen data, and mapping the display data to a virtual display screen, 3D rendering can be carried out uniformly based on the complete display data in the virtual display screen. This achieves the overall 3D transformation of all display content (including various application interfaces, system desktop, status bar, pop-ups, etc.) at the system level of electronic devices, without the need for separate adaptation of any application, thus reducing development and maintenance costs. Attached Figure Description

[0008] To more clearly illustrate the technical solutions in the embodiments of this technical solution, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.

[0009] Figure 1 This is a schematic diagram illustrating the implementation process of a three-dimensional content display method provided in one embodiment of this technical solution; Figure 2 This is a schematic diagram of the display data provided in the embodiment of this technical solution; Figure 3 This is a schematic diagram of the foreground and background images provided in this embodiment of the technical solution; Figure 4 This is a schematic diagram of the structure of the electronic device provided in this embodiment of the technical solution. Detailed Implementation

[0010] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0011] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0012] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0013] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0014] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0015] The following describes the three-dimensional content display method provided by this technical solution. This three-dimensional content display method is applied to electronic devices, such as mobile phones, computers, or wearable devices, which have display functions.

[0016] Please see the appendix Figure 1 The three-dimensional content display method provided in one embodiment of this technical solution includes steps S101 to S104.

[0017] S101: Obtain display data from the electronic device, the display data including display content data and system screen data.

[0018] Specifically, display data refers to the complete two-dimensional RGB image data presented on the main screen of an electronic device, including display content data and system screen data. Display content data is data provided by the application, including video footage, images, text, web page content, game rendering, document tables, and other data. System screen data is data provided by the operating system, used to display or manipulate content data, such as windows, which act as content containers to hold display content data, and interactive interfaces that enable user interaction with the device, including status bars, navigation bars, toolbars, various button controls, input boxes, cursors, scroll bars, system pop-ups, dialog boxes, and other interface elements.

[0019] In operating systems like Android, display content data and system screen data are composited by the system compositor according to layer order to form complete display data. For example, Figure 2 In the video playback interface shown, the status bar, toolbar, button controls, and input boxes represent system screen data, while the video screen, images, and text represent display content data. The system screen data and display content data together constitute the display data.

[0020] In one scenario, display data from an electronic device can be obtained through the interface provided by the system display framework.

[0021] S102: Map the display data to a virtual display screen.

[0022] Virtual display is a virtual display device created by the operating system at the software level.

[0023] In one scenario, a virtual display is pre-created using the operating system's display manager, and a first flag is set for the virtual display. This first flag instructs the virtual display to use display data as its display content when no specific display content is specified. For example, the first flag could be `VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR`. When the first flag is enabled, and the virtual display has no specified display content (i.e., it is not bound to an independent display window, has no dedicated display content, is not associated with its own graphics buffer, or no application window is rendered onto the virtual display), the operating system mirrors the electronic device's display data to the virtual display.

[0024] Since the virtual display screen is an independent data channel, mapping display data to the virtual display screen can decouple the acquisition of display data from subsequent 3D rendering processing. The processing of display data in the virtual display screen will not affect the normal display of the main screen of the electronic device.

[0025] In one scenario, the size of the virtual display is set when creating the virtual display. This virtual display size can be the same as or different from the main screen size. When the virtual display size differs from the main screen size, the display data is scaled to fit the virtual display's resolution after acquisition. By setting a resolution independent of the electronic device's main screen, display data can be scaled during the acquisition phase, thereby reducing the computational load of subsequent 3D rendering.

[0026] S103: Perform 3D rendering based on the display data in the virtual display screen to generate a 3D image corresponding to the display data.

[0027] In one scenario, 3D rendering based on display data in a virtual display screen includes: performing depth inference on the display data in the virtual display screen to obtain the depth value corresponding to the display data, rendering the display data according to the depth value corresponding to the display data, and obtaining a 3D image corresponding to the display data.

[0028] Depth inference refers to predicting the depth value of each pixel in the displayed data using a depth estimation model. This depth estimation model can be a monocular depth estimation network (e.g., the Depth-Anything-V2 network). The depth values ​​corresponding to the displayed data include the depth value of each pixel; a larger depth value indicates that the object corresponding to that pixel is farther from the observer, and a smaller depth value indicates that the object corresponding to that pixel is closer to the observer.

[0029] In one scenario, the first depth value obtained from the most recent depth inference of the displayed data is acquired, and the current frame of the displayed data is rendered based on this first depth value to obtain the 3D image corresponding to the current frame. Specifically, for each frame of the displayed data, if a depth value is obtained through depth inference and then rendered based on that value, it increases data latency and cannot meet the requirements for real-time 3D content display. In this technical solution, for the current frame of the displayed data, the first depth value generated from the most recent depth inference of the displayed data is reused for rendering; that is, the depth value corresponding to one of the frames preceding the current frame of the displayed data is reused for rendering, which can reduce computational load and end-to-end latency. At the same time, since the depth changes between adjacent frames of the displayed data are relatively gradual, reusing the first depth value obtained from the most recent depth inference for rendering produces almost no perceptible difference visually.

[0030] In one scenario, the electronic device can perform depth inference on the displayed data at a set frequency and cache the obtained depth values. During rendering of each frame of the displayed data, the most recently generated depth value is read from the cache for rendering. The frequency of depth inference on the displayed data can be adjusted according to the real-time display effect. For example, when a significant change in the content of the displayed data is detected (such as scene switching, large-scale screen movement, etc.), the frequency of depth inference is increased, thereby improving the quality of the obtained 3D image.

[0031] In one scenario, after obtaining the depth value, disparity is calculated based on the depth value and display data to obtain the left-eye and right-eye views. For example, Depth-Image-Based Rendering (DIBR) technology can be used for disparity calculation. Specifically, the disparity value in the horizontal direction for each pixel is calculated based on the depth value. The disparity value refers to the horizontal position offset of the same physical point in the left-eye and right-eye views. The smaller the depth value, the larger the disparity value; the larger the depth value, the smaller the disparity value. After obtaining the disparity value for each pixel, each pixel is shifted horizontally to generate the left-eye and right-eye views respectively. For example, left-eye candidate views and right-eye candidate views are generated. For pixels in the left-eye candidate view, the pixel is shifted to the left or right by half the disparity value; for pixels in the right-eye candidate view, the pixel is shifted in the opposite direction by half the disparity value. Then, a hole-filling algorithm is used to process the empty areas in the left-eye and right-eye candidate views caused by pixel shifting. For example, the pixel value of the hole region can be set to the zero parallax position (i.e., the pixel value of the corresponding pixel in the display data) or to the pixel value of the far background. The left and right eye candidate views after the holes are filled are the left eye view and the right eye view, respectively.

[0032] After obtaining the left and right eye views, they are merged to obtain a 3D image. The merging can be done by placing the left eye view in the left half of the image and the right eye view in the right half, or by using a top-bottom format or a frame sequence format. The specific merging method depends on the input format supported by the 3D image display device.

[0033] In the above technical solution, parallax is calculated based on depth values ​​to generate left and right eye views with horizontal parallax, which are then synthesized into a three-dimensional image. This can make the output three-dimensional image have a realistic sense of stereoscopic effect and good viewing comfort.

[0034] S104: Output the three-dimensional image to the display screen for display.

[0035] In one scenario, the display screen is the screen of a 3D display device. This 3D display device can be an Augmented Reality (AR) display device, a Virtual Reality (VR) display device, a Mixed Reality (MR) display device, or a terminal device that supports glasses-free 3D display. The electronic device transmits 3D images to the 3D display device via wired or wireless means, and the 3D display device displays the 3D images.

[0036] In one scenario, the display screen is integrated into the electronic device (e.g., the display screen is the main screen of the electronic device) or connected to the electronic device. After generating a 3D image, the electronic device displays the 3D image on the display screen. In this case, the display screen of the electronic device can be a screen that supports glasses-free 3D display, directly presenting the 3D visual effect. Alternatively, the display screen of the electronic device may not support glasses-free 3D display, but the user can view the 3D stereoscopic effect of the main screen through accompanying optical devices (e.g., a VR headset).

[0037] In the above technical solution, by acquiring complete display data including display content data and system screen data, the display data is mapped to a virtual display screen. Based on the display data in the virtual display screen, 3D rendering is performed, thereby achieving overall 3D rendering of all display content of the electronic device (including various application interfaces, system desktop, status bar, pop-ups, etc.). Simultaneously, because the display data is processed on an independent virtual display screen, the 3D rendering process is isolated from the display channel of the electronic device's main screen, and will not affect the normal 2D display of the main screen.

[0038] The following is a detailed explanation of the steps involved in 3D rendering based on display data in this technical solution.

[0039] In this technical solution, a first thread and a second thread are used in parallel to perform 3D rendering on the display data in the virtual display screen to generate a 3D image corresponding to the display data. The first thread can be a graphics library thread (OpenGL thread, GL thread) used to render the display data based on depth values, and the second thread can be an inference thread (Worker thread) used to perform depth inference based on the display data to obtain depth values.

[0040] In one scenario, the first thread's execution flow is as follows: obtain display data from the virtual display screen, read the pixel data of the display data into the buffer area, read the depth value, render the display data based on the depth value, obtain the 3D image, and output it.

[0041] Specifically, within each display cycle, the first thread retrieves the current frame of display data from the virtual display. For example, the first thread binds the current frame of display data in the graphics buffer associated with the virtual display to an external texture. This external texture points to the graphics buffer of the current frame of display data stored in the GPU's video memory, making the display data accessible to the first thread in the form of an external texture. The display data is stored in the graphics buffer as pixel data. The first thread reads the pixel data of the current frame into the system's cache area based on the GPU's video memory graphics buffer pointed to by the external texture, for use by the second thread for depth inference.

[0042] In one scenario, if the external texture cannot be directly accessed by the first thread for pixel data, the first thread creates a Frame Buffer Object (FBO) and uses a blank texture as the color attachment point for that FBO (the FBO's associated texture). The resolution of the FBO's associated texture is the input resolution required by the depth estimation model for depth inference (e.g., 252×252 pixels). After the first thread binds the current frame of the display data to the external texture, it draws the external texture onto the FBO. During the drawing process, texture mapping automatically scales the image, thus scaling the display data to the target resolution. After drawing, the scaled display data is stored in the FBO's associated texture but remains in the GPU's video memory. The first thread then calls the glReadPixels interface to read the pixel data of the current frame from the currently bound FBO.

[0043] In one scenario, the buffer region is a Pixel Buffer Object (PBO). This buffer region comprises two PBOs, using a ping-pong double-buffering mechanism. One PBO is used by the GPU to write pixel data for the current frame, while the other PBO is used by the Central Processing Unit (CPU) to read pixel data from the previous frame. In this technical solution, the first thread calls the glReadPixels interface to have the GPU write the pixel data of the current frame into one PBO, while the second thread reads the pixel data of the previous frame from the other PBO, thereby reducing the transmission latency of pixel data from the GPU to the CPU.

[0044] After reading the pixel data of the current frame into the system's buffer area, the first thread reads the depth value from a preset depth value buffer, which is obtained by the second thread after the most recent depth inference. Based on the read depth value, the first thread uses DIBR technology to calculate the disparity value of each pixel in the pixel data in the horizontal direction, and then horizontally shifts the pixels according to the disparity value to generate left-eye and right-eye views respectively. For the hole areas caused by pixel shifting, a hole-filling algorithm is used to process them. Finally, the hole-filled left-eye and right-eye views are combined into a side-by-side stereoscopic image. After obtaining the 3D image, the first thread submits the 3D image to the display buffer associated with the display screen for display.

[0045] The second thread runs as follows: read pixel data from the cache area, preprocess the pixel data, perform depth inference on the preprocessed pixel data to obtain the initial depth value, perform at least one of time smoothing and edge clearing on the initial depth value to obtain the depth value, and store the depth value in the cache.

[0046] Specifically, the second thread reads the pixel data of the display data from the buffer area written by the first thread. Due to the ping-pong double buffering mechanism, the second thread reads the pixel data of the previous frame written by the first thread from one PBO, while the first thread writes the pixel data of the current frame to the other PBO. Therefore, the pixel data readback and depth inference can overlap in time without blocking each other, improving data processing efficiency.

[0047] The second thread preprocesses the pixel data after reading it. This preprocessing includes scaling the pixel data to the input resolution required by the depth estimation model (e.g., 252×252 pixels). This scaling can be achieved using algorithms such as bilinear interpolation or nearest neighbor interpolation. After scaling, the pixel value of each pixel is normalized, and the normalized data is formatted into a tensor format required by the depth estimation model. This preprocessed pixel data is then input into the depth estimation model, and the initial depth value is calculated through the model's forward propagation.

[0048] After obtaining the initial depth value, the second thread performs at least one of the following on the initial depth value: time smoothing and edge clearing.

[0049] In one scenario, temporal smoothing includes: using the initial depth value output by the depth estimation model as the first initial depth value for each pixel; and for each pixel, performing a weighted average of the first initial depth value and the previously calculated historical depth value to obtain the first target depth value for the pixel. The weighted average algorithm can be an Exponential Weighted Moving Average (EMA) algorithm. After obtaining the first target depth value for each pixel, these values ​​are arranged according to pixel position to obtain the depth values ​​corresponding to the display data. The previously calculated historical depth value refers to the depth value obtained after temporal smoothing of the pixel in the previous frame. This temporal smoothing process suppresses random noise and jitter generated by the depth estimation model during frame-by-frame inference. Simultaneously, by determining the depth value for each pixel through weighted averaging, the obtained depth value can promptly follow the movement of objects in the image, achieving a good balance between noise smoothing and maintaining motion response, and avoiding lag or ghosting of depth values ​​when the image changes.

[0050] In one scenario, edge clearing includes: using an initial depth value output by a depth estimation model or a temporally smoothed depth value as a second initial depth value; detecting the horizontal gradient of the second initial depth value; and determining the boundary region of the foreground image based on the horizontal gradient. Specifically, the foreground image is a region with relatively low depth in the image, for example, such as... Figure 3As shown, the person is the foreground image, and the scenery is the background image. The horizontal gradient refers to the rate of change of pixel values ​​in the horizontal direction, reflecting the degree of abrupt change in depth values ​​in the horizontal direction. The region where the horizontal gradient exceeds a preset threshold is the boundary region between the foreground and background images, i.e., the boundary region of the foreground image. Then, within the horizontal neighborhood of the boundary region of the foreground image, the maximum depth value (i.e., the depth value closest to the observer) is determined. The horizontal neighborhood refers to the region centered on a pixel in the boundary region of the foreground image, extending horizontally to the left and right by a certain pixel range (e.g., 3 to 5 pixels). For each pixel within the boundary region of the foreground image, the second initial depth value corresponding to the pixel is replaced with the maximum depth value to obtain the final depth value of that pixel, thereby achieving neighborhood expansion of the highlighted parts of the image.

[0051] By performing the edge cleanup process described above, the depth transition of the foreground edges can be made sharper, thereby eliminating ghosting, stripes, and torn holes that are generated at the foreground edges during subsequent rendering due to the depth values ​​of low-resolution pixels.

[0052] After obtaining the depth value, the second thread stores the depth value in a cache for the first thread to read and use during 3D rendering.

[0053] In the above technical solution, the second thread performs depth inference asynchronously in the background, and the first thread uses the depth value most recently generated by the second thread to render the current frame, so that the rendering of the display data is not limited by the duration of depth inference, thereby improving the refresh frame rate of the 3D image.

[0054] The following section will explain the three-dimensional content display method of this technical solution using a specific application scenario.

[0055] The user wears AR glasses, which are connected to a mobile phone. When the user activates the 3D display function on the mobile phone, the phone mirrors the display data from the main screen to the virtual display screen.

[0056] Then, the phone starts a first thread and a second thread in parallel. The first thread retrieves display data from the virtual display frame by frame at the phone screen's refresh rate (e.g., 60 frames per second), stores the display data in a cache area, and reads the most recently generated depth value from the cache. Based on this depth value, it performs 3D rendering on the display data using DIBR technology to generate a side-by-side stereoscopic 3D image containing left and right eye views. The 3D image is then output to the display screen of the AR glasses.

[0057] Meanwhile, the second thread reads display data from the cache area at a set frequency, performs preprocessing such as scaling and normalization on the display data, and inputs the preprocessed display data into the depth estimation model for depth inference to obtain the initial depth value corresponding to the display data. Then, the initial depth value is smoothed by pixel-wise exponentially weighted moving average over time and edge clearing is performed to obtain the depth value corresponding to the display data, which is then stored in the cache.

[0058] After the AR glasses receive a 3D image, the left eye display unit displays the left eye view, and the right eye display unit displays the right eye view, thus presenting a complete 3D effect of the displayed data.

[0059] The 3D content display method provided by this technical solution acquires display data, including display content data and system screen data, mirrors the display data to a virtual display screen, and performs 3D rendering on the display data in the virtual display screen. This achieves system-level 3D conversion of all display content on electronic devices, taking effect without any application adaptation. Furthermore, the physical separation of display data acquisition and 3D image display ensures that the normal 2D display of the main screen remains unaffected. Simultaneously, a dual-thread parallel architecture—where the first thread reuses the most recently obtained depth value from the second thread for frame-by-frame rendering, and the second thread asynchronously performs depth inference—improves the refresh rate of the 3D image. Additionally, after depth inference, the obtained depth values ​​undergo exponentially weighted temporal smoothing and edge-aware edge clearing, eliminating temporal jitter and spatial ghosting in the depth values ​​and improving the edge quality and stability of the 3D image.

[0060] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of this technical solution embodiment.

[0061] Figure 4 This is a schematic diagram of the structure of the electronic device provided in this embodiment of the technical solution.

[0062] like Figure 4 As shown, the electronic device of this embodiment includes: a processor 11, a memory 12, and a computer program 13 stored in the memory 12 and executable on the processor 11. When the processor 11 executes the computer program 13, it implements the steps described in the above-described three-dimensional content display method embodiment, for example... Figure 1 Steps S101 to S104 are shown.

[0063] For example, the computer program 13 can be divided into one or more modules / units, which are stored in the memory 12 and executed by the processor 11 to complete the present technical solution. The one or more modules / units can be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program 13 in the electronic device.

[0064] Those skilled in the art will understand that Figure 4 This is merely an example of an electronic device and does not constitute a limitation on the electronic device. It may include more or fewer components than illustrated, or combine certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.

[0065] The processor 11 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0066] The memory 12 can be an internal storage unit of the electronic device, such as a hard drive or RAM. The memory 12 can also be an external storage device of the electronic device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory 12 can include both internal and external storage units. The memory 12 is used to store the computer program and other programs and data required by the electronic device. The memory 12 can also be used to temporarily store data that has been output or will be output.

[0067] This technical solution also provides a computer program product, including a computer program that, when executed by a processor, implements the three-dimensional content display method as described in the above embodiments.

[0068] Those skilled in the art will understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the functions described above can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this technical solution. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0069] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0070] In the embodiments provided in this technical solution, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

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

[0072] Furthermore, in the various embodiments of this technical solution, the functional units can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0073] If an integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the implementation of all or part of the processes in the above-described embodiments can also be accomplished by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0074] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this technical solution.

[0075] The above-described embodiments are only used to illustrate the technical solutions of this technical solution, and are not intended to limit it. Although the technical solutions of this technical solution have been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this technical solution, and should all be included within the protection scope of this technical solution.

Claims

1. A method for displaying three-dimensional content, characterized in that, include: Acquire display data, which includes display content data and system screen data; Map the display data to a virtual display screen; Three-dimensional rendering is performed based on the display data in the virtual display screen to generate a three-dimensional image corresponding to the display data; The 3D image is output to the display screen for display.

2. The method according to claim 1, characterized in that, The step of performing 3D rendering based on the display data in the virtual display screen to generate a 3D image corresponding to the display data includes: Perform depth inference on the display data in the virtual display screen to obtain the depth value corresponding to the display data; The display data is rendered based on the depth value to obtain the three-dimensional image.

3. The method according to claim 2, characterized in that, The step of rendering the display data based on the depth value to obtain the three-dimensional image corresponding to the display data includes: Based on the first depth value, the current frame of the display data is rendered to obtain the three-dimensional image corresponding to the current frame. The first depth value is the depth value obtained from the most recent depth inference of the display data.

4. The method according to claim 2, characterized in that, The step of performing depth inference on the display data in the virtual display screen to obtain the depth value corresponding to the display data includes: Perform depth inference on the display data in the virtual display screen to obtain a first initial depth value corresponding to each pixel; For each pixel, the first initial depth value is weighted and averaged with the previously calculated historical depth value to obtain the depth value corresponding to the display data.

5. The method according to claim 2, characterized in that, The step of performing depth inference on the display data in the virtual display screen to obtain the depth value corresponding to the display data includes: Perform depth inference on the display data in the virtual display screen to obtain a second initial depth value; The boundary region of the foreground image is determined based on the second initial depth value; Determine the maximum depth value of the boundary region of the foreground image within its horizontal neighborhood; For each pixel within the boundary region of the foreground image, the second initial depth value corresponding to the pixel is replaced with the maximum depth value to obtain the depth value corresponding to the display data.

6. The method according to claim 2, characterized in that, The step of rendering the display data based on the depth value to obtain the three-dimensional image includes: Based on the depth value and the display data, parallax is calculated to obtain the left eye view and the right eye view; The left-eye view and the right-eye view are combined to obtain the three-dimensional image.

7. The method according to any one of claims 1 to 6, characterized in that, The step of performing 3D rendering based on the display data in the virtual display screen to generate a 3D image corresponding to the display data includes: The display data in the virtual display screen is rendered in three dimensions by a first thread and a second thread in parallel to generate a three-dimensional image corresponding to the display data; wherein, the first thread is used to render the display data based on the depth value, and the second thread is used to perform depth inference based on the display data to obtain the depth value.

8. The method according to claim 7, characterized in that, The first thread is also used to read the pixel data of the display data and store it in the cache area, and the second thread is used to read the pixel data of the display data from the cache area and perform deep inference based on the pixel data.

9. The method according to any one of claims 1 to 6, characterized in that, Before mapping the display data to the virtual display screen, the method further includes: The virtual display screen is created, and the virtual display screen has a first flag, which indicates that the virtual display screen will use the display data as the display content when no display content is specified.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 9.