Image rendering method and device, electronic equipment, storage medium and program product

By performing upsampling and linear interpolation processing on the target image, the number of sampling times during the image rendering process is reduced, the problem of high computing resource overhead in the existing technology is solved, and the rendering efficiency is improved.

CN118537475APending Publication Date: 2024-08-23TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310206463.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-23
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

In the existing technology, a large number of adjacent pixels need to be sampled during the image rendering process, which results in high computational resource overhead and affects the user experience.

Method used

By upsampling the target image, traversing the upsampled pixels, sampling multiple first sampling pixels and determining linear interpolation weights, performing interpolation processing to obtain intermediate sub-pixels, and performing linear fitting based on these sub-pixels and weights to reduce the need for adjacent connections. The number of pixel sampling to reduce sampling overhead during rendering.

Benefits of technology

It effectively saves the computing resource overhead related to image rendering, improves rendering efficiency, reduces the number of samples, and improves the performance of image rendering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118537475A
    Figure CN118537475A
Patent Text Reader

Abstract

The invention provides an image rendering method and device, electronic equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: performing up-sampling processing on a target image to obtain an up-sampling image; traversing up-sampling pixels in the up-sampling image, and executing the following processing on the traversed up-sampling pixels: sampling a plurality of first sampling pixels of the up-sampling pixels from the up-sampling image, and determining a linear interpolation weight of each first sampling pixel; performing interpolation processing on a plurality of first sampling pixels of the up-sampling pixels to obtain a plurality of middle sub-pixels of the first sampling pixels; based on the plurality of middle sub-pixels and the linear interpolation weight of each first sampling pixel, carrying out linear fitting processing based on a pixel color value on the up-sampling pixel to obtain an up-sampling color value of the up-sampling pixel; and based on the up-sampling color values corresponding to the plurality of up-sampling pixels, performing image rendering processing on the up-sampling image to obtain a rendered image corresponding to the target image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to computer graphics and image technology, and in particular to an image rendering method, device, electronic device, computer-readable storage medium, and computer program product. Background Art

[0002] Display technology based on graphics processing hardware has expanded the channels for perceiving the environment and obtaining information, especially the display technology of virtual scenes. It can realize diversified interactions between virtual objects controlled by users or artificial intelligence according to actual application needs, and has various typical application scenarios. For example, in virtual scenes such as games, it can simulate the real battle process between virtual objects.

[0003] With the continuous development of computer technology, the resolution of screens of electronic devices is getting higher and higher. Therefore, the rendered images (including various virtual objects) presented by applications (especially game applications) are becoming more and more detailed.

[0004] In the related art, a high-resolution rendering image is obtained by upsampling a low-resolution target image. However, in the upsampling process, a large number of adjacent pixels need to be sampled for the current pixel, and the upsampled color value of the current pixel is calculated based on a large number of adjacent pixels. This method will cause a large amount of computing resource overhead, thereby affecting the user experience. Summary of the invention

[0005] Embodiments of the present application provide an image rendering method, apparatus, electronic device, computer-readable storage medium, and computer program product, which can save the cost of computing resources related to image rendering.

[0006] The technical solution of the embodiment of the present application is implemented as follows:

[0007] The present application embodiment provides an image rendering method, including:

[0008] Performing upsampling processing on the target image to obtain an upsampled image, wherein the upsampled image includes a plurality of upsampled pixels;

[0009] Traversing the upsampled pixels in the upsampled image, and performing the following processing on the traversed upsampled pixels: sampling a plurality of first sampled pixels of the upsampled pixels from the upsampled image, and determining a linear interpolation weight of each of the first sampled pixels, wherein the plurality of first sampled pixels include the upsampled pixels and a plurality of first adjacent pixels;

[0010] Performing interpolation processing on a plurality of first sampling pixels of the up-sampled pixel to obtain a plurality of intermediate sub-pixels of the first sampling pixel;

[0011] Based on the linear interpolation weights of the plurality of intermediate sub-pixels and each of the first sampling pixels, performing a linear fitting process based on the pixel color value on the up-sampled pixel to obtain an up-sampled color value of the up-sampled pixel;

[0012] Based on the up-sampled color values ​​respectively corresponding to the multiple up-sampled pixels, the up-sampled image is subjected to image rendering processing to obtain a rendered image corresponding to the target image.

[0013] The present application provides an image rendering device, including:

[0014] An upsampling module, used for performing upsampling processing on the target image to obtain an upsampled image, wherein the upsampled image includes a plurality of upsampled pixels;

[0015] Traversing the upsampled pixels in the upsampled image, and performing the following processing on the traversed upsampled pixels: sampling a plurality of first sampled pixels of the upsampled pixels from the upsampled image, and determining a linear interpolation weight of each of the first sampled pixels, wherein the plurality of first sampled pixels include the upsampled pixels and a plurality of first adjacent pixels;

[0016] Performing interpolation processing on a plurality of first sampling pixels of the up-sampled pixel to obtain a plurality of intermediate sub-pixels of the first sampling pixel;

[0017] Based on the linear interpolation weights of the plurality of intermediate sub-pixels and each of the first sampling pixels, performing a linear fitting process based on the pixel color value on the up-sampled pixel to obtain an up-sampled color value of the up-sampled pixel;

[0018] The processing module is used to perform image rendering processing on the upsampled image based on the upsampled color values ​​respectively corresponding to the multiple upsampled pixels, so as to obtain a rendered image corresponding to the target image.

[0019] In the above technical solution, the up-sampling module is further used to use a first adjacent pixel in the row direction of the up-sampled pixel as the first pixel;

[0020] Using a first adjacent pixel in the column direction of the up-sampled pixel as a second pixel;

[0021] using a first adjacent pixel in the column direction of the first pixel as a third pixel;

[0022] sampling the first pixel, the second pixel, the third pixel and the upsampled pixel in the upsampled image as the first sampled pixel;

[0023] The distance between the coordinates of each of the first sampling pixels and the origin coordinates of the up-sampled pixels is determined as a linear interpolation weight of each of the first sampling pixels.

[0024] In the above technical solution, the up-sampling module is further used to insert a plurality of initial pixels in a cross-shaped manner into the plurality of first sampling pixels;

[0025] Based on the brightness values ​​of the plurality of first sampling pixels, bilinear interpolation processing is performed on the plurality of initial pixels to obtain a plurality of intermediate sub-pixels of the first sampling pixels.

[0026] In the above technical solution, before performing linear fitting processing based on pixel color values ​​on the upsampled pixels based on the linear interpolation weights of the multiple intermediate sub-pixels and each of the first sampling pixels to obtain the upsampled color values ​​of the upsampled pixels, the upsampling module is further used to perform gradient processing based on edge angles on the multiple intermediate sub-pixels to obtain edge rotation angles of the upsampled pixels;

[0027] Based on the edge rotation angle of the up-sampled pixel, edge rotation processing based on the origin coordinates is performed on the up-sampled pixel to obtain the up-sampled pixel used for linear fitting processing based on the pixel color value.

[0028] In the above technical solution, the up-sampling module is also used to obtain the brightness value of each of the intermediate sub-pixels;

[0029] Based on the brightness value of each of the middle sub-pixels, edge feature fitting processing is performed on the up-sampled pixels to obtain edge features of the up-sampled pixels;

[0030] Based on the edge features of the up-sampled pixels and the linear interpolation weight of each of the first sampled pixels, a bilinear interpolation fitting process based on the first sampled pixels is performed on the up-sampled pixels to obtain an up-sampled color value of the up-sampled pixels.

[0031] In the above technical solution, the up-sampling module is further used to perform feature fitting processing in the row direction on the up-sampled pixels based on the brightness value of each of the middle sub-pixels to obtain edge features in the row direction;

[0032] Based on the brightness value of each of the middle sub-pixels, performing feature fitting processing on the up-sampled pixels in a column direction to obtain edge features in the column direction;

[0033] The edge features in the row direction and the edge features in the column direction are fused to obtain the edge features of the upsampled pixels.

[0034] In the above technical solution, the up-sampling module is further used to determine the edge feature in the row direction and the sum of the squares in the column direction as the initial edge feature of the up-sampled pixel;

[0035] Normalizing the initial edge features of the upsampled pixels to obtain edge features of the upsampled pixels.

[0036] In the above technical solution, the up-sampling module is further used to perform mapping processing on the edge features of the up-sampled pixels based on the control parameters to obtain the control parameters of the up-sampled pixels;

[0037] Based on the control parameters of the up-sampled pixels, performing a polynomial fitting process based on edge coefficients on the up-sampled pixels to obtain edge coefficients of the up-sampled pixels;

[0038] Based on the edge coefficient of the up-sampled pixel and the linear interpolation weight of each of the first sampled pixels, bilinear interpolation processing based on the multiple first sampled pixels is performed on the up-sampled pixel to obtain an up-sampled color value of the up-sampled pixel.

[0039] In the above technical solution, the up-sampling module is further used to obtain the edge coefficient of each of the first adjacent pixels;

[0040] Based on the edge coefficient of the up-sampled pixel and the edge coefficient of each of the first adjacent pixels, weighted processing is performed on the linear interpolation weight of each of the first sampled pixels to obtain a final linear interpolation weight of each of the first sampled pixels;

[0041] Based on the final linear interpolation weight of each of the first sampling pixels, a weighted sum process is performed on the grayscale value of each of the first sampling pixels to obtain an up-sampled color value of the up-sampled pixel.

[0042] In the above technical solution, the processing module is further used to update the upsampled image based on the upsampled color values ​​respectively corresponding to the multiple upsampled pixels to obtain the updated upsampled image, wherein the updated upsampled image includes multiple updated pixels;

