Image sequence rendering method and device, computer readable medium and electronic device

By obtaining texture blocks in the image sequence in the image sequence rendering method, determining their texture detail level and building a rendering rate lookup table, the problem of inaccurate image texture classification in the prior art is solved, and the accuracy of rendering rate and image are improved quality.

CN114972001BActive Publication Date: 2025-02-25GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210642065.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-08
Publication Date
2025-02-25
Estimated Expiration
2042-06-08

AI Technical Summary

Technical Problem

In the prior art, image texture classification is performed by manual frame cutting and naked eye observation, resulting in inaccurate image texture classification, which in turn affects the accuracy of the rendering rate and the final image quality.

Method used

An image sequence rendering method is proposed. By obtaining texture blocks in an image sequence, determining their texture detail level, and determining the rendering rate based on this level, building a rendering rate lookup table to accurately color rendering during real-time rendering.

Benefits of technology

Improves the generation efficiency and accuracy of texture rendering rate and improves the image quality during real-time rendering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114972001B_ABST
    Figure CN114972001B_ABST
Patent Text Reader

Abstract

The present disclosure provides an image sequence rendering method and device, a computer-readable medium and an electronic device, and relates to the field of image processing technology. The method includes: obtaining an image sequence to be processed, and capturing an image texture block generated when preprocessing the image sequence; determining a texture detail level corresponding to the image texture block; determining a texture rendering rate corresponding to the image texture block according to the texture detail level; constructing a rendering rate lookup table through the texture rendering rate, so as to complete the coloring rendering of the image texture block based on the rendering rate lookup table when drawing the image sequence in real time. The present disclosure can automatically generate a texture rendering rate corresponding to an image texture, effectively improve the generation efficiency and accuracy of the texture rendering rate, and thereby reduce the device hardware requirements while improving the real-time rendering efficiency of the image sequence, and ensure image quality.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] With the continuous improvement of people's living standards, people have higher requirements for image rendering quality in the fields of electronic games, film and television, photography, etc. Variable Rate Shading (VRS) is a function that improves rendering performance and quality by changing the shading rate of different areas of the frame.

[0003] In the related art, when classifying image textures and setting rendering rates for the classified image textures respectively, it is achieved through manual frame capture and visual observation. However, this method may lead to inaccurate image texture classification and inaccurate rendering rate, which in turn affects the final image quality. Summary of the invention

[0004] The purpose of the present disclosure is to provide an image sequence rendering method, an image sequence rendering device, a computer-readable medium and an electronic device, thereby improving the generation efficiency and accuracy of the texture rendering rate at least to a certain extent, thereby improving the image quality during real-time rendering.

[0005] According to a first aspect of the present disclosure, there is provided an image sequence rendering method, comprising:

[0006] Acquire an image sequence to be processed, and capture an image texture block generated when preprocessing the image sequence;

[0007] Determining a texture detail level corresponding to the image texture block;

[0008] Determining a texture rendering rate corresponding to the image texture block according to the texture detail level;

[0009] A rendering rate lookup table is constructed according to the texture rendering rate, so as to complete the shading rendering of the image texture block based on the rendering rate lookup table when drawing the image sequence in real time.

[0010] According to a second aspect of the present disclosure, there is provided an image sequence rendering device, comprising:

[0011] A texture block acquisition module, used to acquire an image sequence to be processed and capture image texture blocks generated when preprocessing the image sequence;

[0012] A texture detail determination module, used to determine the texture detail level corresponding to the image texture block;

[0013] A rendering rate determination module, used to determine a texture rendering rate corresponding to the image texture block according to the texture detail level;

[0014] The image shading rendering module is used to construct a rendering rate lookup table according to the texture rendering rate, so as to complete the shading rendering of the image texture block based on the rendering rate lookup table when drawing the image sequence in real time.

[0015] According to a third aspect of the present disclosure, a computer-readable medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the above method is implemented.

[0016] According to a fourth aspect of the present disclosure, there is provided an electronic device, characterized in that it includes:

[0017] Processor; and

[0018] The memory is used to store one or more programs. When the one or more programs are executed by one or more processors, the one or more processors implement the above method.

[0019] An image sequence rendering method provided by an embodiment of the present disclosure can capture the image texture blocks generated when rendering the image sequence in the preprocessing stage, and determine the texture detail level corresponding to the image texture blocks, and then determine the texture rendering rate corresponding to the image texture blocks according to the texture detail level. At the same time, for the convenience of application, a rendering rate lookup table can be constructed according to the texture rendering rate. Finally, in the actual operation stage, the rendering rate corresponding to the image texture can be found based on the rendering rate lookup table, and the real-time coloring rendering of the image texture blocks can be completed according to the rendering rate. On the one hand, by capturing the information corresponding to the image texture blocks and according to the texture detail level corresponding to the image texture blocks, the classification of the texture image blocks can be quickly realized, and then the texture rendering rate can be set according to the classification result, which effectively improves the generation efficiency of the texture rendering rate compared to the manual classification method; on the other hand, by classifying the texture image blocks according to the determined texture detail level, the accuracy of the set texture rendering rate can be effectively improved, and then when the image sequence is subjected to real-time coloring rendering, the real-time rendering efficiency of the image sequence can be guaranteed while effectively improving the image quality of the real-time rendering.

[0020] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0022] Figure 1 A schematic diagram showing an exemplary system architecture to which embodiments of the present disclosure may be applied;

[0023] Figure 2 A schematic diagram schematically illustrates a flow chart of an image sequence rendering method in an exemplary embodiment of the present disclosure;

[0024] Figure 3 A schematic diagram of a process for determining a texture detail level corresponding to an image texture block in an exemplary embodiment of the present disclosure is schematically shown;

[0025] Figure 4 A schematic diagram showing a principle of determining grayscale differences in image texture blocks in this exemplary embodiment is shown.

[0026] Figure 5 A schematic diagram of a process of determining a texture rendering rate by texture detail level in an exemplary embodiment of the present disclosure is schematically shown;

[0027] Figure 6 A schematic diagram showing the principle of rendering an image texture block by using texture rendering rates at different gears in this exemplary embodiment is shown.

[0028] Figure 7 A schematic diagram schematically shows a process of drawing an image sequence in real time in an exemplary embodiment of the present disclosure;

[0029] Figure 8 A schematic diagram of a process for configuring a variable rate shading function of a game program in this exemplary embodiment is shown;

