Image processing method and device, storage medium, equipment and program product

By calculating radial offset information and sampling preset noise texture, a radial blur effect is achieved, which solves the problems of high computational complexity and large memory consumption in the existing technology and improves the rendering performance of image processing.

CN121961905APending Publication Date: 2026-05-01NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610002745.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-04
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing radial blurring techniques have high computational complexity and memory consumption in image processing, leading to decreased frame rate and screen stuttering, especially noticeable on mobile devices.

Method used

By calculating radial offset information and sampling preset noise texture, radial noise values ​​are generated, and a single perturbation sampling is performed to achieve a radial blurring effect, requiring only two texture samplings.

Benefits of technology

Significantly reduces computational complexity and memory usage, avoids frame rate drops and screen stuttering, and improves rendering performance, making it especially suitable for high-resolution and mobile devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121961905A_ABST
    Figure CN121961905A_ABST
Patent Text Reader

Abstract

The invention discloses an image processing method and apparatus, a storage medium, a device and a program product. The method comprises the steps of determining a target coordinate of a fuzzy center of a to-be-processed image in a screen space; for a plurality of pixel points in the to-be-processed image, calculating radial offset information of each pixel point relative to the target coordinate; sampling a preset noise texture based on the radial offset information to obtain a radial noise value corresponding to each pixel point; performing radial disturbance processing on the pixel points based on the radial noise values to obtain offset coordinates of each pixel point; and sampling the to-be-processed image according to the offset coordinate of each pixel point to obtain a target image after fuzzy processing. According to the embodiment of the invention, the whole process only relates to two texture sampling operations, and the color values and weights of a plurality of sampling points do not need to be stored, so that the calculation complexity and memory occupation are remarkably reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of game technology, specifically to an image processing method, apparatus, storage medium, device, and program product. Background Technology

[0002] In game rendering technology, radial blur is a commonly used visual effect to simulate scene effects such as high-speed motion, explosion impact, and energy focusing. Radial blur blurs an image radially around a specific center point, creating a dynamic blurring effect that moves outwards or inwards from the center, effectively enhancing visual impact and scene atmosphere.

[0003] The radial blurring method in related technologies mainly adopts a multiple sampling approach. Specifically, first, the blur center point is determined, then the radial direction of each pixel relative to the blur center point is calculated, and then multiple points are sampled along this radial direction at a certain step size (usually 5 to 10 points or even more are required). Finally, the color values ​​of these sampled points are weighted and averaged, and the mixed value is assigned to the current pixel to complete the radial blurring effect.

[0004] However, the aforementioned multiple sampling method not only suffers from significant computational complexity but also incurs substantial memory overhead. On one hand, since each pixel in the image to be processed needs to be sampled multiple times along the radial direction and weighted averaged, achieving a high-quality blur effect may require dozens or even hundreds of texture sampling operations per pixel. This causes the total number of samples to increase exponentially with image resolution, placing a huge computational burden on the graphics processing unit. This is especially problematic on resource-constrained platforms such as mobile devices, easily leading to frame rate drops and stuttering. On the other hand, the process of multiple sampling and weighted blending requires temporarily storing the color values, weights, and intermediate calculation results of multiple sampling points for each pixel, significantly increasing the amount of video memory or cache usage. In high-resolution rendering scenarios, this storage overhead is further amplified, not only increasing memory bandwidth pressure but also potentially triggering resource scheduling bottlenecks and reducing overall rendering efficiency.

[0005] Therefore, radial fuzzy implementation methods in related technologies suffer from high computational complexity and large memory consumption. Summary of the Invention

[0006] This application provides an image processing method, apparatus, storage medium, device, and program product. By calculating radial offset information and sampling a preset noise texture only once to generate a radial noise value, and then performing a single perturbation sampling of the image to be processed based on the radial noise value, the traditional multiple sampling mechanism is avoided. Only two texture samplings are required to achieve the blurring effect, significantly reducing the computational load and temporary storage requirements for each pixel.

[0007] On one hand, embodiments of this application provide an image processing method, the method comprising: Determine the target coordinates of the blur center of the image to be processed in screen space; For multiple pixels in the image to be processed, calculate the radial offset information of each pixel relative to the target coordinates; Based on the radial offset information, a preset noise texture is sampled to obtain the radial noise value corresponding to each pixel. Based on the radial noise value, the pixel is subjected to radial perturbation processing to obtain the offset coordinates of each pixel; The image to be processed is sampled based on the offset coordinates of each pixel to obtain the blurred target image.