[0043] The updated up-sampled image is sharpened to obtain a rendered image corresponding to the target image.

[0044] In the above technical solution, the processing module is further used to traverse the update pixels in the updated up-sampled image, and perform the following processing on the traversed update pixels: sampling a plurality of second sampling pixels of the update pixel from the updated up-sampled image, and determining the brightness value of each of the second sampling pixels, wherein the plurality of second sampling pixels include the update pixel and a plurality of second adjacent pixels;

[0045] Performing filter kernel processing based on the brightness values ​​of the plurality of second sampling pixels to obtain filter kernel parameters of the updated pixels;

[0046] Based on the filter kernel parameter of the update pixel and the brightness values ​​of the plurality of second sampling pixels, the update pixel is sharpened to obtain the sharpened update pixel;

[0047] A set of the multiple sharpened update pixels is used as a rendering image corresponding to the target image.

[0048] An embodiment of the present application provides an electronic device for image rendering, the electronic device comprising:

[0049] A memory for storing computer executable instructions;

[0050] The processor is used to implement the image rendering method provided in the embodiment of the present application when executing the computer executable instructions stored in the memory.

[0051] An embodiment of the present application provides a computer-readable storage medium storing a computer program or computer-executable instructions, which, when executed by a processor, can implement the image rendering method provided in the embodiment of the present application.

[0052] An embodiment of the present application provides a computer program product, including a computer program or computer executable instructions, which, when executed by a processor, can implement the image rendering method provided in the embodiment of the present application.

[0053] The embodiments of the present application have the following beneficial effects:

[0054] By using the linear interpolation weights of the intermediate sub-pixel and the first sampling pixel obtained by interpolation, a linear fitting process based on the pixel color value is performed on the upsampled pixel to obtain the upsampled color value of the upsampled pixel, thereby determining the upsampled color value of the upsampled pixel in combination with the upsampled pixel and the intermediate sub-pixel. Compared with the method of sampling a large number of adjacent pixels in the related art, the embodiment of the present application utilizes the intermediate sub-pixel to reduce the sampling of adjacent pixels, thereby reducing the number of sampling times during upsampling and reducing the sampling overhead in the rendering process, so as to save the overhead of computing resources related to image rendering and improve image rendering efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1A-1B is a schematic diagram of an application mode of the image rendering method provided in an embodiment of the present application;

[0056] Figure 2 is a schematic diagram of the structure of an electronic device for image rendering provided by an embodiment of the present application;

[0057] Figure 3A-3B It is a flowchart of an image rendering method provided in an embodiment of the present application;

[0058] Figure 4 is a flowchart of a high-performance supersampling method provided in an embodiment of the present application;

[0059] Figure 5 is a schematic diagram of bilinear interpolation of adjacent pixels provided in an embodiment of the present application;

[0060] Figure 6 is a schematic diagram of an intermediate sub-pixel provided in an embodiment of the present application;

[0061] Figure 7 is a schematic diagram of the arrangement of the middle sub-pixels provided in an embodiment of the present application;

[0062] Figure 8 is the function graph of the Lansczcos2 function L(x) provided in the embodiment of the present application;

[0063] Fig. 9 is an upsampled image provided by an embodiment of the present application;

[0064] Fig.10 is a schematic diagram of pixel b, pixel e, pixel f, pixel d, and pixel h provided in an embodiment of the present application;

[0065] Fig.11 is a schematic diagram of a filter kernel provided in an embodiment of the present application;

[0066] Fig.12 is a sharpened image provided by an embodiment of the present application;

[0067] Fig.13A It is an image with a native 720P resolution provided by an embodiment of the present application;

[0068] Fig. 13B It is an image with a native 540P resolution provided by an embodiment of the present application;

[0069] Fig. 13C It is an image generated by 540P resolution + AMD FSR provided in the embodiment of the present application;

[0070] Fig.13D It is an image generated by the 540P resolution provided in the embodiment of the present application + the high-performance supersampling method provided in the embodiment of the present application. DETAILED DESCRIPTION

[0071] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0072] In the following description, the terms "first\second" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0073] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0074] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0075] 1) In response to: used to indicate the conditions or states on which the executed operations depend. When the dependent conditions or states are met, one or more operations executed may be in real time or have a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations executed may be executed.

[0076] 2) Client: An application running in a terminal to provide various services, such as a video player client, a game client, etc.

[0077] 3) Virtual scene: A virtual game scene displayed (or provided) when the game application is running on the terminal. The virtual scene can be a simulation of the real world, a semi-simulated and semi-fictional virtual environment, or a purely fictional virtual environment. The virtual scene can be any of a two-dimensional virtual scene, a 2.5-dimensional virtual scene, or a three-dimensional virtual scene. The embodiment of the present application does not limit the dimension of the virtual scene. For example, the virtual scene may include the sky, land, ocean, etc. The land may include environmental elements such as deserts and cities, and users can control virtual objects to move in the virtual scene.

[0078] 4) Virtual objects: images of various people and objects that can interact in a virtual scene, or movable objects in a virtual scene. The movable objects can be virtual characters, virtual animals, cartoon characters, etc., such as characters and animals displayed in a virtual scene. The virtual object can be a virtual image in a virtual scene that represents a user. A virtual scene can include multiple virtual objects, each of which has its own shape and volume in the virtual scene and occupies a part of the space in the virtual scene.

[0079] 5) Image rendering: The process of converting three-dimensional light energy transfer processing into a two-dimensional image. Scenes and objects are represented in three-dimensional form, which is closer to the real world and easier to manipulate and transform. However, most image display devices are two-dimensional raster displays and dot matrix printers. The representation of three-dimensional scenes using N-dimensional gratings and dot matrix is ​​image rendering, i.e. rasterization. Raster displays can be regarded as a pixel matrix. Any image displayed on a raster display is actually a collection of pixels with one or more colors and grayscales.

[0080] The embodiments of the present application provide an image rendering method, device, electronic device, computer-readable storage medium, and computer program product, which can save the cost of computing resources related to image rendering. In order to facilitate easier understanding of the image rendering method provided by the embodiments of the present application, the exemplary implementation scenario of the image rendering method provided by the embodiments of the present application is first described. The virtual object in the image rendering method provided by the embodiments of the present application can be completely based on terminal output, or based on the coordinated output of the terminal and the server.

[0081] In one implementation scenario, see Figure 1A , Figure 1A It is a schematic diagram of the application mode of the image rendering method provided in the embodiment of the present application, which is suitable for some application modes that completely rely on the graphics processing hardware computing power of the terminal 400 to complete the relevant data calculation of the rendered image, such as stand-alone / offline mode games, and the output of the rendered image is completed through various types of terminals 400 such as smart phones, tablet computers and virtual reality / augmented reality devices.

[0082] As an example, types of graphics processing hardware include a central processing unit (CPU) and a graphics processing unit (GPU).

[0083] When forming a visual perception of a virtual scene included in a rendered image, terminal 400 calculates the data required for display through graphics computing hardware, and completes the loading, parsing and rendering of display data, and outputs video frames that can form a visual perception of the virtual scene through graphics output hardware, for example, presenting two-dimensional video frames on the display screen of a smartphone, or projecting video frames that achieve a three-dimensional display effect on the lenses of augmented reality / virtual reality glasses; in addition, in order to enrich the perception effect, terminal 400 can also use different hardware to form one or more of auditory perception, tactile perception, motion perception and taste perception.

[0084] As an example, a client 410 (e.g., a stand-alone game application) is running on the terminal 400. During the operation of the client 410, a rendered image including a virtual scene 100 is output. The virtual scene may be an environment for game characters to interact, such as a plain, street, valley, etc. for game characters to fight. Taking the first-person perspective display of the virtual scene as an example, a rendered virtual object is displayed in the virtual scene 100. The rendered virtual object may be a game character controlled by a user (or player), which will operate in the virtual scene in response to the real user's operation on buttons (including joystick buttons, attack buttons, defense buttons, etc.). For example, when the real user moves the joystick button to the left, the virtual object will move to the left in the virtual scene, and can also remain still, jump, and use various functions (such as skills and props). The rendered virtual object may also be an artificial intelligence (AI, Artificial Intelligence) set in a virtual scene battle through training. The rendered virtual object may also be a non-user character (NPC, Non-Player Character) set in the virtual scene interaction. The rendered virtual object may also be an inactive object or an active object in the virtual scene 100.

[0085] For example, taking the first-person perspective display of the virtual scene 100 as an example, the terminal 400 upsamples the target image to obtain an upsampled image; traverses the upsampled pixels in the upsampled image, and performs the following processing on the traversed upsampled pixels: samples multiple first sampling pixels of the upsampled pixels from the upsampled image, and determines the linear interpolation weight of each first sampling pixel; interpolates the multiple first sampling pixels of the upsampled pixels to obtain multiple intermediate sub-pixels of the first sampling pixels; based on the multiple intermediate sub-pixels and the linear interpolation weight of each first sampling pixel, performs linear fitting processing based on the pixel color value on the upsampled pixels to obtain the upsampled color value of the upsampled pixels; based on the upsampled color values ​​corresponding to the multiple upsampled pixels, performs image rendering processing on the upsampled image to display a rendered image including the virtual scene 100 on the client 410.

[0086] In another implementation scenario, see Figure 1B , Figure 1B It is a schematic diagram of an application mode of the image rendering method provided in an embodiment of the present application, which is applied to a terminal 400 and a server 200, and is suitable for an application mode that relies on the computing power of the server 200 to complete virtual scene calculations and output virtual scenes at the terminal 400.