[0030] Fig. 9 A schematic diagram schematically shows the composition of an image sequence rendering device in an exemplary embodiment of the present disclosure;

[0031] Fig.10 A schematic diagram of an electronic device to which the embodiments of the present disclosure can be applied is shown. DETAILED DESCRIPTION

[0032] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0033] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0034] Figure 1 A schematic diagram of a system architecture of an exemplary application environment in which an image sequence rendering method and apparatus according to an embodiment of the present disclosure can be applied is shown.

[0035] like Figure 1 As shown, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc. The terminal devices 101, 102, 103 may be various electronic devices with image processing functions, including but not limited to desktop computers, portable computers, smart phones, tablet computers, etc. It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. According to the implementation requirements, there may be any number of terminal devices, networks and servers. For example, the server 105 may be a server cluster composed of multiple servers.

[0036] The image sequence rendering method provided in the embodiment of the present disclosure is generally executed by the terminal devices 101, 102, and 103, and accordingly, the image sequence rendering device is generally arranged in the terminal devices 101, 102, and 103. However, it is easy for those skilled in the art to understand that the image sequence rendering method provided in the embodiment of the present disclosure can also be executed by the server 105, and accordingly, the image sequence rendering device can also be arranged in the server 105, which is not particularly limited in the present exemplary embodiment. For example, in an exemplary embodiment, the user can collect raw depth data through the depth sensor for collecting depth images included in the terminal devices 101, 102, and 103, and then upload the raw depth data to the server 105. After the server generates a depth image through the image sequence rendering method provided in the embodiment of the present disclosure, the server transmits the depth image to the terminal devices 101, 102, 103, etc.

[0037] In the related art, when setting the texture rendering rate of an image texture, it is generally done manually, which is mainly divided into two steps: first, use capture software, such as Renderdoc software, to capture a game scene image, then open the file saved by the capture, view the image texture content from the image texture list, then observe the image texture details with the naked eye, and finally classify the image texture based on the observation results and set the rendering rate.

[0038] However, this solution is not only cumbersome in terms of steps, requiring the use of third-party software to capture game frames, and then opening the software to view the captured content, but also labor-intensive. Due to the large number of scenes in the game, it is impossible to capture frames for each scene one by one. In addition, the error rate is high. Due to the large number of game scenes and the large number of textures used, manual frame capture classification is bound to have omissions and be mixed with subjective judgment factors during classification, resulting in a decrease in the accuracy of the classification results.

[0039] Based on one or more problems in the related art, the present disclosure first provides an image sequence rendering method. The image sequence rendering method of an exemplary embodiment of the present disclosure is specifically described below by taking a terminal device executing the method as an example.

[0040] Figure 2 A schematic flow chart of an image sequence rendering method in this exemplary embodiment is shown, comprising the following steps S210 to S240:

[0041] In step S210, an image sequence to be processed is obtained, and image texture blocks generated when preprocessing the image sequence are captured.

[0042] In an exemplary embodiment, an image sequence refers to a set of continuous images that need to be rendered in real time by a GPU (Graphics Processing Unit). For example, the image sequence may be a set of continuous images generated by real-time rendering of a game scene, or a set of continuous images generated by real-time rendering of a virtual reality (VR) scene. Of course, the image sequence may also be a set of other types of continuous images that need to be rendered and output by a GPU in real time, and this exemplary embodiment does not specifically limit this.

[0043] A texture image block refers to a texture map corresponding to the surface of a model in a virtual scene that requires real-time rendering by a GPU. For example, a texture image block may be a texture map associated with a character model in a virtual scene, or a texture map associated with a flower, plant, or tree model in a virtual scene. This example embodiment is not limited to this.

[0044] Of course, the texture image block may also include multiple types of texture maps. For example, the texture image block may include a color map and a light and shadow map (such as a normal map, a height map, an occlusion light map, etc.). The type of texture map included in a specific texture image block is related to the virtual scene in the application process, and this example embodiment does not make any special limitations on this.

[0045] Taking the game scene in the real-time rendering game program as an example, during the real-time running of the game program, the image texture blocks in the game scene will be rendered in real time to generate an image sequence in the display interface of the terminal device, that is, the final displayed game screen. Specifically, the game program to be processed can be run in the pre-processing stage, that is, in the off-screen frame buffer (Framebuffer), and in the process of GPU real-time rendering to generate an image sequence, the image texture blocks corresponding to the game screen are captured through the hook function (Hook) and the image API (Application Programming Interface) instructions are saved. For example, the name and parameters corresponding to the image API instruction (such as the size, storage format, pixel data, LOD level of the image texture block used by the current instruction) and other data can be saved in the terminal device's memory in binary form for subsequent use.

[0046] Optionally, the graphics API that supports capture in this embodiment includes but is not limited to OpenGL, OpenGL ES, Vulkan, DirectX, Metal, etc.

[0047] In step S220, the texture detail level corresponding to the image texture block is determined.

[0048] In an exemplary embodiment, the texture detail level refers to data that measures the fineness of the texture in an image texture block. For example, the texture detail level corresponding to the image texture block can be represented by the gradient data between pixels in the image texture block, or the texture detail level corresponding to the image texture block can be represented by the complexity of the texture distribution in the image texture block. This exemplary embodiment does not make any special limitation on this.

[0049] By determining the texture detail levels of different image texture blocks and classifying the image texture blocks, the display quality of the image during real-time rendering can be effectively improved.

[0050] In step S230, a texture rendering rate corresponding to the image texture block is determined according to the texture detail level.

[0051] In an exemplary embodiment, the texture rendering rate refers to the way in which the GPU draws pixels when rendering the output image in real time. For example, the texture rendering rate corresponding to the current image texture block can be 2*2, which means that when rendering the current image texture block in real time, after outputting the pixel value of one pixel, all pixels in the 2*2 area are directly covered with the pixel value, which is equivalent to originally needing to calculate the pixel values ​​of 4 pixels, but at a texture rendering rate of 2*2, only the pixel value of 1 pixel needs to be calculated, which can effectively improve the efficiency of real-time rendering of image sequences.

[0052] Of course, in variable rate shading technology, the texture rendering rate corresponding to the image texture block can also be 1*1 texture rendering rate, 1*2 texture rendering rate, 2*1 texture rendering rate, 4*2 texture rendering rate, 2*4 texture rendering rate and 4*4 texture rendering rate.