[0008] On the other hand, embodiments of this application provide an image processing apparatus, the apparatus comprising: The determining unit is used to determine the target coordinates of the blur center of the image to be processed in screen space; The calculation unit is used to calculate the radial offset information of each pixel relative to the target coordinates for multiple pixels in the image to be processed; The first sampling unit is used to sample a preset noise texture based on the radial offset information to obtain a radial noise value corresponding to each pixel. The processing unit is configured to perform radial perturbation processing on the pixel based on the radial noise value to obtain the offset coordinates of each pixel. The second sampling unit is used to sample the image to be processed according to the offset coordinates of each pixel to obtain the blurred target image.

[0009] On the other hand, embodiments of this application provide a computer-readable storage medium storing a computer program adapted for loading by a processor to perform the image processing method as described in any of the above embodiments.

[0010] On the other hand, embodiments of this application provide a computer device, the computer device including a processor and a memory, the memory storing a computer program, the processor executing the image processing method as described in any of the above embodiments by calling the computer program stored in the memory.

[0011] On the other hand, embodiments of this application provide a computer program product, including computer instructions, which, when executed by a processor, implement the image processing method as described in any of the above embodiments.

[0012] This application provides an image processing method that determines the target coordinates of the blur center of an image to be processed in screen space; calculates the radial offset information of each pixel relative to the target coordinates for multiple pixels in the image to be processed; samples a preset noise texture based on the radial offset information to obtain a radial noise value corresponding to each pixel; performs radial perturbation processing on the pixels based on the radial noise value to obtain the offset coordinates of each pixel; and samples the image to be processed according to the offset coordinates of each pixel to obtain the blurred target image. This method first determines the blur center and calculates the radial offset information, then obtains the radial noise value by sampling the noise texture only once, and uses this radial noise value to perform radial perturbation on the pixel coordinates. Therefore, in the final stage, only one sampling of the original image is required to generate the blur effect. Compared to related technologies where each pixel needs to be repeatedly sampled radially 5 to 10 times or even more and weighted, the entire process of this application involves only two texture sampling operations. It eliminates the need to store the color values ​​and weights of multiple sampling points, significantly reducing computational complexity and memory usage. This allows radial blur to run stably in real-time rendering scenarios such as high resolution or mobile devices, avoiding problems such as frame rate drops and screen stuttering. Attached Figure Description

[0013] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0014] Figure 1 This is a schematic diagram of the architecture of the image processing system provided in an embodiment of this application.

[0015] Figure 2 This is a schematic flowchart of the image processing method provided in an embodiment of this application.

[0016] Figure 3 This is a schematic diagram of a first application scenario of the image processing method provided in the embodiments of this application.

[0017] Figure 4 This is a schematic diagram of a second application scenario of the image processing method provided in the embodiments of this application.

[0018] Figure 5 This is a schematic diagram of a third application scenario of the image processing method provided in the embodiments of this application.

[0019] Figure 6 This is a schematic diagram of the structure of the image processing apparatus provided in the embodiments of this application.

[0020] Figure 7 A schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0021] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0022] This application provides an image processing method, apparatus, storage medium, device, and program product. Specifically, the image processing method of this application can be executed by a computer device, which can be a terminal or a server. The terminal can be a smartphone, tablet, laptop, smart TV, wearable smart device, smart vehicle terminal, etc. The terminal can also include a client, which can be a game client, browser client, instant messaging client, or mini-program, etc. The server can be an independent physical server, 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 communication, middleware services, domain name services, security services, content delivery network (CDN), and big data and artificial intelligence platforms.

[0023] It should be noted that, in this embodiment, the entity executing the image processing method can be a terminal device or a server. The terminal device can be a local terminal device or a client device in the aforementioned cloud gaming. This embodiment does not limit the type of the entity executing the method.

[0024] Please see Figure 1 , Figure 1This is a schematic diagram of the architecture of an image processing system provided in an embodiment of this application. The system can implement the image processing method provided in this embodiment. The image processing system may include a terminal 1000, a server 2000, and a network 3000. The terminal 1000 and the server 2000 can interact with each other via the network 3000, which may be a wide area network (WAN), a local area network (LAN), or a combination of both.

[0025] In some embodiments, the terminal 1000 is used to acquire an image to be processed and generate an image processing request. For example, a user loads an image to be processed through the graphical interface of the terminal 1000, or triggers an instruction to generate a radial blur effect in a game / rendering scene. The terminal 1000 responds to the user operation or system event, generates a corresponding image processing request, and sends the image processing request to the server 2000.

[0026] Server 2000 is used to execute a radial blur image processing flow according to an image processing request. Specifically, server 2000 is used to determine the target coordinates of the blur center of the image to be processed in screen space; for multiple pixels in the image to be processed, calculate the radial offset information of each pixel relative to the target coordinates; sample a preset noise texture based on the radial offset information to obtain the radial noise value corresponding to each pixel; perform radial perturbation processing on the pixels based on the radial noise value to obtain the offset coordinates of each pixel; and sample the image to be processed according to the offset coordinates of each pixel to generate the blurred target image.