[0087] Taking the visual perception of a virtual scene included in a rendered image as an example, the server 200 calculates display data related to the virtual scene (such as scene data) and sends it to the terminal 400 through the network 300. The terminal 400 relies on graphics computing hardware to complete the loading, parsing and rendering of the display data, and relies on graphics output hardware to output the virtual scene to form a visual perception. For example, a two-dimensional video frame can be presented on the display screen of a smartphone, or a video frame with a three-dimensional display effect can be projected on the lenses of augmented reality / virtual reality glasses. As for the perception of the form of the virtual scene, it can be understood that the corresponding hardware output of the terminal 400 can be used, such as using a microphone to form auditory perception, using a vibrator to form tactile perception, and so on.

[0088] As an example, a client 410 (eg, a network version of a game application) is running on the terminal 400 , which interacts with other users in a game by connecting to a server 200 (eg, a game server), and the terminal 400 outputs a virtual scene of the client 410 .

[0089] For example, taking the first-person perspective display of the virtual scene 100 as an example, the terminal 200 upsamples the target image to obtain an upsampled image; traverses the upsampled pixels in the upsampled image, and performs the following processing on the traversed upsampled pixels: samples multiple first sampling pixels of the upsampled pixels from the upsampled image, and determines the linear interpolation weight of each first sampling pixel; interpolates the multiple first sampling pixels of the upsampled pixels to obtain multiple intermediate sub-pixels of the first sampling pixels; based on the multiple intermediate sub-pixels and the linear interpolation weight of each first sampling pixel, performs linear fitting processing based on the pixel color value on the upsampled pixels to obtain the upsampled color value of the upsampled pixels; based on the upsampled color values ​​corresponding to the multiple upsampled pixels, performs image rendering processing on the upsampled image to obtain a rendered image including the virtual scene 100, and sends the rendered image including the virtual scene 100 to the terminal 400, so that the rendered image including the virtual scene 100 is displayed on the client 410.

[0090] In some embodiments, the terminal 400 can implement the image rendering method provided by the embodiment of the present application by running a computer program. For example, the computer program can be a native program or software module in the operating system; it can be a native application (APP, APPlication), that is, a program that needs to be installed in the operating system to run, such as a dress-up game APP (that is, the above-mentioned client 410); it can also be a small program, that is, a program that can be run only by downloading it to a browser environment; it can also be a game small program that can be embedded in any APP. In short, the above-mentioned computer program can be an application, module or plug-in in any form.

[0091] Taking the computer program as an application program as an example, in actual implementation, the terminal 400 installs and runs an application program that supports image rendering. The application program can be an image application such as various games, video players, etc.

[0092] In some embodiments, the embodiments of the present application can also be implemented with the aid of cloud technology. Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or a local area network to achieve data calculation, storage, processing, and sharing.

[0093] For example, Figure 1B The server 200 in the example may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal 400 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal 400 and the server 200 may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.

[0094] In some embodiments, multiple servers may form a blockchain, and server 200 is a node on the blockchain. Information connections may exist between each node in the blockchain, and information may be transmitted between nodes through the above information connections. Among them, data related to the image rendering method provided in the embodiment of the present application (such as image rendering logic, rendered image) may be stored on the blockchain.

[0095] The structure of the electronic device for image rendering provided by the embodiment of the present application is described below. Figure 2 , Figure 21 is a schematic diagram of the structure of an electronic device 500 for image rendering provided in an embodiment of the present application. Taking the electronic device 500 as a terminal as an example, Figure 2 The electronic device 500 for image rendering shown includes: at least one processor 510, a memory 550, at least one network interface 520 and a user interface 530. The various components in the electronic device 500 are coupled together via a bus system 540. It is understood that the bus system 540 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 540 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 540 is not described in detail. Figure 2 Various buses are labeled as bus system 540 .

[0096] The processor 510 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0097] The memory 550 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 550 described in the embodiment of the present application is intended to include any suitable type of memory. The memory 550 optionally includes one or more storage devices that are physically far away from the processor 510.

[0098] In some embodiments, the memory 550 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.

[0099] Operating system 551, including system programs for processing various basic system services and performing hardware-related tasks, such as framework layer, core library layer, driver layer, etc., for implementing various basic services and processing hardware-based tasks;

[0100] A network communication module 552, used to reach other electronic devices via one or more (wired or wireless) network interfaces 520, exemplary network interfaces 520 include: Bluetooth, Wireless Compatibility Authentication (WiFi), and Universal Serial Bus (USB), etc.;

[0101] In some embodiments, the image rendering device provided in the embodiments of the present application can be implemented in software. The image rendering device provided in the embodiments of the present application can be provided as various software embodiments, including various forms including applications, software, software modules, scripts or codes.

[0102] Figure 2 An image rendering device 555 stored in a memory 550 is shown, which may be software in the form of a program or plug-in, and includes a series of modules, including an upsampling module 5551 and a processing module 5552. These modules are logical, and therefore may be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below.

[0103] As mentioned above, the image rendering method provided in the embodiment of the present application can be implemented by various types of electronic devices, such as a terminal, a server, or a combination of the two. Therefore, the execution subject of each step will not be repeatedly described below. Figure 3A , Figure 3A is a flowchart of an image rendering method provided by an embodiment of the present application, combined with Figure 3A The steps shown are explained.

[0104] In step 101, an up-sampling process is performed on a target image to obtain an up-sampled image, wherein the up-sampled image includes a plurality of up-sampled pixels.

[0105] For example, if the target image is a low-resolution image, it is necessary to upsample the target image to the screen resolution, which is a high-resolution image. Therefore, the target image is upsampled to obtain an upsampled image, that is, the resolution of the upsampled image is higher than the resolution of the target image. The upsampled image includes the original pixels in the target image and the newly added pixels. The pixel values ​​of the newly added pixels can be set to (0, 0, 0). The pixel values ​​of the newly added pixels can be set according to the actual application requirements. It should be noted that the upsampled pixels are the original pixels or the newly added pixels in the target image.

[0106] It should be noted that the upsampling process performed on the target image is an initial sampling process, that is, the newly added pixel values ​​are not accurate, and each pixel in the upsampled image needs to be reassigned. The upsampled color value is calculated for each pixel in the upsampled image through steps 102 to 104, and the upsampled image is updated based on the upsampled color value of each pixel to obtain an image with improved resolution.

[0107] In step 102, upsampled pixels in the upsampled image are traversed, and the following processing is performed on the traversed upsampled pixels: a plurality of first sampled pixels of the upsampled pixels are sampled from the upsampled image, and a linear interpolation weight of each first sampled pixel is determined, wherein the plurality of first sampled pixels include the upsampled pixels and a plurality of first adjacent pixels.

[0108] For example, the following processing is performed for the traversed up-sampled pixel f: a plurality of first sampled pixels of the up-sampled pixel are sampled from the up-sampled image, and a linear interpolation weight of each first sampled pixel is determined.

[0109] In some embodiments, sampling multiple first sampling pixels of the upsampled pixel from the upsampled image includes: taking a first adjacent pixel in the row direction of the upsampled pixel as the first pixel; taking a first adjacent pixel in the column direction of the upsampled pixel as the second pixel; taking a first adjacent pixel in the column direction of the first pixel as the third pixel; sampling the first pixel, the second pixel, the third pixel and the upsampled pixel in the upsampled image as the first sampling pixel.

[0110] like Figure 5 As shown, the current up-sampled pixel is pixel f, and the four adjacent pixels f, pixel g, pixel j, and pixel k of pixel f are the first sampling pixels of the up-sampled pixel f, that is, the first pixel is pixel g, the second pixel is pixel j, and the third pixel is pixel k.

[0111] It should be noted that the row direction can be a negative row direction or a positive row direction, and the column direction can be a negative column direction or a positive column direction, that is, the first sampling pixel can form a "0" structure.

[0112] Of course, the embodiment of the present application can also use the first adjacent pixel in the positive row direction of the upsampled pixel as the first pixel, the first adjacent pixel in the negative row direction of the upsampled pixel as the second pixel, the first adjacent pixel in the positive column direction of the upsampled pixel as the third pixel, the pixel in the positive column direction of the first pixel as the fourth pixel, and the pixel in the positive column direction of the second pixel as the fifth pixel, and then the first pixel, the second pixel, the third pixel, the fourth pixel, the fifth pixel and the upsampled pixel in the upsampled image are sampled as the first sampling pixel, that is, the first sampling pixel forms an "8" structure. It should be noted that the embodiment of the present application is not limited to the composition structure of the first sampling pixel, and can be a "0" structure, an "8" structure, etc.

[0113] In some embodiments, determining the linear interpolation weight of each first sampling pixel includes: determining the distance between the coordinates of each first sampling pixel and the origin coordinates of the up-sampled pixel as the linear interpolation weight of each first sampling pixel.

[0114] For example, the distance between the coordinates of each first sampling pixel and the coordinates of the origin of the up-sampled pixel is determined as the linear interpolation weight of each first sampling pixel, wherein the coordinates of the origin of the up-sampled pixel are floor(f), and floor() represents rounding down, that is, the coordinates of the origin of the up-sampled pixel are the coordinates of the up-sampled pixel rounded down.

[0115] In step 103, an interpolation process is performed on a plurality of first sampling pixels of the up-sampled pixel to obtain a plurality of intermediate sub-pixels of the first sampling pixel.

[0116] Following step 102, the following processing is performed for the traversed upsampled pixels: interpolation processing is performed on multiple first sampled pixels of the upsampled pixels to obtain multiple intermediate sub-pixels of the first sampled pixels. Thus, by replacing the pixels in the upsampled image with the intermediate sub-pixels, the number of sampling times in each upsampling process can be reduced, and the sampling overhead in the rendering process can be reduced.

