Image processing method, device, system and server
By directly calculating inter-frame motion vectors and using rendering perspective information for image rendering and compression, the problem of time-consuming and uncertain motion vector estimation in the existing technology is solved, and the image clarity and fluency of cloud rendering are improved.
Patent Information
- Application Number
- CN202010472745.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-29
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2040-05-29
AI Technical Summary
In existing cloud rendering technology, the motion vector estimation process based on image block search is time-consuming and highly uncertain, resulting in a decrease in the clarity and smoothness of the compressed rendered image.
By obtaining the rendering perspective information of the current frame and the previous frame, the motion vector between frames is directly calculated, and the model data is used for image rendering and coding compression to avoid image block search and matching.
It saves motion vector estimation time, improves rendering image compression efficiency, ensures the reliability and accuracy of motion vectors, and improves the clarity and smoothness of the display screen.
Smart Images

Figure CN111583350B
Abstract
Description
Technical Field
[0001] The present application mainly relates to the field of virtual reality applications, and more specifically to an image processing method, device, system and server. Background Art
[0002] Nowadays, with the development and popularization of 5G networks (fifth-generation mobile communication networks), AR (Augmented Reality) devices / VR (Virtual Reality) devices can use cloud rendering technology to render images of complex models (i.e. 3D models of objects to be rendered, such as monsters and buildings in game scenes), so that the wearer of the device can see the detailed information of the complex model in real time, improving the user experience.
[0003] Among them, cloud rendering technology is to render the 3D program in a remote server. The user initiates a control command through the terminal, the server responds to the control command, executes the corresponding rendering task, and then feeds back the rendered image to the user terminal for display.
[0004] In actual applications, in order to meet the real-time display requirements of the device, in the current cloud rendering process, after obtaining the rendered image of any frame, the rendered image needs to be compressed before being transmitted to the device. Specifically, a video compression method is usually used to achieve the compression and real-time transmission of the rendered image obtained by continuous frame rendering.
[0005] However, after obtaining the rendered image of the current frame, the prior art usually adopts an image block search method to estimate the motion vectors of the rendered image of the previous frame and the rendered image of the current frame to obtain the motion vector information of the current frame, and then implements encoding and compression of the rendered image based on the motion vector information. The motion vector estimation process is very time-consuming, and the obtained motion vector information is often not the optimal motion vector of the current frame, which will cause a certain loss in the compressed rendered image, thereby reducing the clarity of the picture displayed after the device is decompressed. Summary of the invention
[0006] In view of this, in order to solve the above technical problems, this application provides the following technical solutions:
[0007] On the one hand, the present application proposes an image processing method, the method comprising:
[0008] Obtaining first rendering perspective information of a current frame for an object to be rendered;
[0009] Retrieving second rendering perspective information of a previous frame of the object to be rendered;
[0010] According to the first rendering perspective information, image rendering is performed using the model data of the object to be rendered to obtain a rendered image of the current frame;
[0011] In a process of performing image rendering using the model data, obtaining a motion vector of a rendered image of a current frame relative to a rendered image of a previous frame using the first rendering perspective information and the second rendering perspective information;
[0012] The motion vector is used to encode and compress the rendered image of the current frame, and a compressed rendered image is output.
[0013] Optionally, the obtaining, by using the first rendering perspective information and the second rendering perspective information, a motion vector of the rendered image of the current frame relative to the rendered image of the previous frame includes:
[0014] Using the first rendering perspective information and the second rendering perspective information, obtaining offset information between a two-dimensional projection point of a current frame and a two-dimensional projection point of a previous frame when the model data is projected onto a two-dimensional plane;
[0015] A motion vector of the rendered image of the current frame relative to the rendered image of the previous frame is determined according to the offset information.
[0016] Optionally, the using the first rendering perspective information and the second rendering perspective information to obtain offset information between a two-dimensional projection point of a current frame and a two-dimensional projection point of a previous frame when the model data is projected onto a two-dimensional plane includes:
[0017] Comparing the first rendering perspective information with the second rendering perspective information to obtain a rendering perspective change between a current frame and a previous frame;
[0018] Acquire a first position of a two-dimensional projection point projected onto a two-dimensional plane by the model data during a process of rendering a current frame image using the model data;
[0019] Retrieving a second position of a two-dimensional projection point projected onto a two-dimensional plane by the model data during a process of rendering a previous frame of image using the model data;
[0020] The offset information between the first position and the second position is obtained according to the rendering viewing angle change.
[0021] Optionally, the method further includes:
[0022] In a process of performing image rendering using the model data or compressing the rendered image of the current frame, obtaining third rendering perspective information of a next frame of the object to be rendered;
[0023] Based on the third rendering perspective information, the model data is used to perform image rendering to obtain the rendered image of the next frame, and in the process of using the model data to render the next frame of image, the first rendering perspective information and the third rendering perspective information are used to obtain the motion vector of the rendered image of the next frame relative to the rendered image of the current frame.
[0024] Optionally, the method further includes:
[0025] The first rendering perspective information obtained is associated with the frame information of the current frame and stored;
[0026] The retrieving the second rendering perspective information of the previous frame of the object to be rendered includes:
[0027] From the rendering perspective information respectively stored in association with at least one historical frame, second rendering perspective information stored in association with the frame information of a previous frame of the current frame is retrieved.
[0028] Optionally, performing image rendering using model data of the object to be rendered according to the first rendering perspective information to obtain a rendered image of the current frame includes:
[0029] Acquire, from the model data of the object to be rendered, the data to be rendered corresponding to the first rendering perspective information;
[0030] The image rendering is performed using the data to be rendered to obtain a rendered image of the current frame.
[0031] On the other hand, the present application also proposes an image processing device, the device comprising:
[0032] An information acquisition module, used to acquire first rendering perspective information of a current frame of an object to be rendered;
[0033] An information retrieving module, used to retrieve the second rendering perspective information of the previous frame of the object to be rendered;
[0034] An image rendering module, configured to perform image rendering using the model data of the object to be rendered according to the first rendering perspective information, to obtain a rendered image of a current frame;
[0035] A motion vector obtaining module, used to obtain a motion vector of a rendered image of a current frame relative to a rendered image of a previous frame by using the first rendering perspective information and the second rendering perspective information during a process in which the image rendering module performs image rendering by using the model data;
[0036] The coding and compression module is used to use the motion vector to perform coding and compression on the rendered image of the current frame, and output the compressed rendered image.
[0037] On the other hand, the present application also proposes a server, comprising:
[0038] Communication module;
[0039] A memory, used for storing a program for implementing the above-mentioned image processing method;
[0040] The processor is used to load and execute the program stored in the memory to implement the steps of the above-mentioned image processing method.
[0041] In yet another aspect, the present application further provides an image processing system, the system comprising at least one electronic device and at least one server;
[0042] The electronic device is used to obtain rendering perspective information corresponding to each of a plurality of consecutive frames of an object to be rendered when a user wears the electronic device;
[0043] The server is the above-mentioned server.
[0044] Optionally, the electronic device includes multiple types of sensors, and the multiple types of sensors are used to sense different degrees of freedom spatial postures of the electronic device to obtain rendering perspective information of corresponding frames.
[0045] It can be seen that compared with the prior art, the present application provides an image processing method, device, system and server. After the server obtains the first rendering perspective information of the current frame, it directly retrieves the second rendering perspective information of the previous frame, and based on the first rendering perspective information, uses the model data of the object to be rendered to render the image, and obtains the rendered image of the current frame. At the same time, the first rendering perspective information and the second rendering perspective information are directly used to obtain the motion vector of the rendered image of the current frame relative to the rendered image of the previous frame, so as to use the motion vector to complete the encoding compression of the rendered image of the current frame and output the compressed rendered image. Compared with the prior art, it greatly saves a lot of time consumed by estimating the motion vector based on the image block search, improves the compression efficiency of the rendered image, and also solves the uncertainty caused by the image block search matching method, ensures the reliability and accuracy of the obtained motion vector, avoids the loss of the compressed rendered image, and improves the clarity and smoothness of the picture displayed by the electronic device after decompression. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0047] Figure 1 A schematic diagram of the structure of an optional image processing system for implementing the image processing method proposed in this application is shown;
[0048] Figure 2 A flow chart of a cloud rendering application scenario is shown;
[0049] Figure 3 A schematic flow chart of an optional example of the image processing method proposed in the present application is shown;
[0050] Figure 4 A schematic diagram of a flow chart of an existing image processing method is shown;
[0051] Figure 5 A schematic flow chart showing another optional example of the image processing method proposed in the present application;
[0052] Figure 6 A schematic flow chart showing another optional example of the image processing method proposed in the present application;
[0053] Figure 7 A schematic flow chart showing another optional example of the image processing method proposed in the present application;
[0054] Figure 8 A schematic structural diagram of an optional example of the image processing device proposed in the present application is shown;
[0055] Fig. 9 A schematic structural diagram showing another optional example of the image processing device proposed in the present application;
[0056] Fig.10 A schematic diagram of the hardware structure of an optional example of a server for implementing the image processing method proposed in the present application is shown. DETAILED DESCRIPTION
[0057] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0058] It should be noted that, for ease of description, only the parts related to the relevant invention are shown in the drawings. In the absence of conflict, the embodiments in this application and the features in the embodiments can be combined with each other. Moreover, the "system", "device", "unit" and / or "module" used in this application are a method for distinguishing different components, elements, parts, parts or assemblies at different levels, and other expressions can also be used to replace the word if other words can achieve the same purpose.
[0059] As shown in this application and claims, unless the context clearly indicates an exception, the words "a", "an", "a kind" and / or "the" do not refer to the singular, but also include the plural. Generally speaking, the terms "include" and "comprise" only indicate the inclusion of clearly identified steps and elements, and these steps and elements do not constitute an exclusive list. The method or device may also include other steps or elements. The elements defined by the sentence "includes a..." do not exclude the existence of other identical elements in the process, method, commodity or device that includes the elements.
[0060] Among them, in the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" refers to two or more than two. The following terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features.
[0061] In addition, flow charts are used in the present application to illustrate the operations performed by the system according to the embodiments of the present application. It should be understood that the preceding or following operations are not necessarily performed accurately in order. On the contrary, the various steps may be processed in reverse order or simultaneously. At the same time, other operations may also be added to these processes, or a certain step or several steps of operations may be removed from these processes.
[0062] Reference Figure 1 , is a schematic diagram of the structure of an optional image processing system for implementing the image processing method proposed in this application, and the image processing system can be applied to various cloud rendering application scenarios, such as Figure 1 As shown, the system may include at least one electronic device 100 and at least one server 200, wherein:
[0063] The electronic device 100 can be used to obtain rendering perspective information corresponding to multiple consecutive frames of an object to be rendered when a user wears the electronic device.
[0064] In this embodiment, the electronic device 100 may include various types of AR (Augmented Reality) devices, VR (Virtual Reality) devices, etc., such as VR smart glasses, helmets, handles, etc. This application does not limit the specific device type of the electronic device 100. For different users, the electronic device used to view the objects to be rendered in the virtual scene can be determined according to actual needs, usage habits, etc., and this application does not describe them in detail.
[0065] The server 200 may be a service device that supports cloud computing and implements cloud rendering, that is, a cloud server deployed in the cloud, which may be composed of one or more servers. The present application does not limit the specific composition structure of the server 200. In the present application, it may execute the image processing method and device proposed in the embodiments below of the present application, and the specific implementation process may refer to the description of the corresponding part of the embodiments below.
[0066] In practical applications, in order to improve the interactive experience and control of the virtual world, in the cloud rendering application scenario, refer to Figure 2 The flowchart of the cloud rendering application scenario shown usually requires the electronic device 100 to collect rendering perspective information at different times and send it to the server 200. The server 200 uses the model data to render the image based on the rendering perspective information, and obtains the rendered image of the model of the object to be rendered under the rendering perspective. After compression, it is fed back to the electronic device 100, and the electronic device 100 then decompresses the compressed rendering image and displays it.
[0067] Among them, the rendering perspective information collected by the electronic device 100 at different times can be a multi-degree of freedom (dof) spatial posture, such as 3dof spatial posture, 6dof spatial posture, etc. 3dof can refer to the degrees of freedom of three rotation angles, such as the rotation of the head of a user wearing an electronic device in different directions, but it cannot detect the spatial displacement of the head in the front, back, left and right directions, and can be suitable for application scenarios of watching VR movies; 6dof can be based on 3dof, adding the changes in up, down, front, back, left and right movements brought about by the body movement of the user wearing the electronic device, which can better realize the tracking and positioning of the user. For example, in game application scenarios, it can enable the user of the electronic device to interact in scenes such as crossing obstacles, avoiding monsters, and climbing mountains, and get a more real and immersive experience.
[0068] Based on this, the electronic device 100 may include multiple types of sensors for sensing the spatial postures of the electronic device 100 with different degrees of freedom to form rendering perspective information of the corresponding frame. The specific detection process of the rendering perspective information will not be described in detail.
[0069] In this embodiment, in order to improve the efficiency of cloud rendering, it is proposed to merge the rendering process of a frame of rendered image and the motion vector calculation process between the frame and the adjacent frame, and directly use the rendering perspective information obtained from the two adjacent frames to calculate the motion vector. Compared with the prior art that takes a lot of time to perform image block search on the rendered images obtained by rendering the two adjacent frames, and then estimates the motion vector based on the image block search results, the running vector calculation efficiency is greatly improved, thereby speeding up the compression speed of each frame of rendered image, and achieving the purpose of improving the model rendering efficiency. The specific implementation process can refer to the description of the corresponding part of the embodiment below.
[0070] Reference Figure 3 , is a flow chart of an optional example of an image processing method proposed in an embodiment of the present application, which can be applied to a server in an image processing system, such as Figure 3 As shown, the method may include:
[0071] Step S11, obtaining first rendering perspective information of a current frame for an object to be rendered;
[0072] Combined with the above description of cloud rendering application scenarios, the user interacts with the server through an electronic device (such as the above-mentioned AR device or VR device, etc., which will not be explained one by one below) or other terminals to determine the object to be rendered that currently needs to be rendered, such as the entire virtual scene or a virtual object contained therein, so that the server obtains the model data of the object to be rendered. During the interaction between the user wearing the electronic device and the currently presented virtual scene, each sensor in the electronic device can collect first rendering perspective information, such as 3dof spatial posture, 6dof spatial posture and other multi-degree-of-freedom spatial posture data, and upload it to the server in real time, so that the server obtains the first rendering perspective information for the current frame of the object to be rendered. The server can thereby determine the rendering image under which the rendering perspective of the object to be rendered needs to be presented to the user.
[0073] It can be seen that step S11 can be that the server receives the first rendering perspective information of the current frame collected and sent by the electronic device while the user is wearing the electronic device through a wireless communication network, such as a 5G (fifth generation mobile communication) network, a WIFI network, etc.
[0074] It should be noted that the collection of the first rendering perspective information is not limited to the collection of multiple types of sensors configured in the electronic device, but can also be combined with other collection devices configured in the user's space, such as cameras and other image collection devices, smart bracelets, etc., to collect multi-degree-of-freedom spatial posture data of the user wearing the electronic device to determine the first rendering perspective information required for the object to be rendered in the current frame.
[0075] Among them, frame usually refers to a single image which is the smallest unit in image animation. One frame is a still picture, and continuous frames can form an animation, such as presenting dynamic game scenes, playing VR movies, etc. The frame number is the number of frames of the picture transmitted in 1 second, which can be understood as the number of times the graphics processor can refresh per second.
[0076] Based on this, in order to ensure the real-time and reliability of the interaction between the user and the virtual scene, since the user's perspective in the virtual scene will usually change continuously after wearing the electronic device, that is, after the user wears the electronic device, at least one part of the body may move, such as the head, body, eyes, hands, etc., and it is necessary to continuously collect rendering perspective information of different frames. This application can use the rendering perspective information of each frame currently collected as the first rendering perspective information of the current frame. The server's subsequent processing process is similar, and this application will no longer explain the processing of the rendering perspective information of each frame obtained one by one.
[0077] Step S12, retrieving the second rendering perspective information of the previous frame of the object to be rendered;
[0078] Step S13, performing image rendering using the model data of the object to be rendered according to the first rendering perspective information to obtain a rendered image of the current frame;
[0079] Step S14, in the process of performing image rendering using the model data, using the first rendering perspective information and the second rendering perspective information, obtaining a motion vector of a rendered image of a current frame relative to a rendered image of a previous frame;
[0080] In order to meet the high requirements of virtual reality scenes for real-time display, such as the link from the movement of users wearing electronic devices to the display of corresponding virtual images, it is best to control it within 10ms (unit: milliseconds), but it is not limited to this. The rendered images of each frame need to be compressed and then transmitted in real time to increase the data transmission speed and shorten the time spent on the entire process from rendering to display of each frame of rendered image, thereby improving the display effect of electronic devices on virtual reality scenes.
[0081] In the process of compressing rendered images of different frames, it is usually necessary to calculate the motion vector between two consecutive frames, so as to achieve coding compression of the rendered image of the current frame. Figure 4As shown in the schematic diagram of the encoding compression process, after obtaining the rendered image of the current frame based on the first rendering perspective information of the current frame, the server calls up the rendered image of the adjacent previous frame, and then based on the image block search algorithm, performs image block search and matching on the rendered image of the previous frame and the rendered image of the current frame to obtain the motion vector of the rendered image of the current frame relative to the rendered image of the previous frame. At this time, the motion vector is actually estimated based on the image block search and matching results, which is not only time-consuming but also the obtained motion vector is often not optimal, which will cause certain losses in the compressed picture.
[0082] In order to improve the above problems, the present application proposes to directly use the rendering perspective information of two adjacent frames to directly calculate the motion vector. Since in inter-frame coding, the motion vector is used to represent the relative displacement between the current coding block and the best matching block in its reference image, combined with the above description of the rendering perspective information, the perspective change between the rendering perspective information of two adjacent frames can indicate the relative postures of different degrees of freedom. After the conversion process, the relative variables of the multi-degree-of-freedom spatial postures of the same part of the object to be rendered between two adjacent frames can be directly determined, thereby accurately calculating the motion vector between the rendered images of two adjacent frames.
[0083] It can be seen that the method of calculating the motion vector between two adjacent frames of rendered images proposed in this embodiment does not need to divide the rendered image into image blocks and then search and match multiple image blocks, which saves a lot of time consumed by image block search in the traditional method of estimating motion vectors based on image block search, thereby improving the compression efficiency of the rendered image, and also solves the uncertainty caused by the image block search and matching method, ensuring the reliability and accuracy of the obtained motion vector, and avoiding the loss of the compressed image.
[0084] Moreover, in order to further shorten the time from rendering a frame of image to transmitting it to the electronic device, the present application further proposes to obtain the motion vector while rendering the image of the current frame, and it is not necessary to calculate the motion vector after completing the rendering of the current frame. Figure 5 As shown in the flow chart, the server directly retrieves the second rendering perspective information of the previous frame. After that, the server can use the first rendering perspective information and the second rendering perspective information simultaneously to obtain the current frame motion vector, that is, the motion vector of the rendered image of the current frame relative to the rendered image of the previous frame, during the image rendering process based on the first rendering perspective information and using the model data of the object to be rendered.
[0085] It should be noted that the present application does not limit the implementation process of how to use the model data of the object to be rendered to perform image rendering based on the rendering perspective information to obtain the corresponding rendered image, nor does it limit the implementation process of how to use the rendering perspective of adjacent frames to calculate the motion vector between the rendered images of the adjacent frames.
[0086] Step S15: using the motion vector, encode and compress the rendered image of the current frame, and output the compressed rendered image.
[0087] This application does not elaborate on the specific implementation process of step S15.
[0088] Based on the above analysis, in this embodiment, after the server obtains the first rendering perspective information of the current frame, it directly retrieves the second rendering perspective information of the previous frame, and based on the first rendering perspective information, uses the model data of the object to be rendered to render the image, and obtains the rendered image of the current frame. At the same time, the first rendering perspective information and the second rendering perspective information are directly used to obtain the motion vector of the rendered image of the current frame relative to the rendered image of the previous frame, so as to use the motion vector to complete the encoding compression of the rendered image of the current frame and output the compressed rendered image. Compared with the prior art, it greatly saves a lot of time consumed by estimating the motion vector based on the image block search, improves the compression efficiency of the rendered image, and also solves the uncertainty caused by the image block search matching method, ensures the reliability and accuracy of the obtained motion vector, avoids the loss of the compressed rendered image, and improves the clarity and smoothness of the picture displayed by the electronic device after decompression.
[0089] Reference Figure 6 , which is a flowchart of another optional example of the image processing method proposed in the embodiment of the present application. This embodiment may be an optional detailed implementation of the image processing method described in the above embodiment, but is not limited to the detailed implementation described in this embodiment. Figure 6 As shown, the method may include:
[0090] Step S21, obtaining first rendering perspective information of a current frame for an object to be rendered;
[0091] Step S22, retrieving the second rendering perspective information of the previous frame of the object to be rendered;
[0092] Step S23, performing image rendering using the model data of the object to be rendered according to the first rendering perspective information to obtain a rendered image of the current frame;
[0093] Regarding the specific implementation process of steps S21 to S23, reference may be made to the description of the corresponding parts of the above embodiment, which will not be repeated in this embodiment.
[0094] Step S24, using the first rendering perspective information and the second rendering perspective information, obtaining offset information between the two-dimensional projection point of the current frame and the two-dimensional projection point of the previous frame when the model data is projected onto the two-dimensional plane;
[0095] In the process of rendering a three-dimensional model, it is usually necessary to project the three-dimensional model data of the object to be rendered onto a two-dimensional plane to obtain the image of the three-dimensional model of the object to be rendered under the corresponding viewing angle. Specifically, the three-dimensional model data in the three-dimensional coordinate system can be converted to the corresponding projection data in the two-dimensional coordinate system, that is, the coordinates of the two-dimensional projection points converted from the three-dimensional point cloud data are determined. Moreover, since the rendering viewing angle information obtained from two adjacent frames usually changes, but the change is not very large, the rendered images of adjacent frames will contain the same pixel points. In this way, this embodiment can use the rendering viewing angle information obtained from two adjacent frames to calculate the offset information of the two-dimensional projection points of the same pixel point in the adjacent frames, such as the coordinate change of the same pixel point. The specific calculation process will not be described in detail.
[0096] Step S25, determining a motion vector of the rendered image of the current frame relative to the rendered image of the previous frame according to the offset information;
[0097] In this embodiment, the offset information of different two-dimensional projection points obtained above can be directly determined as the motion vector of the rendered image of the current frame relative to the rendered image of the previous frame. Of course, according to the needs of coding compression, the offset information obtained by the above calculation is converted into an information format to obtain the motion vector, which is not limited in this application.
[0098] Step S26: Utilize the motion vector to encode and compress the rendered image of the current frame, and output the compressed rendered image.
[0099] In summary, in this embodiment, after obtaining the first rendering perspective information of the current frame, the known rendering perspective information of the current frame and the previous frame of the object to be rendered can be used to directly calculate the offset information of the two-dimensional projection points rendered by different perspectives before and after while rendering the current frame image, and obtain the motion vector of the rendered image of the current frame relative to the rendered image of the previous frame, and then use the motion vector to encode and compress the rendered image of the current frame, and output the compressed rendered image. The motion vector estimation process based on image block search is omitted, the calculation speed and accuracy of the motion vector are improved, and the entire cloud rendering experience is improved.
[0100] Reference Figure 7 , which is a flowchart of another optional example of the image processing method proposed in the embodiment of the present application. This embodiment may be another optional detailed implementation of the image processing method described in the above embodiment, but is not limited to the detailed implementation described in this embodiment. Figure 7 As shown, the method may include:
[0101] Step S31, obtaining first rendering perspective information of a current frame for an object to be rendered;
[0102] Step S32, storing the first rendering perspective information in association with the frame information of the current frame;
[0103] Among them, the frame information of the current frame can be used to distinguish different frames. Therefore, the frame information may include the frame number of the current frame in the entire rendering and display process of the object to be rendered, but is not limited to this, and the present application does not limit the associated storage method of the first rendering perspective information and the corresponding frame information.
[0104] Step S33, retrieving second rendering perspective information stored in association with frame information of a previous frame of the current frame from rendering perspective information stored in association with at least one historical frame;
[0105] Combined with the above analysis, each time the rendering perspective information of a frame is obtained in this embodiment, it can be associated with the corresponding frame information and stored for calculating the motion vector of the next frame. Therefore, after the first rendering perspective information of the current frame, in order to obtain the motion vector of the current frame, the frame information of the previous frame of the current frame can be determined, and then the rendering information corresponding to the frame information of the previous frame is searched from the corresponding rendering perspective information associated with each historical frame, that is, the second rendering perspective information of the previous frame.
[0106] Step S34, obtaining the data to be rendered corresponding to the first rendering perspective information from the model data of the object to be rendered;
[0107] Step S35, performing image rendering using the data to be rendered to obtain a rendered image of the current frame;
[0108] The model data may be data obtained after three-dimensional modeling of the object to be rendered. The process of obtaining the model data of the object to be rendered will not be described in detail. After obtaining the first rendering perspective information of the current frame of the object to be rendered, the model data of the three-dimensional model of the object to be rendered under the rendering perspective may be obtained, that is, the data to be rendered used to render the picture of the object to be rendered under the rendering perspective. After that, the data to be rendered may be used for image rendering to obtain the rendered image of the current frame. The specific implementation process of the image rendering will not be described in detail.
[0109] Step S36, in the process of performing image rendering of the current frame using the data to be rendered, comparing the first rendering perspective information with the second rendering perspective information to obtain a rendering perspective change amount between the current frame and the previous frame;
[0110] It should be understood that the specific content of the rendering perspective change between the current frame and the previous frame can be determined based on the content of the rendering perspective information. If the above-mentioned rendering perspective information is 3dof spatial posture or 6dof spatial posture, the rendering perspective change between two adjacent frames can include spatial posture changes with different degrees of freedom.
[0111] Step S37, obtaining a first position of a two-dimensional projection point projected onto a two-dimensional plane by the data to be rendered in the current frame during image rendering;
[0112] Step S38, calling the second position of the two-dimensional projection point projected onto the two-dimensional plane by the data to be rendered in the previous frame during the image rendering process;
[0113] Combined with the above description of the image rendering process of different frames, after the data to be rendered in the three-dimensional space is projected onto the two-dimensional plane, the position information of each two-dimensional projection point will be obtained. In order to distinguish the two-dimensional projection points projected onto the two-dimensional plane by the data to be rendered of different frames, this embodiment can record the position information of the two-dimensional projection point of the current frame as the first position, and record the position information of the two-dimensional projection point of the previous frame as the second position.
[0114] Step S39, obtaining offset information between the first position and the second position according to the above rendering viewing angle change;
[0115] Step S310, determining a motion vector of a rendered image of a current frame relative to a rendered image of a previous frame according to the offset information;
[0116] Based on the changes in the spatial postures of each degree of freedom contained in the rendering perspective change, the coordinate changes of the two-dimensional projection points of the same pixel point in adjacent frames in the two-dimensional coordinate system can be determined, thereby determining the motion vector between adjacent frames.
[0117] Step S311 , using the motion vector, encoding and compressing the rendered image of the current frame, and outputting the compressed rendered image.
[0118] It should be noted that the step of storing the first rendering perspective information of the current frame can be completed before obtaining the rendering perspective information of the next frame, and is not limited to the execution order of the steps described above in this embodiment.
[0119] In some embodiments, since the motion vector of a frame and its adjacent previous frame is obtained, as analyzed above, the rendering perspective information of the adjacent previous frame is used, and there is no need to use the rendering perspective information of other historical frames. Therefore, the present application can retain the rendering perspective information of several adjacent historical frames of the current frame, and there is no need to retain the rendering perspective information of all historical frames. Specifically, after determining the number of rendering perspective information that can exist, the rendering perspective information of the current frame can be written into the storage space in sequence. If the storage space is full, the rendering perspective information written first can be overwritten, but it is not limited to this storage method.
[0120] In summary, after obtaining the rendering perspective information of the current frame, this embodiment can store it with the frame information of the frame for calling when obtaining the motion vector of the next frame. In the process of image rendering based on the rendering perspective information of the current frame and using the to-be-rendered data in the model data corresponding to the frame, the rendering perspective change between the current frame and the previous frame can be used to obtain the position change of the two-dimensional projection point under the rendering perspective of the current frame and the previous frame, so as to quickly and accurately calculate the motion vector between the rendered images of the current frame and the previous frame, so as to use the motion vector to realize the encoding compression of the rendered image of the current frame, and then send the compressed rendered image to the electronic device. Compared with the existing image processing method, the motion vector estimation process based on image block search is omitted, which greatly improves the calculation speed and accuracy of the motion vector, and ensures that the compressed rendered image will not be lost, thereby ensuring that the picture presented by the electronic device is clear and smooth.
[0121] In some embodiments, combined with the description of the inventive concept of the present application in the above embodiments, in order to further shorten the acquisition time of the rendered image between two adjacent frames, the present application can obtain the third rendering perspective information of the next frame for the object to be rendered when using the model data to render the image of the current frame, or when compressing the obtained rendered image of the current frame, without waiting until the compressed rendered image of the current frame is transmitted to the electronic device before obtaining the third rendering perspective information of the next frame, thereby reducing the waiting time. In this case, combined with the above analysis, the server can use the model data to render the image based on the third rendering perspective information to obtain the rendered image of the next frame, and in the process of using the model data to render the next frame of the image, use the first rendering perspective information and the third rendering perspective information to obtain the motion vector of the rendered image of the next frame relative to the rendered image of the current frame, thereby realizing compression of the rendered image of the next frame. The specific implementation process can refer to the processing process of the rendered image of the current frame in the above embodiment, and will not be repeated.
[0122] Reference Figure 8 , is a schematic diagram of an optional example of the structure of the image processing device proposed in the embodiment of the present application, and the device can be applied to a server in an image processing system, such as Figure 8 As shown, the device may include:
[0123] An information acquisition module 210 is used to acquire first rendering perspective information of a current frame of an object to be rendered;
[0124] An information retrieving module 220, used to retrieve the second rendering perspective information of the previous frame of the object to be rendered;
[0125] In some embodiments, the image processing device proposed in the present application may further include:
[0126] A rendering perspective information storage module, used for storing the acquired first rendering perspective information in association with the frame information of the current frame;
[0127] Accordingly, the information retrieval module 220 may include:
[0128] The second rendering perspective information retrieving unit is used to retrieve the second rendering perspective information stored in association with the frame information of the previous frame of the current frame from the rendering perspective information stored in association with at least one historical frame.
[0129] An image rendering module 230 is used to perform image rendering using the model data of the object to be rendered according to the first rendering perspective information to obtain a rendered image of a current frame;
[0130] In a possible implementation, the image rendering module 230 may include:
[0131] A to-be-rendered data acquisition unit, configured to acquire the to-be-rendered data corresponding to the first rendering perspective information from the model data of the to-be-rendered object;
[0132] The image rendering unit is used to perform image rendering using the data to be rendered to obtain a rendered image of the current frame.
[0133] A motion vector obtaining module 240 is used to obtain a motion vector of a rendered image of a current frame relative to a rendered image of a previous frame by using the first rendering perspective information and the second rendering perspective information during the image rendering process performed by the image rendering module using the model data;
[0134] The coding and compression module 250 is used to use the motion vector to perform coding and compression on the rendered image of the current frame, and output a compressed rendered image.
[0135] In some embodiments, Fig. 9 As shown, the motion vector obtaining module 240 may include:
[0136] An offset information acquisition unit 241 is used to acquire offset information between a two-dimensional projection point of a current frame and a two-dimensional projection point of a previous frame when the model data is projected onto a two-dimensional plane by using the first rendering perspective information and the second rendering perspective information;
[0137] In a possible implementation, the offset information acquiring unit 241 may include:
[0138] A rendering perspective change obtaining unit, configured to compare the first rendering perspective information with the second rendering perspective information to obtain a rendering perspective change between a current frame and a previous frame;
[0139] A first position acquisition unit, used for acquiring a first position of a two-dimensional projection point projected onto a two-dimensional plane by the model data during the process of rendering a current frame image using the model data;
[0140] A second position calling unit, used for calling a second position of a two-dimensional projection point projected onto a two-dimensional plane by the model data in a process of rendering a previous frame of image using the model data;
[0141] The offset information obtaining unit is used to obtain the offset information between the first position and the second position according to the rendering viewing angle change.
[0142] The motion vector determining unit 242 is used to determine the motion vector of the rendered image of the current frame relative to the rendered image of the previous frame according to the offset information.
[0143] Based on the image processing devices described in the above embodiments, in order to further shorten the time difference between adjacent frame rendering images to improve the cloud rendering experience, the image processing device proposed in this application may also include:
[0144] A third rendering perspective information acquisition module, used to acquire third rendering perspective information of a next frame of the object to be rendered during image rendering using the model data or compressing the rendered image of the current frame;
[0145] A next frame rendering image obtaining module, used to perform image rendering using the model data according to the third rendering perspective information to obtain the next frame rendering image;
[0146] The next frame motion vector obtaining module is used to obtain the motion vector of the next frame rendered image relative to the current frame rendered image by using the first rendering perspective information and the third rendering perspective information during the process of rendering the next frame image by using the model data.
[0147] It should be noted that the various modules, units, etc. in the above-mentioned device embodiments can be stored in the memory as program modules, and the processor executes the above-mentioned program modules stored in the memory to implement the corresponding functions. For the functions implemented by each program module and its combination, as well as the technical effects achieved, please refer to the description of the corresponding parts of the above-mentioned method embodiments, which will not be repeated in this embodiment.
[0148] The present application also provides a storage medium on which a computer program can be stored. The computer program can be called and loaded by a processor to implement the various steps of the image processing method described in the above embodiment.
[0149] Reference Fig.10 , is a schematic diagram of a hardware structure of an optional example of a server for implementing the image processing method proposed in the present application, the server may include a communication module 31, a memory 32 and a processor 33, wherein:
[0150] The number of communication modules 31, memory 32 and processor 33 can be at least one, and the communication modules 31, memory 32 and processor 33 can all be connected to a communication bus to achieve data interaction between each other through the communication bus. The specific implementation process can be determined according to the requirements of the specific application scenario and will not be described in detail in this application.
[0151] The communication module 31 may include a communication module that can realize data interaction by using a wireless communication network, such as a WIFI module, a 5G / 6G (fifth-generation mobile communication network / sixth-generation mobile communication network) module, etc. The communication module 31 may also include a communication interface for realizing data interaction between internal components of the server, such as a USB interface, a serial / parallel port, etc. The present application does not limit the specific content contained in the communication module 31.
[0152] In the embodiment of the present application, the memory 32 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device or other volatile solid-state storage device. The processor 33 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices.
[0153] In the actual application of this embodiment, the memory 32 can be used to store a program for implementing the image processing method described in any of the above method embodiments; the processor 33 can load and execute the program stored in the memory 32 to implement the various steps of the image processing method proposed in any of the above method embodiments of the present application. The specific implementation process can refer to the description of the corresponding part of the corresponding embodiment above and will not be repeated here.
[0154] It should be understood that Fig.10 The server structure shown does not constitute a limitation on the server in the embodiment of the present application. In actual applications, the server may include Fig.10 More or fewer components as shown, or combinations of certain components, are not listed here one by one in this application.
[0155] Finally, it should be noted that the various embodiments in this specification are described in a progressive or parallel manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the devices, systems, and servers disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method part.
[0156] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An image processing method, the method comprising: Obtaining first rendering perspective information of a current frame for an object to be rendered; Retrieving second rendering perspective information of a previous frame of the object to be rendered; According to the first rendering perspective information, image rendering is performed using the model data of the object to be rendered to obtain a rendered image of the current frame; In the process of performing image rendering using the model data, a motion vector of a rendered image of a current frame relative to a rendered image of a previous frame is obtained using the first rendering perspective information and the second rendering perspective information; wherein the motion vector represents a relative displacement between a current coding block and a best matching block in a reference image; The motion vector is used to encode and compress the rendered image of the current frame, and a compressed rendered image is output.
2. The method according to claim 1, wherein the step of obtaining a motion vector of a rendered image of a current frame relative to a rendered image of a previous frame by using the first rendering perspective information and the second rendering perspective information comprises: Using the first rendering perspective information and the second rendering perspective information, obtaining offset information between a two-dimensional projection point of a current frame and a two-dimensional projection point of a previous frame when the model data is projected onto a two-dimensional plane; A motion vector of the rendered image of the current frame relative to the rendered image of the previous frame is determined according to the offset information.
3. The method according to claim 2, wherein the step of obtaining offset information between a two-dimensional projection point of a current frame and a two-dimensional projection point of a previous frame when the model data is projected onto a two-dimensional plane by using the first rendering perspective information and the second rendering perspective information comprises: Comparing the first rendering perspective information with the second rendering perspective information to obtain a rendering perspective change between a current frame and a previous frame; Acquire a first position of a two-dimensional projection point projected onto a two-dimensional plane by the model data during a process of rendering a current frame image using the model data; Retrieving a second position of a two-dimensional projection point projected onto a two-dimensional plane by the model data during a process of rendering a previous frame of image using the model data; The offset information between the first position and the second position is obtained according to the rendering viewing angle change.
4. The method according to any one of claims 1 to 3, further comprising: In a process of performing image rendering using the model data or compressing the rendered image of the current frame, obtaining third rendering perspective information of a next frame of the object to be rendered; Based on the third rendering perspective information, the model data is used to perform image rendering to obtain the rendered image of the next frame, and in the process of using the model data to render the next frame of image, the first rendering perspective information and the third rendering perspective information are used to obtain the motion vector of the rendered image of the next frame relative to the rendered image of the current frame.
5. The method according to any one of claims 1 to 3, further comprising: The first rendering perspective information obtained is associated with the frame information of the current frame and stored; The retrieving the second rendering perspective information of the previous frame of the object to be rendered includes: From the rendering perspective information respectively stored in association with at least one historical frame, second rendering perspective information stored in association with the frame information of a previous frame of the current frame is retrieved.
6. The method according to any one of claims 1 to 3, wherein the step of performing image rendering using the model data of the object to be rendered based on the first rendering perspective information to obtain a rendered image of the current frame comprises: Acquire, from the model data of the object to be rendered, the data to be rendered corresponding to the first rendering perspective information; The image rendering is performed using the data to be rendered to obtain a rendered image of the current frame.
7. An image processing device, comprising: An information acquisition module, used to acquire first rendering perspective information of a current frame of an object to be rendered; An information retrieving module, used to retrieve the second rendering perspective information of the previous frame of the object to be rendered; An image rendering module, configured to perform image rendering using the model data of the object to be rendered according to the first rendering perspective information, to obtain a rendered image of a current frame; A motion vector obtaining module, used to obtain a motion vector of a rendered image of a current frame relative to a rendered image of a previous frame by using the first rendering perspective information and the second rendering perspective information during an image rendering process in which the image rendering module uses the model data; wherein the motion vector represents a relative displacement between a current coding block and a best matching block in its reference image; The coding and compression module is used to use the motion vector to perform coding and compression on the rendered image of the current frame, and output the compressed rendered image.
8. A server, comprising: Communication module; A memory for storing a program for implementing the image processing method according to any one of claims 1 to 6; A processor is used to load and execute the program stored in the memory to implement each step of the image processing method according to any one of claims 1 to 6.
9. An image processing system, the system comprising at least one electronic device and at least one server; The electronic device is used to obtain rendering perspective information corresponding to each of a plurality of consecutive frames of an object to be rendered when a user wears the electronic device; The server is the server according to claim 8.
10. According to the system of claim 9, the electronic device comprises multiple types of sensors, and the multiple types of sensors are used to sense different degrees of freedom spatial postures of the electronic device to obtain rendering perspective information of the corresponding frame.