[0027] In some embodiments, the server 2000 may also perform subsequent encoding, rendering, or packaging processing on the target image to adapt to the display requirements of the terminal 1000.

[0028] Subsequently, the server 2000 sends the processed target image to the terminal 1000. The terminal 1000 receives the target image and displays it in the graphical interface, allowing the user to obtain the image display result with radial blur effect.

[0029] It should be noted that, Figure 1 Taking the image processing method provided in this application embodiment as an example, which is executed by server 2000. In another embodiment, the method can also be executed by terminal 1000, for example, terminal 1000 locally loads noise texture and image to be processed and directly performs radial blurring processing; it can also be executed jointly by terminal 1000 and server 2000, for example, server 2000 preprocesses radial offset information or noise texture, and terminal 1000 performs final image sampling and display processing. This application does not limit this.

[0030] To facilitate understanding of the image processing method provided in this application's embodiments, the following description uses an experimental scenario built with Unreal Engine 4.27. It should be noted that the method described in this embodiment can be applied to any 3D rendering platform; this embodiment only uses Unreal Engine as an example for illustration and does not limit the implementation effect.

[0031] First, build the radial blur display scene. In Unreal Engine 4.27, create a new scene L_ShowRadialBlur and place 9 basic meshes (e.g., Boxes) in the scene. The world positions of the 9 boxes in the scene are as follows: Figure 3 As shown, the purpose of this step is to demonstrate the initial scene setup for achieving the radial blur effect later.

[0032] Next, set up the post-processing material. Create a new post-processing material named PP_RadialBlur, and place a PostProcessing Volume in the scene. Configure the newly created post-processing material PP_RadialBlur into the PostProcessing Volume, and set the boundaries of the PostProcessing Volume to be borderless. The purpose of this step is to initially configure the post-rendering system built into Unreal Engine. The radial blur algorithm proposed in this embodiment is mainly implemented in the PP_RadialBlur material.

[0033] Please see Figures 2 to 5 , Figure 2 This is a schematic flowchart of the image processing method provided in the embodiments of this application. Figures 3 to 5 This is a schematic diagram illustrating an application scenario of the image processing method provided in an embodiment of this application. It should be noted that the steps shown may be executed in a logical order different from that shown in the flowchart. The method may include steps 110 to 150: Step 110: Determine the target coordinates of the blur center of the image to be processed in screen space.

[0034] During game rendering, radial blur requires radially divergent blurring based on a specific center point. This center point typically corresponds to a specific location in the 3D virtual scene, such as the location of an explosion, the source of an energy impact, or the player's visual focus.

[0035] The image to be processed refers to the rendered image obtained by the game engine after the scene rendering is completed and before post-processing.

[0036] The blur center refers to the central reference point of the radial blur effect, from which the visual effect of radial blur will radiate outwards. In 3D game scenes, the blur center is usually defined in world space and has 3D world coordinates.

[0037] Screen space refers to the coordinate system corresponding to a two-dimensional display screen. Its coordinate range is usually normalized to the interval [0,1], where (0,0) corresponds to the top left corner of the screen and (1,1) corresponds to the bottom right corner. Radial blur, as a post-processing effect, needs to be calculated in screen space.

[0038] The target coordinates refer to the two-dimensional coordinates of the blur center in screen space, which will serve as the reference origin for subsequent radial offset calculations.

[0039] Since the blur center is defined in three-dimensional world space, while the radial blur effect needs to be implemented in two-dimensional screen space, it is necessary to convert the three-dimensional world coordinates of the blur center into two-dimensional screen space coordinates.

[0040] In some embodiments, determining the target coordinates of the blur center of the image to be processed in screen space includes the following steps 01 to 04: Step 01: Obtain the world space coordinates of the blur center of the image to be processed.

[0041] World Space Coordinates refer to coordinates defined in the global coordinate system of a 3D virtual scene. This coordinate system is a fixed and unified 3D Cartesian coordinate system in which all objects in the 3D virtual scene have a unique position.

[0042] In some embodiments, the world space coordinates of the fuzzy center can be obtained in a variety of ways: When radial blur effect is used to represent the impact of an explosion, the world space coordinates of the blur center can be the world position coordinates of the 3D virtual object corresponding to the explosion effect. When radial blur is used to represent energy focusing, the world space coordinates of the blur center can be the location of the convergence point of the energy beam; When radial blur is used to highlight a target virtual character or object that the player is focused on, the world space coordinates of the blur center can be the center coordinates of the target virtual character or object.