[0117] In some embodiments, interpolation processing is performed on multiple first sampling pixels of the upsampled pixel to obtain multiple intermediate sub-pixels of the first sampling pixel, including: inserting multiple initial pixels in a cross-shaped manner among the multiple first sampling pixels; and performing bilinear interpolation processing on the multiple initial pixels based on brightness values ​​of the multiple first sampling pixels to obtain multiple intermediate sub-pixels of the first sampling pixel.

[0118] like Figure 5 As shown, the current up-sampled pixel is pixel f, then the four adjacent pixels f, pixel g, pixel j, and pixel k of pixel f are the first sampling pixels of the up-sampled pixel f. Figure 6 As shown, the four pixels f, g, j, k are interpolated to obtain five initial pixels A, B, C, D, E (i.e., unassigned intermediate sub-pixels) in the shape of a cross. The brightness values ​​of the initial pixels A, B, C, D, E are obtained by bilinearly interpolating the pixels f, g, j, k to obtain multiple intermediate sub-pixels of the first sampling pixel (i.e., assigned intermediate sub-pixels). The calculation process of bilinear interpolation is shown in formula (1):

[0119]

[0120] Among them, L represents the brightness value of the pixel, p x represents the horizontal distance between the current pixel (i.e., the middle sub-pixel A, B, C, D, E) and the origin coordinate of pixel f, p y Indicates the vertical distance between the current pixel and the origin coordinates of pixel f.

[0121] In step 104, based on the linear interpolation weights of the plurality of intermediate sub-pixels and each first sampling pixel, a linear fitting process based on the pixel color value is performed on the up-sampled pixel to obtain an up-sampled color value of the up-sampled pixel.

[0122] Continuing from step 103, the following processing is performed on the traversed upsampled pixels: based on the linear interpolation weights of multiple intermediate sub-pixels and each first sampling pixel, a linear fitting processing based on the pixel color value is performed on the upsampled pixels to obtain the upsampled color value of the upsampled pixels, that is, based on the adjacent pixels, an interpolation calculation is performed on the upsampled pixels to obtain the upsampled color value of the upsampled pixels, so as to perform a complete upsampling processing on the traversed upsampled pixels.

[0123] like Figure 5 As shown, since only four adjacent pixels around the current pixel (i.e., the upsampled pixel traversed) are sampled, each pixel is sampled only four times during the upsampling process, reducing the number of samples during upsampling, thereby reducing the sampling overhead and bandwidth overhead during the entire upsampling process.

[0124] See also Figure 3B , Figure 3B is a flowchart of an image rendering method provided by an embodiment of the present application. Figure 3B Show Figure 3A Step 104 in can be Figure 3B Steps 1041 to 1043 are shown to implement: in step 1041, the brightness value of each intermediate sub-pixel is obtained; in step 1042, based on the brightness value of each intermediate sub-pixel, edge feature fitting processing is performed on the upsampled pixels to obtain edge features of the upsampled pixels; in step 1043, based on the edge features of the upsampled pixels and the linear interpolation weights of each first sampling pixel, bilinear interpolation fitting processing based on the first sampling pixels is performed on the upsampled pixels to obtain upsampled color values ​​of the upsampled pixels.

[0125] For example, first, edge fitting processing is performed on the upsampled pixels through the brightness value of each intermediate sub-pixel to obtain the edge feature Feature of the upsampled pixels, wherein the edge feature is a feature that reflects the edge degree of the upsampled pixels through the brightness value of the intermediate sub-pixels. Then, based on the edge features of the upsampled pixels and the linear interpolation weights of each first sampling pixel, the upsampled pixels are fitted through a bilinear interpolation function to obtain the upsampled color value of the upsampled pixels, that is, the upsampled pixels are fitted with a bilinear interpolation fitting process based on the first sampling pixels.

[0126] In some embodiments, based on the brightness value of each intermediate sub-pixel, edge feature fitting processing is performed on the upsampled pixels to obtain edge features of the upsampled pixels, including: based on the brightness value of each intermediate sub-pixel, feature fitting processing is performed on the upsampled pixels in the row direction to obtain edge features in the row direction; based on the brightness value of each intermediate sub-pixel, feature fitting processing is performed on the upsampled pixels in the column direction to obtain edge features in the column direction; edge features in the row direction and edge features in the column direction are fused to obtain edge features of the upsampled pixels.

[0127] by Figure 6 As an example, the process of performing feature fitting processing on the upsampled pixels in the row direction is as follows: The process of performing feature fitting processing on the upsampled pixels in the column direction is: Among them, f() represents the gray value of the pixel, and the pixel point Q x,y+1 Indicates the middle sub-pixel A, pixel Q x-1,y Indicates the middle sub-pixel B, pixel Q x,y Indicates the middle sub-pixel C, pixel Q x+1,y Indicates the middle sub-pixel D, pixel Q x,y-1 represents the middle sub-pixel E. FX represents the initial edge feature in the horizontal direction (i.e., the edge feature in the row direction), and FY represents the initial edge feature in the vertical direction (i.e., the edge feature in the column direction). Then, the edge feature in the row direction and the edge feature in the column direction are fused to obtain the edge feature of the upsampled pixel.

[0128] In some embodiments, edge features in the row direction and edge features in the column direction are fused to obtain edge features of upsampled pixels, including: determining the sum of the squares of the edge features in the row direction and the column direction as the initial edge features of the upsampled pixels; and normalizing the initial edge features of the upsampled pixels to obtain edge features of the upsampled pixels.

[0129] Following the above example, after determining FX and FY, determine the initial edge feature F of the upsampled pixel = (FX 2 +FY 2 ). It should be noted that FX and FY belong to [0,1], so F belongs to [0,2]. F is normalized to map to [0,1] to obtain the edge feature Feature of the upsampled pixel. For example, the normalization process is Feature = (F / 2) 2 .

[0130] It should be noted that the embodiments of the present application are not limited to the above-mentioned fusion method, and other fusion methods are also possible.

[0131] In some embodiments, based on the edge features of the upsampled pixels and the linear interpolation weights of each first sampling pixel, the upsampled pixels are subjected to bilinear interpolation fitting processing based on the first sampling pixels to obtain upsampled color values ​​of the upsampled pixels, including: performing mapping processing based on control parameters on the edge features of the upsampled pixels to obtain control parameters of the upsampled pixels; based on the control parameters of the upsampled pixels, performing polynomial fitting processing based on edge coefficients on the upsampled pixels to obtain edge coefficients of the upsampled pixels; based on the edge coefficients of the upsampled pixels and the linear interpolation weights of each first sampling pixel, performing bilinear interpolation processing based on multiple first sampling pixels on the upsampled pixels to obtain upsampled color values ​​of the upsampled pixels.

[0132] It should be noted that the control parameter is a parameter in the bilinear interpolation function Lanczcos2 used to control the distance between the up-sampled pixel and the origin coordinate to belong to a set interval.

[0133] For example, first, a connection between the edge feature Feature and the control parameter w is established, that is, a linear relationship, and based on the edge feature Feature and the linear relationship, the control parameter w is calculated, that is, the edge feature of the upsampled pixel is mapped based on the control parameter to obtain the control parameter w of the upsampled pixel.

[0134] Then, based on the control parameters of the upsampled pixels, the upsampled pixels are subjected to polynomial fitting processing based on edge coefficients to obtain edge coefficients of the upsampled pixels. That is, the calculation process of the polynomial fitting processing based on edge coefficients is: Among them, w represents the control parameter used to control x(x,y) to belong to the interval [-2,-1], [1,2], and x(x,y) represents the distance between the current pixel (i.e., the upsampled pixel) and the origin coordinates, that is, L(x) represents the edge coefficient of the upsampled pixel.

[0135] Finally, based on the edge coefficient of the up-sampled pixel and the linear interpolation weight of each first sampled pixel, a bilinear interpolation process based on the plurality of first sampled pixels is performed on the up-sampled pixel to obtain an up-sampled color value of the up-sampled pixel.

[0136] In some embodiments, based on the edge coefficient of the upsampled pixel and the linear interpolation weight of each first sampling pixel, bilinear interpolation processing based on multiple first sampling pixels is performed on the upsampled pixel to obtain an upsampled color value of the upsampled pixel, including: obtaining the edge coefficient of each first adjacent pixel; based on the edge coefficient of the upsampled pixel and the edge coefficient of each first adjacent pixel, weighted processing is performed on the linear interpolation weight of each first sampling pixel to obtain a final linear interpolation weight of each first sampling pixel; based on the final linear interpolation weight of each first sampling pixel, weighted summation processing is performed on the grayscale value of each first sampling pixel to obtain an upsampled color value of the upsampled pixel.

[0137] by Figure 5 For example, the calculation process of the bilinear interpolation processing based on the multiple first sampling pixels is to upsample the color value Among them, L(x) represents the Lanczocs2 value of the current pixel (that is, the edge coefficient of each first adjacent pixel), that is, L(x) f The value of Lanczocs2 for pixel f, L(x) g The value of Lanczocs2 for pixel g, L(x) j represents the value of Lanczocs2 of pixel j, L(x) k represents the value of Lanczocs2 of pixel k. d represents the distance between the current pixel and the origin coordinate (i.e., the linear interpolation weight of each first sampled pixel). For example, for pixel j, d = (0, 1), i.e. represents the bilinear interpolation weight of pixel f, represents the bilinear interpolation weight of pixel g, represents the bilinear interpolation weight of pixel j, represents the bilinear interpolation weight of pixel k. f represents the gray value of the current pixel, that is, f f Represents the grayscale value of pixel f, f g represents the gray value of pixel g, f j represents the gray value of pixel j, f k Represents the grayscale value of pixel k.

