Picture rendering method and device
The prediction model processes the inertial measurement data and current pose speed at the predicted moment to accurately determine the display pose at the display moment, which solves the problem of inaccurate rendering of XR devices and improves user experience.
Patent Information
- Application Number
- CN202310315799.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-28
- Publication Date
- 2024-10-01
AI Technical Summary
When existing XR devices render and display images, they are unable to accurately detect the user's head posture at future moments, resulting in inaccurate renderings, causing users to feel dizzy and affecting their experience.
By determining multiple predicted moments after the current moment, including intermediate moments and display moments, these moments are input into the pre-trained prediction model for prediction processing, the current pose and speed of the headset are obtained, and the display moment is determined based on the predicted inertial measurement data The display pose is displayed, and the virtual scene is rendered based on this.
It is possible to accurately determine the display position at the display moment, avoid users' dizziness, and improve user experience.
Smart Images

Figure CN118732818A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing, and more particularly to a method and device for rendering a picture. Background Art
[0002] XR (Extended Reality) devices include VR (Virtual Reality) devices, AR (Augmented Reality) devices, and MR (Mixed Reality) devices. Users wear XR devices and watch the images rendered by XR devices.
[0003] In actual use, XR devices need to render image data in advance so that they can display normally at the corresponding display time. In related technologies, the image data to be displayed at the future moment is usually rendered using the current posture to obtain a display screen. This method has the problem of inaccurate rendering of the display screen, which can cause users to feel dizzy and affect the user experience. Summary of the invention
[0004] The embodiments of the present disclosure provide a method and device for rendering an image to overcome the problem of low positioning accuracy of an optical tracker.
[0005] In a first aspect, an embodiment of the present disclosure provides a screen rendering method, which is applied to a head-mounted display device. The screen rendering method includes: determining multiple predicted moments after a current moment, the multiple predicted moments include multiple intermediate moments and a display moment, and the display moment is after the multiple intermediate moments; inputting the multiple predicted moments into a pre-trained prediction model for prediction processing to obtain multiple predicted inertial measurement data, and the predicted inertial measurement data corresponds one-to-one to the predicted moments; obtaining the current posture and current speed of the head-mounted display device, and determining the display posture at the display moment based on the current posture, current speed and multiple predicted inertial measurement data; rendering the virtual scene according to the display posture to obtain a display screen corresponding to the display moment.
[0006] In a second aspect, an embodiment of the present disclosure provides a picture rendering device, a first determining unit, configured to determine a plurality of predicted moments after a current moment, the plurality of predicted moments including a plurality of intermediate moments and a display moment, the display moment being after the plurality of intermediate moments;
[0007] A processing unit, used for inputting a plurality of prediction moments into a pre-trained prediction model for prediction processing, and obtaining a plurality of prediction inertial measurement data, wherein the prediction inertial measurement data corresponds to the prediction moments one by one;
[0008] a second determination unit, configured to obtain a current posture and a current speed of the head mounted display device, and determine a display posture at a display time according to the current posture, the current speed and a plurality of predicted inertial measurement data;
[0009] The rendering unit is used to render the virtual scene according to the display posture to obtain a display picture corresponding to the display moment.
[0010] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor and a memory;
[0011] Memory stores computer-executable instructions;
[0012] At least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the screen rendering method provided in the first aspect above.
[0013] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the screen rendering method provided in the first aspect above is implemented.
[0014] In a fifth aspect, according to one or more embodiments of the present disclosure, a computer program product is provided. The computer program product includes computer execution instructions. When a processor executes the computer execution instructions, the screen rendering method provided in the first aspect above is implemented.
[0015] The screen rendering method and device provided in this embodiment determine multiple predicted moments after the current moment, the multiple predicted moments include multiple intermediate moments and display moments, and the display moment is after the multiple intermediate moments; input the multiple predicted moments into a pre-trained prediction model for prediction processing to obtain multiple predicted inertial measurement data, and the predicted inertial measurement data correspond to the predicted moments one by one; obtain the current posture and current speed of the head-mounted display device, and determine the display posture at the display moment according to the current posture, current speed and multiple predicted inertial measurement data; render the virtual scene according to the display posture to obtain the display picture corresponding to the display moment, which can accurately determine the display posture at the display moment, and render the virtual scene based on the display posture to obtain the display picture accurately displayed at the display moment, thereby avoiding dizziness of the user when watching the picture and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0017] Figure 1 An example diagram of an application scenario provided by an embodiment of the present disclosure;
[0018] Figure 2 A flowchart of a method for rendering a picture provided by an embodiment of the present disclosure;
[0019] Figure 3 A schematic diagram of a model training process provided by an embodiment of the present disclosure;
[0020] Figure 4 A structural block diagram of a picture rendering device provided in an embodiment of the present disclosure;
[0021] Figure 5 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0023] The images displayed on the screen of the XR device require a lot of high-load pre-rendering. When the user wears the XR device, the user's head is always moving, so the image data needs to be rendered according to the posture of the user's head to reduce the user's dizziness when watching the picture. In addition, since the rendering process takes a certain amount of time, the image data needs to be rendered in advance. However, in the case of pre-rendering, the XR device cannot detect the user's head posture in the future, so the accuracy of the rendered picture cannot be guaranteed.
[0024] In the related art, the predicted posture at the future moment is obtained based on the current posture at the current moment and the current predicted inertial measurement data. However, this method assumes that the predicted inertial measurement data at the future moment is the same as the current predicted inertial measurement data. However, if the user is stationary at the current moment and moves at the future moment, the predicted posture obtained by this method is not accurate, which further causes the user to feel dizzy.
[0025] Based on the above problems, the screen rendering method and device provided by the present invention determine multiple predicted moments after the current moment, the multiple predicted moments include multiple intermediate moments and display moments, and the display moment is after the multiple intermediate moments; the multiple predicted moments are input into a pre-trained prediction model for prediction processing to obtain multiple predicted inertial measurement data, and the predicted inertial measurement data correspond to the predicted moments one by one; the current posture and current speed of the head-mounted display device are obtained, and the display posture at the display moment is determined according to the current posture, current speed and multiple predicted inertial measurement data; the virtual scene is rendered according to the display posture to obtain a display picture corresponding to the display moment, which can accurately determine the display posture at the display moment, and render the virtual scene based on the display posture to obtain a display picture accurately displayed at the display moment, thereby avoiding dizziness when the user watches the picture and improving the user experience.
[0026] refer to Figure 1 , Figure 1 This is an example diagram of an application scenario provided by an embodiment of the present disclosure. Figure 1 As shown, it includes: a user 11 and a head mounted display device 12, wherein the user 11 wears the head mounted display device 12, and the head mounted display device 12 can display images. When the user's head moves, the head mounted display device 12 can obtain the user's head posture and predict inertial measurement data (linear acceleration and inertial acceleration of head movement).
[0027] The above application scenario is only one of the scenario examples, and the embodiment of the present disclosure can be applied to any application scenario of a head-mounted display device.
[0028] refer to Figure 2 , is a flow chart of a screen rendering method provided by an embodiment of the present disclosure. Figure 2 As shown, the image rendering method is applied to a head mounted display device and specifically includes the following steps:
[0029] S201. Determine multiple predicted moments after the current moment.
[0030] In the present disclosure, a head-mounted display device is such as VR glasses.
[0031] The multiple predicted moments include multiple intermediate moments and a display moment, and the display moment is after the multiple intermediate moments. The multiple intermediate moments are between the current moment and the display moment, and the display moment refers to the last moment among the multiple predicted moments.
[0032] In the present disclosure, for example, if the current time is 9:00, then multiple predicted times are 9:00+1ms (milliseconds), 9:00+2ms, ..., 9:00+30ms, wherein multiple intermediate times are 9:00+1ms, 9:00+2ms, ..., 9:00+29ms, and the displayed time is 9:00+30ms.
[0033] The step of determining a plurality of predicted moments after the current moment includes: obtaining the display moment; and determining a plurality of intermediate moments between the current moment and the display moment.
[0034] Furthermore, obtaining the display time includes: obtaining the interval duration between the display time and the current time; and determining the display time according to the screen rendering duration and the current time.
[0035] In the present disclosure, the display time can be obtained first, that is, what needs to be predicted currently is the posture at the display time. Among them, the display time can be determined according to a preset method. Specifically, the interval duration of the advance rendering can be preset, and the current time plus the interval duration is the display time. For example, when the interval duration is 30ms, the posture of the display time (9:00+30ms) is predicted at 9:00 (current time), the posture of the display time (10:00+30ms) is predicted at 10:00, and the posture of the display time 11:00+30ms is predicted at 11:00. In addition, the display time can also be determined by other methods, which are not limited here.
[0036] Furthermore, multiple intermediate moments between the current moment and the displayed moment can be determined according to a preset unit interval. The difference between two adjacent intermediate moments is the preset unit interval, and the difference between the earliest intermediate moment and the current moment is also the preset unit interval. For example, the preset unit interval is 1ms, 2ms, or 3ms, which is not limited here. For example, if the current moment is 9:00 and the displayed moment is 9:00+30ms, the intermediate moments can be 9:00+1ms, 9:00+2ms, ..., 9:00+29ms.
[0037] Wherein, obtaining the interval duration between the display moment and the current moment includes: determining the virtual scene type; determining the interval duration according to the virtual scene type, and the virtual scene type and the interval duration have a preset corresponding relationship.
[0038] Specifically, for different virtual scene types, the time required for rendering the picture is different, and the interval time refers to the rendering of the display picture after the interval time starts at the current moment. For example, for scenes with a large amount of calculation, such as complex game scenes, the time required for picture rendering is longer, so it is necessary to start rendering earlier. For scenes with a low amount of calculation, such as image browsing, the time required for picture rendering is shorter, so it is not necessary to start rendering earlier. In the present disclosure, the correspondence between the interval time and the virtual scene type can be pre-set. For example, for game scenes, the corresponding interval time is 50ms. For video scenes, the corresponding interval time is 30ms. For image browsing scenes, the corresponding interval time is 20ms.
[0039] In an optional embodiment, obtaining the interval duration between the display moment and the current moment includes: obtaining a picture display frame rate; determining the interval duration according to the picture display frame rate, and the picture display frame rate is positively correlated with the interval duration.
[0040] In the present disclosure, the higher the frame rate, the greater the amount of calculation, and the longer the time required for screen rendering, so it is necessary to start rendering earlier. The lower the frame rate, the smaller the amount of calculation, and the shorter the time required for screen rendering, so it is not necessary to start rendering earlier. The present disclosure can predetermine the corresponding relationship between the screen display frame rate and the interval duration. For example: when the frame rate is greater than 60 frames / second, the interval duration is 50ms. When the frame rate is less than 60 frames / second and greater than 30 frames / second, the interval duration is 35ms. When the frame rate is less than 35ms, the interval duration is 25ms.
[0041] In an optional embodiment, obtaining the interval duration between the display time and the current time includes: obtaining the historical screen rendering duration within a preset historical time period; determining the interval duration based on the historical screen rendering duration, and the interval duration is greater than or equal to the historical screen rendering duration.
[0042] Specifically, it can be determined that the interval duration is greater than or equal to the average historical screen rendering duration, or it can be determined that the interval duration is greater than or equal to the longest historical screen rendering duration.
[0043] In an embodiment of the present application, the preset historical time period can be 1 second or 2 seconds, etc. For example, if 30 frames of images are displayed within 1 second before the current moment, the historical screen rendering time of each frame of the 30 frames of images is obtained, which are 30 historical screen rendering times of 20ms, 23ms, 19ms, etc. If the average value of the 30 historical screen rendering times is 21ms, it can be determined that the interval duration is greater than the average value 21ms, for example, it can be greater than the preset value, such as 2ms, then the interval duration is 23ms. Optionally, if the maximum value of the 30 historical screen rendering times is 28ms. It can be determined that the interval duration is equal to the maximum value 28ms.
[0044] In the present disclosure, the interval duration may be a default one or may be determined in other ways, which is not limited here. In addition, the present disclosure may first determine the display time of each frame of the image, and then render the image at the interval duration before the display time. Exemplarily, the interval duration is 30ms, and a frame of the image is displayed at 9:00+30ms. When the time reaches 9:00, the steps of the present disclosure are executed to complete the rendering of the image before 9:00+30ms.
[0045] The present disclosure can achieve accurate determination of the intermediate time between the display time and the current time at the current time, so as to subsequently determine the posture at the display time.
[0046] S202: Input multiple prediction moments into a pre-trained prediction model for prediction processing to obtain multiple predicted inertial measurement data.
[0047] Specifically, in the prediction model, multiple prediction moments are converted according to the moment sequence to obtain corresponding sequence identifiers. For example, the prediction moments are 9:00+1ms, 9:00+2ms, ..., 9:00+29ms, 9:00+30ms, then the corresponding sequence identifiers are 1, 2, 3, 4, ..., 30, where the prediction moments correspond one-to-one to the sequence identifiers.
[0048] Furthermore, the sequence identifier is processed by the prediction model to obtain the predicted inertial measurement data. The predicted inertial measurement data corresponds to the predicted time. For example, if the predicted time is 9:00+1ms, 9:00+2ms, ..., 9:00+29ms, 9:00+30ms, the predicted inertial measurement data of 9:00+1ms, the predicted inertial measurement data of 9:00+2ms, ..., the predicted inertial measurement data of 9:00+29ms, and the predicted inertial measurement data of 9:00+30ms are obtained.
[0049] In the present disclosure, the predicted inertial measurement data includes: angular velocity and linear acceleration. The predicted inertial measurement data at the current moment can be collected by using an IMU (Inertial Measurement Unit) of a head-mounted display device, wherein the IMU includes a gyroscope and a linear accelerometer, wherein the gyroscope can collect the angular velocity of the head-mounted display device, and the linear accelerometer can collect the linear acceleration of the head-mounted display device.
[0050] In addition, the prediction model in the present disclosure is a learning model, which can be implemented by at least one algorithm such as wavelet filtering algorithm, FFT (fast Fourier transform), Kalman (Kalman filtering algorithm), Wiener filtering, federal filtering, linear linear fitting, quadratic linear fitting, time series, SVM (Support Vector Machine), convolutional neural network, etc., without limitation.
[0051] In an embodiment of the present application, determining multiple predicted moments after the current moment also includes: acquiring multiple historical inertial measurement data; determining the historical moments corresponding to the historical inertial measurement data; determining multiple historical moments as input data of the prediction model, and multiple historical inertial measurement data as label data of the prediction model, training the prediction model, and obtaining a trained pre-model.
[0052] Specifically, the prediction model is a pre-trained model, that is, the prediction model can be trained in advance to obtain a pre-trained model, and then adjusted and trained in real time during use.
[0053] In the process of pre-training the prediction model, multiple inertial measurement data obtained from actual measurement are obtained. The multiple inertial measurement data have a time series. The multiple inertial measurement data are grouped to obtain multiple groups of inertial measurement data. The multiple groups of inertial measurement data are used as labels, and the time series are identified as the input of the model to perform pre-training of the prediction model. For example, multiple inertial measurement data within 1s to 2s are included, wherein each millisecond has an inertial measurement data, then 1s to 2s include 1000 inertial measurement data, and the 1000 inertial measurement data are divided into 200 groups, each group has 50 inertial measurement data, and the 50 inertial measurement data are used as labels. Then one pre-training is to input 1 to 50 into the prediction model, output the predicted inertial measurement data, and use the loss value of the predicted inertial measurement data and the label to adjust the pre-training model. The purpose of the pre-training process is to learn the changing relationship of the inertial measurement data in the time series.
[0054] Furthermore, during the use of the present disclosure, the pre-trained prediction model can be adjusted and trained in real time using historical inertial measurement data to obtain a trained prediction model for determining the predicted inertial measurement data at the display moment.
[0055] In an embodiment of the present application, historical inertial measurement data can also be used to directly train a prediction model to obtain a trained prediction model for determining the predicted inertial measurement data at the display moment. The present application does not limit the training method of the prediction model.
[0056] For example, refer to Figure 3 , the current time is T, and the image display time is (T+K), then the historical time segment can be Tn to T, where n is an integer greater than or equal to 1. Among them, the historical inertial measurement data between Tn, T-(n-1), ... to T can be used to adjust the training prediction model. For example, if T is 9:00 and n is 30ms, 9:00-29ms, 9:00-28ms, 9:00-27ms, ..., T are used as input, and the corresponding historical inertial measurement data are used as label data to adjust the training of the prediction model. The adjusted prediction model can be used to predict the subsequent predicted inertial measurement data from the current time to the display time.
[0057] In the embodiment of the present application, the predicted inertial measurement data at a future time can be accurately predicted.
[0058] S203, obtaining a current posture and a current speed of the head mounted display device, and determining a display posture at a display time according to the current posture, the current speed and a plurality of predicted inertial measurement data.
[0059] In an optional embodiment, the display posture at the display time is determined based on the current posture and current speed by using an integral operation method. For example, if the current time is 9:00, the posture and speed at 9:00 are obtained, and the posture and speed at 9:00 and the predicted inertial measurement data at 9:00+1ms can be used to determine the posture A and speed a at 9:00+1ms, and the posture A and speed a and the predicted inertial measurement data at 9:00+2ms can be used to determine the posture B and speed b at 9:00+3ms, and so on to determine the posture at 9:00+30ms.
[0060] Furthermore, the display posture at the display moment is determined according to the current posture, current speed and multiple predicted inertial measurement data, including: acquiring the current inertial measurement data; using an integral operation method to integrate the current posture and current speed according to multiple predicted inertial measurement data and the current inertial measurement data to obtain the display posture.
[0061] In another optional embodiment, the predicted inertial measurement data includes: angular velocity and linear acceleration, and an integral operation method is used to integrate the current posture and current speed according to multiple predicted inertial measurement data and current inertial measurement data to obtain a display posture, including: obtaining a preset angular velocity deviation and linear velocity deviation; an integral operation method is used to integrate the current posture and current speed according to multiple predicted inertial measurement data, angular velocity deviation and linear velocity deviation, and current inertial measurement data to obtain a display posture.
[0062] Furthermore, the movement speed of the head mounted display device at the display moment can also be obtained.
[0063] Among them, the angular velocity deviation and the linear velocity deviation are preset. The angular velocity deviation and the linear velocity deviation can be added in each calculation. Exemplarily, if the current time is 9:00, the posture at 9:00 is obtained, and the posture and speed at 9:00 and the predicted inertial measurement data of 9:00+1ms as well as the angular velocity deviation and the linear velocity deviation can be used to determine the posture C and speed c at 9:00+1ms, and the posture C and speed c and the predicted inertial measurement data of 9:00+2ms as well as the angular velocity deviation and the linear velocity deviation can be used to determine the posture D and speed d at 9:00+3ms, and so on to determine the posture at 9:00+30ms. Among them, the additional speed refers to the movement and / or rotation speed of the head-mounted display device.
[0064] In the embodiment of the present application, by using integral operation and taking into account the angular velocity deviation and the linear velocity deviation, the display posture at the display moment can be determined more accurately.
[0065] S204: Render the virtual scene according to the display posture to obtain a display picture corresponding to the display time.
[0066] The present disclosure predicts the display posture at the display moment, and adopts the display posture to render the virtual scene to be displayed at the display moment, so that the GPU (graphics processing unit, graphics renderer) can accurately render the virtual scene to be displayed in the future or the part to be displayed in the future of the current virtual scene in advance, so that the rendered picture reduces the dizziness of the user's eyes after observing.
[0067] The screen rendering method and device provided in this embodiment determine multiple predicted moments after the current moment, the multiple predicted moments include multiple intermediate moments and display moments, and the display moment is after the multiple intermediate moments; input the multiple predicted moments into a pre-trained prediction model for prediction processing to obtain multiple predicted inertial measurement data, and the predicted inertial measurement data correspond to the predicted moments one by one; obtain the current posture and current speed of the head-mounted display device, and determine the display posture at the display moment according to the current posture, current speed and multiple predicted inertial measurement data; render the virtual scene according to the display posture to obtain the display picture corresponding to the display moment, which can accurately determine the display posture at the display moment, and render the virtual scene based on the display posture to obtain the display picture accurately displayed at the display moment, thereby avoiding dizziness of the user when watching the picture and improving the user experience.
[0068] Corresponding to the picture rendering method of the above embodiment, Figure 4 FIG. 4 is a structural block diagram of a picture rendering device 40 provided in an embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. Figure 4 As shown, the picture rendering device 40 specifically includes: a first determination unit 401, a processing unit 402, a second determination unit 403 and a rendering unit 404, wherein:
[0069] A first determining unit 401 is used to determine a plurality of predicted moments after the current moment, the plurality of predicted moments including a plurality of intermediate moments and a display moment, the display moment being after the plurality of intermediate moments;
[0070] The processing unit 402 is used to input the multiple prediction moments into the pre-trained prediction model for prediction processing to obtain multiple prediction inertial measurement data, where the prediction inertial measurement data corresponds to the prediction moments one by one;
[0071] The second determination unit 403 is used to obtain the current posture and current speed of the head mounted display device, and determine the display posture at the display time according to the current posture, current speed and a plurality of predicted inertial measurement data;
[0072] The rendering unit 404 is used to render the virtual scene according to the display posture to obtain a display picture corresponding to the display time.
[0073] In some embodiments, a training unit (not shown) is also included. The training unit is specifically used to obtain multiple historical inertial measurement data before determining multiple predicted moments after the current moment; determine the historical moments corresponding to the historical inertial measurement data; determine the multiple historical moments as input data of the prediction model, and the multiple historical inertial measurement data as label data of the prediction model, train the prediction model, and obtain a trained pre-model.
[0074] In some embodiments, the second determination unit 403 is specifically used to: obtain current inertial measurement data; and integrate the current posture and current speed according to multiple predicted inertial measurement data and current inertial measurement data using an integral operation method to obtain a display posture.
[0075] In some embodiments, the predicted inertial measurement data includes: angular velocity and linear acceleration, and the second determination unit 403 is specifically used to: obtain preset angular velocity deviation and linear velocity deviation; use an integral operation method to integrate the current posture and current velocity according to multiple predicted inertial measurement data, angular velocity deviation and linear velocity deviation, and current inertial measurement data to obtain a display posture.
[0076] In some embodiments, the first determining unit 401 is specifically configured to obtain the display time; and determine a plurality of intermediate times between the current time and the display time.
[0077] In some embodiments, when acquiring the display time, the first determination unit 401 is specifically used to acquire the interval duration between the display time and the current time; and determine the display time according to the screen rendering duration and the current time.
[0078] In some embodiments, when acquiring the interval duration between the display moment and the current moment, the first determination unit 401 is specifically used to determine the virtual scene type; the interval duration is determined according to the virtual scene type, and the virtual scene type and the interval duration have a preset corresponding relationship.
[0079] In some embodiments, when obtaining the interval duration between the display moment and the current moment, the first determination unit 401 is specifically used to obtain the screen display frame rate; the interval duration is determined according to the screen display frame rate, and the screen display frame rate is positively correlated with the interval duration.
[0080] In some embodiments, when obtaining the interval duration between the display time and the current time, the first determination unit 401 is specifically used to obtain the historical screen rendering duration within a preset historical time period; based on the historical screen rendering duration, the interval duration is determined, and the interval duration is greater than or equal to the historical screen rendering duration.
[0081] The screen rendering device provided in this embodiment can be used to execute the technical solution of the embodiment of the above-mentioned screen rendering method. Its implementation principle and technical effect are similar, and this embodiment will not be repeated here.
[0082] refer to Figure 5 , which shows a schematic diagram of the structure of an electronic device 50 suitable for implementing the embodiment of the present disclosure, and the electronic device 50 may be a terminal device or a server. The terminal device may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0083] like Figure 5 As shown, the electronic device 50 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 51, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 52 or a program loaded from a storage device 58 to a random access memory (RAM) 53. Various programs and data required for the operation of the electronic device 50 are also stored in the RAM 53. The processing device 51, the ROM 52, and the RAM 53 are connected to each other via a bus 54. An input / output (I / O) interface 55 is also connected to the bus 54.
[0084] Typically, the following devices may be connected to the I / O interface 55: input devices 56 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 57 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 58 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 59. The communication device 59 may allow the electronic device 50 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 The electronic device 50 is shown with various devices, but it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or have instead.
[0085] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 59, or installed from the storage device 58, or installed from the ROM 52. When the computer program is executed by the processing device 51, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0086] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0087] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0088] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.
[0089] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0090] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a unit, a program segment or a part of a code, and the unit, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0091] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, constitute a limitation on the unit itself.
[0092] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: Field Programmable Gate Array (FPGA), Application Specific Integrated Circuit (ASIC), Application Specific Standard Parts (ASSP), System on Chip (SOC), Complex Programmable Logic Device (CPLD), etc.
[0093] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM, Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM, Compact Disc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0094] In a first aspect, according to one or more embodiments of the present disclosure, a screen rendering method is provided, which is applied to a head-mounted display device, and the screen rendering method includes: determining multiple predicted moments after a current moment, the multiple predicted moments include multiple intermediate moments and a display moment, and the display moment is after the multiple intermediate moments; inputting the multiple predicted moments into a pre-trained prediction model for prediction processing to obtain multiple predicted inertial measurement data, and the predicted inertial measurement data corresponds one-to-one to the predicted moments; obtaining the current posture and current speed of the head-mounted display device, and determining the display posture at the display moment based on the current posture, current speed and multiple predicted inertial measurement data; rendering the virtual scene according to the display posture to obtain a display screen corresponding to the display moment.
[0095] According to one or more embodiments of the present disclosure, determining multiple predicted moments after the current moment also includes: acquiring multiple historical inertial measurement data; determining the historical moments corresponding to the historical inertial measurement data; determining the multiple historical moments as input data of the prediction model, the multiple historical inertial measurement data as label data of the prediction model, training the prediction model, and obtaining a trained prediction model.
[0096] According to one or more embodiments of the present disclosure, the display posture at the display moment is determined according to the current posture, the current speed and multiple predicted inertial measurement data, including: acquiring the current inertial measurement data; using an integral operation method to integrate the current posture and the current speed according to the multiple predicted inertial measurement data and the current inertial measurement data to obtain the display posture.
[0097] According to one or more embodiments of the present disclosure, the predicted inertial measurement data includes: angular velocity and linear acceleration. An integral operation method is used to integrate the current posture and current speed according to multiple predicted inertial measurement data and current inertial measurement data to obtain a display posture, including: obtaining a preset angular velocity deviation and linear velocity deviation; an integral operation method is used to integrate the current posture and current speed according to multiple predicted inertial measurement data, the angular velocity deviation and the linear velocity deviation, and the current inertial measurement data to obtain a display posture.
[0098] According to one or more embodiments of the present disclosure, determining a plurality of predicted moments after a current moment includes: acquiring a display moment; and determining a plurality of intermediate moments between the current moment and the display moment.
[0099] According to one or more embodiments of the present disclosure, obtaining the display time includes: obtaining the interval duration between the display time and the current time; and determining the display time according to the screen rendering duration and the current time.
[0100] According to one or more embodiments of the present disclosure, obtaining the interval duration between the display moment and the current moment includes: determining the virtual scene type; determining the interval duration according to the virtual scene type, and the virtual scene type and the interval duration have a preset corresponding relationship.
[0101] According to one or more embodiments of the present disclosure, obtaining the interval duration between the display moment and the current moment includes: obtaining the screen display frame rate; determining the interval duration according to the screen display frame rate, and the screen display frame rate is positively correlated with the interval duration.
[0102] According to one or more embodiments of the present disclosure, obtaining the interval duration between the display moment and the current moment includes: obtaining the historical screen rendering duration within a preset historical time period; determining the interval duration based on the historical screen rendering duration, and the interval duration is greater than or equal to the historical screen rendering duration.
[0103] In a second aspect, according to one or more embodiments of the present disclosure, a picture rendering device is provided, including:
[0104] A first determining unit, configured to determine a plurality of predicted moments after the current moment, the plurality of predicted moments including a plurality of intermediate moments and a display moment, the display moment being after the plurality of intermediate moments;
[0105] A processing unit, used for inputting a plurality of prediction moments into a pre-trained prediction model for prediction processing, and obtaining a plurality of prediction inertial measurement data, wherein the prediction inertial measurement data corresponds to the prediction moments one by one;
[0106] a second determination unit, configured to obtain a current posture and a current speed of the head mounted display device, and determine a display posture at a display time according to the current posture, the current speed and a plurality of predicted inertial measurement data;
[0107] The rendering unit is used to render the virtual scene according to the display posture to obtain a display picture corresponding to the display moment.
[0108] In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: at least one processor and a memory;
[0109] Memory stores computer-executable instructions;
[0110] At least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the screen rendering method provided in the first aspect above.
[0111] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the screen rendering method provided in the first aspect above is implemented.
[0112] In a fifth aspect, according to one or more embodiments of the present disclosure, a computer program product is provided. The computer program product includes computer execution instructions. When a processor executes the computer execution instructions, the screen rendering method provided in the first aspect above is implemented.
[0113] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0114] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0115] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A picture rendering method, applied to a head mounted display device, the picture rendering method comprising: Determine a plurality of predicted moments after the current moment, the plurality of predicted moments including a plurality of intermediate moments and a display moment, the display moment being after the plurality of intermediate moments; Inputting the plurality of prediction moments into a pre-trained prediction model for prediction processing to obtain a plurality of prediction inertial measurement data, wherein the prediction inertial measurement data corresponds one-to-one to the prediction moments; Acquire a current posture and a current speed of the head mounted display device, and determine a display posture at a display time according to the current posture, the current speed and the plurality of predicted inertial measurement data; The virtual scene is rendered according to the display posture to obtain a display picture corresponding to the display moment.
2. The screen rendering method according to claim 1, wherein the determining of a plurality of predicted moments after the current moment further comprises: Acquire multiple historical inertial measurement data; Determining a historical moment corresponding to the historical inertial measurement data; Determine the multiple historical moments as input data of the prediction model, the multiple historical inertial measurement data as label data of the prediction model, train the prediction model, and obtain a trained prediction model.
3. The screen rendering method according to claim 1, wherein determining the display posture at the display time according to the current posture, the current speed and the plurality of predicted inertial measurement data comprises: Get current inertial measurement data; The current posture and the current speed are integrated according to the plurality of predicted inertial measurement data and the current inertial measurement data to obtain the display posture.
4. The image rendering method according to claim 3, wherein the predicted inertial measurement data comprises: angular velocity and linear acceleration, wherein the current posture and current velocity are integrated according to the plurality of predicted inertial measurement data and the current inertial measurement data to obtain the display posture, including: Get the preset angular velocity deviation and linear velocity deviation; The display posture is obtained by integrating the current posture and the current speed according to the multiple predicted inertial measurement data, the angular velocity deviation, the linear velocity deviation, and the current inertial measurement data.
5. The screen rendering method according to any one of claims 1 to 4, wherein the step of determining a plurality of predicted moments after the current moment comprises: Obtaining the display time; A plurality of intermediate times between the current time and the display time are determined.
6. The screen rendering method according to claim 5, wherein obtaining the display time comprises: Get the interval between the displayed time and the current time; The display time is determined according to the interval duration and the current time.
7. The image rendering method according to claim 6, wherein the step of obtaining the interval between the display time and the current time comprises: Determine the type of virtual scene; The interval duration is determined according to the virtual scene type, and the virtual scene type and the interval duration have a preset corresponding relationship.
8. The image rendering method according to claim 6, wherein the step of obtaining the interval between the display time and the current time comprises: Get the screen display frame rate; The interval duration is determined according to the picture display frame rate, and the picture display frame rate is positively correlated with the interval duration.
9. The image rendering method according to claim 6, wherein the step of obtaining the interval between the display time and the current time comprises: Get the historical image rendering duration within the preset historical time period; The interval duration is determined according to the historical screen rendering duration, and the interval duration is greater than or equal to the historical screen rendering duration.
10. A picture rendering device, comprising: A first determining unit, configured to determine a plurality of predicted moments after a current moment, wherein the plurality of predicted moments include a plurality of intermediate moments and a display moment, and the display moment is after the plurality of intermediate moments; A processing unit, configured to input the plurality of prediction moments into a pre-trained prediction model for prediction processing, and obtain a plurality of prediction inertial measurement data, wherein the prediction inertial measurement data corresponds one-to-one to the prediction moments; a second determination unit, configured to obtain a current posture and a current speed of the head mounted display device, and determine a display posture at a display moment according to the current posture, the current speed and the plurality of predicted inertial measurement data; A rendering unit is used to render the virtual scene according to the display posture to obtain a display picture corresponding to the display moment.
11. An electronic device, comprising: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the screen rendering method according to any one of claims 1 to 9.
12. A computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when a processor executes the computer-executable instructions, the image rendering method according to any one of claims 1 to 9 is implemented.
Citation Information
Cited By
Smooth prediction method, device and system for positioning data of medical rescue
CN121070180A
Simulation control method and device, equipment and storage medium
CN121143679A
Simulation control method and device, equipment and storage medium
CN121143679B