[0043] Step 02: Perform a space transformation from world space to clip space on the world space coordinates to obtain clip space coordinates.

[0044] Clip space is an important coordinate space in the graphics rendering pipeline, located after view space and before normalized device coordinate space (NDC space).

[0045] The transformation from world space to clip space requires two matrix transformations: first, the world space coordinates are transformed to the camera's view space using the view matrix, and then the view space coordinates are transformed to clip space using the projection matrix. These two transformations can usually be combined into a single world-to-clip matrix.

[0046] In some embodiments, the spatial transformation from world space to clip space of world space coordinates can be achieved through the following mathematical operation: BlurCenter_CS = BlurCenter_WS × Where BlurCenter_CS represents the clipping space coordinates, and BlurCenter_WS represents the world space coordinates. This represents the transformation matrix from world space to clip space.

[0047] Step 03: Normalize the clipping space coordinates to obtain normalized device coordinates.

[0048] Normalized Device Coordinate (NDC) is a standardized coordinate space in the graphics rendering pipeline, in which the visible area is normalized to a standard coordinate range.

[0049] In some embodiments, the clipping space coordinates are normalized to obtain normalized device coordinates, including: The clipping space coordinates are processed by perspective division to obtain normalized device coordinates.

[0050] The purpose of perspective division is to project objects in a 3D scene based on their distance from the camera. Objects farther from the camera appear smaller on the screen, while objects closer to the camera appear larger, thus simulating the perspective effect of the human eye.

[0051] Step 04: Remap the normalized device coordinates to obtain the target coordinates.

[0052] Normalized device coordinates have a range of [-1, 1], with their origin typically located at the center of the screen and the positive Y-axis pointing upwards. Screen space coordinates (also known as texture coordinates or UV coordinates) typically have a range of [0, 1], with their origin located at the top left or bottom left corner of the screen and the positive Y-axis typically pointing downwards.

[0053] To convert normalized device coordinates into a coordinate form suitable for screen space operation, a remapping process is required, mapping the coordinate range from [-1,1] to [0,1], and adjusting the origin and axis directions as needed.

[0054] In some embodiments, remapping normalized device coordinates can be achieved through the following mathematical operations: BlurCenter_SP=BlurCenter_NDC×0.5+0.5; Here, BlurCenter_SP represents the target coordinates in screen space.

[0055] The function of this remapping formula is to linearly map coordinate values ​​from the interval [-1,1] to the interval [0,1].

[0056] Through the complete coordinate transformation process described above, the blur center was successfully transformed from three-dimensional world space to two-dimensional screen space, yielding target coordinates that can be used for subsequent radial offset calculations. This coordinate transformation process accurately considers factors such as camera position, orientation, and frustum parameters, ensuring that the projection position of the blur center on the screen is correct.

[0057] Step 120: For multiple pixels in the image to be processed, calculate the radial offset information of each pixel relative to the target coordinates.

[0058] The image to be processed consists of multiple pixels, each with a specific coordinate position in screen space. To achieve a radial blur effect, it is necessary to calculate the radial offset information of each pixel relative to the blur center (i.e., the target coordinates).

[0059] Radial offset information describes the spatial relationship of a pixel relative to the blur center, including the direction information of the pixel pointing to the blur center (or from the blur center to the pixel), and the distance information between the pixel and the blur center.

[0060] In some embodiments, calculating the radial offset information of each pixel relative to the target coordinates includes the following steps 1201 to 1202: Step 1201: Obtain the initial screen space coordinates of each pixel.

[0061] Initial screen space coordinates refer to the original position coordinates of a pixel in screen space, usually represented in the form of texture coordinates (UV coordinates), with a coordinate range of [0, 1].

[0062] Step 1202: Based on the relative relationship between the initial screen space coordinates and the target coordinates, determine the radial offset information of each pixel relative to the target coordinates, wherein the radial offset information includes the radial direction and / or distance information of each pixel.

[0063] Radial offset information describes the spatial relationship between a pixel and the blur center. This information can be determined by calculating the relative position between the initial screen space coordinates and the target coordinates.

[0064] In some embodiments, the radial offset information may include at least one of the following: Radial direction: indicates the direction from the blur center to the pixel, or the direction from the pixel to the blur center; Distance information: Represents the Euclidean distance or other forms of distance metric between a pixel and the blur center.

[0065] In some embodiments, a relative position vector can be obtained by calculating the difference between the initial screen space coordinates and the target coordinates. This relative position vector contains both direction information (the direction of the vector) and distance information (the length of the vector).