[0138] Of course, the embodiment of the present application may also perform weighted sum processing on the brightness value of each first sampling pixel based on the final linear interpolation weight of each first sampling pixel to obtain the up-sampled color value of the up-sampled pixel.

[0139] In some embodiments, based on multiple intermediate sub-pixels and the linear interpolation weights of each first sampling pixel, a linear fitting process based on the pixel color value is performed on the upsampled pixel. Before obtaining the upsampled color value of the upsampled pixel, a gradient process based on the edge angle is performed on the multiple intermediate sub-pixels to obtain the edge rotation angle of the upsampled pixel; based on the edge rotation angle of the upsampled pixel, an edge rotation process based on the origin coordinate is performed on the upsampled pixel to obtain the upsampled pixel for performing a linear fitting process based on the pixel color value.

[0140] It should be noted that since the edges in the image may have various angles, the embodiments of the present application can also rotate the edges according to the angle of the edges, that is, based on the edge rotation angle of the upsampled pixels, the upsampled pixels are subjected to edge rotation processing based on the origin coordinates, that is, according to the angle of the edges of the upsampled pixels, the upsampled pixels are rotated around the origin coordinates.

[0141] For example, the arrangement of the five middle sub-pixels A, B, C, D, and E is as follows: Figure 7 As shown, pixel Q x,y+1 Indicates the middle sub-pixel A, pixel Q x-1,y Indicates the middle sub-pixel B, pixel Q x,y Indicates the middle sub-pixel C, pixel Q x+1,y Indicates the middle sub-pixel D, pixel Q x,y-1 Represents the middle sub-pixel E.

[0142] Then, the horizontal and vertical gradients are calculated according to formula (2):

[0143]

[0144] D y =f(Q x,y-1 )-f(Q x,y+1 )

[0145] Among them, f() represents the brightness of the pixel, D x Represents the horizontal gradient, D y Represents the vertical gradient.

[0146] Based on the horizontal and vertical gradients, the edge rotation angle of the upsampled pixel is determined, that is, Dir = (cosθ, sin) = (D x ,D y ), based on D x and D y , according to (cosθ, sinθ) = (D x ,D y ), and the edge rotation angle θ is calculated. It should be noted that the above calculation process is based on the gradient processing of the edge angle.

[0147] After obtaining the edge rotation angle of the upsampled pixel, the upsampled pixel is rotated around the origin coordinate according to the edge angle of the upsampled pixel to obtain the upsampled pixel (also called rotated pixel) used for linear fitting processing based on the pixel color value, that is, based on the edge rotation angle of the upsampled pixel, the edge rotation processing based on the origin coordinate is performed on the upsampled pixel.

[0148] It should be noted that, compared with the related art which requires calculation of multiple sets of gradients, the embodiment of the present application only needs to calculate one set of gradients, thereby saving the amount of gradient calculation.

[0149] After the upsampled pixels are edge rotated based on the origin coordinates to obtain the rotated pixels, a linear fitting process based on the pixel color values ​​is performed on the rotated pixels (i.e., the rotated upsampled pixels) based on the linear interpolation weights of the multiple intermediate sub-pixels and each first sampling pixel to obtain the upsampled color values ​​of the upsampled pixels.

[0150] It should be noted that the linear fitting process based on the pixel color value of the rotated pixel is similar to the linear fitting process based on the pixel color value of the upsampled pixel, that is, the above embodiment of the linear fitting process based on the pixel color value of the upsampled pixel is similar to the embodiment of the linear fitting process based on the pixel color value of the rotated pixel. For example, the linear fitting process based on the pixel color value of the rotated pixel is performed to obtain the calculation process of the upsampled color value (UpsampleColor) as follows: Among them, L(x) represents the Lanczocs2 value of the current pixel (i.e., the edge coefficient), where x is the pixel after edge rotation, i.e., L(x) f Represents the value of Lanczocs2 of pixel f after edge rotation, L(x) g The value of Lanczocs2 for pixel g, L(x) j represents the value of Lanczocs2 of pixel j, L(x) k Represents the Lanczocs2 value of pixel k. d represents the distance between the current pixel and the origin coordinate (i.e., the bilinear interpolation weight of the current pixel). For example, for pixel j, d = (0, 1).

[0151] Right now represents the bilinear interpolation weight of pixel f, represents the bilinear interpolation weight of pixel g, represents the bilinear interpolation weight of pixel j, represents the bilinear interpolation weight of pixel k. f represents the gray value of the current pixel, that is, f f Represents the grayscale value of pixel f, f grepresents the gray value of pixel g, f j represents the gray value of pixel j, f k Represents the grayscale value of pixel k.

[0152] In step 105, based on the up-sampled color values ​​respectively corresponding to the plurality of up-sampled pixels, image rendering processing is performed on the up-sampled image to obtain a rendered image corresponding to the target image.

[0153] For example, after calculating the upsampled color value for each pixel in the upsampled image through steps 102 to 104, the upsampled image is updated based on the upsampled color value of each pixel to obtain an image with improved resolution, that is, the upsampled image is rendered to obtain a rendered image corresponding to the target image.

[0154] Of course, after calculating the upsampled color value of each pixel in the upsampled image through steps 102 to 104, the upsampled image can also be rendered through other rendering methods to obtain a rendered image corresponding to the target image.

[0155] In some embodiments, based on the upsampled color values ​​respectively corresponding to the multiple upsampled pixels, image rendering processing is performed on the upsampled image to obtain a rendered image corresponding to the target image, including: based on the upsampled color values ​​respectively corresponding to the multiple upsampled pixels, the upsampled image is updated to obtain an updated upsampled image, wherein the updated upsampled image includes multiple updated pixels; and the updated upsampled image is sharpened to obtain a rendered image corresponding to the target image.

[0156] For example, by performing a sharpening process on the updated upsampled image, the image resolution can be increased while maintaining the details of the image.

[0157] In some embodiments, the updated upsampled image is sharpened to obtain a rendered image corresponding to the target image, including: traversing the updated pixels in the updated upsampled image, and performing the following processing on the traversed updated pixels: sampling multiple second sampling pixels of the updated pixels from the updated upsampled image, and determining the brightness value of each second sampling pixel, wherein the multiple second sampling pixels include the updated pixel and multiple second adjacent pixels; performing filter kernel processing based on the brightness values ​​of the multiple second sampling pixels to obtain filter kernel parameters of the updated pixels; performing sharpening processing on the updated pixels based on the filter kernel parameters of the updated pixels and the brightness values ​​of the multiple second sampling pixels to obtain sharpened updated pixels; and using the set of multiple sharpened updated pixels as the rendered image corresponding to the target image.

[0158] For example, first, multiple second sampling pixels of the update pixel are sampled from the updated up-sampled image, that is, the up-sampled color values ​​of the current pixel (that is, the traversed update pixel) and its four upper, lower, left and right adjacent pixels are sampled, and the brightness values ​​corresponding to the current pixel and its four upper, lower, left and right adjacent pixels (that is, the second adjacent pixels) are determined.

[0159] like Fig.10 As shown, the current pixel is pixel e, and the four adjacent pixels above, below, left and right of pixel e are pixel b, pixel h, pixel d, and pixel f respectively.

[0160] Then, the process of performing filter kernel processing based on the brightness values ​​of multiple second sampling pixels is as follows: determine the RCAS filter kernel parameters (referred to as filter kernel parameters) through the maximum pixel brightness and minimum pixel brightness of pixel b, pixel e, pixel f, pixel d, and pixel h.

[0161] For example, according to the maximum pixel brightness and minimum pixel brightness of pixel b, pixel e, pixel f, pixel d, and pixel h, according to the formula The RCAS filter kernel parameters are obtained, where Scale is exp(-0.25), Min represents the minimum pixel brightness of pixel b, pixel e, pixel f, pixel d, and pixel h, Max represents the maximum pixel brightness of pixel b, pixel e, pixel f, pixel d, and pixel h, and w represents the RCAS filter kernel parameters.

[0162] Next, based on the filter kernel parameters of the update pixel and the brightness values ​​of the plurality of second sampling pixels, the update pixel is sharpened to obtain a sharpened update pixel.

[0163] For example, through the RCAS filter kernel parameters, according to the formula The updated pixel color value after sharpening), where f() represents the brightness value of the pixel, w represents the RCAS filter kernel parameter, F(Q) represents the color value of the pixel e after sharpening, and the pixel point Q x,y+1 represents pixel b, pixel Q x-1,y Represents pixel d, pixel Q x,y Represents pixel e, pixel Q x+1,y represents pixel f, pixel Q x,y-1 Represents pixel h.

[0164] It should be noted that after performing sharpening once for each updated pixel, the set of multiple sharpened updated pixels is used as the rendered image corresponding to the target image. Therefore, the local contrast near the pixel is used to adjust the color of the pixel to eliminate the blurring of details caused by anti-aliasing, image stretching and other operations.

[0165] The following is an explanation of an exemplary application of the embodiments of the present application in a practical application scenario.

[0166] The embodiments of the present application can be applied to various image rendering scenarios, such as game applications, photo editing applications, etc.

[0167] In the related art, the image super resolution (AMD FSR 1.0, AMD FidelityFX SuperResoluition 1.0) method is based on the spatial domain to achieve pixel adaptive upsampling, which can improve the image resolution while maintaining the image details. The image super resolution (AMD FSR 1.0, AMD FidelityFX Super Resoluition1.0) method includes two rendering processes (Render Pass), one of which is Edge Adaptive Spatial Upsampling (EASU). EASU provides the function of adaptive edge upsampling, which can up sample low-resolution images to high resolution.