[0053] Specifically, the texture rendering rate can be determined according to the texture detail level corresponding to the image texture block. For example, if the texture detail level indicates that the texture details of the image texture block are finer and more complex, correspondingly, in order to ensure the image quality, the texture rendering rate corresponding to the image texture block can be set to a smaller value, such as 1*1 texture rendering rate, 1*2 texture rendering rate, 2*1 texture rendering rate, 2*2 texture rendering rate and other gears, which can effectively ensure the texture details of the image; if the texture detail level indicates that the texture details of the image texture block are coarser and simpler, correspondingly, in order to ensure the real-time rendering efficiency of the image, the texture rendering rate corresponding to the image texture block can be set to a larger value, such as 4*2 texture rendering rate, 2*4 texture rendering rate and 4*4 texture rendering rate and other gears, which can effectively ensure the real-time rendering efficiency of the image without losing the image texture of the original image.

[0054] Determining the texture rendering rate corresponding to the image texture block by the texture detail level can effectively improve the accuracy of the texture rendering rate and ensure the quality of the image output by real-time rendering.

[0055] In step S240, a rendering rate lookup table is constructed according to the texture rendering rate, so as to complete the shading rendering of the image texture block based on the rendering rate lookup table when drawing the image sequence in real time.

[0056] In an exemplary embodiment, the rendering rate lookup table refers to a mapping relationship table that associates and stores each image texture block with the corresponding texture rendering rate. By setting the rendering rate lookup table, the CPU (Central Processing Unit) can effectively improve the texture rendering rate corresponding to the image texture block, thereby further improving the real-time rendering efficiency of the image.

[0057] After learning the rendering rate lookup table corresponding to the image sequence in the preprocessing stage, the rendering rate lookup table can be saved in the storage space of the terminal device; in the specific application process, such as the real-time running process of the game program, the rendering rate lookup table corresponding to the game program can be obtained, and the rendering rate lookup table can be used to command the GPU and related graphics drawing interfaces to perform real-time shading rendering of the image texture blocks in the game scene, and finally generate and output the image sequence corresponding to the game scene.

[0058] The contents of step S210 to step S240 are described in detail below.

[0059] In an exemplary embodiment, the Figure 3 The steps in the above example determine the texture detail level corresponding to the image texture block. Figure 3 As shown, it may specifically include:

[0060] Step S310, converting the color information in the image texture block into grayscale information;

[0061] Step S320, calculating the grayscale difference between the target pixel in the image texture information and the surrounding pixels corresponding to the target pixel according to the grayscale information;

[0062] Step S330: determining a texture detail level corresponding to the image texture block based on the grayscale difference.

[0063] Among them, the color information in the image texture block refers to the value of each pixel in the image texture block in the corresponding color space. For example, the color information in the image texture block can be the value of each pixel in the RGB color space, which is used to represent a certain color, such as pure red is FF0000, or it can be represented by different color channels, such as pure red is (255, 0, 0). This example embodiment does not impose any special limitation on the expression form of the color information in the image texture block.

[0064] Gray information is the color information in the image texture block processed into data representing the black and white degree of the current pixel. For example, the color information in the image texture block can be binarized to obtain grayscale information, or the color information in the image texture block can be weighted averaged to obtain grayscale information. Specifically, the black and white degree of the pixel, that is, grayscale information, can be represented by 0-255. This example implementation does not impose any special restrictions on the conversion between color information and grayscale information.

[0065] The target pixel refers to any pixel in the image texture block, and the surrounding pixels refer to multiple pixels adjacent to the target pixel. For example, the surrounding pixels can be 8 pixels surrounding the target pixel, or multiple pixels within a preset radius. This example embodiment does not specifically limit this.

[0066] The grayscale difference between the target pixel and the surrounding pixels in the image texture information can be calculated based on the grayscale information, that is, the grayscale information corresponding to the target pixel and the surrounding pixels are directly subtracted. The obtained grayscale difference can represent the gradient information of the image texture block, and further reflect the texture details in the image texture block.

[0067] The texture detail level corresponding to the image texture block is represented by the grayscale difference between the target pixel and the surrounding pixels. On the one hand, the calculation process of the grayscale difference is relatively simple, which can effectively reduce the amount of calculation in the process of determining the texture detail level corresponding to the image texture block, thereby improving the calculation efficiency; on the other hand, the grayscale difference can effectively represent the texture details in the image texture block. By representing the texture detail level corresponding to the image texture block by the grayscale difference, the expression degree of the texture detail level for the texture details can be improved, and the expression accuracy of the texture detail level can be improved, thereby improving the accuracy of the determined texture rendering rate.

[0068] In an exemplary embodiment, the grayscale difference may include a first grayscale difference and a second grayscale difference, the first grayscale difference refers to the grayscale difference between the target pixel and the surrounding pixels in the horizontal axis direction, and the second grayscale difference refers to the grayscale difference between the target pixel and the surrounding pixels in the vertical axis direction.

[0069] It should be noted that, in the “first grayscale difference” and “second grayscale difference” of this exemplary embodiment, the “first” and “second” are only used to distinguish the grayscale differences in different coordinate directions and do not have any special meaning and should not impose any special limitations on this exemplary embodiment.

[0070] Since the texture details in the image texture block may be distributed in the vertical or horizontal direction, calculating the first grayscale difference between the target pixel and the surrounding pixels in the horizontal direction and the second grayscale difference in the vertical direction can effectively improve the accuracy of the grayscale difference in expressing the texture detail level and effectively ensure the accuracy of the texture rendering rate.

[0071] Specifically, the first-order gradient and second-order gradient between the target pixel and the surrounding pixels in the horizontal direction can be calculated according to the grayscale information, and the maximum value of the first-order gradient and the second-order gradient in the horizontal direction can be used as the first grayscale difference; the first-order gradient and the second-order gradient between the target pixel and the surrounding pixels in the vertical direction can be calculated according to the grayscale information, and the maximum value of the first-order gradient and the second-order gradient in the vertical direction can be used as the second grayscale difference.

[0072] The first-order gradient refers to the grayscale difference between the target pixel and the surrounding pixels, and the second-order gradient refers to the grayscale difference between the target pixel and the two pixels between the surrounding pixels. By calculating the first-order gradient and the second-order gradient, the accuracy of the calculated first grayscale difference and the second grayscale difference is further guaranteed.