[0066] In some embodiments, the radial offset information includes a radial offset vector. Based on the relative relationship between the initial screen space coordinates and the target coordinates, the radial offset information of each pixel relative to the target coordinates is determined, including the following steps 001 to 002: Step 001: Subtract the target coordinates from the initial screen space coordinates to obtain the relative coordinates of each pixel.

[0067] Relative coordinates represent the relative position vector of a pixel with respect to the blur center. The direction of this vector points from the blur center to the pixel, and the length of the vector represents the distance between the pixel and the blur center.

[0068] In some embodiments, relative coordinates can be obtained through the following mathematical operations: ; in, Represents relative coordinates, Represents the initial screen space coordinates.

[0069] Subtraction essentially translates the origin of the screen space coordinate system from the top-left (or bottom-left) corner to the blur center. In the new coordinate system, the blur center's coordinates are (0, 0), while the coordinates of other pixels are redefined relative to the blur center.

[0070] Step 002: Perform polar coordinate transformation on the relative coordinates to obtain the radial offset vector.

[0071] The polar coordinate system is a two-dimensional coordinate system that uses distance and angle to describe points on a plane.

[0072] In this embodiment, converting the relative coordinates from the Cartesian coordinate system to the polar coordinate system makes it easier to describe the radial relationship of a pixel relative to the blur center.

[0073] In some embodiments, polar coordinate transformation of relative coordinates can be achieved through the following mathematical operations: uv1 = arctan(uv.y, uv.x); Where uv.x and uv.y represent relative coordinates. The X and Y components are given, and arctan is the arctangent function.

[0074] Step 130: Sample the preset noise texture based on the radial offset information to obtain the radial noise value corresponding to each pixel.

[0075] A preset noise texture is a two-dimensional image texture that is pre-generated or designed and contains random or semi-random noise patterns. This texture stores noise values ​​at different locations, which can be used to introduce randomness or irregularity into image processing.

[0076] In this embodiment, a preset noise texture is used to introduce noise perturbation along the radial direction for the radial blur effect. By sampling the noise texture using radial offset information as sampling coordinates, noise values ​​associated with the radial direction of the pixels can be obtained.

[0077] Radial noise value refers to the numerical value corresponding to a specific pixel obtained by sampling the noise texture. This value is used to control the degree of perturbation of that pixel in the radial direction.

[0078] In some embodiments, the preset noise texture is a noise map in the radial direction.

[0079] Radial noise mapping refers to noise patterns that exhibit radial or circular characteristics, rather than a completely random or regular grid-like distribution. This specially designed noise mapping better complements the requirements of radial blurring effects, allowing noise disturbances to exhibit a coherent variation pattern along the radial direction.

[0080] In some embodiments, the radial noise map can be created using a procedural generation algorithm.

[0081] In some embodiments, radial noise maps can also be obtained by artists manually drawing or adjusting existing noise images to meet specific visual effect requirements.

[0082] In some embodiments, sampling a preset noise texture based on radial offset information can be achieved through the following mathematical operations: noise0 = texture2D(noiseTex,uv1); Where noise0 is the radial noise value of the pixel corresponding to uv1, and noiseTex is the preset noise texture.

[0083] The texture2D() function is a standard two-dimensional texture sampling function in graphics shader languages, used to read the color value at the corresponding position in a two-dimensional texture object based on the given UV coordinates.

[0084] Step 140: Perform radial perturbation processing on the pixels based on the radial noise value to obtain the offset coordinates of each pixel.

[0085] Radial perturbation processing refers to the process of offsetting and adjusting the screen space coordinates of pixels based on the sampled radial noise values. The purpose of this processing is to use the noise values ​​to control the positional offset of pixels along the radial direction, thereby producing an irregular, natural blurring effect in subsequent sampling.

[0086] Offset coordinates refer to the new coordinate positions of a pixel in screen space after radial perturbation. These coordinates will be used to resample the image to obtain blurred color values.

[0087] In some embodiments, radial perturbation is performed on each pixel based on the radial noise value to obtain the offset coordinates of each pixel, including the following steps: The radial noise value is multiplied by the radial offset information of each pixel to obtain the radial perturbation factor; The radial perturbation factor is superimposed on the initial screen space coordinates of each pixel to obtain the offset coordinates of each pixel.

[0088] The radial perturbation factor is a vector representing the amount of positional offset a pixel should make in screen space. The direction of this vector is consistent with the direction of the radial offset information (i.e., along the direction from the blur center to the pixel), and the magnitude of the vector is modulated by the radial noise value.

[0089] In some embodiments, the radial perturbation factor can be obtained through the following mathematical operation: uv_rf = noise0× ; Where uv_rf represents the radial perturbation factor, and noise0 represents the radial noise value. This indicates radial offset information, i.e., the relative coordinates calculated in step 120.