[0168] For each pixel, EASU needs to perform 12 samples, that is, EASU's 12-tap bilinear interpolation, which requires sampling 12 adjacent pixels around the current pixel, for a total of 12 samples. The image super-resolution algorithm is used to optimize personal computer (PC) games. 12 samples have little effect on PC games, but the sampling overhead is a bit large for mobile devices. Because as the number of samples increases, the shader's time consumption and bandwidth overhead will increase. Mobile devices are extremely sensitive to bandwidth. An increase in bandwidth will cause the mobile device's hardware to heat up faster, causing the graphics processor (GPU) to downclock, ultimately affecting the game's frame rate and giving players a bad gaming experience.

[0169] In order to solve the above problems, the embodiment of the present application provides a high-performance supersampling method to optimize the shader of EASU and reduce the number of sampling times during upsampling, thereby reducing the sampling overhead and bandwidth overhead in the entire upsampling process, and ultimately being able to be efficiently applied on the mobile terminal.

[0170] Combine the following Figure 4 Specifically describe the high performance supersampling method provided by the embodiment of the present application:

[0171] It should be noted that the resolution of the rendering target (RenderTarget) of the EASU Render Pass is set to the screen resolution so that the resolution can be upsampled to the screen resolution, wherein the pixel values ​​of the newly added pixels in the upsampling process can be set to the initial values, for example, the pixel values ​​of the newly added pixels are set to (0,0,0), and then the EASU upsampling is performed once for each pixel of the screen resolution through the following steps 1 to 4.

[0172] Step 1: Sample four bilinear interpolation adjacent pixels (also referred to as first sampling pixels) for the current up-sampled pixel, and determine the bilinear interpolation weights corresponding to the four bilinear interpolation adjacent pixels.

[0173] like Figure 5 As shown, the current upsampled pixel is f, and the four adjacent pixels f, pixel g, pixel j, and pixel k of bilinear interpolation are the bilinear interpolation adjacent pixels of the upsampled pixel f. The distance between the bilinear interpolation adjacent pixels and the origin coordinates of the current upsampled pixel f is used as the bilinear interpolation weight of the bilinear interpolation adjacent pixels, where the origin coordinates of the current upsampled pixel f are floor(f), and floor() means rounding down.

[0174] Step 2: Determine the gradients in the horizontal and vertical directions based on the five middle sub-pixels interpolated from the four adjacent pixels using bilinear interpolation.

[0175] like Figure 6 As shown, the four bilinear interpolation adjacent pixels f, g, j, k are interpolated to obtain five intermediate sub-pixels A, B, C, D, E. The brightness values ​​of these five intermediate sub-pixels are obtained by interpolating the brightness values ​​of the bilinear interpolation adjacent pixels f, g, j, k, as shown in formula (1):

[0176]

[0177]

[0178] Among them, L represents the brightness value of the pixel, p x represents the horizontal distance between the current pixel (i.e., the middle sub-pixel A, B, C, D, E) and the origin coordinate of pixel f, p y Indicates the vertical distance between the current pixel and the origin coordinates of pixel f.

[0179] It should be noted that the arrangement of the five middle sub-pixels A, B, C, D, and E is as follows: Figure 7 As shown, pixel Q x,y+1 Indicates the middle sub-pixel A, pixel Q x-1,y Indicates the middle sub-pixel B, pixel Q x,yIndicates the middle sub-pixel C, pixel Q x+1,y Indicates the middle sub-pixel D, pixel Q x,y-1 Represents the middle sub-pixel E.

[0180] Then, the horizontal and vertical gradients are calculated according to formula (2):

[0181] D x =f(Q x-1,y )-f(Q x+1,y ) (2)

[0182] D y =f(Q x,y-1 )-f(Q x,y+1 )

[0183] Among them, f() represents the brightness of the pixel, D x Represents the horizontal gradient, D y Represents the vertical gradient.

[0184] It should be noted that, compared with the 4 sets of gradients that need to be calculated in the bilinear interpolation scheme of 12 taps, the embodiment of the present application only needs to calculate 1 set of gradients, thereby saving the amount of gradient calculation.

[0185] Step 3: Based on the brightness values ​​of the five middle sub-pixels, determine the edge feature Feature of the current up-sampled pixel.

[0186] It should be noted that the embodiments of the present application are not limited to the calculation process of the brightness value, for example, the brightness value bright = 0.299*R+0.587*G+0.114*B, where R represents the red value of the pixel, G represents the green value of the pixel, and B represents the blue value of the pixel.

[0187] The calculation process of edge feature Feature is shown in formula (3):

[0188] F=(FX 2 +FY 2 ) (3)

[0189]

[0190]

[0191] Among them, f() represents the gray value of the pixel, and the pixel point Q x,y+1 Indicates the middle sub-pixel A, pixel Q x-1,y Indicates the middle sub-pixel B, pixel Q x,y Indicates the middle sub-pixel C, pixel Q x+1,y Indicates the middle sub-pixel D, pixel Q x,y-1represents the middle sub-pixel E. FX represents the initial edge feature in the horizontal direction, and FY represents the initial edge feature in the vertical direction.

[0192] It should be noted that FX and FY belong to [0,1], so F belongs to [0,2]. F is normalized and mapped to [0,1] to obtain the edge feature Feature.

[0193] Step 4: Based on the edge feature Feature, determine the control parameter w of the Lansczcos2 function, and perform edge rotation of the pixel according to the gradient obtained in step 2. Then, determine the upsampled color value (Upsample Color) according to the bilinear interpolation weight obtained in step 1.

[0194] First, it is necessary to establish the relationship between the edge feature Feature and the control parameter w, that is, the linear relationship (adjustable) as shown in formula (4):

[0195]

[0196] Therefore, based on the edge feature Feature and the linear relationship obtained in step 3, the control parameter w of the Lansczcos2 function is determined.

[0197] Then, obtain the gradient determined in step 2 and set Dir = (cosθ, sinθ) = (D x ,D y ), according to formula (5), the edge rotation of the pixel is performed, that is, Dir is used to rotate x(x,y) in the Lansczcos2 function L(x), which can adapt to the edge rotation situation:

[0198]

[0199] Among them, x represents the horizontal distance between the current pixel and the origin coordinates, and y represents the vertical distance between the current pixel and the origin coordinates. That is, when calculating L(x), D x ,D y The length of the current pixel from the origin coordinate will be multiplied to replace x(x,y) in the Lansczcos2 function L(x). The calculation process of the Lansczcos2 function L(x) is shown in formula (6):

[0200]

[0201] Among them, w represents the control parameter used to control x(x,y) to belong to the interval [-2,-1], [1,2], and x(x,y) represents the distance between the current pixel and the origin coordinates, that is, Among them, the function graph of Lansczcos2 function L(x) is as follows Figure 8 As shown, when L(x) is a negative number, it means that the current pixel is an edge pixel.

[0202] Next, according to the bilinear interpolation weights obtained in step 1, the four bilinear interpolation adjacent pixels are weighted summed according to formula (7) to obtain the upsampled color value (Upsample Color):

[0203]

[0204] Among them, L(x) represents the Lanczocs2 value of the current pixel (i.e., the edge coefficient), where x is the pixel after edge rotation, i.e., L(x) f The value of Lanczocs2 for pixel f, L(x) g The value of Lanczocs2 for pixel g, L(x) j represents the value of Lanczocs2 of pixel j, L(x) k represents the Lanczocs2 value of pixel k. d represents the distance between the current pixel and the origin coordinate (i.e., the bilinear interpolation weight of the current pixel). For example, for pixel j, d = (0, 1), i.e. represents the bilinear interpolation weight of pixel f, represents the bilinear interpolation weight of pixel g, represents the bilinear interpolation weight of pixel j, represents the bilinear interpolation weight of pixel k. f represents the gray value of the current pixel, that is, f f Represents the grayscale value of pixel f, f g represents the gray value of pixel g, f j represents the gray value of pixel j, f k Represents the grayscale value of pixel k.

[0205] It should be noted that after performing EASU upsampling once for each pixel of the screen resolution, the following can be obtained: Fig. 9 The upsampled image shown. After performing EASU upsampling once for each pixel of the screen resolution, Robust Contrast Adaptive Sharpening (RCAS) can also be performed once for each pixel of the screen resolution. RCAS provides a sharpening function that can enhance the details of the upsampled image. As shown below, through the following steps 5 to 7, RCAS is performed once for each pixel of the screen resolution to achieve the sharpening function.

[0206] Step 5: Sample the upsampled color values ​​of the current pixel and its four upper, lower, left, and right adjacent pixels (ie, EASU results), and determine the brightness values ​​corresponding to the current pixel and its four upper, lower, left, and right adjacent pixels respectively.

[0207] like Fig.10 As shown, the current pixel is pixel e, and the four adjacent pixels above, below, left and right of pixel e are pixel b, pixel h, pixel d, and pixel f respectively.

[0208] Step 6: Determine the RCAS filter kernel parameters (referred to as filter kernel parameters) through the maximum pixel brightness and the minimum pixel brightness of pixel b, pixel e, pixel f, pixel d, and pixel h.

[0209] For example, the RCAS filter kernel parameters are obtained according to formula (8) through the maximum pixel brightness and the minimum pixel brightness of pixel b, pixel e, pixel f, pixel d, and pixel h:

[0210]

[0211] Among them, Scale is exp(-0.25), Min represents the minimum pixel brightness of pixel b, pixel e, pixel f, pixel d, and pixel h, Max represents the maximum pixel brightness of pixel b, pixel e, pixel f, pixel d, and pixel h, and w represents the RCAS filter kernel parameter.