[0073] For example, the process of calculating the first-order gradient and the second-order gradient corresponding to the image texture block can be expressed by the relationship group (1):

[0074] dh=max[|P i,j -P i,j-1 |,|P i,j+1 -P i,j |]

[0075] ddh=max[|P i+1,j+1 -P i+1,j-1 |,|P i-1,j+1 -P i-1,j-1 |]

[0076] dv=max[|(P i,j -P i-1,j )|,|(P i+1,j -P i,j )|]

[0077] ddv=max[|(P i+1,j-1 -P i-1,j-1 )|,|(P i+1,j+1 -P i-1,j+1 )|] (1)

[0078] Among them, dh can represent the first-order gradient between the target pixel and the surrounding pixels in the horizontal direction, ddh can represent the second-order gradient between the target pixel and the surrounding pixels in the horizontal direction, dv can represent the first-order gradient between the target pixel and the surrounding pixels in the vertical direction, ddv can represent the second-order gradient between the target pixel and the surrounding pixels in the vertical direction, P i,j It can represent the grayscale information of the pixel in the i-th row and j-th column in the image texture block.

[0079] The process of calculating the first grayscale difference and the second grayscale difference corresponding to the image texture block can be expressed by the relationship group (2):

[0080] dx=max(dh,ddh)

[0081] dy=max(dv,ddv) (2)

[0082] Wherein, dx may represent the first grayscale difference of the calculated image texture block in the horizontal coordinate direction, and dy may represent the second grayscale difference of the calculated image texture block in the vertical coordinate direction.

[0083] The above calculation process is performed for each pixel in the image texture block, and the first grayscale difference and the second grayscale difference corresponding to all pixels in the image texture block can be obtained.

[0084] Figure 4 A schematic diagram showing a principle of determining grayscale differences in image texture blocks in this exemplary embodiment is shown.

[0085] refer to Figure 4 As shown, the image texture block 400 includes a plurality of pixels, with the target pixel being the pixel P. 1,1 For example, the surrounding pixels corresponding to the target pixel may include pixel P 0,0 , pixel P 0,1 , pixel P 0,2 , pixel P 1,0 , pixel P 1,2 , pixel P 2,0 , pixel P 2,1 and pixel P 2,2 Among them, the first-order gradient between the target pixel and the surrounding pixels in the horizontal coordinate direction can be pixel P 1,1 With pixel P 1,2 The grayscale difference between the pixels P and P can be expressed as 0,0 With pixel P 0,2 The grayscale difference between the target pixel and the surrounding pixels; the first-order gradient between the target pixel and the surrounding pixels in the ordinate direction can be the pixel P 1,1 With pixel P 0,1 The grayscale difference between the pixels P and P can be expressed as 0,2 With pixel P 2,2 Of course, Figure 4 This is merely an illustrative example and should not constitute any particular limitation to this exemplary embodiment.

[0086] In an exemplary embodiment, the minimum value of the first grayscale differences corresponding to all pixels in the image texture block can be used as the third grayscale difference, and the minimum value of the second grayscale differences corresponding to all pixels in the image texture block can be used as the fourth grayscale difference. Finally, the texture detail level corresponding to the image texture block is determined based on the third grayscale difference and the fourth grayscale difference.

[0087] Specifically, after calculation through the relationship group (1) and the relationship group (2), the first grayscale difference and the second grayscale difference corresponding to each pixel in the image texture block can be obtained. By traversing the first grayscale differences corresponding to each pixel, the minimum value of the first grayscale differences is determined as the final gradient change of the image texture block in the horizontal coordinate direction, that is, the third grayscale difference, which can be expressed as dxmin; similarly, by traversing the second grayscale differences corresponding to each pixel, the minimum value of the second grayscale differences is determined as the final gradient change of the image texture block in the vertical coordinate direction, that is, the fourth grayscale difference, which can be expressed as dymin.

[0088] It should be noted that, in this example embodiment, the "third" and "fourth" in the "third grayscale difference" and "fourth grayscale difference" are only used to distinguish the grayscale differences of the image texture blocks in different coordinate directions, and do not have any special meaning and should not cause any special limitation to this example embodiment.

[0089] In an exemplary embodiment, the Figure 5 Determine the texture rendering rate by texture detail level in the steps in Figure 5 As shown, it may specifically include:

[0090] Step S510, obtaining a preset grayscale difference threshold, wherein the grayscale difference interval includes a first grayscale difference threshold and a second grayscale difference threshold;

[0091] Step S520, determining a texture rendering rate of the image texture block in a horizontal coordinate direction according to the third grayscale difference, the first grayscale difference threshold, and the second grayscale difference threshold;

[0092] Step S530, determining a texture rendering rate of the image texture block in a vertical coordinate direction according to the fourth grayscale difference, the first grayscale difference threshold, and the second grayscale difference threshold;

[0093] Step S540: determining a texture rendering rate corresponding to the image texture block according to the texture rendering rate in the abscissa direction and the texture rendering rate in the ordinate direction.

[0094] Among them, the grayscale difference threshold refers to a pre-set judgment value for determining the texture rendering rate. Specifically, the grayscale difference threshold may include a first grayscale difference threshold and a second grayscale difference threshold. The first grayscale difference threshold and the second grayscale difference threshold may constitute a grayscale difference interval, which is used to classify image texture blocks whose grayscale values ​​are greater than the grayscale difference interval, whose grayscale values ​​are within the grayscale difference interval, and whose grayscale values ​​are less than the grayscale difference interval, and set the corresponding texture rendering rate according to the classification result.

[0095] For example, the classification of image texture blocks can be achieved through equations (3) and (4), as follows:

[0096]

[0097]

[0098] Among them, xRate can represent the texture rendering rate of the image texture block in the horizontal direction, yRate can represent the texture rendering rate of the image texture block in the vertical direction, threshold1 can represent the first grayscale difference threshold, threshold2 can represent the second grayscale difference threshold, dxmin can represent the third grayscale difference of the image texture block in the horizontal direction, and dymin can represent the fourth grayscale difference of the image texture block in the vertical direction.

[0099] The texture rendering rate of the image texture block in the horizontal direction and the texture rendering rate of the image texture block in the vertical direction can be obtained respectively through equations (3) and (4). For example, if the texture rendering rate in the horizontal direction is determined to be xRate=2 and the texture rendering rate in the vertical direction is determined to be yRate=1, then the texture rendering rate corresponding to the image texture block is 2*1.