[0090] Multiplication is essentially a scalar scaling of the relative coordinate vector. The larger the radial noise value, the larger the magnitude of the radial perturbation factor, indicating that the pixel will be offset by a greater distance; the smaller the radial noise value, the smaller the magnitude of the radial perturbation factor, indicating that the pixel will be offset by a shorter distance.

[0091] Due to relative coordinates Since it already contains directional information (the direction from the blur center to the pixel), the radial perturbation factor uv_rf naturally inherits this direction, ensuring that the offset is performed along the radial direction.

[0092] In some embodiments, the offset coordinate uv2 can be obtained through the following mathematical operation: uv2=uv_rf+ .

[0093] Step 150: Sample the image to be processed according to the offset coordinates of each pixel to obtain the blurred target image.

[0094] Offset coordinates are new coordinate positions obtained by applying a perturbation factor to the original position of a pixel. These offset coordinates are used to sample the image to obtain the color that the pixel should display after blurring.

[0095] The target image refers to the final image obtained after radial blurring. This image will present a radial blurring visual effect based on the blur center, and the blur trajectory has a natural randomness introduced by noise disturbance.

[0096] In some embodiments, the image to be processed is sampled according to the offset coordinates of each pixel to obtain the blurred target image, including the following steps 1501 to 1502: Step 1501: Sample the rendering texture of the image to be processed using the offset coordinates of each pixel to obtain the color value of each pixel.

[0097] A render texture is a texture object that stores the content of an image to be processed. In the post-processing workflow, the game engine outputs the rendering results of the scene to a texture, which contains the color information of all visible objects in the scene from the current camera's perspective.

[0098] In some embodiments, the color value at a specific coordinate position in the rendered texture can be read using a texture sampling function: finalColor = texture2D(postprocessingTex,uv2); Where finalColor represents the sampled color value, postprocessingTex represents the rendering texture of the image to be processed, and uv2 is the offset coordinate of the pixel.

[0099] Step 1502: Use the color value as the result of the pixel blurring to obtain the blurred target image.

[0100] After sampling all pixels, each pixel obtains a blurred color value. Assigning these color values ​​to the corresponding pixels creates the complete target image.

[0101] In some embodiments, since the radial offset information, sampled noise value, and calculated offset coordinates of each pixel are different, the final sampled color of each pixel will also vary depending on its position relative to the blur center and the degree of noise perturbation.

[0102] For example, such as Figure 3 As shown, before the radial blur effect is applied, the edges of virtual objects (such as cubes) in the game scene are clear and the texture details are well-defined. After applying the radial blur processing provided in the embodiments of this application, as shown... Figure 4 As shown, when the blur center is located in the center of the screen, the entire scene produces a blur effect radiating outwards from the center of the screen; for example, as... Figure 5 As shown, when the blur center position is adjusted to the upper left of the screen, the blur radiation center also moves accordingly, and all blur trajectories point to the new blur center position.

[0103] The number of sampling points can also be dynamically controlled to adapt to the blur effect requirements in different scenarios.

[0104] In some embodiments, the number of sampling points for sampling the image to be processed based on the offset coordinates of each pixel is dynamically adjusted according to a preset blur intensity parameter. When the blur intensity parameter is greater than a preset threshold, the number of sampling points is increased to enhance the blur effect; when the blur intensity parameter is less than or equal to the preset threshold, the number of sampling points is reduced to save computing resources, thereby optimizing performance and resource consumption while ensuring visual effects.

[0105] This application's embodiments achieve a highly efficient radial blur effect. Unlike traditional methods that require sampling each pixel dozens or even hundreds of times along the radial direction, this application's embodiments only require two texture samplings: one is sampling a preset noise texture to obtain radial noise values, and the other is sampling the rendering texture of the image to be processed using offset coordinates. This single-sampling mechanism based on noise perturbation reduces the computational complexity from O(n×m) to O(n×2), where n is the number of pixels and m is the number of samplings per pixel. While ensuring visual quality, it significantly improves rendering performance, making it particularly suitable for platforms with limited computing resources, such as mobile devices.

[0106] All of the above technical solutions can be combined in any way to form optional embodiments of this application, and will not be described in detail here.