[0212] Based on the RCAS filter kernel parameters, we can get Fig.11 The RCAS filter core is shown.

[0213] Step 7: Based on the RCAS filter kernel parameters, determine the upsampling result after sharpening.

[0214] For example, the upsampling result after sharpening is calculated according to formula (9) through the RCAS filter kernel parameters:

[0215]

[0216] Among them, f() represents the brightness value of the pixel, w represents the RCAS filter kernel parameter, F(Q) represents the color value of the pixel e after sharpening, and the pixel point Q x,y+1 represents pixel b, pixel Q x-1,y Represents pixel d, pixel Q x,y Represents pixel e, pixel Q x+1,y represents pixel f, pixel Q x,y-1 Represents pixel h.

[0217] It should be noted that after performing RCAS sharpening once for each pixel of the screen resolution, the following can be obtained: Fig.12 The sharpened image shown.

[0218] In order to verify the high-performance supersampling method provided in the embodiment of the present application, the high-performance supersampling method is applied to the mobile terminal. Fig.13A Shows images with native 720P resolution. Fig. 13B Shows the image at native 540P resolution. Fig. 13C The image generated by 540P resolution + AMD FSR 1.0 is shown. Fig.13D An image generated by 540P resolution + the high-performance supersampling method provided in an embodiment of the present application is shown. Fig.13A and Fig. 13B This is an effect diagram of using bilinear interpolation upsampling (Upsample) to screen resolution provided by an editing software (such as UE). Fig. 13C This is the effect of using FSR Upsample to screen resolution. Fig.13D This is an effect picture that is upsampled to the screen resolution using a high-performance supersampling method. By comparing the effect pictures, it can be found that the original 540P is very blurry in some places, such as the character's hair 11, the edges of the clothes 12, and other details, while AMD FSR 1.0 can upsample the original resolution of 540P to the same as 720P. The technical solution of the embodiment of the present application is very close to the original AMD FSR in terms of effect, and the difference is basically invisible to the naked eye.

[0219] Regarding the comparison of performance data, the performance data of AMD FSR 1.0 running at the original resolution of 540P is as follows: EASU (1.16 milliseconds) + RCAS (684.02 microseconds), and the performance data of the technical solution of the embodiment of the present application running at the original resolution of 540P is as follows: EASU (674.92 microseconds) + RCAS (692.85 microseconds). Therefore, the technical solution of the embodiment of the present application is nearly 0.5ms less than AMD FSR 1.0 in EASU, optimizing 42% of the overhead.

[0220] Regarding the comparison of bandwidth data, compared with the original resolution 720P resolution, the technical solution of the embodiment of the present application + the 540P resolution solution can save nearly 27 megabytes of bandwidth, which is very useful for low-end machines. While avoiding high bandwidth, it can also ensure image quality close to 720P.

[0221] In summary, the high-performance supersampling method provided in the embodiment of the present application optimizes the 12 samplings of the EASU with the largest overhead of AMD FSR 1.0 to 4 samplings, reducing the number of samplings by 2 / 3, and the computational overhead of the entire EASU is also reduced by 2 / 3, thereby reducing the sampling overhead and bandwidth overhead in the entire upsampling process, and ultimately being able to be efficiently applied on the mobile terminal.

[0222] So far, the image rendering method provided by the embodiment of the present application has been described in combination with the exemplary application and implementation of the electronic device provided by the embodiment of the present application. The following will continue to describe the cooperation of various modules in the image rendering device 555 provided by the embodiment of the present application to implement the image rendering scheme.

[0223] The upsampling module 5551 is used to perform upsampling processing on the target image to obtain an upsampled image, wherein the upsampled image includes multiple upsampled pixels; traverse the upsampled pixels in the upsampled image, and perform the following processing on the traversed upsampled pixels: sample multiple first sampling pixels of the upsampled pixels from the upsampled image, and determine the linear interpolation weight of each of the first sampling pixels, wherein the multiple first sampling pixels include the upsampled pixel and multiple first adjacent pixels; perform interpolation processing on the multiple first sampling pixels of the upsampled pixels to obtain multiple intermediate sub-pixels of the first sampling pixels; based on the multiple intermediate sub-pixels and the linear interpolation weight of each of the first sampling pixels, perform linear fitting processing based on pixel color values ​​on the upsampled pixels to obtain upsampled color values ​​of the upsampled pixels; the processing module 5552 is used to perform image rendering processing on the upsampled image based on the upsampled color values ​​corresponding to the multiple upsampled pixels, to obtain a rendered image corresponding to the target image.

[0224] In some embodiments, the upsampling module 5551 is also used to use a first adjacent pixel in the row direction of the upsampled pixel as the first pixel; use a first adjacent pixel in the column direction of the upsampled pixel as the second pixel; use a first adjacent pixel in the column direction of the first pixel as the third pixel; sample the first pixel, the second pixel, the third pixel and the upsampled pixel in the upsampled image as the first sampling pixels; and determine the distance between the coordinates of each of the first sampling pixels and the origin coordinates of the upsampled pixel as the linear interpolation weight of each of the first sampling pixels.

[0225] In some embodiments, the upsampling module 5551 is further used to insert a plurality of initial pixels in a cross-shaped manner into the plurality of first sampling pixels; and based on the brightness values ​​of the plurality of first sampling pixels, perform bilinear interpolation processing on the plurality of initial pixels to obtain a plurality of intermediate sub-pixels of the first sampling pixels.

[0226] In some embodiments, based on the linear interpolation weights of the multiple intermediate sub-pixels and each of the first sampling pixels, the up-sampled pixels are subjected to linear fitting processing based on pixel color values ​​to obtain the up-sampled color values ​​of the up-sampled pixels. The up-sampling module 5551 is also used to perform gradient processing based on edge angles on the multiple intermediate sub-pixels to obtain the edge rotation angles of the up-sampled pixels; based on the edge rotation angles of the up-sampled pixels, the up-sampled pixels are subjected to edge rotation processing based on origin coordinates to obtain the up-sampled pixels used for performing linear fitting processing based on pixel color values.

[0227] In some embodiments, the upsampling module 5551 is also used to obtain the brightness value of each of the intermediate sub-pixels; based on the brightness value of each of the intermediate sub-pixels, edge feature fitting processing is performed on the upsampled pixels to obtain edge features of the upsampled pixels; based on the edge features of the upsampled pixels and the linear interpolation weights of each of the first sampling pixels, bilinear interpolation fitting processing based on the first sampling pixels is performed on the upsampled pixels to obtain upsampled color values ​​of the upsampled pixels.

[0228] In some embodiments, the upsampling module 5551 is also used to perform feature fitting processing in the row direction on the upsampled pixels based on the brightness value of each of the intermediate sub-pixels to obtain the edge features in the row direction; perform feature fitting processing in the column direction on the upsampled pixels based on the brightness value of each of the intermediate sub-pixels to obtain the edge features in the column direction; and fuse the edge features in the row direction and the edge features in the column direction to obtain the edge features of the upsampled pixels.

[0229] In some embodiments, the upsampling module 5551 is further used to determine the edge features in the row direction and the sum of the squares in the column direction as the initial edge features of the upsampled pixels; and normalize the initial edge features of the upsampled pixels to obtain the edge features of the upsampled pixels.

[0230] In some embodiments, the upsampling module 5551 is also used to perform mapping processing on the edge features of the upsampled pixels based on control parameters to obtain the control parameters of the upsampled pixels; based on the control parameters of the upsampled pixels, perform polynomial fitting processing on the upsampled pixels based on edge coefficients to obtain the edge coefficients of the upsampled pixels; based on the edge coefficients of the upsampled pixels and the linear interpolation weights of each of the first sampling pixels, perform bilinear interpolation processing on the upsampled pixels based on the multiple first sampling pixels to obtain the upsampled color values ​​of the upsampled pixels.

[0231] In some embodiments, the upsampling module 5551 is further used to obtain the edge coefficient of each of the first adjacent pixels; based on the edge coefficient of the upsampled pixel and the edge coefficient of each of the first adjacent pixels, weighted processing is performed on the linear interpolation weight of each of the first sampling pixels to obtain the final linear interpolation weight of each of the first sampling pixels; based on the final linear interpolation weight of each of the first sampling pixels, weighted summation processing is performed on the grayscale value of each of the first sampling pixels to obtain the upsampled color value of the upsampled pixel.

[0232] In some embodiments, the processing module 5552 is also used to update the upsampled image based on the upsampled color values ​​corresponding to the multiple upsampled pixels, respectively, to obtain the updated upsampled image, wherein the updated upsampled image includes multiple updated pixels; and to sharpen the updated upsampled image to obtain a rendered image corresponding to the target image.

[0233] In some embodiments, the processing module 5552 is also used to traverse the updated pixels in the updated upsampled image, and perform the following processing on the traversed updated pixels: sampling multiple second sampling pixels of the updated pixel from the updated upsampled image, and determining the brightness value of each of the second sampling pixels, wherein the multiple second sampling pixels include the update pixel and multiple second adjacent pixels; performing filter kernel processing based on the brightness values ​​of the multiple second sampling pixels to obtain filter kernel parameters of the update pixel; performing sharpening processing on the update pixel based on the filter kernel parameters of the update pixel and the brightness values ​​of the multiple second sampling pixels to obtain the sharpened update pixel; and using a set of multiple sharpened update pixels as a rendered image corresponding to the target image.

[0234] The embodiment of the present application provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device performs the image rendering method described above in the embodiment of the present application.

