Rendering Method, Rendering Device, Computer-Readable Storage Medium, and Electronic Device

By reducing resolution and interpolation processing of boundary pixel points, the second scene image is generated for rendering, and the problem of high GPU load during the rendering process is solved, achieving performance improvement and image quality retention.

CN114972605BActive Publication Date: 2025-06-24GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210809442.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-11
Publication Date
2025-06-24
Estimated Expiration
2042-07-11

AI Technical Summary

Technical Problem

The GPU load is high during rendering, resulting in performance bottlenecks.

Method used

By reducing the resolution of the scene image to be rendered, boundary pixel points are determined, and interpolated processing is used to generate a second scene image, thereby rendering.

Benefits of technology

Reduces GPU load, retains image boundary information, reduces the impact on user perception, and is suitable for various types of application interfaces.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114972605B_ABST
    Figure CN114972605B_ABST
Patent Text Reader

Abstract

The present disclosure provides a rendering method, a rendering device, a computer-readable storage medium, and an electronic device, relating to the field of computer technologies. The rendering method includes: obtaining a scene image to be rendered, reducing the resolution of the scene image to be rendered to obtain a first scene image; determining boundary pixel points in the first scene image, and performing interpolation processing on the first scene image by using the determination result of the boundary pixel points to obtain a second scene image; and performing rendering based on the second scene image. The present disclosure can reduce the GPU load.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technologies, and in particular, to a rendering method, a rendering device, a computer-readable storage medium, and an electronic device. Background Art

[0002] Before a terminal device displays the interface of an application, it is necessary to first render the interface of the application through a GPU (Graphics Processing Unit). However, the rendering process usually causes a high load on the GPU. Summary of the Invention

[0003] The present disclosure provides a rendering method, a rendering device, a computer-readable storage medium, and an electronic device, thereby at least to some extent overcoming the problem of high GPU load during the rendering process.

[0004] According to a first aspect of the present disclosure, there is provided a rendering method, including: reducing the resolution of a scene image to be rendered to obtain a first scene image; determining boundary pixel points in the first scene image, and performing interpolation processing on the first scene image by using the determination result of the boundary pixel points to obtain a second scene image; and performing rendering based on the second scene image.

[0005] According to a second aspect of the present disclosure, there is provided a rendering device, including: a resolution reduction module, configured to reduce the resolution of a scene image to be rendered to obtain a first scene image; an interpolation module, configured to determine boundary pixel points in the first scene image, and perform interpolation processing on the first scene image by using the determination result of the boundary pixel points to obtain a second scene image; and a rendering module, configured to perform rendering based on the second scene image.

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

[0007] According to a fourth aspect of the present disclosure, there is provided an electronic device, including a processor; and a memory, configured to store one or more programs, and when the one or more programs are executed by the processor, the processor implements the above-mentioned rendering method.

[0008] In the technical solutions provided by some embodiments of the present disclosure, the resolution of the image of the scene to be rendered is reduced to obtain a first scene image, and the first scene image is interpolated using the determination result of the boundary pixel points in the first scene image to obtain a second scene image, and rendering is performed based on the second scene image. On the one hand, by reducing the resolution of the image of the scene to be rendered to perform the rendering process, the GPU load can be reduced, and the image boundary information is retained by means of interpolation, further reducing the GPU load while minimally affecting the user perception; on the other hand, the solution of the present disclosure has strong universality, can render the interfaces of various types of application programs, and does not require the participation of application developers.

[0009] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The accompanying drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure. Obviously, the accompanying drawings in the following description are only some embodiments of the present disclosure, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts. In the drawings:

[0011] Figure 1 A schematic diagram showing the processing process of the rendering scheme of the embodiment of the present disclosure;

[0012] Figure 2 A schematic diagram showing the details of the rendering process taking the 3D scene rendering as an example of the present disclosure;

[0013] Figure 3 A flowchart schematically showing the rendering method according to an exemplary embodiment of the present disclosure;