[0107] This application provides an image processing method that determines the target coordinates of the blur center of an image to be processed in screen space; calculates the radial offset information of each pixel relative to the target coordinates for multiple pixels in the image to be processed; samples a preset noise texture based on the radial offset information to obtain a radial noise value corresponding to each pixel; performs radial perturbation processing on the pixels based on the radial noise value to obtain the offset coordinates of each pixel; and samples the image to be processed according to the offset coordinates of each pixel to obtain the blurred target image. This method first determines the blur center and calculates the radial offset information, then obtains the radial noise value by sampling the noise texture only once, and uses this radial noise value to perform radial perturbation on the pixel coordinates. Therefore, in the final stage, only one sampling of the original image is required to generate the blur effect. Compared to related technologies where each pixel needs to be repeatedly sampled radially 5 to 10 times or even more and weighted, the entire process of this application involves only two texture sampling operations. It eliminates the need to store the color values ​​and weights of multiple sampling points, significantly reducing computational complexity and memory usage. This allows radial blur to run stably in real-time rendering scenarios such as high resolution or mobile devices, avoiding problems such as frame rate drops and screen stuttering. Meanwhile, the introduction of noise perturbation makes the blurred trajectory exhibit natural irregularity, avoiding the mechanical feeling caused by regular sampling in traditional methods, and enhancing the visual realism and immersion.

[0108] To facilitate better implementation of the image processing method of this application embodiment, this application embodiment also provides an image processing apparatus. Please refer to... Figure 6 , Figure 6 This is a schematic diagram of the structure of an image processing apparatus provided in an embodiment of this application. The image processing apparatus 200 may include: The determining unit 210 is used to determine the target coordinates of the blur center of the image to be processed in the screen space; The calculation unit 220 is used to calculate the radial offset information of each pixel relative to the target coordinates for multiple pixels in the image to be processed. The first sampling unit 230 is used to sample a preset noise texture based on radial offset information to obtain a radial noise value corresponding to each pixel. Processing unit 240 is used to perform radial perturbation processing on the pixels based on the radial noise value to obtain the offset coordinates of each pixel; The second sampling unit 250 is used to sample the image to be processed according to the offset coordinates of each pixel to obtain the target image after blurring.

[0109] In some embodiments, when determining the target coordinates of the blur center of the image to be processed in screen space, the apparatus is specifically used for: Obtain the world space coordinates of the blur center of the image to be processed; Perform a space transformation from world space to clip space on the world space coordinates to obtain clip space coordinates; The clipping space coordinates are normalized to obtain normalized device coordinates; The normalized device coordinates are remapped to obtain the target coordinates.

[0110] In some embodiments, when calculating the radial offset information of each pixel relative to the target coordinates, the device specifically performs the following: Obtain the initial screen space coordinates of each pixel; Based on the relative relationship between the initial screen space coordinates and the target coordinates, the radial offset information of each pixel relative to the target coordinates is determined, wherein the radial offset information includes the radial direction and / or distance information of each pixel.

[0111] In some embodiments, the radial offset information includes a radial offset vector. When determining the radial offset information of each pixel relative to the target coordinates based on the relative relationship between the initial screen space coordinates and the target coordinates, the device is specifically used for: Subtract the target coordinates from the initial screen space coordinates to obtain the relative coordinates of each pixel; The radial offset vector is obtained by performing a polar coordinate transformation on the relative coordinates.

[0112] In some embodiments, when the apparatus is used to perform radial perturbation processing on each pixel based on the radial noise value to obtain the offset coordinates of each pixel, it is specifically used for: The radial noise value is multiplied by the radial offset information of each pixel to obtain the radial perturbation factor; The radial perturbation factor is superimposed on the initial screen space coordinates of each pixel to obtain the offset coordinates of each pixel.

[0113] In some embodiments, when the apparatus samples the image to be processed based on the offset coordinates of each pixel to obtain a blurred target image, it is specifically used for: The color value of each pixel is obtained by sampling the rendering texture of the image to be processed using the offset coordinates of each pixel. The color value is used as the result of blurring the pixels to obtain the blurred target image.

[0114] In some embodiments, the preset noise texture is a noise map in the radial direction.

[0115] Each unit in the aforementioned image processing apparatus can be implemented entirely or partially through software, hardware, or a combination thereof. Each unit can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each unit.

[0116] The image processing device 200 can be integrated into a terminal or server that has storage and a processor and thus computing power, or the image processing device 200 can be the terminal or server.

[0117] Optionally, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0118] Figure 7 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. The computer device may include: a communication interface 301, a memory 302, a processor 303, and a communication bus 304. The communication interface 301, memory 302, and processor 303 communicate with each other via the communication bus 304. The communication interface 301 is used for data communication between the device 300 and external devices. The memory 302 can be used to store software programs and modules, and the processor 303 runs the software programs and modules stored in the memory 302, such as the software programs for corresponding operations in the aforementioned method embodiments.