[0100] At this point, the texture rendering rate setting process of a single image texture block is completed, and then the next image texture block in the memory is read until all image texture blocks are processed, and finally the rendering rate lookup table corresponding to the game scene or image sequence is obtained.

[0101] Through the first grayscale difference threshold and the second grayscale difference threshold, the image instructions finally displayed can be effectively adjusted. For example, if the first grayscale difference threshold and the second grayscale difference threshold are both set relatively small, then there will be fewer textures rendered at a higher rate, and the final image quality will be more delicate, but relatively, the real-time rendering efficiency will decrease; if the first grayscale difference threshold and the second grayscale difference threshold are both set relatively large, then there will be more image textures using a higher rendering rate, and the final image quality will be fuzzy, but relatively, the real-time rendering efficiency will increase. Therefore, by customizing the first grayscale difference threshold and the second grayscale difference threshold, the best real-time rendering efficiency and image quality can be adjusted, effectively improving the real-time rendering efficiency while ensuring the image quality. The specific first grayscale difference threshold and the second grayscale difference threshold can be customized according to the actual application situation, and this example embodiment does not make any special restrictions on this.

[0102] In this exemplary embodiment, the texture rendering rate in the preprocessing stage may include 1*2 texture rendering rate, 2*1 texture rendering rate, 2*2 texture rendering rate, 4*2 texture rendering rate, 2*4 texture rendering rate and 4*4 texture rendering rate. The 1*1 texture rendering rate is not set, which can reduce the amount of data in the rendering rate lookup table and improve the rendering rate lookup efficiency during the real-time running of the game. For the image texture using the 1*1 texture rendering rate, it can be directly not processed in this embodiment.

[0103] Figure 6A schematic diagram showing the principle of rendering an image texture block by using texture rendering rates at different gears in this exemplary embodiment is shown.

[0104] refer to Figure 6 As shown, the rendering method in image texture block 601 can represent a 1*1 texture rendering rate, that is, a single pixel value is only used to render a single pixel; the rendering method in image texture block 602 can represent a 2*1 texture rendering rate, that is, one pixel value output can be used to cover two adjacent pixels in the horizontal coordinate direction; the rendering method in image texture block 603 can represent a 1*2 texture rendering rate, that is, one pixel value output can be used to cover two adjacent pixels in the vertical coordinate direction; the rendering method in image texture block 604 can represent a 2*2 texture rendering rate, that is, one pixel value output can be used to cover two adjacent pixels in the vertical coordinate direction. It is used to cover and render 4 pixels in a 2*2 area; the rendering method in the image texture block 605 can represent a 2*4 texture rendering rate, that is, one pixel value output can be used to cover and render 8 pixels in a 2*4 rectangular area; the rendering method in the image texture block 606 can represent a 4*2 texture rendering rate, that is, one pixel value output can be used to cover and render 8 pixels in a 4*2 rectangular area; the rendering method in the image texture block 607 can represent a 4*4 texture rendering rate, that is, one pixel value output can be used to cover and render 16 pixels in a 4*4 square area. It can be seen that as the texture rendering rate increases, for image texture blocks of the same size, the higher the real-time rendering efficiency, the lower the image quality.

[0105] In an exemplary embodiment, texture identification information corresponding to the image texture block may be obtained, and then the texture identification information may be associated with the texture rendering rate and stored to construct a rendering rate lookup table.

[0106] Among them, texture identification information refers to data that can uniquely identify an image texture block. For example, the texture identification information can be a texture name corresponding to a texture in an image texture block, such as texture names such as "Tree" and "Man", or a hash value (hash) corresponding to a texture in an image texture block. Of course, it can also be a unique code set for an image texture block, and this example embodiment does not make any special limitations on this.

[0107] The rendering rate lookup table may be a json file storing texture identification information and texture rendering rate, or an XML file storing texture identification information and texture rendering rate. This example embodiment does not impose any special limitation on the storage format of the rendering rate lookup table.

[0108] For example, the rendering rate lookup table can be expressed as:

[0109]

[0110]

[0111] Among them, value can represent the hash value corresponding to the image texture block, and comment can represent the texture content corresponding to the image texture block, which is convenient for subsequent debugging and maintenance.

[0112] By storing the texture identification information in association with the texture rendering rate, the CPU's search efficiency for the texture rendering rate corresponding to the image texture block can be effectively improved, further improving the real-time rendering efficiency corresponding to the image texture block.

[0113] In an exemplary embodiment, an image sequence may include a first image sequence belonging to a first scene and a second image sequence belonging to a second scene, wherein the first scene refers to a scene with high requirements for real-time rendering efficiency and image quality. For example, taking a game program as an example, the first scene may be a battle scene in the game program. Since the battle scene has high requirements for real-time performance and image quality, it is necessary to carefully set the texture rendering rate corresponding to each image texture block. On the contrary, the second scene refers to a scene with low requirements for real-time rendering efficiency and image quality. For example, continuing to take the game program as an example, the second scene may be a static scene in the game program. Since the static scene has low requirements for real-time performance, the second image sequence belonging to the second scene may be screened out in the preprocessing stage, and only the rendering rate lookup table of the image texture block corresponding to the first image sequence belonging to the first scene is set.

[0114] Therefore, in the preprocessing stage, ie, in the off-screen frame buffer (Framebuffer), when capturing the image texture blocks generated when rendering the image sequence, only the image texture blocks generated when rendering the first image sequence belonging to the first scene may be captured.

[0115] By screening out the second image sequence of the second scene, it is avoided that the preprocessing does not require setting the texture rendering rate of the scene, which effectively reduces the amount of data in the preprocessing stage and improves the preprocessing efficiency.

[0116] Optionally, the texture map corresponding to the UI area in the first scene may also be culled.

[0117] Optionally, special UI names belonging to different scenes can be pre-set. When the special UI is detected in the image sequence corresponding to the current scene according to the special UI name, the current scene can be considered to belong to the first scene. If not, the current scene can be considered to belong to the second scene. This example embodiment does not specifically limit the method for distinguishing the first scene from the second scene.

[0118] In an exemplary embodiment, the Figure 7 Implement shading rendering of image texture blocks based on rendering rate lookup table, refer to Figure 7 As shown, it may specifically include:

[0119] Step S710, when drawing an image sequence in real time, obtaining an image drawing operation instruction corresponding to the image sequence, wherein the image drawing operation instruction includes drawing of a plurality of image texture blocks;