[0014] Figure 4 A schematic diagram showing the location of the Hook Layer in the embodiment of the present disclosure;

[0015] Figure 5 A schematic diagram showing the filter used when calculating the pixel gradient in the embodiment of the present disclosure;

[0016] Figure 6 A schematic diagram showing the weights used in the lanczos interpolation process in the embodiment of the present disclosure;

[0017] Figure 7 A flowchart showing the process of obtaining the second scene image by means of interpolation in the embodiment of the present disclosure;

[0018] Figure 8The figure shows a flowchart of the entire rendering process of the present disclosure taking a rendered game application as an example;

[0019] Figure 9 The figure schematically shows a block diagram of a rendering device according to an exemplary embodiment of the present disclosure;

[0020] Figure 10 The figure schematically shows a block diagram of a rendering device according to another exemplary embodiment of the present disclosure;

[0021] Figure 11 The figure schematically shows a block diagram of a rendering device according to still another exemplary embodiment of the present disclosure;

[0022] Figure 12 The figure schematically shows a block diagram of an electronic device according to an exemplary embodiment of the present disclosure. Detailed Embodiments

[0023] Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The features, structures, or characteristics described may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of the embodiments of the present disclosure. However, those skilled in the art will realize that the technical solutions of the present disclosure can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring the various aspects of the present disclosure.

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

[0025] The flowcharts shown in the accompanying drawings are only illustrative and do not necessarily include all the steps. For example, some steps can be further decomposed, while some steps can be combined or partially combined, so the actual execution order may change according to the actual situation. Additionally, all the following terms "first", "second", "third", "fourth", etc. are only for the purpose of distinction and should not be construed as a limitation of the content of the present disclosure.

[0026] The rendering solution of the embodiments of the present disclosure can be implemented by an electronic device. That is to say, the electronic device can execute each step of the following rendering method, and the rendering device of the present disclosure can be configured in the electronic device. Among them, the electronic device can be, for example, a mobile terminal such as a smart phone, a tablet computer, a smart wearable device, etc. In addition, the electronic device can also be a server.

[0027] Figure 1 A schematic diagram showing the processing process of the rendering solution of the embodiments of the present disclosure is shown.

[0028] Reference Figure 1 , when the scene image to be rendered is obtained, the scene image to be rendered can be rendered by using the scene rendering process of the embodiments of the present disclosure to obtain a scene rendering result, and the scene rendering result can be cached. This process can be referred to as the scene rendering process. After the scene rendering process, the UI (User Interface) image to be rendered corresponding to the scene image to be rendered can be subjected to a UI rendering process to obtain a UI rendering result. This process can be referred to as the UI rendering process. Then, the electronic device can display the scene rendering result and the UI rendering result on the display screen.

[0029] It should be understood that the above rendering process is only a process of processing one frame of the scene image to be rendered by the application program. In a continuously rendered scene, the above rendering process is executed for each frame.

[0030] In addition, for the UI rendering process, if the UI interface does not change, after obtaining a UI rendering result, only the scene rendering process can be executed, continuously updating the scene at the display end while keeping the UI unchanged.

[0031] The application program of the embodiments of the present disclosure can be any application program installed in the electronic device, such as a game application program, a multimedia application program, a browser application program, etc.

[0032] Taking a game application program as an example, the scene image to be rendered can be the interface of the game running, including 2D or 3D game scene images. The corresponding UI image to be rendered can be the image corresponding to the game UI interface for realizing human-computer interaction.

[0033] Figure 2 A detailed schematic diagram of the rendering process of the embodiments of the present disclosure is shown.

[0034] Reference Figure 2 , first, the electronic device can perform 3D rendering on the 3D scene data and store the rendering result in the offscreen frame buffer 1.

[0035] Then, the resolution of the 3D rendering result can be reduced to obtain a first scene image, and the first scene image can be interpolated based on the boundary information to obtain a second scene image, and the second scene image is stored in the off-screen frame buffer 2.