[0235] The present application embodiment provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions or computer programs are stored. When the computer-executable instructions or computer programs are executed by a processor, the processor will be caused to execute the image rendering method provided by the present application embodiment, for example, Figure 3A-3B An image rendering method is shown.

[0236] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or it may be various devices including one or any combination of the above memories.

[0237] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.

[0238] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file storing other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).

[0239] As an example, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.

[0240] It is understandable that in the embodiments of the present application, related data such as user information is involved. When the embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0241] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.

Claims

1. An image rendering method, characterized in that: The method comprises: Performing upsampling processing on the target image to obtain an upsampled image, wherein the upsampled image includes a plurality of upsampled pixels; Traversing the upsampled pixels in the upsampled image, and performing the following processing on the traversed upsampled pixels: sampling a plurality of first sampled pixels of the upsampled pixels from the upsampled image, and determining a linear interpolation weight of each of the first sampled pixels, wherein the plurality of first sampled pixels include the upsampled pixels and a plurality of first adjacent pixels; Performing interpolation processing on a plurality of first sampling pixels of the up-sampled pixel to obtain a plurality of intermediate sub-pixels of the first sampling pixel; Based on the linear interpolation weights of the plurality of intermediate sub-pixels and each of the first sampling pixels, performing a linear fitting process based on the pixel color value on the up-sampled pixel to obtain an up-sampled color value of the up-sampled pixel; Based on the up-sampled color values ​​respectively corresponding to the multiple up-sampled pixels, the up-sampled image is subjected to image rendering processing to obtain a rendered image corresponding to the target image.

2. The method according to claim 1, characterized in that The step of sampling a plurality of first sampling pixels of the up-sampled pixels from the up-sampled image comprises: Taking a first adjacent pixel in the row direction of the up-sampled pixel as a first pixel; Using a first adjacent pixel in the column direction of the up-sampled pixel as a second pixel; using a first adjacent pixel in the column direction of the first pixel as a third pixel; sampling the first pixel, the second pixel, the third pixel and the upsampled pixel in the upsampled image as the first sampled pixel; The step of determining a linear interpolation weight of each of the first sampling pixels comprises: The distance between the coordinates of each of the first sampling pixels and the origin coordinates of the up-sampled pixels is determined as a linear interpolation weight of each of the first sampling pixels.

3. The method according to claim 1, characterized in that The interpolation processing is performed on the plurality of first sampling pixels of the up-sampled pixel to obtain a plurality of intermediate sub-pixels of the first sampling pixel, comprising: Inserting a plurality of initial pixels in a cross-shaped manner into the plurality of first sampling pixels; Based on the brightness values ​​of the plurality of first sampling pixels, bilinear interpolation processing is performed on the plurality of initial pixels to obtain a plurality of intermediate sub-pixels of the first sampling pixels.

4. The method according to claim 1, characterized in that: Before performing linear fitting processing based on pixel color values ​​on the upsampled pixels based on the linear interpolation weights of the plurality of intermediate sub-pixels and each of the first sampled pixels to obtain upsampled color values ​​of the upsampled pixels, the method further includes: Performing gradient processing based on edge angles on the plurality of middle sub-pixels to obtain edge rotation angles of the up-sampled pixels; Based on the edge rotation angle of the up-sampled pixel, edge rotation processing based on the origin coordinates is performed on the up-sampled pixel to obtain the up-sampled pixel used for linear fitting processing based on the pixel color value.

5. The method according to claim 1 or 4, characterized in that: The performing a linear fitting process based on the pixel color value on the upsampled pixel based on the linear interpolation weights of the plurality of intermediate sub-pixels and each of the first sampled pixels to obtain an upsampled color value of the upsampled pixel includes: Obtaining a brightness value of each of the intermediate sub-pixels; Based on the brightness value of each of the middle sub-pixels, edge feature fitting processing is performed on the up-sampled pixels to obtain edge features of the up-sampled pixels; Based on the edge features of the up-sampled pixels and the linear interpolation weight of each of the first sampled pixels, a bilinear interpolation fitting process based on the first sampled pixels is performed on the up-sampled pixels to obtain an up-sampled color value of the up-sampled pixels.

6. The method according to claim 5, characterized in that The performing edge feature fitting processing on the upsampled pixel based on the brightness value of each of the intermediate sub-pixels to obtain the edge feature of the upsampled pixel includes: Based on the brightness value of each of the middle sub-pixels, performing feature fitting processing on the up-sampled pixels in a row direction to obtain edge features in the row direction; Based on the brightness value of each of the middle sub-pixels, performing feature fitting processing on the up-sampled pixels in a column direction to obtain edge features in the column direction; The edge features in the row direction and the edge features in the column direction are fused to obtain the edge features of the upsampled pixels.

7. The method according to claim 6, characterized in that The fusing the edge features in the row direction and the edge features in the column direction to obtain the edge features of the upsampled pixels includes: Determine the edge feature in the row direction and the sum of the squares in the column direction as the initial edge feature of the up-sampled pixel; Normalizing the initial edge features of the upsampled pixels to obtain edge features of the upsampled pixels.

8. The method according to claim 5, characterized in that The step of performing bilinear interpolation fitting processing based on the first sampling pixels on the up-sampled pixels based on the edge features of the up-sampled pixels and the linear interpolation weight of each of the first sampling pixels to obtain an up-sampled color value of the up-sampled pixels includes: Performing mapping processing on the edge features of the upsampled pixels based on the control parameters to obtain the control parameters of the upsampled pixels; Based on the control parameters of the up-sampled pixels, performing a polynomial fitting process based on edge coefficients on the up-sampled pixels to obtain edge coefficients of the up-sampled pixels; Based on the edge coefficient of the up-sampled pixel and the linear interpolation weight of each of the first sampled pixels, bilinear interpolation processing based on the multiple first sampled pixels is performed on the up-sampled pixel to obtain an up-sampled color value of the up-sampled pixel.

9. The method according to claim 8, characterized in that The step of performing bilinear interpolation processing based on the plurality of first sampling pixels on the up-sampled pixel based on the edge coefficient of the up-sampled pixel and the linear interpolation weight of each of the first sampling pixels to obtain an up-sampled color value of the up-sampled pixel includes: Obtaining an edge coefficient of each of the first adjacent pixels; Based on the edge coefficient of the up-sampled pixel and the edge coefficient of each of the first adjacent pixels, weighted processing is performed on the linear interpolation weight of each of the first sampled pixels to obtain a final linear interpolation weight of each of the first sampled pixels; Based on the final linear interpolation weight of each of the first sampling pixels, a weighted sum process is performed on the grayscale value of each of the first sampling pixels to obtain an up-sampled color value of the up-sampled pixel.

10. The method according to claim 1, characterized in that The performing image rendering processing on the upsampled image based on the upsampled color values ​​respectively corresponding to the plurality of upsampled pixels to obtain a rendered image corresponding to the target image includes: Based on the up-sampled color values ​​respectively corresponding to the multiple up-sampled pixels, the up-sampled image is updated to obtain the updated up-sampled image, wherein the updated up-sampled image includes the multiple updated pixels; The updated up-sampled image is sharpened to obtain a rendered image corresponding to the target image.

11. The method according to claim 10, characterized in that The step of performing sharpening processing on the updated up-sampled image to obtain a rendered image corresponding to the target image includes: Traversing the update pixels in the updated up-sampled image, and performing the following processing on the traversed update pixels: sampling a plurality of second sampling pixels of the update pixel from the updated up-sampled image, and determining a brightness value of each of the second sampling pixels, wherein the plurality of second sampling pixels include the update pixel and a plurality of second adjacent pixels; Performing filter kernel processing based on the brightness values ​​of the plurality of second sampling pixels to obtain filter kernel parameters of the updated pixels; Based on the filter kernel parameter of the update pixel and the brightness values ​​of the plurality of second sampling pixels, the update pixel is sharpened to obtain the sharpened update pixel; A set of the multiple sharpened update pixels is used as a rendering image corresponding to the target image.

12. An image rendering device, characterized in that: The device comprises: An upsampling module, used for performing upsampling processing on the target image to obtain an upsampled image, wherein the upsampled image includes a plurality of upsampled pixels; Traversing the upsampled pixels in the upsampled image, and performing the following processing on the traversed upsampled pixels: sampling a plurality of first sampled pixels of the upsampled pixels from the upsampled image, and determining a linear interpolation weight of each of the first sampled pixels, wherein the plurality of first sampled pixels include the upsampled pixels and a plurality of first adjacent pixels; Performing interpolation processing on a plurality of first sampling pixels of the up-sampled pixel to obtain a plurality of intermediate sub-pixels of the first sampling pixel; Based on the linear interpolation weights of the plurality of intermediate sub-pixels and each of the first sampling pixels, performing a linear fitting process based on the pixel color value on the up-sampled pixel to obtain an up-sampled color value of the up-sampled pixel; The processing module is used to perform image rendering processing on the upsampled image based on the upsampled color values ​​respectively corresponding to the multiple upsampled pixels, so as to obtain a rendered image corresponding to the target image.

13. An electronic device, characterized in that: The electronic device comprises: A memory for storing computer executable instructions; A processor, configured to implement the image rendering method according to any one of claims 1 to 11 when executing the computer executable instructions stored in the memory.

14. A computer-readable storage medium, characterized in that: A computer program or a computer executable instruction is stored, and when the computer program or the computer executable instruction is executed by a processor, the image rendering method according to any one of claims 1 to 11 is implemented.

15. A computer program product comprising a computer program or computer executable instructions, characterized in that: When the computer program or computer executable instruction is executed by a processor, the image rendering method according to any one of claims 1 to 11 is implemented.