[0119] In some embodiments, the processor 303 may invoke software programs and modules stored in the memory 302 to perform the following operations: determine the target coordinates of the blur center of the image to be processed in the screen space; calculate the radial offset information of each pixel relative to the target coordinates for multiple pixels in the image to be processed; sample a preset noise texture based on the radial offset information to obtain the radial noise value corresponding to each pixel; perform radial perturbation processing on the pixels based on the radial noise value to obtain the offset coordinates of each pixel; sample the image to be processed according to the offset coordinates of each pixel to obtain the blurred target image.

[0120] In some embodiments, the computer device 300 may be integrated into a terminal or server that has storage and a processor, thus possessing computing capabilities; or the computer device 300 may be the terminal or server. The terminal may be a smartphone, tablet, laptop, smart TV, smart speaker, wearable smart device, personal computer, or other similar device. The server may be a standalone physical server, 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 communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.

[0121] This application also provides a computer-readable storage medium for storing a computer program. This computer-readable storage medium can be applied to a computer device, and the computer program causes the computer device to execute the corresponding processes in the image processing methods of the embodiments of this application; for the sake of brevity, further details are omitted here.

[0122] This application also provides a computer program product including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the corresponding process in the image processing method of this application embodiment. For brevity, further details are omitted here.

[0123] This application also provides a computer program comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the corresponding process in the image processing method of this application. For brevity, further details are omitted here.

[0124] It should be understood that the processor in this application may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor described above can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0125] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0126] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0127] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0128] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0129] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0130] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0131] In addition, the functional units in this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0132] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer or a server) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0133] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. An image processing method, characterized in that, The method includes: Determine the target coordinates of the blur center of the image to be processed in screen space; For multiple pixels in the image to be processed, calculate the radial offset information of each pixel relative to the target coordinates; Based on the radial offset information, a preset noise texture is sampled to obtain the radial noise value corresponding to each pixel. Based on the radial noise value, the pixel is subjected to radial perturbation processing to obtain the offset coordinates of each pixel; The image to be processed is sampled based on the offset coordinates of each pixel to obtain the blurred target image.

2. The image processing method as described in claim 1, characterized in that, Determining the target coordinates of the blur center of the image to be processed in screen space includes: Obtain the world space coordinates of the blur center of the image to be processed; Perform a space transformation from world space to clip space on the world space coordinates to obtain clip space coordinates; The clipping space coordinates are normalized to obtain normalized device coordinates; The normalized device coordinates are remapped to obtain the target coordinates.

3. The image processing method as described in claim 1, characterized in that, The calculation of the radial offset information of each pixel relative to the target coordinates includes: Obtain the initial screen space coordinates of each pixel; Based on the relative relationship between the initial screen space coordinates and the target coordinates, the radial offset information of each pixel relative to the target coordinates is determined, wherein the radial offset information includes the radial direction and / or distance information of each pixel.

4. The image processing method as described in claim 3, characterized in that, The radial offset information includes a radial offset vector. Determining the radial offset information of each pixel relative to the target coordinates based on the relative relationship between the initial screen space coordinates and the target coordinates includes: Subtracting the target coordinates from the initial screen space coordinates yields the relative coordinates of each pixel. The radial offset vector is obtained by performing a polar coordinate transformation on the relative coordinates.

5. The image processing method as described in claim 1, characterized in that, The step of performing radial perturbation processing on each pixel based on the radial noise value to obtain the offset coordinates of each pixel includes: The radial noise value is multiplied by the radial offset information of each pixel to obtain the radial perturbation factor; The radial perturbation factor is superimposed on the initial screen space coordinates of each pixel to obtain the offset coordinates of each pixel.

6. The image processing method as described in claim 1, characterized in that, The step of sampling the image to be processed based on the offset coordinates of each pixel to obtain the blurred target image includes: The rendering texture of the image to be processed is sampled using the offset coordinates of each pixel to obtain the color value of each pixel; The color value is used as the blurring result of the pixel to obtain the blurred target image.

7. The image processing method as described in claim 1, characterized in that, The preset noise texture is a noise map in the radial direction.

8. An image processing apparatus, characterized in that, The device includes: The determining unit is used to determine the target coordinates of the blur center of the image to be processed in screen space; The calculation unit is used to calculate the radial offset information of each pixel relative to the target coordinates for multiple pixels in the image to be processed; The first sampling unit is used to sample a preset noise texture based on the radial offset information to obtain a radial noise value corresponding to each pixel. The processing unit is configured to perform radial perturbation processing on the pixel based on the radial noise value to obtain the offset coordinates of each pixel. The second sampling unit is used to sample the image to be processed according to the offset coordinates of each pixel to obtain the blurred target image.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted for loading by a processor to perform the image processing method as described in any one of claims 1-7.

10. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing a computer program, and the processor executing the image processing method according to any one of claims 1-7 by calling the computer program stored in the memory.

11. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the image processing method according to any one of claims 1-7.