[0036] Next, the electronic device can perform a post-processing rendering process on the second scene image to obtain a third scene image, and the third scene image can be stored in the post-processing frame buffer. Post-processing can include, but is not limited to, anti-aliasing (AA) processing, high dynamic range imaging (HDR) processing, etc.

[0037] Subsequently, the electronic device can perform a fusion rendering on the second scene image and the third scene image, and the fused image is denoted as a fourth scene image, and the fourth scene image is the 3D scene rendering result corresponding to the 3D scene data.

[0038] After determining the 3D scene rendering result, the UI data corresponding to the 3D scene data can be rendered to obtain a UI rendering result.

[0039] In this case, the 3D scene rendering result and the UI rendering result can be displayed on the display screen of the electronic device, thereby realizing the presentation of one frame of the picture.

[0040] Figure 3 Schematically shows a flowchart of a rendering method according to an exemplary embodiment of the present disclosure.

[0041] Refer to Figure 3 , the rendering method may include the following steps:

[0042] S32. Obtain a scene image to be rendered, and reduce the resolution of the scene image to be rendered to obtain a first scene image.

[0043] In an exemplary embodiment of the present disclosure, the scene image to be rendered may be a scene to be rendered by an application. The application may be any application that requires scene rendering installed on the electronic device, including but not limited to game applications, multimedia applications, browser applications, social applications, etc. The scene image to be rendered may include 2D scene images and 3D scene images, and the present disclosure does not limit the application and the scene to be rendered.

[0044] The scene image to be rendered is usually rendered in a specific off-screen window. According to some embodiments of the present disclosure, the off-screen window of the scene image to be rendered can be determined first.

[0045] Specifically, when the application starts, the electronic device can start the Hook Layer. Refer to Figure 4 , the Hook Layer is located between the application and the Graphics API (Application Programming Interface). Each Graphics API will pass through the Hook Layer to prepare for subsequent actions. Among them, the Graphics API includes but is not limited to OpenGL, OpenGL ES, Vulkan, DirectX, Metal, etc.

[0046] In the Hook Layer, the electronic device can find the off-screen window of the scene image to be rendered according to the label of the off-screen window or the label of the attachment of the off-screen window.

[0047] There are multiple attachments for the off-screen window, including but not limited to color buffer, depth buffer, and stencil buffer, etc. The attachments of the off-screen window correspond to memory or video memory. The color buffer is used to store colors. The depth buffer is used to store depth values to help the GPU cull occluded object pixels. The stencil buffer helps the GPU draw objects with special shapes or implement certain features.

[0048] After determining the off-screen window, the resolution of the scene image to be rendered can be reduced in the off-screen window to obtain the first scene image. The present disclosure does not limit the reduction multiple of the resolution. For example, the resolution of the first scene image can be 0.7 times or 0.8 times that of the scene image to be rendered.

[0049] The electronic device can determine the original resolution of the scene image to be rendered in the Hook Layer, and perform a reduction process on the original resolution in the Hook Layer to determine the first scene image.

[0050] It should be understood that when the application sets the viewport, if it has been switched to the off-screen window, the viewport is reset to the reduced-resolution viewport.

[0051] S34. Determine the boundary pixel points in the first scene image, and perform interpolation processing on the first scene image using the determination result of the boundary pixel points to obtain the second scene image.

[0052] After obtaining the first scene image, the electronic device can determine the boundary pixel points in the first scene image. It can be understood that the boundary pixel points can be the pixel points where the pixel information in the first scene image changes (especially mutates), and usually include the contour points of the objects in the first scene image.

[0053] It should be understood that to determine whether a pixel point is a boundary pixel point, the gray value of the pixel point can be used.

[0054] First, the electronic device can obtain the gradient values of the pixel points in the first scene image. Among them, the gradient value represents the directional derivative of a certain function at this point along this direction to obtain the maximum value, that is, the function changes fastest and has the largest change rate at this point along this direction. The central difference method can be used to calculate the gradient value of the pixel point.