[0120] Step S720, determining the target image texture block corresponding to the image drawing operation instruction;

[0121] Step S730, determining a target texture rendering rate in the rendering rate lookup table according to the target texture identification information corresponding to the target image texture block;

[0122] Step S740, performing shading rendering on the target image texture block based on the target texture rendering rate and the image drawing operation instruction, and completing real-time rendering of the image sequence.

[0123] The image drawing operation instruction may be a drawcall, and a drawcall is a general term for all graphics operations required for drawing a virtual object.

[0124] In the actual game running process, since multiple image texture blocks will be bound to each image drawing operation instruction drawcall, and each texture rendering rate setting will overwrite the previous setting, it is necessary to ensure that only one image texture block will be set in a drawcall. At this time, you can select the target image texture block that best represents the drawing content of this drawcall for setting, that is, the first activated texture unit GL_TEXTURE0, and only set the rendering rate of the target image texture block bound to this texture unit. The texture rendering rate corresponding to the target image texture block is found in the rendering rate lookup table through the hash value of the target image texture block, and finally the texture rendering rate of the image texture block is set before the draw operation of each drawcall through the graphics interface corresponding to the texture rendering rate. Then, the target image texture block is shaded and rendered through the determined target texture rendering rate and image drawing operation instruction, and the execution is repeated to shade and render all image texture blocks in real time, and finally the real-time rendering of the image sequence is completed.

[0125] By setting the texture rendering rate of only the image texture block bound to the first texture unit activated in a drawcall, the CPU's search efficiency for texture rendering rate is further improved, improving the running smoothness of scenes with high real-time requirements such as games.

[0126] Figure 8 A schematic diagram of a flow chart for configuring a variable rate shading function of a game program in this exemplary embodiment is shown.

[0127] refer to Figure 8 As shown, in step S810, a game program that needs to be configured with a variable rate shading function may be obtained. Of course, it may also be other applications with high real-time requirements, for example, it may also be an application with a VR scene;

[0128] In step S820, it can be determined whether the game program has been configured with the variable rate shading function. Specifically, the game can be run to check. If it is determined that the game program has not been configured with the variable rate shading function, the preprocessing process 801 is executed; if it is determined that the game program has been configured with the variable rate shading function, the real-time operation process 802 is executed and the current process ends.

[0129] The preprocessing process 801 may include steps S830 to S860, which are specifically as follows:

[0130] Step S830, image texture block capture; specifically, the image texture block loading and saving graphics API instructions can be captured through a hook function in an off-screen frame buffer, and during the running of the game program, the names and parameters of these graphics API instructions (such as the size, storage format, pixel data, LOD level, etc. of the texture used by the current instruction) are saved in binary form to the terminal device memory 803;

[0131] Step S840, image texture block culling; specifically, in step S830, information of all image texture blocks in the game program has been obtained, but not all image textures are applicable to the VRS technology. In this embodiment, only the non-UI textures of the first scene (such as the battle scene) in the game program are learned, so it is necessary to cull the image textures corresponding to the UI and the second scene (such as the non-battle scene);

[0132] Step S850, image texture learning; specifically, the image texture block screened in step S840 is used to write a program using the same graphics API instruction as in step S830 to read the saved file data in the terminal device memory 803, and write a corresponding shader, use the GPU to process the image texture block, and determine the texture rendering rate of the image texture block according to the texture detail level corresponding to the image texture block;

[0133] Step S860, construct a rendering rate lookup table; specifically, after all image texture blocks are learned, the learning results, that is, the texture rendering rate and the hash value of the image texture block are matched one by one, saved in a json file or an XML file according to a preset format, to obtain a rendering rate lookup table, and the rendering rate lookup table is stored in the terminal device memory 803.

[0134] The real-time operation process 802 may include steps S870 to S880, which are specifically as follows:

[0135] Step S870, querying a rendering rate lookup table; specifically, the corresponding rendering rate lookup table may be obtained in the terminal device memory 803 according to the identification information of the game program, and when the game program renders to the target image texture block in real time, the corresponding target texture rendering rate may be queried in the rendering rate lookup table based on the hash value of the target image texture block;

[0136] Step S880, variable rate shading gear setting; specifically, the graphics interface corresponding to the target texture rendering rate can be called to set the target texture rendering rate of the target image texture block before the draw operation of each drawcall, and the shading rendering of the target image texture block is completed based on the target texture rendering rate, and finally the real-time rendering of the image sequence corresponding to the game level is completed.

[0137] In summary, in this exemplary embodiment, in the preprocessing stage, the image texture blocks generated when rendering the image sequence can be captured, and the texture detail level corresponding to the image texture blocks can be determined, and then the texture rendering rate corresponding to the image texture blocks can be determined according to the texture detail level. At the same time, for the convenience of application, a rendering rate lookup table can be constructed according to the texture rendering rate. Finally, in the actual operation stage, the rendering rate corresponding to the image texture can be found based on the rendering rate lookup table, and the real-time coloring rendering of the image texture blocks can be completed according to the rendering rate. On the one hand, by capturing the information corresponding to the image texture blocks and according to the texture detail level corresponding to the image texture blocks, the classification of the texture image blocks can be quickly realized, and then the texture rendering rate can be set according to the classification result, which effectively improves the generation efficiency of the texture rendering rate compared to the manual classification method; on the other hand, by classifying the texture image blocks according to the determined texture detail level, the accuracy of the set texture rendering rate can be effectively improved, and then when the image sequence is subjected to real-time coloring rendering, the real-time rendering efficiency of the image sequence can be guaranteed while effectively improving the image quality of the real-time rendering.

[0138] It should be noted that the above figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0139] For further reference, Fig. 9 As shown, in the implementation of this example, an image sequence rendering device 900 is also provided, including a texture block acquisition module 910, a texture detail determination module 920, a rendering rate determination module 930 and an image shading rendering module 940. Among them:

[0140] The texture block acquisition module 910 is used to acquire the image sequence to be processed and capture the image texture blocks generated when preprocessing the image sequence;

[0141] The texture detail determination module 920 is used to determine the texture detail level corresponding to the image texture block;

[0142] The rendering rate determination module 930 is used to determine the texture rendering rate corresponding to the image texture block according to the texture detail level;

[0143] The image shading rendering module 940 is used to construct a rendering rate lookup table according to the texture rendering rate, so as to complete the shading rendering of the image texture block based on the rendering rate lookup table when drawing the image sequence in real time.