[0055] Specifically, filters in the x - direction and y - direction can be used to process the grayscale values of the pixel points to obtain f(x) and f(y) respectively. Figure 5 An example of a set of filters is shown. The present disclosure places no restrictions on the parameter values and forms of the filters. The gradient value of the pixel point is determined by calculating, for example, the root of the sum of the squares of f(x) and f(y).

[0056] Next, the gradient value of the pixel point can be compared with the gradient threshold. If the gradient value of the pixel point is greater than the gradient threshold, it is determined that the pixel point is a boundary pixel point in the first scene image; if the gradient value of the pixel point is less than or equal to the gradient threshold, it is determined that the pixel point is a non - boundary pixel point in the first scene image. The present disclosure places no restrictions on the specific value of the gradient threshold. For example, the gradient threshold is set to 0.1.

[0057] After determining the boundary pixel points in the first scene image, the interpolation process can be performed on the first scene image using the determination result of the boundary pixel points to obtain the second scene image. Among them, the determination result of the boundary pixel points refers to the result of determining which pixel points in the first scene image are boundary pixel points, that is, the result of dividing the pixel points in the first scene image into boundary pixel points and non - boundary pixel points.

[0058] In the exemplary embodiment of the present disclosure, different interpolation methods are used for boundary pixel points and non - boundary pixel points.

[0059] Specifically, the first interpolation method can be used to perform interpolation processing on the boundary pixel points, and the second interpolation method can be used to perform interpolation processing on the non - boundary pixel points.

[0060] For non - boundary pixel points, the difference from surrounding pixel points is not large, so fewer surrounding pixel points can be taken for interpolation. For boundary pixel points, their difference from surrounding pixel points is usually large. If fewer surrounding pixel points are taken for interpolation, it is impossible to well reflect that they are boundaries. Therefore, more surrounding pixel points are taken for interpolation. That is to say, the number of surrounding pixel points selected for the first interpolation method for boundary pixel points is greater than the number of surrounding pixel points selected for the second interpolation method for non - boundary pixel points. For example, for the first interpolation method, 16 or 32 surrounding pixel points can be taken for interpolation, while for the second interpolation method, 4 or 8 surrounding pixel points can be taken for interpolation.

[0061] In some embodiments of the present disclosure, for the first interpolation method, the nearest m surrounding pixel points can be selected for interpolation with a boundary pixel point as the center. For the second interpolation method, the nearest n surrounding pixel points can be selected for frame interpolation with a non-boundary pixel point as the center. Among them, m is greater than n. For example, m can be 16, 20, 24, 32, etc., and n can be 4, 8, etc. The present disclosure does not limit the number of surrounding pixel points used for interpolation, which can be jointly determined according to the specific content of the image and the processing capability of the electronic device.

[0062] It can be understood that when using surrounding pixel points for interpolation, weights are usually configured for the surrounding pixel points. In order to further restore the boundary information, the weights of the surrounding pixel points in the first interpolation method include negative values, and the weights of the surrounding pixel points in the second interpolation method are all positive values.

[0063] That is to say, in the process of interpolating boundary pixel points using the first interpolation method, the pixel value and weight of the surrounding pixel points of the boundary pixel point are used to determine the pixel value of the boundary pixel point after interpolation. In the process of interpolating non-boundary pixel points using the second interpolation method, the pixel value and weight of the surrounding pixel points of the non-boundary pixel point are used to determine the pixel value of the non-boundary pixel point after interpolation. Among them, the weights of the surrounding pixel points of the boundary pixel point include negative values, and the weights of the surrounding pixel points of the non-boundary pixel point are all positive values. For example, the weights of the surrounding pixel points of the non-boundary pixel point are all positive values and the weights of each surrounding pixel point can be the same.

[0064] In some embodiments of the present disclosure, the first interpolation method can be the lanczos interpolation method, and the second interpolation method can be bilinear interpolation.