[0144] In an exemplary embodiment, the texture detail determination module 920 may include:

[0145] A grayscale conversion unit, used for converting the color information in the image texture block into grayscale information;

[0146] A grayscale difference calculation unit, used for calculating the grayscale difference between a target pixel in the image texture information and surrounding pixels corresponding to the target pixel according to the grayscale information;

[0147] A texture detail level determination unit is used to determine the texture detail level corresponding to the image texture block based on the grayscale difference.

[0148] In an exemplary embodiment, the grayscale difference may include a first grayscale difference and a second grayscale difference, and the grayscale difference calculation unit may be used to:

[0149] Calculate the first-order gradient and the second-order gradient between the target pixel and the surrounding pixels in the horizontal coordinate direction according to the grayscale information, and take the maximum value of the first-order gradient and the second-order gradient in the horizontal coordinate direction as the first grayscale difference;

[0150] The first-order gradient and the second-order gradient between the target pixel and the surrounding pixels in the ordinate direction are calculated according to the grayscale information, and the maximum value of the first-order gradient and the second-order gradient in the ordinate direction is used as the second grayscale difference.

[0151] In an exemplary embodiment, the texture detail level determination unit may be configured to:

[0152] Taking the minimum value of the first grayscale differences corresponding to all pixels in the image texture block as the third grayscale difference;

[0153] Taking the minimum value of the second grayscale differences corresponding to all pixels in the image texture block as the fourth grayscale difference;

[0154] The texture detail level corresponding to the image texture block is determined according to the third grayscale difference and the fourth grayscale difference.

[0155] In an exemplary embodiment, the rendering rate determination module 930 may be configured to:

[0156] Obtaining a preset grayscale difference threshold, wherein the grayscale difference interval includes a first grayscale difference threshold and a second grayscale difference threshold;

[0157] Determining a texture rendering rate of the image texture block in a horizontal coordinate direction according to the third grayscale difference, the first grayscale difference threshold, and the second grayscale difference threshold;

[0158] determining a texture rendering rate of the image texture block in a ordinate direction according to the fourth grayscale difference, the first grayscale difference threshold, and the second grayscale difference threshold;

[0159] The texture rendering rate corresponding to the image texture block is determined by the texture rendering rate in the abscissa direction and the texture rendering rate in the ordinate direction.

[0160] In an exemplary embodiment, the image shading rendering module 940 may be used to:

[0161] Obtaining texture identification information corresponding to the image texture block;

[0162] The texture identification information is associated with the texture rendering rate and stored to construct the rendering rate lookup table.

[0163] In an exemplary embodiment, the texture rendering rate may include a 1*2 texture rendering rate, a 2*1 texture rendering rate, a 2*2 texture rendering rate, a 4*2 texture rendering rate, a 2*4 texture rendering rate, and a 4*4 texture rendering rate.

[0164] In an exemplary embodiment, the image sequence may include a first image sequence belonging to a first scene and a second image sequence belonging to a second scene, and the texture block acquisition module 910 may be used to:

[0165] An image texture block generated when preprocessing the first image sequence is captured.

[0166] In an exemplary embodiment, the image shading rendering module 940 may be used to:

[0167] When drawing an image sequence in real time, obtaining an image drawing operation instruction corresponding to the image sequence, wherein the image drawing operation instruction includes drawing of a plurality of image texture blocks;

[0168] Determine a target image texture block corresponding to the image drawing operation instruction;

[0169] Determine a target texture rendering rate in the rendering rate lookup table according to the target texture identification information corresponding to the target image texture block;

[0170] The target image texture block is shaded and rendered based on the target texture rendering rate and the image drawing operation instruction to complete the real-time rendering of the image sequence.

[0171] The specific details of each module in the above device have been described in detail in the implementation method of the method part. The undisclosed details can be found in the implementation method of the method part, so they will not be repeated here.

[0172] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".

[0173] The exemplary embodiment of the present disclosure also provides an electronic device. The electronic device may be the terminal device 101, 102, 103 or the server 105. Generally, the electronic device may include a processor and a memory, the memory is used to store executable instructions of the processor, and the processor is configured to execute the above-mentioned image sequence rendering method by executing the executable instructions.

[0174] Below Fig.10 The mobile terminal 1000 in FIG. 1 is taken as an example to exemplify the structure of the electronic device. It should be understood by those skilled in the art that, in addition to the components specifically used for mobile purposes, Fig.10 The construction in can also be applied to fixed type equipment.

[0175] like Fig.10 As shown, the mobile terminal 1000 may specifically include: a processor 1001, a memory 1002, a bus 1003, a mobile communication module 1004, an antenna 1, a wireless communication module 1005, an antenna 2, a display screen 1006, a camera module 1007, an audio module 1008, a power module 1009 and a sensor module 1010.

[0176] Processor 1001 may include one or more processing units, for example: processor 1001 may include AP (Application Processor), modem processor, GPU (Graphics Processing Unit), ISP (Image Signal Processor), controller, encoder, decoder, DSP (Digital Signal Processor), baseband processor and / or NPU (Neural-Network Processing Unit), etc.

[0177] The encoder can encode (i.e. compress) an image or video to reduce the data size for easy storage or transmission. The decoder can decode (i.e. decompress) the encoded data of an image or video to restore the image or video data. The mobile terminal 1000 can support one or more encoders and decoders, such as: image formats such as JPEG (Joint Photographic Experts Group), PNG (Portable Network Graphics), BMP (Bitmap), and video formats such as MPEG (Moving Picture Experts Group) 1, MPEG10, H.1063, H.1064, and HEVC (High Efficiency Video Coding).

[0178] The processor 1001 may be connected to the memory 1002 or other components via a bus 1003 .

[0179] The memory 1002 may be used to store computer executable program codes, which may include instructions. The processor 1001 executes various functional applications and data processing of the mobile terminal 1000 by running the instructions stored in the memory 1002. The memory 1002 may also store application data, such as images, videos, and other files.

[0180] The communication function of the mobile terminal 1000 can be implemented by the mobile communication module 1004, antenna 1, wireless communication module 1005, antenna 2, modulation and demodulation processor and baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. The mobile communication module 1004 can provide 3G, 4G, 5G and other mobile communication solutions applied to the mobile terminal 1000. The wireless communication module 1005 can provide wireless communication solutions such as wireless LAN, Bluetooth, near field communication, etc. applied to the mobile terminal 1000.