[0065] Figure 6 Shows a schematic diagram of using weights in the lanczos interpolation process of the embodiments of the present disclosure. Refer to Figure 6 , there are negative values in the weights configured for the surrounding pixel points in the lanczos interpolation method. For the bilinear interpolation method, it is easy to understand that the weighted average method of the surrounding pixel points is usually adopted, and the weights are all positive values. It should be understood that although both the first interpolation method and the second interpolation method can adopt the weighted average processing method, they are at least different in terms of weight configuration and the number of surrounding pixel points.

[0066] Figure 7 Shows a flowchart of obtaining the second scene image by using the interpolation means in the embodiments of the present disclosure.

[0067] In step S702, the gradient value of the pixel points in the first scene image can be calculated.

[0068] In step S704, it is determined whether the pixel point is a boundary pixel point based on the calculated gradient value. If it is not a boundary pixel point, step S706 is executed, and a bilinear interpolation process is adopted; if it is a boundary pixel point, step S708 is executed, and a lanczos interpolation process is adopted.

[0069] Combining the output results of step S706 and step S708, a second scene image can be obtained.

[0070] It should be noted that the resolution of the second scene image is usually the same as that of the original scene image to be rendered to ensure that the user's perception is not affected. However, in some other embodiments of the present disclosure, when the resolution of the scene image to be rendered is inconsistent with the display resolution, the resolution of the second scene image can also be inconsistent with the resolution of the scene image to be rendered, but consistent with the display resolution.

[0071] S36. Render based on the second scene image.

[0072] According to some embodiments of the present disclosure, the electronic device can render the second scene image to obtain a scene rendering result corresponding to the scene image to be rendered.

[0073] According to some other embodiments of the present disclosure, in order to further improve the quality of the output image, first, the electronic device can perform at least one post-processing process on the second scene image to obtain a third scene image. Among them, the post-processing can include but is not limited to anti-aliasing processing, high dynamic range imaging processing, etc.

[0074] Next, the electronic device can fuse the second scene image and the third scene image to obtain a fourth scene image. The fusion process can also be referred to as composite, and the fusion method can be controlled by the application side. In addition, fusion weights can be configured for the second scene image and the third scene image. For example, in order to improve the accuracy of the fused image, the weight of the second scene image can be configured to be greater than the weight of the third scene image.

[0075] Then, the electronic device can render the fourth scene image to obtain a scene rendering result corresponding to the scene image to be rendered.

[0076] If there is a user interface corresponding to this frame of the scene image to be rendered, after obtaining the scene rendering result, the electronic device can determine the user interface to be rendered corresponding to the scene image to be rendered, and render the user interface to be rendered according to the resolution of the user interface to be rendered to obtain a user interface rendering result.

[0077] By directly rendering according to the resolution of the user interface to be rendered, the image quality of the user interface will not be affected, ensuring a better interaction experience for the user.

[0078] After determining the scene rendering result and the user interface rendering result, the electronic device can display the scene rendering result and the user interface rendering result on the display screen, thereby presenting a frame of picture.

[0079] The following will refer to Figure 8 to describe the entire rendering process of the embodiments of the present disclosure.

[0080] In step S802, the electronic device acquires a game scene image to be rendered.

[0081] In step S804, the electronic device reduces the resolution of the game scene image to be rendered to obtain a first scene image.

[0082] In step S806, the electronic device determines the boundary pixel points and non-boundary pixel points in the first scene image.

[0083] In step S808, the electronic device interpolates the boundary pixel points by using a first interpolation method.

[0084] In step S810, the electronic device interpolates the non-boundary pixel points by using a second interpolation method.

[0085] In step S812, by using the interpolation results of step S808 and step S810, a second scene image can be generated.

[0086] In step S814, the electronic device can post-process the second scene image to obtain a third scene image.

[0087] In step S816, the electronic device can fuse the second scene image and the third scene image to obtain a fourth scene image.

[0088] In step S818, the electronic device can render the fourth scene image to obtain a game scene rendering result.

[0089] In step S820, the electronic device can render a game UI image corresponding to the game scene image to be rendered to obtain a game UI rendering result.

[0090] In step S822, the electronic device can display the game scene rendering result obtained in step S818 and the game UI rendering result obtained in step S820 on the display screen to complete the display of the current frame of picture.

[0091] It should be noted that after step S822 is executed, it can return to step S802 to implement the rendering of the next frame of picture.

[0092] It should be noted that although the steps of the methods in the present disclosure are described in a specific order in the accompanying drawings, this does not require or imply that these steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution, etc.

[0093] Furthermore, in this exemplary embodiment, a rendering device is also provided.

[0094] Figure 9 A block diagram of the rendering device according to an exemplary embodiment of the present disclosure is schematically shown. Referring to Figure 9 , the rendering device 9 according to an exemplary embodiment of the present disclosure may include a downsampling module 91, an interpolation module 93, and a rendering module 95.

[0095] Specifically, the downsampling module 91 may be configured to obtain the scene image to be rendered, reduce the resolution of the scene image to be rendered to obtain a first scene image; the interpolation module 93 may be configured to determine the boundary pixel points in the first scene image, and perform interpolation processing on the first scene image using the determination result of the boundary pixel points to obtain a second scene image; the rendering module 95 may be configured to perform rendering based on the second scene image.

[0096] According to an exemplary embodiment of the present disclosure, the interpolation module 93 may be configured to perform: performing interpolation processing on the boundary pixel points using a first interpolation method; performing interpolation processing on the non-boundary pixel points in the first scene image using a second interpolation method; wherein, the number of surrounding pixel points selected for the boundary pixel points by the first interpolation method is greater than the number of surrounding pixel points selected for the non-boundary pixel points by the second interpolation method.

[0097] According to an exemplary embodiment of the present disclosure, the interpolation module 93 may be configured to perform: determining the pixel value of the interpolated boundary pixel points using the pixel values and weights of the surrounding pixel points of the boundary pixel points; determining the pixel value of the interpolated non-boundary pixel points using the pixel values and weights of the surrounding pixel points of the non-boundary pixel points; wherein, the weights of the surrounding pixel points of the boundary pixel points include negative values, and the weights of the surrounding pixel points of the non-boundary pixel points are all positive values.

[0098] According to an exemplary embodiment of the present disclosure, the process of the interpolation module 93 for determining the boundary pixel points may be configured to perform: obtaining the gradient value of the pixel points in the first scene image; comparing the gradient value of the pixel points with a gradient threshold; if the gradient value of the pixel points is greater than the gradient threshold, determining the pixel points as the boundary pixel points in the first scene image.

[0099] According to an exemplary embodiment of the present disclosure, the downsampling module 91 may be configured to perform: determining an off-screen window of the scene image to be rendered; downsampling the resolution of the scene image to be rendered in the off-screen window to obtain a first scene image.

[0100] According to an exemplary embodiment of the present disclosure, the rendering module 95 may be configured to perform: rendering the second scene image to obtain a scene rendering result corresponding to the scene image to be rendered.

[0101] According to an exemplary embodiment of the present disclosure, the rendering module 95 may also be configured to perform: performing at least one post-processing process on the second scene image to obtain a third scene image; fusing the second scene image and the third scene image to obtain a fourth scene image; rendering the fourth scene image to obtain a scene rendering result corresponding to the scene image to be rendered.

[0102] According to an exemplary embodiment of the present disclosure, referring to Figure 10 , compared with the rendering device 9, the rendering device 10 may further include a user interface processing module 101.

[0103] Specifically, the user interface processing module 101 may be configured to perform: after obtaining the scene rendering result, determining a user interface to be rendered corresponding to the scene image to be rendered; rendering the user interface to be rendered according to the resolution of the user interface to be rendered to obtain a user interface rendering result.

[0104] According to an exemplary embodiment of the present disclosure, referring to Figure 11 , compared with the rendering device 10, the rendering device 11 may further include a result display module 111.