[0181] The display screen 1006 is used to implement display functions, such as displaying user interfaces, images, videos, etc. The camera module 1007 is used to implement shooting functions, such as shooting images, videos, etc. The audio module 1008 is used to implement audio functions, such as playing audio, collecting voice, etc. The power module 1009 is used to implement power management functions, such as charging the battery, powering the device, monitoring the battery status, etc.

[0182] The sensor module 1010 may include one or more sensors for implementing corresponding sensing detection functions. For example, the sensor module 1010 may include an inertial sensor for detecting the motion posture of the mobile terminal 1000 and outputting inertial sensing data.

[0183] The exemplary embodiments of the present disclosure also provide a computer-readable storage medium on which a program product capable of implementing the above-mentioned method of the present specification is stored. In some possible implementations, various aspects of the present disclosure can also be implemented in the form of a program product, which includes program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section of the present specification, for example, it can execute Figures 3 to 8 Any one or more steps in .

[0184] It should be noted that the computer-readable medium shown in the present disclosure 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.

[0185] 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, apparatus, 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, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A 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 combination 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: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0186] In addition, program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0187] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

[0188] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for rendering an image sequence, characterized in that: include: Acquire an image sequence to be processed, and capture an image texture block generated when preprocessing the image sequence; Determining the texture detail level corresponding to the image texture block includes: converting color information in the image texture block into grayscale information; calculating the grayscale difference between a target pixel in the image texture information and surrounding pixels corresponding to the target pixel according to the grayscale information; and determining the texture detail level corresponding to the image texture block based on the grayscale difference; Determining a texture rendering rate corresponding to the image texture block according to the texture detail level; A rendering rate lookup table is constructed according to the texture rendering rate, so as to complete the shading rendering of the image texture block based on the rendering rate lookup table when drawing the image sequence in real time.

2. The method according to claim 1, characterized in that The grayscale difference includes a first grayscale difference and a second grayscale difference, and the grayscale difference between a target pixel and surrounding pixels corresponding to the target pixel in the image texture information is calculated according to the grayscale information, including: Calculate the first-order gradient and the second-order gradient between the target pixel and the surrounding pixels in the horizontal coordinate direction according to the grayscale information, and take the maximum value of the first-order gradient and the second-order gradient in the horizontal coordinate direction as the first grayscale difference; The first-order gradient and the second-order gradient between the target pixel and the surrounding pixels in the ordinate direction are calculated according to the grayscale information, and the maximum value of the first-order gradient and the second-order gradient in the ordinate direction is used as the second grayscale difference.

3. The method according to claim 2, characterized in that The determining the texture detail level corresponding to the image texture block based on the grayscale difference includes: Taking the minimum value of the first grayscale differences corresponding to all pixels in the image texture block as the third grayscale difference; Taking the minimum value of the second grayscale differences corresponding to all pixels in the image texture block as the fourth grayscale difference; The texture detail level corresponding to the image texture block is determined according to the third grayscale difference and the fourth grayscale difference.

4. The method according to claim 3, characterized in that The determining, according to the texture detail level, a texture rendering rate corresponding to the image texture block comprises: Obtaining a preset grayscale difference threshold, wherein the grayscale difference threshold includes a first grayscale difference threshold and a second grayscale difference threshold; Determining a texture rendering rate of the image texture block in a horizontal coordinate direction according to the third grayscale difference, the first grayscale difference threshold, and the second grayscale difference threshold; determining a texture rendering rate of the image texture block in a ordinate direction according to the fourth grayscale difference, the first grayscale difference threshold, and the second grayscale difference threshold; The texture rendering rate corresponding to the image texture block is determined by the texture rendering rate in the abscissa direction and the texture rendering rate in the ordinate direction.

5. The method according to claim 1, characterized in that: The constructing a rendering rate lookup table according to the texture rendering rate comprises: Obtaining texture identification information corresponding to the image texture block; The texture identification information is associated with the texture rendering rate and stored to construct the rendering rate lookup table.

6. The method according to claim 1, characterized in that The texture rendering rate includes a 1*2 texture rendering rate, a 2*1 texture rendering rate, a 2*2 texture rendering rate, a 4*2 texture rendering rate, a 2*4 texture rendering rate and a 4*4 texture rendering rate.

7. The method according to claim 1, characterized in that The image sequence includes a first image sequence belonging to a first scene and a second image sequence belonging to a second scene, and the capturing of image texture blocks generated when preprocessing the image sequence includes: An image texture block generated when preprocessing the first image sequence is captured.

8. The method according to any one of claims 1 to 6, characterized in that: The method of completing the shading rendering of the image texture block based on the rendering rate lookup table when drawing the image sequence in real time includes: When drawing an image sequence in real time, obtaining an image drawing operation instruction corresponding to the image sequence, wherein the image drawing operation instruction includes drawing of a plurality of image texture blocks; Determine a target image texture block corresponding to the image drawing operation instruction; Determine a target texture rendering rate in the rendering rate lookup table according to the target texture identification information corresponding to the target image texture block; The target image texture block is shaded and rendered based on the target texture rendering rate and the image drawing operation instruction to complete the real-time rendering of the image sequence.

9. An image sequence rendering device, characterized in that: include: A texture block acquisition module, used to acquire an image sequence to be processed and capture image texture blocks generated when preprocessing the image sequence; A texture detail determination module, used to determine the texture detail level corresponding to the image texture block; A rendering rate determination module, used to determine a texture rendering rate corresponding to the image texture block according to the texture detail level; An image shading and rendering module, used for constructing a rendering rate lookup table according to the texture rendering rate, so as to complete shading and rendering of the image texture block based on the rendering rate lookup table when drawing the image sequence in real time; The texture detail determination module comprises: A grayscale conversion unit, used for converting the color information in the image texture block into grayscale information; A grayscale difference calculation unit, used for calculating the grayscale difference between a target pixel in the image texture information and surrounding pixels corresponding to the target pixel according to the grayscale information; A texture detail level determination unit is used to determine the texture detail level corresponding to the image texture block based on the grayscale difference.

10. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

11. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 8 by executing the executable instructions.

Citation Information

Patent Citations

  • Motion adaptive rendering using variable rate shading

    CN110868580A

  • Method and device for layer drawing control, and mobile terminal

    WO2018161957A1