[0105] Specifically, the result display module 111 may be configured to perform: displaying the scene rendering result and the user interface rendering result on a display screen.

[0106] According to an exemplary embodiment of the present disclosure, the resolution of the scene image to be rendered is the same as that of the second scene image.

[0107] Since each functional module of the rendering device in the implementation manner of the present disclosure is the same as that in the above method implementation manner, it will not be described in detail herein.

[0108] Figure 12 The figure shows a schematic diagram of an electronic device suitable for implementing the exemplary embodiment of the present disclosure. It should be noted that Figure 12 The shown electronic device is only an example and should not impose any limitation on the functions and usage scope of the embodiments of the present disclosure.

[0109] The electronic device of the present disclosure at least includes a processor and a memory. The memory is used to store one or more programs. When the one or more programs are executed by the processor, the processor can implement the rendering method of the exemplary embodiments of the present disclosure.

[0110] Specifically, as Figure 12 shown, the electronic device 120 may include: a processor 1210, an internal memory 1221, an external memory interface 1222, a Universal Serial Bus (USB) interface 1230, a charging management module 1240, a power management module 1241, a battery 1242, an antenna 1, an antenna 2, a mobile communication module 1250, a wireless communication module 1260, an audio module 1270, a sensor module 1280, a display screen 1290, a camera module 1291, an indicator 1292, a motor 1293, a key 1294, and a Subscriber Identification Module (SIM) card interface 1295, etc. The sensor module 1280 may include a depth sensor, a pressure sensor, a gyroscope sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, and a bone conduction sensor, etc.

[0111] It can be understood that the structure schematically shown in the embodiments of the present disclosure does not constitute a specific limitation on the electronic device 120. In other embodiments of the present disclosure, the electronic device 120 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0112] The processor 1210 may include one or more processing units. For example, the processor 1210 may include an Application Processor (AP), a modem processor, a GPU, an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and / or a Neural-network Processing Unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors. In addition, a memory may also be provided in the processor 1210 for storing instructions and data. Specifically, the rendering solution of the embodiments of the present disclosure may be implemented by the GPU.

[0113] The electronic device 120 can implement the shooting function through an ISP, a camera module 1291, a video codec, a GPU, a display screen 1290, an application processor, etc. In some embodiments, the electronic device 120 may include one or N camera modules 1291, where N is a positive integer greater than 1. If the electronic device 120 includes N cameras, one of the N cameras is the main camera.

[0114] The internal memory 1221 can be used to store computer-executable program code, and the executable program code includes instructions. The internal memory 1221 may include a program storage area and a data storage area. The external memory interface 1222 can be used to connect to an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 120.

[0115] The present disclosure also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device.

[0116] The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0117] The computer-readable storage medium can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable storage medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination of the above.

[0118] The computer-readable storage medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device is caused to implement the method as described in the embodiments of the present disclosure.

[0119] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, as well as combinations of blocks in the block diagram or flowchart, may be implemented by a dedicated hardware-based system that performs the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.

[0120] The units involved in the embodiments described in the present disclosure can be implemented in software or in hardware, and the described units can also be provided in a processor. Among them, the names of these units do not, in some cases, constitute a limitation on the unit itself.

[0121] From the description of the above embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software or by a combination of software and necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.

[0122] In addition, the above accompanying drawings are only schematic illustrations of the processes included in the methods according to the exemplary embodiments of the present disclosure, and are not for limiting purposes. It is easy to understand that the processes shown in the above accompanying drawings do not indicate or limit the time sequence of these processes. Additionally, it is also easy to understand that these processes can be executed, for example, synchronously or asynchronously in multiple modules.

[0123] It should be noted that although several modules or units of devices for action execution are mentioned in the above detailed description, such a division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of the two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0124] Other embodiments of the present disclosure will be readily apparent to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include known common general knowledge or conventional technical means in the technical field not disclosed herein. The specification and examples are only to be considered as exemplary, and the true scope and spirit of the present disclosure are pointed out by the claims.

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

Claims

1. A rendering method, characterized in that, Including: Reducing the resolution of the scene image to be rendered to obtain a first scene image; Determining boundary pixel points in the first scene image and performing interpolation processing on the first scene image using the determination result of the boundary pixel points to obtain a second scene image; Rendering based on the second scene image; Performing interpolation processing on the first scene image using the determination result of the boundary pixel points includes: Performing interpolation processing on the boundary pixel points using a first interpolation method; Performing interpolation processing on non-boundary pixel points in the first scene image using a second interpolation method; Wherein, the number of surrounding pixel points selected for the boundary pixel points by the first interpolation method is greater than the number of surrounding pixel points selected for the non-boundary pixel points by the second interpolation method.

2. The rendering method according to claim 1, wherein Performing interpolation processing on the boundary pixel points using a first interpolation method includes: determining the pixel value after interpolation of the boundary pixel points using the pixel values and weights of the surrounding pixel points of the boundary pixel points; Performing interpolation processing on the non-boundary pixel points using a second interpolation method includes: determining the pixel value after interpolation of the non-boundary pixel points using the pixel values and weights of the surrounding pixel points of the non-boundary pixel points; Wherein, the weights of the surrounding pixel points of the boundary pixel points include negative values, and the weights of the surrounding pixel points of the non-boundary pixel points are all positive values.

3. The rendering method according to claim 1, wherein Determining boundary pixel points in the first scene image includes: Obtaining the gradient value of a pixel point in the first scene image; Comparing the gradient value of the pixel point with a gradient threshold; If the gradient value of the pixel point is greater than the gradient threshold, determining the pixel point as a boundary pixel point in the first scene image.

4. The rendering method according to claim 1, wherein Reducing the resolution of the scene image to be rendered to obtain a first scene image includes: Determining an off-screen window of the scene image to be rendered; Reducing the resolution of the scene image to be rendered in the off-screen window to obtain the first scene image.

5. The rendering method according to claim 1, characterized in that, Rendering based on the second scene image includes: Rendering the second scene image to obtain a scene rendering result corresponding to the scene image to be rendered.

6. The rendering method according to claim 1, characterized in that Rendering based on the second scene image includes: Performing at least one post-processing process on the second scene image to obtain a third scene image; Fusing the second scene image and the third scene image to obtain a fourth scene image; Rendering the fourth scene image to obtain a scene rendering result corresponding to the scene image to be rendered.

7. The rendering method according to claim 5 or 6, characterized in that, After obtaining the scene rendering result, the rendering method further includes: Determining a user interface to be rendered corresponding to the scene image to be rendered; Rendering the user interface to be rendered according to the resolution of the user interface to be rendered to obtain a user interface rendering result.

8. The rendering method according to claim 7, wherein The rendering method further includes: Displaying the scene rendering result and the user interface rendering result on a display screen.

9. The rendering method according to claim 1, wherein The resolution of the scene image to be rendered is the same as the resolution of the second scene image.

10. A rendering device, characterized in that, Including: A resolution reduction module for reducing the resolution of the scene image to be rendered to obtain a first scene image; An interpolation module, configured to determine boundary pixel points in the first scene image and perform interpolation processing on the first scene image by using the determination result of the boundary pixel points to obtain a second scene image; A rendering module, configured to perform rendering based on the second scene image; The interpolation module is configured to: perform interpolation processing on the boundary pixel points by using a first interpolation method; perform interpolation processing on non-boundary pixel points in the first scene image by using a second interpolation method; wherein, the number of surrounding pixel points selected for the boundary pixel points by the first interpolation method is greater than the number of surrounding pixel points selected for the non-boundary pixel points by the second interpolation method.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, the rendering method according to any one of claims 1 to 9 is implemented.

12. An electronic device, characterized in that, Comprising: A processor; A memory, configured to store one or more programs, which when executed by the processor, cause the processor to implement the rendering method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Real-time multi-scale high-frequency material rendering method and system based on normal mapping

    CN114092625A