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

CN122912461APending Publication Date: 2026-10-16NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611258841.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-19
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0004]本公开提供了一种图像处理方法、装置、电子设备、存储介质及程序产品,以解决通过新增渲染通道实现模型轮廓交互渲染所带来的开发维护成本高、落地风险大,且渲染效果单一、存在明显应用局限的问题

Benefits of technology

[0010]The technical solution of this disclosure, by acquiring the object mask image corresponding to the game screen to be processed, can complete object classification and boundary recognition based on the mask data of the existing rendering pipeline. This eliminates the need for additional independent rendering channels and modifications to the engine's underlying rendering logic, fundamentally reducing the cost and risk of development, debugging, and later maintenance. Furthermore, by filtering game objects with overlapping positions based on transparency and interaction attributes, the range of objects requiring contour interaction can be accurately identified, reducing the processing volume of subsequent edge detection and effect compositing, and providing pre-processing support for reducing rendering computational overhead. Further, by performing edge detection on the object mask image to obtain the object contour mask image, the edge contours of each second game object can be accurately extracted from the classified mask data. This eliminates the need to rely on multi-channel overlay to generate interactive contours, solving the problems of single rendering effects and significant limitations in spatial hierarchy expression in traditional multi-channel solutions. This provides accurate boundary determination criteria for subsequently restoring the spatial interaction effects of transparent and interactive objects. Furthermore, based on the object mask image, the game screen to be processed, and the object outline mask image, the target game screen is rendered. It can calculate the spatial interaction effect between multiple objects by comprehensively considering object classification attributes, transparency levels, and outline boundaries within a single pipeline. This eliminates the need for collaborative adaptation across multiple stages, including scene, special effects, and post-production, significantly reducing the difficulty of cross-stage collaboration and improving the efficiency of solution implementation. At the same time, it can accurately restore the spatial occlusion level between transparent objects and interactive objects, ensuring the clarity of interactive outlines and balancing the spatial realism of the rendering effect with the visual recognizability of the image. The technical solution of this disclosure addresses the technical problems in related technologies, such as the need to add a rendering channel to combine semi-transparent models with model outlines, the high development and maintenance costs and risks due to reliance on engine-level modifications, the significant limitations of single rendering effects, and the high collaboration difficulty and low implementation efficiency caused by the need for multi-stage collaborative adaptation. It achieves the technical effect of single-pipeline multi-object contour interactive rendering based on mask data, realizing high-quality object space interaction effects without modifying the engine's underlying logic, simplifying the development and maintenance process and reducing cross-stage collaboration costs, improving the efficiency of solution implementation, ensuring the spatial accuracy and visual clarity of the interactive effects, and optimizing the visual performance of the game screen and the player's gaming experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122912461A_ABST
    Figure CN122912461A_ABST
Patent Text Reader

Abstract

The embodiment of the present disclosure discloses an image processing method and device, electronic equipment, storage medium and program product, which relates to the technical field of image processing. The method comprises: obtaining an object mask corresponding to a to-be-processed game picture; performing edge detection on the object mask to determine an object contour mask corresponding to a second game object; wherein the object contour mask is used to represent the edge contour of the second game object; and rendering a target game picture according to the object mask, the to-be-processed game picture and the object contour mask. The technical scheme solves the problems of high development and maintenance cost, great landing risk, single rendering effect and obvious application limitations caused by the implementation of model contour interactive rendering through the addition of a rendering channel, realizes the technical effect of single-pipeline model contour interactive rendering based on object mask data, accurately restores the spatial occlusion level between different objects, and enriches the visual performance of contour interaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of image processing technology, and more particularly to an image processing method, apparatus, electronic device, storage medium, and program product. Background Technology

[0002] In the field of 3D game rendering, model outlining effects are a core technical means to enhance character recognizability and achieve stylized rendering, and are widely used in various game products. With the continuous upgrading of game art expression, semi-transparent effects and semi-transparent models are used extensively in game scenes. The spatial interaction between model outlining and semi-transparent models directly determines the exquisiteness of the picture and the player's visual experience, and also puts forward higher requirements for the realism and adaptability of rendering solutions.

[0003] In related technologies, a common approach is to add a rendering channel after rendering the model outline to combine the semi-transparent model with the model outline. This approach has obvious drawbacks: it not only requires modification of the engine's underlying rendering logic, resulting in high development, debugging, and post-maintenance costs and risks, but also produces a single rendering effect with obvious limitations. Furthermore, it requires collaborative adaptation across multiple stages, including scenes, special effects, and post-production, making cross-stage collaboration difficult and resulting in low implementation efficiency. Summary of the Invention

[0004] This disclosure provides an image processing method, apparatus, electronic device, storage medium, and program product to solve the problems of high development and maintenance costs, high implementation risks, and limited application of interactive rendering of model outlines by adding new rendering channels.

[0005] According to one aspect of this disclosure, an image processing method is provided, the method comprising: Obtain the object mask image corresponding to the game screen to be processed; wherein, the game screen to be processed includes multiple game objects, and the object mask image is used to indicate at least two game objects that have a positional overlap relationship; the at least two game objects include: a first game object whose transparency value is within a preset value range and a second game object with an outline stroke effect; Edge detection is performed on the object mask image to determine the object contour mask image corresponding to the second game object; wherein, the object contour mask image is used to represent the edge contour of the second game object; The target game screen is rendered based on the object mask image, the game screen to be processed, and the object outline mask image.

[0006] According to another aspect of this disclosure, an image processing apparatus is provided, the apparatus comprising: The first module is used to obtain an object mask image corresponding to the game screen to be processed; wherein, the game screen to be processed includes multiple game objects, and the object mask image is used to indicate at least two game objects that have a positional overlap relationship; the at least two game objects include: a first game object whose transparency value is within a preset value range and a second game object with an outline stroke effect; The second module is used to perform edge detection on the object mask image to determine the object contour mask image corresponding to the second game object; wherein, the object contour mask image is used to represent the edge contour of the second game object; The third module is used to render the target game screen based on the object mask image, the game screen to be processed, and the object outline mask image.

[0007] According to another aspect of this disclosure, an electronic device is provided, the electronic device comprising: One or more processors; Storage device for storing one or more programs. When one or more programs are executed by one or more processors, the one or more processors implement any of the image processing methods described in the embodiments of this disclosure.

[0008] According to another aspect of this disclosure, a computer-readable storage medium is provided that stores computer instructions for causing a processor to execute any of the image processing methods described in the embodiments of this disclosure.

[0009] According to another aspect of the present disclosure, a computer program product is provided, which, when executed by a processor, implements any of the image processing methods described in the embodiments of the present disclosure.

[0010] The technical solution of this disclosure, by acquiring the object mask image corresponding to the game screen to be processed, can complete object classification and boundary recognition based on the mask data of the existing rendering pipeline. This eliminates the need for additional independent rendering channels and modifications to the engine's underlying rendering logic, fundamentally reducing the cost and risk of development, debugging, and later maintenance. Furthermore, by filtering game objects with overlapping positions based on transparency and interaction attributes, the range of objects requiring contour interaction can be accurately identified, reducing the processing volume of subsequent edge detection and effect compositing, and providing pre-processing support for reducing rendering computational overhead. Further, by performing edge detection on the object mask image to obtain the object contour mask image, the edge contours of each second game object can be accurately extracted from the classified mask data. This eliminates the need to rely on multi-channel overlay to generate interactive contours, solving the problems of single rendering effects and significant limitations in spatial hierarchy expression in traditional multi-channel solutions. This provides accurate boundary determination criteria for subsequently restoring the spatial interaction effects of transparent and interactive objects. Furthermore, based on the object mask image, the game screen to be processed, and the object outline mask image, the target game screen is rendered. It can calculate the spatial interaction effect between multiple objects by comprehensively considering object classification attributes, transparency levels, and outline boundaries within a single pipeline. This eliminates the need for collaborative adaptation across multiple stages, including scene, special effects, and post-production, significantly reducing the difficulty of cross-stage collaboration and improving the efficiency of solution implementation. At the same time, it can accurately restore the spatial occlusion level between transparent objects and interactive objects, ensuring the clarity of interactive outlines and balancing the spatial realism of the rendering effect with the visual recognizability of the image. The technical solution of this disclosure addresses the technical problems in related technologies, such as the need to add a rendering channel to combine semi-transparent models with model outlines, the high development and maintenance costs and risks due to reliance on engine-level modifications, the significant limitations of single rendering effects, and the high collaboration difficulty and low implementation efficiency caused by the need for multi-stage collaborative adaptation. It achieves the technical effect of single-pipeline multi-object contour interactive rendering based on mask data, realizing high-quality object space interaction effects without modifying the engine's underlying logic, simplifying the development and maintenance process and reducing cross-stage collaboration costs, improving the efficiency of solution implementation, ensuring the spatial accuracy and visual clarity of the interactive effects, and optimizing the visual performance of the game screen and the player's gaming experience.

[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments of this disclosure, 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 disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 This is a schematic flowchart of an image processing method provided in an embodiment of the present disclosure; Figure 2 This is a schematic diagram illustrating a screen presentation effect of a first game object and a second game object with an overlapping position, provided in an embodiment of this disclosure. Figure 3 This is a schematic flowchart of another image processing method provided in an embodiment of the present disclosure; Figure 4 This is a schematic flowchart of another image processing method provided in an embodiment of the present disclosure; Figure 5 This is a schematic diagram of the structure of an image processing apparatus provided in an embodiment of the present disclosure; Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0014] To enable those skilled in the art to better understand the present disclosure, the technical solutions of the present disclosure will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present disclosure, and not all embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present disclosure.

[0015] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0016] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0017] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0018] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0019] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0020] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0021] Before introducing this technical solution, the application scenarios can be illustrated by example. The technical solution provided by the embodiments of this disclosure can be applied to any 3D rendering scene that requires spatial interaction between model outlines and semi-transparent effects. It is especially suitable for fields with high requirements for realism and stylized expression, such as game development, virtual simulation, and digital content production. Examples include scenarios such as superimposed rendering of semi-transparent effects of character skills and model outlines, interaction between semi-transparent scene objects and character outlines, post-processing of stylized global outlines in games, and fusion of spatial media and contour effects.

[0022] Currently, the integration of model outlines and semi-transparent effects in games and 3D virtual scenes is generally achieved by adding additional rendering channels. After the model outline rendering is completed, an additional independent rendering channel is added to draw the semi-transparent model and effects, and the semi-transparent effect is superimposed and synthesized with the generated outline image.

[0023] However, this approach has significant drawbacks: on the one hand, adding a new independent rendering channel requires modifying the underlying rendering logic of the engine, resulting in high development, debugging, and post-maintenance costs and significant technical risks, and the rendering effect has obvious limitations, making it difficult to achieve accurate spatial occlusion interaction effects; on the other hand, the implementation of the solution requires collaborative adaptation across multiple stages, including scenes, special effects, and post-production, resulting in long cross-functional collaboration links and low implementation efficiency, making it unable to adapt to the large-scale rendering production needs of massive game objects and rich semi-transparent special effects.

[0024] To address the aforementioned issues, this disclosure proposes a stroke-based spatial interaction data processing scheme based on object masking and layered fusion. Specifically, this technical solution uses the rendering pipeline template channel as a carrier to assign differentiated mask values ​​to different game objects, generating object mask maps. Edge detection is then used to obtain the corresponding object contour mask maps. Furthermore, by combining transparency information, mask operations are used to accurately filter out contour areas covered by semi-transparent effects. Based on this, partitioned fusion processing is performed on the object contours, ultimately resulting in a target game screen with realistic spatial interaction effects.

[0025] Therefore, without modifying the engine's underlying rendering logic or adding a new independent rendering channel, the correct spatial occlusion interaction between model outlines and semi-transparent effects can be achieved within the native post-processing pipeline, effectively reducing development and maintenance costs and significantly improving the realism of the outline effect and the refinement of the image. Furthermore, the solution is highly adaptable and compatible with various semi-transparent models and special effects scenes, supporting the needs of large-scale game rendering content production.

[0026] Figure 1 This is a flowchart illustrating an image processing method provided in an embodiment of this disclosure. This embodiment is applicable to any rendering scenario with multi-object contour space interactive rendering requirements. The method can be executed by an image processing device, which can be implemented in hardware and / or software, and can be configured in electronic devices such as computers or servers. Figure 1 As shown, the method in this embodiment includes: S110. Obtain the object mask image corresponding to the game screen to be processed; wherein, the game screen to be processed includes multiple game objects, and the object mask image is used to indicate at least two game objects that have a positional overlap relationship; the at least two game objects include: a first game object whose transparency value is in a preset value range and a second game object with an outline stroke effect.

[0027] In this context, the game frame to be processed can be understood as an intermediate frame in the game rendering process, where the basic scene rendering has been completed and the target effect processing stage is underway, awaiting the overlay of specific rendering effects. From a content perspective, the game frame to be processed has already completed the basic rendering of all game objects within the scene through the main rendering pipeline, including complete rendering information such as color, transparency, and depth. Its pixel dimensions are completely consistent with the final output image; it is not a blank, unrendered image. From a process perspective, the game frame to be processed can be the direct carrier for subsequent post-processing steps such as mask calculations, outline partitioning, and effect compositing. After corresponding rendering processing, it will be transformed into the target game frame with the desired visual effects.

[0028] In this context, game objects can be understood as renderable entities within a game scene that possess independent spatial positions and rendering attributes, serving as the basic units that constitute the game's visuals. Game objects can encompass various 3D rendering elements such as player characters, non-player characters, scene objects, special effects carriers, and interactive props. Each game object possesses independent spatial coordinates, material parameters, and rendering levels, and under camera projection, it can exhibit positional overlap and visual occlusion relationships, which are the primary components responsible for this contour overlap effect.

[0029] The object mask image can be understood as a classification mask image used to identify the affiliation of different game objects at the pixel level. It is the core data carrier for determining object overlap and distinguishing object types. Each screen pixel in the object mask image corresponds to a unique identifier value. Different values ​​correspond to different game objects or background areas, allowing for quick differentiation of the object category to which a pixel belongs. In one scenario, different target game objects in the object mask image correspond to different object mask values. For example, the pixel corresponding to the player character in the image is marked with a value of 1, the pixel corresponding to the semi-transparent energy shield is marked with a value of 2, and the blank background area is marked with a value of 0. This image, which only records the region identifier values, is the object mask image, and the marked values ​​are the object mask values. The object mask value can be understood as a unique identifier value assigned to each target game object. Different target game objects can correspond to different mask values, which are written into the pixel position of the corresponding target game object in the object mask image to distinguish different game objects. This is the core identifier basis for extracting contours and determining occluded areas in subsequent readings. For example, an object mask value of 2 can be assigned to a semi-transparent energy shield, while an object mask value of 1 can be assigned to a player character adjacent to the semi-transparent energy shield. These two values ​​differentiate the regions in the object mask map. In one scenario, the object mask map can be used to indicate at least two game objects that have a positional overlap.

[0030] The positional overlap relationship can be understood as a spatial projection relationship in which at least two game objects have overlapping pixel areas on the screen projection from the current camera's perspective. That is, from the current camera's perspective, the screen projection ranges of two or more game objects overlap, meaning the same pixel area on the screen simultaneously belongs to the projection range of multiple objects. In this solution, the overlapping of the projections of a semi-transparent first game object and a second game object with an outline effect in screen space is a prerequisite for triggering the outline overlap rendering effect.

[0031] Optionally, the at least two game objects that have a positional overlap relationship may include two types of game objects: one is a first game object whose own transparency value is a preset value, that is, a game object that carries a semi-transparent effect; the other is a second game object with an outline stroke effect.

[0032] The first game object can be understood as a game object whose transparency is within a preset range. The first game object can be a game object in the game scene that carries a semi-transparent effect, whose transparency value is within a preset range, and which will interact spatially with other target game objects, thus forming outline interactions. The first game object can include at least one of the following: a game object constructed from a model material with a transparency value within the preset range, such as a game object constructed from a semi-transparent model material; or an effect object with a transparency value within the preset range, such as a semi-transparent effect. A semi-transparent model material can be a model surface property that allows light to partially penetrate and blend with the background color. Its transparency is controlled through the alpha channel and is often used to represent objects with a sense of transparency, such as glass, water surfaces, and sheer fabrics. It is a key material type for enhancing the realism and expressiveness of game visuals. A semi-transparent effect can be achieved by adjusting the alpha channel value of pixels, making the object appear to have a transparent background. It is often used to represent elements such as smoke, flames, glass, and water, and is an important rendering technique for creating atmosphere and depth in games. For example, in a game scene, semi-transparent skill smoke, semi-transparent glass barriers, and semi-transparent spell shields all belong to the first game object category. Transparency values ​​can be understood as parameters characterizing the transparency of pixels in a virtual object, describing the object's ability to transmit light. Transparency values ​​can be data recording the transparency of each pixel in the rendering pipeline; the value determines the extent to which the pixel will show through the background image. Extreme values ​​represent complete opacity, the other extreme represents complete transparency, and the middle range represents semi-transparency. The transparency value of the first game object can be inherent to the model's material or come from dynamic effects such as particles and skill effects. The preset value range can be understood as a pre-defined range of values ​​used as a selection criterion for the first game object. The preset value range can be a continuous range of values ​​defined by its upper and lower boundaries, used to determine whether a game object belongs to the first game object. The transparency value of the game object is compared to the preset value range; if the transparency value falls within the preset value range, the game object is determined to be the first game object. Optionally, the preset value range can be a range of values ​​greater than 0 and less than 1.

[0033] The second game object can be understood as a solid game object with an outline effect, serving as the carrier of the outline overlap effect. This second game object can include player characters, key NPCs, interactive objects, and other solid objects that need to be highlighted with outlines; it already has its own rendered outline effect. When occluded by the semi-transparent first game object, its outline will exhibit a differentiated overlapping visual effect, making it the covered party in the outline overlap relationship. The outline outline effect can be understood as a highlighted line effect generated along the outer contour of the game object, used to enhance the visual recognizability of the object's outline. The outline outline effect can be achieved through post-processing algorithms or material shading, its purpose being to highlight the outer boundary of the target object and reduce the visual cost for the player to identify the target. In this solution, this outline effect will interact with the semi-transparent object in front, creating a spatial occlusion interaction, presenting a differentiated outline appearance covered by a transparent area, restoring a realistic spatial hierarchy.

[0034] In one scenario, the provided solution, obtaining the object mask image corresponding to the game screen to be processed, may include at least one of the following: obtaining the game screen to be processed, which contains multiple game objects; identifying at least two game objects in the game screen to be processed that have an overlapping relationship; assigning different object mask values ​​to the identified at least two game objects according to a preset allocation rule; and processing the game screen to be processed based on the object mask values ​​corresponding to each game object to obtain the object mask image corresponding to the game screen to be processed; obtaining object identifier buffer data corresponding to the game screen to be processed, which records the object identifier buffer data of each game object... The unique identifier of each game object is mapped to a distinct object mask value according to a preset identifier mapping rule. Based on the mapping relationship between pixel identifiers and object mask values, an object mask image corresponding to the game screen to be processed is generated. Geometric buffer data corresponding to the game screen to be processed is obtained. This geometric buffer data contains depth and normal information for each pixel. Based on a preset geometric feature determination rule, object boundaries are divided to obtain independent object regions, and distinct object mask values ​​are assigned to each game object region. Pixel filling is then performed based on the object mask values ​​corresponding to each object region to generate the object mask image corresponding to the game screen to be processed. The following section provides a detailed explanation of one method for obtaining the object mask image.

[0035] Optionally, obtaining the object mask image corresponding to the game screen to be processed includes: obtaining the game screen to be processed; the game screen to be processed includes multiple game objects; determining at least two game objects in the game screen to be processed that have an overlapping relationship, and assigning different object mask values ​​to the determined at least two game objects according to a preset allocation rule; processing the game screen to be processed according to the object mask values ​​corresponding to the at least two game objects respectively, to obtain the object mask image corresponding to the game screen to be processed.

[0036] In this context, "game object" can be a collective term for all renderable and interactive virtual entities in a 3D game scene. Game objects are the basic units that constitute a game scene, encompassing various elements such as characters, props, buildings, terrain, and special effects particles. Each game object has its own independent spatial location, rendering attributes, and interaction logic, collectively forming a complete virtual scene. For example, player characters, enemy monsters, ground rocks, tree models, and skill smoke effects in a game scene are all game objects.

[0037] The preset allocation rules can be understood as the standard logic pre-defined during the development phase for assigning mask values ​​to game objects with overlapping positions. The preset allocation rules define the correspondence between game objects and mask values. The core principle is to ensure that each game object corresponds to a unique mask value, avoiding numerical conflicts that could lead to confusion of object regions. Optionally, the preset allocation rules may include at least one of the following: allocation according to the object type of the game object; allocation according to the rendering priority of the game object; mapping allocation according to the object identifier of the game object; and allocation by grouping the game objects according to their stroke style.

[0038] In one scenario, the game screen to be processed is first acquired. This screen contains multiple game objects, including at least two game objects that need to participate in the rendering of spatial interaction effects. Further, object detection is performed on the game screen to identify at least two game objects with overlapping positions. Based on a pre-defined mask allocation rule, distinct object mask values ​​are assigned to these two overlapping game objects to differentiate them. Further, during the rendering process, the object mask value corresponding to each game object is written into the pixel area it covers, generating an object mask map corresponding to the game screen to be processed.

[0039] S120. Perform edge detection on the object mask image to determine the object contour mask image corresponding to the second game object.

[0040] Edge detection can be understood as an image processing operation that extracts the boundaries of regions in an image. Edge detection identifies the locations of pixels with abrupt changes in value within an image, locating the boundaries between different regions. This transforms the original whole-area marker into the outline of the region, making it the core processing method for generating outlining effects. For example, performing edge detection on a character region with a value of 1 in an object mask image will yield a closed line around the character's outer edge.

[0041] The object contour mask can be understood as a two-dimensional marker image used to mark the edge contour positions of the second game object. The object contour mask represents the edge contour of the second game object. It can be obtained by edge detection operations on an object mask, retaining non-zero values ​​only at the edge contour positions of the target game object, with zero values ​​in other areas. The object contour mask represents the edge contour shape of each second game object and is the basic data carrier for the final outline effect. For example, in an image, only the outer edge of the character, the outer edge of the semi-transparent shield, and the boundary line between them have non-zero values, while the values ​​in the rest of the background area are all 0. This image, which only records the contour markers, is the object contour mask. The edge contour of the second game object can be understood as the boundary line shape of the visible area of ​​the second game object. The edge contour can include both the outer boundary line of a single second game object and the boundary line between the first and second game objects, and is the actual area where the outline effect is presented. The edge contour can be used to clearly distinguish the boundary range of different second game objects, enhancing the visual recognition of the second game objects. For example, the outer edge lines of the player character's body and the boundary lines between the semi-transparent spell shield and the character are all part of the edge outline of the target game object.

[0042] It should be noted that the object contour mask can also be used to represent the edge contour of the first game object. That is, the object contour mask can contain not only the edge contour of the second game object, but also the edge contour of the first game object.

[0043] In one scenario, the provided solution involves performing edge detection on the object mask image to obtain an object contour mask image corresponding to the second game object. This can include at least one of the following: processing the object mask image using an edge detection model to obtain an output object contour mask image; processing the object mask image using an edge detection algorithm to obtain an object outline effect image; and subtracting the object mask image and the object outline effect image to obtain the object contour mask image. One of these processing methods is described in detail below.

[0044] Optionally, edge detection is performed on the object mask image to determine the object contour mask image corresponding to the second game object, including: performing edge detection on the object mask image using an edge detection algorithm to obtain an object outline effect image corresponding to the second game object; performing subtraction processing on the object mask image and the object outline effect image to obtain the object contour mask image to be processed; and performing normalization processing on the object contour mask image to be processed to obtain the object contour mask image corresponding to the second game object.

[0045] Edge detection algorithms can be understood as a class of image processing operations used to identify and extract region boundaries from an image. Edge detection algorithms can identify locations where pixel values ​​within an image undergo abrupt changes, locating the boundaries between regions with different values, thereby converting entire region markers into linear boundary markers. Optionally, edge detection algorithms may include at least one of the following: convolution edge detection algorithms using the Laplacian operator; gradient edge detection algorithms using the Sobel operator; morphological edge detection algorithms based on image dilation and erosion operations; and edge detection algorithms based on distance fields.

[0046] The object outline effect image can be understood as an intermediate image directly output after the object mask image has been processed by an edge detection algorithm. The object outline effect image is a direct output of edge detection; the object edge positions in the image directly show the numerical distribution of the corresponding outline width, including the shape and range of the outline. For example, after performing edge detection on a character region with an object mask value of 1, the character edge positions in the output image show a continuous outline shape; this intermediate image with the outline effect is the object outline effect image.

[0047] The difference operation can be understood as an image processing operation that subtracts the corresponding pixel values ​​from two images of the same size. It involves subtracting the pixel values ​​at the same location in each image and using the difference to filter out the regions of difference between the two images. The difference operation can be used to remove the solid interior region of a target game object from its outline image, retaining only the outer outline, thus achieving precise separation of the outline region.

[0048] The object contour mask image can be understood as an intermediate image of the contour markers obtained after subtraction, but which has not yet been standardized. While the object contour mask image has separated the contour region of the target game object, the pixel values ​​of the contour region are irregular and inconsistent, failing to meet the standard specifications of mask data. Therefore, it cannot be directly used for subsequent occlusion detection and fusion operations and requires further standardization. For example, the contour region values ​​obtained after subtraction vary greatly, with some positions having values ​​of 0.3 and others 0.7, not yet standardized into standard mask values. This image is the object contour mask image.

[0049] Normalization can be understood as a standardization process that maps image pixel values ​​to a uniform range of values. Through numerical transformation operations, normalization maps unevenly distributed and inconsistent pixel values ​​in an image to a preset standard value range. Normalization ensures that values ​​in all contour regions remain consistent, while values ​​in non-contour regions are uniformly set to zero, making the image conform to the specifications of mask data. For example, scattered values ​​between 0.2 and 0.9 in contour regions are uniformly mapped to a fixed standard mask value of 1, and values ​​in non-contour regions are uniformly mapped to 0, thus completing the standardization and regularization of mask values.

[0050] Optionally, an edge detection algorithm is used to perform edge detection on the object mask image to generate an object outline effect image corresponding to the game scene, including: using the Laplacian algorithm to perform calculations on the object mask image to obtain an object outline effect image corresponding to the second game object.

[0051] The Laplacian algorithm can be a convolutional edge detection algorithm based on the principle of second-order differentiation. The Laplacian algorithm performs pixel-by-pixel convolution calculations on an image using a preset Laplacian convolution kernel, capturing the second-order variation in pixel values. Regions with drastic value jumps will output high response values, while regions with gradual value changes will output low response values, thus locating region boundaries in the image. Optionally, the Laplacian convolution kernel can include at least one of the following: a four-neighborhood Laplacian convolution kernel, an eight-neighborhood Laplacian convolution kernel, or a custom Laplacian convolution kernel with weight adjustment.

[0052] In one scenario, the horizontal and vertical directions of the texture coordinates in the object mask image are mapped to the horizontal and vertical dimensions of the Laplacian operator, respectively. Second-order derivative differencing is performed in both the horizontal and vertical directions to obtain a discrete four-neighbor Laplacian operator, and the corresponding convolution kernel is configured. Further, the object mask image is input into the Laplacian function for convolution, resulting in an intermediate mask formed by the boundary of the second game object spreading outwards, thus obtaining the object outline effect image corresponding to the second game object. Further, pixel-by-pixel subtraction is performed on the object mask image and the object outline effect image, and the resulting image is used as the contour mask image of the object to be processed. Further, the contour mask image is normalized to unify the range of pixel values, thereby obtaining the object contour mask image corresponding to the second game object.

[0053] S130. Render the target game screen based on the object mask image, the game screen to be processed, and the object outline mask image.

[0054] Transparency information can be understood as rendering channel data that records the degree of opacity of objects at each pixel position in the game screen. Transparency information can be derived from the result of a mixture of material opacity parameters and transparency calculations in the rendering pipeline. The value should typically be set between 0 and 1, where 0 represents complete transparency with no physical occlusion, 1 represents complete opacity, and intermediate values ​​correspond to different degrees of semi-transparency. Transparency information accurately reflects the transparency of semi-transparent objects and the occlusion levels between different game objects. Transparency information can be used to avoid clipping issues caused by stroke errors covering semi-transparent objects. For example, the opacity gradient data of a semi-transparent spell shield from edge to center, the constant semi-transparency value of glass materials, the value of completely opaque character parts, and the value of completely transparent blank backgrounds collectively constitute the transparency information of the game screen.

[0055] The target game screen can be understood as the final image output after integrating multiple types of information and calculations, containing correct spatial outline interaction effects. The target game screen can be based on the region identity of the object mask image, the game screen to be processed, and the outline range of the object outline mask image. It completes the occlusion judgment, semi-transparency blending, and hierarchical sorting calculations for the outlines, ultimately outputting an image with outline effects that conform to three-dimensional spatial logic. This is the final output result of the entire process. The target game screen can be used to indicate the spatial interaction effects of at least two target game objects with overlapping positions. Spatial interaction effects can be understood as the visual interaction performance presented by at least two game objects due to their hierarchical relationship in three-dimensional space. Spatial interaction effects can be specifically manifested as visual logic such as front and rear occlusion between objects, semi-transparent overlay, and the display and hiding of outlines. This is used to ensure that the outline effects conform to the laws of real spatial perspective, avoiding problems such as outline clipping and hierarchical confusion, and enhancing the spatial three-dimensionality and realism of the image. For example, when a semi-transparent shield is located in front of a game character, the visual performance of the shield outline being fully displayed and the outline of the game character's occluded portion being correspondingly weakened is a spatial interaction effect.

[0056] In practical applications, for the spatial interaction rendering of model outlines and semi-transparent models in game scenes, it is common practice to render the model outlines first and then add another rendering channel to combine the semi-transparent models with the model outlines. This results in high development, debugging, and later maintenance costs and risks, as well as a single rendering effect with obvious limitations and low implementation efficiency.

[0057] In response to the above situation, in this embodiment of the disclosure, a pixel-by-pixel fusion operation is performed on the object mask image, the game screen to be processed, and the object outline mask image. The stroke level determination and semi-transparent occlusion effect synthesis are completed in a unified post-processing link without the need to add an additional independent rendering channel. This reduces development and maintenance costs and implementation risks, enriches the rendering effect of stroke space interaction, and improves the overall implementation efficiency of the solution.

[0058] In one scenario, the provided solution renders the target game image based on an object mask, the game image to be processed, and an object contour mask. This can include at least one of the following: multiplying the object mask pixel-by-pixel with the transparency information of the game image to be processed to obtain a target object region mask; performing edge detection on the target object region mask to obtain a coverage region contour mask; and then combining the object contour mask to finally render the target game image; identifying the coverage area of ​​a foreground semi-transparent object based on the transparency information of the game image to be processed; determining the target game object area occluded by the foreground based on the object mask; cropping the contour of the corresponding occluded area in the object contour mask; and finally rendering the target game image; calculating the occlusion intensity coefficient at each pixel position based on the transparency information of the game image to be processed; matching the stroke parameters of the corresponding target game object based on the object mask; and then adjusting the stroke display intensity pixel-by-pixel with the object contour mask to finally render the target game image. The following provides a detailed explanation of one of the rendering methods for the target game image.

[0059] In one scenario, the object mask and the transparency information of the game screen to be processed can be multiplied pixel by pixel, and the resulting image can be used as the target object region mask. Further, the Laplacian algorithm can be used to perform edge detection on the target object region mask to obtain the outline mask of the covered area. Finally, the object outline mask and the covered area outline mask can be compared pixel by pixel, and the target game screen can be rendered.

[0060] For example, Figure 2 This is a schematic diagram illustrating a visual presentation effect of a first game object and a second game object with an overlapping position, provided in an embodiment of this disclosure. Figure 2 As shown, the white triangular pyramid corresponding to object 21 is the second game object, which is a solid object with an outline stroke effect; the semi-transparent ring structure corresponding to object 22 and the semi-transparent cube corresponding to object 23 are the first game objects, and the transparency values ​​of both are within the preset value range; in the picture, the first game objects 22 and 23 have a positional overlap with the second game object 21 on the screen projection, which can intuitively present the spatial occlusion and outline interaction scene between the semi-transparent object and the outlined solid object, and is used to illustrate the applicable scene and object spatial relationship of multi-object outline interaction rendering in this solution.

[0061] In one scenario, to ensure the final stroke effect matches the model's own texture colors and overcomes the limitations of solid-color strokes, the image processing method adds a preprocessing step of object mask image color fusion before performing edge detection: obtaining the screen color information corresponding to the game screen to be processed; multiplying the screen color information and the object mask image pixel by pixel to update the object mask image. The updated object mask image will carry the original texture color of the target game object, and subsequent edge detection operations can directly generate a stroke effect with the object model's own colors.

[0062] In this context, image color information can be understood as the basic rendered image data that records the color representation of each pixel in the game screen. Image color information can originate from the color buffer output of the rendering pipeline, containing complete three-channel color values. It can realistically present the inherent texture colors, lighting effects, and material color representations of all objects in the scene, serving as the original carrier of the visual colors in the game screen. Image color information can be used to assign the model's own color characteristics to purely identifiable object masks. For example, the texture color of a character's clothing, the base tone of skin, the light blue hue of a semi-transparent spell shield, and the texture color of the scene terrain all belong to the image color information of the game screen.

[0063] Pixel-wise multiplication can be understood as a basic image processing operation that multiplies the values ​​of two images of the same size according to their corresponding pixel positions. Pixel-wise multiplication can be based on pixel coordinates as the matching benchmark, performing numerical multiplication operations on the corresponding channels of pixels at the same positions in the two images one by one. In one scenario, pixel-wise multiplication can combine the region filtering characteristics of an object mask with the image's color information, retaining only the color values ​​within the target area marked by the mask, while setting the values ​​of the background area outside the mask to zero, thus achieving precise binding between color and the target object area.

[0064] In one scenario, the color information corresponding to the game screen to be processed is obtained. This color information includes the original texture colors of each model in the game screen and the real-time lighting shading effect. The color information is multiplied pixel by pixel with the object mask image according to the corresponding pixel position. With the help of the region identification attribute of the object mask image, only the color data of the area covered by the target game object is retained, and the values ​​of the remaining background areas are set to zero. This completes the update of the object mask image, so that the updated mask image has both region identification capability and the original color information of the model.

[0065] The technical solution of this disclosure, by acquiring the object mask image corresponding to the game screen to be processed, can complete object classification and boundary recognition based on the mask data of the existing rendering pipeline. This eliminates the need for additional independent rendering channels and modifications to the engine's underlying rendering logic, fundamentally reducing the cost and risk of development, debugging, and later maintenance. Furthermore, by filtering game objects with overlapping positions based on transparency and interaction attributes, the range of objects requiring contour interaction can be accurately identified, reducing the processing volume of subsequent edge detection and effect compositing, and providing pre-processing support for reducing rendering computational overhead. Further, by performing edge detection on the object mask image to obtain the object contour mask image, the edge contours of each second game object can be accurately extracted from the classified mask data. This eliminates the need to rely on multi-channel overlay to generate interactive contours, solving the problems of single rendering effects and significant limitations in spatial hierarchy expression in traditional multi-channel solutions. This provides accurate boundary determination criteria for subsequently restoring the spatial interaction effects of transparent and interactive objects. Furthermore, based on the object mask image, the game screen to be processed, and the object outline mask image, the target game screen is rendered. It can calculate the spatial interaction effect between multiple objects by comprehensively considering object classification attributes, transparency levels, and outline boundaries within a single pipeline. This eliminates the need for collaborative adaptation across multiple stages, including scene, special effects, and post-production, significantly reducing the difficulty of cross-stage collaboration and improving the efficiency of solution implementation. At the same time, it can accurately restore the spatial occlusion level between transparent objects and interactive objects, ensuring the clarity of interactive outlines and balancing the spatial realism of the rendering effect with the visual recognizability of the image. The technical solution of this disclosure addresses the technical problems in related technologies, such as the need to add a rendering channel to combine semi-transparent models with model outlines, the high development and maintenance costs and risks due to reliance on engine-level modifications, the significant limitations of single rendering effects, and the high collaboration difficulty and low implementation efficiency caused by the need for multi-stage collaborative adaptation. It achieves the technical effect of single-pipeline multi-object contour interactive rendering based on mask data, realizing high-quality object space interaction effects without modifying the engine's underlying logic, simplifying the development and maintenance process and reducing cross-stage collaboration costs, improving the efficiency of solution implementation, ensuring the spatial accuracy and visual clarity of the interactive effects, and optimizing the visual performance of the game screen and the player's gaming experience.

[0066] Figure 3 This is a schematic flowchart illustrating another image processing method provided in this embodiment. The technical solution of this embodiment can be combined with other embodiments; for the same or related parts, they can be described in conjunction with the descriptions of other embodiments, and will not be repeated here. Figure 3 As shown, the method in this embodiment may specifically include: S210. Obtain the object mask image corresponding to the game screen to be processed; wherein, the game screen to be processed includes multiple game objects, and the object mask image is used to indicate at least two game objects that have a positional overlap relationship; the at least two game objects include: a first game object whose transparency value is in a preset value range and a second game object with an outline stroke effect.

[0067] S220. Perform edge detection on the object mask image to determine the object contour mask image corresponding to the second game object.

[0068] S230. Obtain the transparency information corresponding to the game screen to be processed, and multiply the object mask image and the transparency information pixel by pixel to obtain the target area mask image; the target area mask image is used to indicate at least part of the object area of ​​the second game object.

[0069] The target region mask can be understood as an intermediate marker image, obtained after transparency filtering, that marks the occluded area of ​​the second game object. The target region mask is generated pixel-by-pixel by multiplying the object mask by the transparency information of the game scene, precisely corresponding to at least a portion of the object area of ​​the second game object covered by the foreground semi-transparent object, and is used for subsequent extraction of the outline of the occluded portion. For example, retaining only the marker image of the player character's body area covered by the semi-transparent shield is the target object region mask. The target region mask can be used to indicate at least a portion of the object area of ​​the second game object. As mentioned earlier, the second game object can be a target game object in the game scene that is occluded by the foreground semi-transparent object and requires a stroke effect. The second game object can be a game subject with a physical model, such as a player character, monster, or scene object, located behind the semi-transparent occluding object in spatial hierarchy. Its stroke needs to be processed hierarchically due to the occlusion by the foreground semi-transparent object, and is the main carrier of the stroke effect in this solution.

[0070] In one scenario, the proposed solution utilizes an object mask map to provide the complete pixel boundaries of the second game object, limiting the calculation range and eliminating interference from semi-transparent data in the background area. The game screen's transparency information provides the spatial distribution and occlusion intensity of the foreground semi-transparent objects, used to filter the pixel locations that actually cause occlusion. After multiplying these two data points pixel by pixel, only pixels that "belong to the second game object and are covered by foreground semi-transparency" retain non-zero values, while the rest are uniformly set to zero, thus accurately pinpointing the occluded area of ​​the second game object. From a data characteristics perspective, this mask is not simply a binary mask; its pixel values ​​are positively correlated with foreground transparency. Higher values ​​indicate stronger foreground occlusion at the corresponding location, identifying both the spatial boundaries of the occluded area and carrying the corresponding occlusion intensity weight, supporting subsequent, more refined stroke transparency gradient processing. Furthermore, the target area mask image can be a key intermediate carrier connecting spatial occlusion determination and outline processing. Subsequent edge detection can directly extract the outline of the occluded part of the second game object without additional spatial hierarchy judgment, thus accurately locating the edge area that needs to be occluded and weakened in the outline.

[0071] In one scenario, an object mask image of the complete body range of the second game object that is marked as occluded is obtained, along with transparency information recording the transparency of the foreground semi-transparent occluding object. The two types of images are multiplied pixel by pixel according to their corresponding pixel coordinates. The area actually covered by the foreground semi-transparent object of the second game object is filtered out by spatial intersection, and the values ​​of the remaining unoccluded areas are set to zero, thereby obtaining the target area mask image.

[0072] S240. Perform edge detection on the target region mask to obtain a covered region contour mask; the covered region contour mask is used to indicate the region contour of at least a portion of the object region of the second game object.

[0073] The coverage area contour mask can be understood as a standardized two-dimensional marker image that marks the boundary contour of the area actually covered by the foreground semi-transparent object for the second game object. It is the edge extraction result of the occluded intersection area. The coverage area contour mask can be obtained from the target area mask through edge detection calculations, accurately corresponding to the area contour of the second game object occluded by the foreground semi-transparent object, and is used to determine the specific range that needs to be occluded in the complete outline. For example, the ring-shaped marker image that marks the outer contour of the area where the player character is covered by the semi-transparent shield is the coverage area contour mask.

[0074] In one scenario, the provided solution generates the coverage area contour mask image by edge detection and normalization of the target object area mask image. Essentially, it represents the boundary line of the spatial intersection between the "second game object's body range" and the "foreground semi-transparent occlusion range," rather than the complete outer contour of the foreground semi-transparent object itself. From a morphological perspective, after normalization, it typically presents as a discontinuous ring or arc-shaped binary image, with non-zero values ​​only distributed at the boundaries of the occluded area, and its width matching the final stroke width. Its contour shape can fit the body edge of the occluded portion of the second game object, automatically cropping redundant edges of the foreground semi-transparent object that extend beyond the second game object's body, preventing invalid contours from interfering with subsequent stroke processing. Functionally, it serves as a precise clipping template for stroke spatial occlusion processing, accurately locating specific edge regions affected by foreground semi-transparent occlusion in the complete stroke. This supports subsequent differential processing of the occluded stroke segments, such as transparency overlay, intensity attenuation, or layer hiding, ensuring that the stroke effect conforms to the 3D spatial occlusion logic.

[0075] In one scenario, the target object region mask, which marks the intersection area where the second game object is actually covered by the foreground semi-transparent object, is used as input. Edge detection is performed on it, and the numerical abrupt boundary of the intersection area is extracted through Laplacian operation. Then, the numerical value range is unified through normalization, and finally, the outline mask of the covered area is obtained, which only retains the boundary shape of the occluded area.

[0076] S250: Render the target game screen based on the object outline mask, the coverage area outline mask, and the game screen to be processed.

[0077] In one scenario, the provided solution addresses the common problems of traditional outline occlusion processing schemes, such as harsh and fragmented effects, difficulty in finely controlling the outline appearance of occluded segments, and reliance on additional rendering channels. This embodiment utilizes two types of pre-generated contour masks—object contour mask and overlay region contour mask—to achieve differentiated rendering of outlines within a unified post-processing chain, eliminating the need for additional independent rendering channels. Specifically, the implementation is as follows: Based on the overlay region contour mask, the object contour mask is divided into occluded and non-occluded contour regions; the occluded contour regions are processed using preset transparency information to obtain the processed object contour mask; the processed object contour mask is then pixel-by-pixel blended with the game screen to be processed to render the target game screen.

[0078] The occlusion outline region can be understood as the stroke section in the object outline mask that is actually covered by the foreground semi-transparent object and requires display intensity adjustment. The occlusion outline region can be defined by spatial matching between the cover area outline mask and the object outline mask, corresponding to the part of the second game object stroke that is behind the foreground semi-transparent object; its range strictly fits the actual boundary of the foreground occlusion and will not exceed the occluded area to cause incorrect clipping, and is the area where the stroke layer processing is effective.

[0079] The non-occluded outline area can be understood as the stroke segment in the object outline mask that is not covered by the foreground semi-transparent object and can be displayed completely. The non-occluded outline area can be the remaining part of the object outline mask after removing the occluded outline area, corresponding to the segment in the second game object stroke that is not occluded by the foreground and is directly exposed to the field of view; no intensity adjustment is required, and the complete display effect of the original stroke can be preserved, ensuring the visual recognition of the stroke subject.

[0080] The preset transparency information can be understood as a pre-configured set of transparency parameters used to adjust the display intensity of the obscured segment's outline. By adjusting the preset transparency information, the transparency of the obscured segment's outline can be controlled, achieving different visual effects from completely hidden to semi-transparent and barely visible, breaking through the limitations of traditional outlines that are either visible or invisible. In some cases, the preset transparency information can be a default setting or a custom setting. For example, the preset transparency of the obscured segment's outline can be set to 30%, so that the outline obscured by the shield presents a light-colored, transparent transition effect, rather than disappearing completely.

[0081] In one scenario, the outline mask of the covered area is used as a spatial determination template, and it is matched and compared with the object outline mask pixel by pixel. In the object outline mask, stroke pixels that coincide with non-zero pixel positions in the covered area outline mask are uniformly defined as occluded outline regions; the remaining stroke pixels that do not coincide are defined as non-occluded outline regions. This divides the object outline mask into occluded and non-occluded outline regions. Furthermore, for the defined occluded outline regions, pre-configured preset transparency information is called, and the display intensity of all stroke pixels in the region is weighted and attenuated pixel by pixel according to a preset transparency coefficient. The stroke pixels in the non-occluded outline regions retain their original intensity and are not processed with any transparency. This results in a processed object outline mask that carries spatial hierarchy differences. Furthermore, the processed object outline mask image is mixed with the scene rendering image from the current camera viewpoint using transparency blending. The processed stroke mask is used as an overlay layer, and the stroke color is overlaid onto the corresponding position of the scene rendering image according to the pixel transparency value. Unoccluded strokes are overlaid into the image with full intensity, while occluded strokes are attenuated and blend naturally with the semi-transparent effect of the scene, ultimately outputting a target game image with correct spatial hierarchy and natural occlusion transition.

[0082] For example, the occluded contour region and the non-occluded contour region can be determined with reference to the following formula: in, Indicates the area of ​​the occluded outline; Represents an object outline mask; This represents the outline mask of the covered area.

[0083] This formula is a conditional judgment function for contour pixels, with the input parameters being the object contour mask image. With the outline mask of the coverage area When the pixel values ​​of the object contour mask and the cover area contour mask are equal, X is output, representing the occluded contour area. This area corresponds to the stroke segment that needs to be weakened in terms of opacity. When the pixel values ​​of the two are not equal, the object contour mask is output directly. It retains the original outline pixels and the corresponding non-occluded contour areas that do not need to be processed, thereby completing the differentiation and filtering of outline pixels and realizing the logic of dividing the object contour mask image into occluded contour areas and non-occluded contour areas.

[0084] The technical solution of this disclosure uses pixel-by-pixel calculations of object mask images and transparency information to filter out the corresponding coverage area of ​​the second game object, then specifically extracts the contour information of the area, and finally combines it with global object contour rendering to obtain the target game screen. On the one hand, it can accurately lock the spatial overlapping interaction area between transparent objects and interactive objects, avoid performing redundant edge detection calculations on non-interactive areas of the entire scene, effectively compress the computational volume and improve rendering efficiency. On the other hand, it can clearly distinguish between the complete contour of the object and the contour of the area covered by the transparent object, accurately restore the occlusion level and spatial interaction relationship between the two types of objects, solve the problem that traditional solutions are difficult to accurately reflect the spatial occlusion relationship between transparent objects and outlined objects, and significantly improve the spatial realism and visual hierarchy of the contour interaction effect.

[0085] Figure 4 This is a schematic flowchart illustrating another image processing method provided in this embodiment. The technical solution of this embodiment can be combined with other embodiments; for the same or related parts, they can be described in conjunction with the descriptions of other embodiments, and will not be repeated here. Figure 4 As shown, the method in this embodiment may specifically include: S310. Obtain the object mask image corresponding to the game screen to be processed; wherein, the game screen to be processed includes multiple game objects, and the object mask image is used to indicate at least two game objects that have a positional overlap relationship; the at least two game objects include: a first game object whose transparency value is in a preset value range and a second game object with an outline stroke effect.

[0086] S320. Perform edge detection on the object mask image to determine the object contour mask image corresponding to the second game object.

[0087] S330: Render the target game screen based on the object mask image, the game screen to be processed, and the object outline mask image.

[0088] S340. Obtain the spatial texture information corresponding to the game screen to be processed, and update the target game screen based on the spatial texture information.

[0089] In practical applications, the model outline generated by post-processing is essentially a two-dimensional screen space image. To achieve spatial layer interaction between the foreground semi-transparent effect and the outline, conventional solutions usually require adding an additional independent rendering channel. The semi-transparent effect is then overlaid after the outline is rendered. However, this method has two obvious drawbacks: First, the additional independent channel increases the overhead and complexity of the rendering pipeline. Second, the outline in two-dimensional screen space does not carry three-dimensional depth and spatial angle information. The semi-transparent effect in the independent channel cannot accurately occlude and blend with the outline based on the real three-dimensional spatial relationship, which can easily lead to layer disorder and abrupt blending transitions, making it difficult to reproduce the real visual effect of semi-transparent medium covering the outline in three-dimensional space.

[0090] In response to the above situation, the technical solution provided in this embodiment introduces spatial texture information based on camera view vectors within a unified post-processing rendering chain. A foreground semi-transparent texture with three-dimensional spatial angle and depth attributes is generated through a spherical mapping algorithm. Without adding an independent rendering channel, the hierarchical interaction between the semi-transparent medium and the stroke in three-dimensional space is simulated, so that the occlusion and blending effect of the stroke has a realistic sense of spatial depth and medium texture, further optimizing the interaction performance between the stroke and the foreground semi-transparent effect.

[0091] Spatial texture information can be understood as texture sampling data with three-dimensional spatial angle and depth attributes, a spatialized texture resource distinct from ordinary two-dimensional screen textures. Spatial texture information is not fixedly mapped onto a two-dimensional screen plane, but rather generated as a three-dimensional spatial texture through a spherical mapping algorithm of the camera's view vector, and then obtained through texture sampling. Its pixel values ​​correspond to the visual characteristics of media at specific directions and depths in three-dimensional space, simulating foreground effects such as spatial fog, dust particles, and semi-transparent media, naturally carrying three-dimensional spatial distribution attributes. In one scenario, spatial texture information can be the core medium for realizing the interaction between outlines and semi-transparent space within the post-processing chain. Without an additional independent rendering channel, it can simulate the occlusion and blending effects of foreground media on outlines in three-dimensional space, solving the problem that two-dimensional post-processing outlines cannot produce realistic spatial interaction with three-dimensional effects. For example, spatial texture information can be a spherical spatial dust texture generated based on the camera's view, presenting the correct spatial following effect as the camera rotates. Superimposed on the outline, it can simulate the visual effect of a character being semi-transparently covered by spatial dust.

[0092] In one scenario, the proposed solution addresses the limitation that ordinary two-dimensional screen textures only correspond to planar pixel positions and lack three-dimensional spatial angle and depth attributes, making it impossible to form a real-level interaction with spatial outlines. This solution adopts a two-layer construction logic that combines angle spherical mapping with depth distance scaling to generate spatial texture information with three-dimensional spatial distribution characteristics within a unified post-processing link.

[0093] Optionally, the spatial texture information corresponding to the game screen to be processed is obtained, including: obtaining the camera orientation vector corresponding to the game screen to be processed, and mapping the camera orientation vector to two-dimensional texture coordinates through inverse trigonometric function operation to obtain spherical spatial texture coordinates; for each pixel in the game screen to be processed, determining the distance information between the pixel and the rendering camera corresponding to the game screen to be processed, scaling the spherical spatial texture coordinates based on the ratio of the distance information to a preset depth reference value to obtain the spatial texture sampling coordinates corresponding to the pixel; sampling the preset base texture using the spatial texture sampling coordinates to obtain the base texture sampling value, and performing spatial intensity modulation on the base texture sampling value based on the distance information and the preset depth reference value to obtain the spatial texture pixel value corresponding to the pixel; obtaining spatial texture information based on the spatial texture pixel value corresponding to each pixel.

[0094] The camera orientation vector can be understood as a three-dimensional direction vector originating from the current camera viewpoint and pointing to the corresponding spatial position of each pixel on the screen. It serves as the baseline input for spatial angle calculations. In the camera space coordinate system, each screen pixel corresponds to a line of sight originating from the camera's near plane. The camera orientation vector represents the spatial orientation of this line of sight, and after normalization, the values ​​of its components are typically between -1 and 1. The camera orientation vector acts as a bridge connecting two-dimensional screen pixels and three-dimensional spatial angles. Subsequent spherical mapping and distance calculations are based on this vector, ensuring that the generated texture exhibits correct spatial following effects as the camera's viewpoint rotates.

[0095] Inverse trigonometric function operations are a set of mathematical operations that convert three-dimensional vector components into corresponding angle values, used to achieve spherical mapping from direction vectors to texture coordinates. Specifically, inverse trigonometric function operations can include arcsine and arctangent operations, taking the axial component of the camera direction vector as input and outputting the corresponding pitch and yaw angle values. Through normalization, the angle values ​​can be linearly mapped to the 0-1 texture coordinate range, transforming the three-dimensional spatial orientation into texture parameters for two-dimensional texture sampling, achieving spherical texture mapping and avoiding stretching distortion of planar textures at edges.

[0096] Two-dimensional texture coordinates can be understood as two-dimensional parameters used to locate sampling positions on a two-dimensional texture image, usually represented in UV form. Two-dimensional texture coordinates consist of two normalized values, horizontal and vertical, typically ranging from 0 to 1, corresponding to the width and height dimensions of the texture image. Here, it is an intermediate product of the camera orientation vector after angle conversion, before incorporating depth information for spatial correction; it only represents the texture position corresponding to the spatial angle and is the basic unit for generating spherical spatial texture coordinates.

[0097] Spherical texture coordinates can be understood as angular texture coordinates obtained by spherical mapping based on the 3D viewing direction, representing the texture sampling position corresponding to the spatial orientation. Spherical texture coordinates are only related to the spatial angle of the camera's viewpoint and are independent of pixel distance. This is equivalent to wrapping a 2D texture on a virtual sphere centered on the camera. When the camera rotates, the coordinates change synchronously with the viewing angle, simulating the visual following effect of environmental textures in 3D space, thus solving the problem of ordinary screen textures being fixed in a 2D plane and misaligning when the viewing angle rotates.

[0098] The preset base texture can be understood as a pre-made two-dimensional texture material, which is the original image resource for generating spatial textures. The preset base texture can be a seamlessly looping planar image such as noise texture, grain texture, or medium texture, which does not have spatial attributes itself. After sampling it through spherical spatial texture coordinates, the original planar texture will be given three-dimensional spatial angular distribution characteristics and transformed into a foreground medium texture with a sense of space.

[0099] The base texture sample value can be understood as the original texture pixel data obtained by sampling a preset base texture using spherical space texture coordinates, which is the basic form of spatial texture. The base texture sample value already has spatial angular distribution and depth perspective scale attributes, but it has not yet been modulated by depth intensity. It belongs to intermediate texture data and needs to be further adjusted for intensity by combining depth parameters.

[0100] In this context, a pixel is the smallest image unit in the screen rendering and the basic processing unit for pixel-by-pixel calculation of spatial texture. Each pixel corresponds to a specific pixel position on the final rendered image, and each pixel has an independent camera orientation vector and depth distance value. This solution calculates unique texture coordinates and texture values ​​for each pixel individually, achieving pixel-by-pixel differentiated processing and ensuring that the texture perfectly matches the scene depth and viewpoint.

[0101] Distance information can be understood as the straight-line distance between a pixel's spatial location and the camera's viewpoint, used to characterize the pixel's depth level. Distance information is obtained by calculating the distance between world space coordinates and camera coordinates, and its value reflects the pixel's distance from the camera in three-dimensional space. Distance information participates in two processes: first, calculating coordinate scaling factors to achieve a perspective effect where objects appear larger when closer and smaller when farther away; second, participating in texture intensity modulation to simulate the visual phenomenon of media thickness accumulating with distance.

[0102] The preset depth reference value can be understood as a pre-configured depth reference scale, serving as a unified reference parameter for texture coordinate scaling, texture intensity reference, and layered construction. The preset intensity coefficient can be consistent with the engine's spatial units. When the pixel distance equals this reference value, the texture coordinate scaling coefficient is 1, and both the texture size and intensity are at the reference state. Simultaneously, it can also serve as a depth identifier for a single-layer spatial texture, supporting the setting of multiple different reference values ​​to achieve multi-layer depth texture overlay and simulate medium distribution at different depths. For example, setting the preset depth reference value to 100 units means that the texture at a distance of 100 units from the camera maintains its original size and reference intensity.

[0103] Spatial texture sampling coordinates can be understood as the final texture sampling coordinates after depth scale correction, serving as the direct input parameters for sampling the preset base texture. Based on spherical spatial texture coordinates, spatial texture sampling coordinates are obtained by multiplicatively scaling the U and V components component by component, using the ratio of pixel distance information to a preset depth reference value as a scaling factor. Spatial texture sampling coordinates simultaneously carry both spatial angle and depth perspective attributes. The textures sampled from these coordinates naturally conform to the perspective law of near objects appearing larger than distant objects in real space, thus solving the problem of a lack of depth perception in pure spherical coordinates.

[0104] Spatial intensity modulation (SIM) can be understood as a pixel-by-pixel intensity adjustment of the base texture sample values ​​based on depth distance parameters, used to endow the texture with spatial attributes of depth intensity variation. SIM can include performing pixel-by-pixel multiplication operations on the base texture sample values ​​with distance information and preset depth reference values, simulating the visual law in real physical space that "the farther the distance, the longer the medium path, the higher the thickness, the stronger the visual effect," allowing planar textures that originally only have scale perspective to further possess intensity variations in the depth direction, enhancing the sense of volume and realism.

[0105] Spatial texture pixel values ​​can be understood as the final texture values ​​output after intensity modulation of a single pixel, and are the smallest unit of spatial texture information. Spatial texture pixel values ​​can be transparency values, grayscale values, or color intensity values; spatial texture pixel values ​​also integrate three three-dimensional attributes: spatial angular distribution, depth perspective scale, and depth intensity variation, corresponding one-to-one with screen pixels.

[0106] In one scenario, the camera orientation vector corresponding to the game screen to be processed is obtained and normalized to obtain a normalized camera orientation vector. Further, the normalized camera orientation vector is decomposed into three orthogonal axial components according to the camera space coordinate system. The two orthogonal components in the horizontal plane correspond to the lateral and forward components of the view, respectively, while the vertical axial component corresponds to the longitudinal component of the view. Further, in the horizontal dimension, a two-parameter arctangent operation is used, with the forward and lateral components of the view as input, to calculate the full-quadrant yaw angle of the view in the horizontal plane. The yaw angle is then linearly normalized, and after offset and scaling operations, the angle value is mapped to the standard texture coordinate range of 0 to 1, obtaining the horizontal U component of the spherical space texture coordinates. In the vertical dimension, an arcsine operation is used, with the longitudinal component of the view as input, to calculate the pitch angle of the view. Similarly, the pitch angle is normalized and mapped to obtain the vertical V component in the range of 0 to 1. Further, the horizontal U component and the vertical V component are paired and combined to obtain the complete two-dimensional spherical space texture coordinates. The coordinates, centered on the current camera, are only related to the spatial orientation angle of the viewpoint and do not carry pixel depth information. As the camera viewpoint rotates, the coordinates change synchronously with the viewpoint angle, achieving a uniform and distortion-free mapping of the 2D texture on the virtual sphere. This provides the angular dimension as the basis for subsequent coordinate scaling correction incorporating depth information. Further, for each pixel in the game screen to be processed, the world space coordinates of the rendering camera corresponding to the game screen and the 3D absolute world coordinates of the pixel are obtained. Distance calculations are used to obtain the straight-line distance from the pixel's spatial location to the rendering camera. Further, using a preset depth reference value as a scale, the ratio of the distance information of the current pixel to the preset depth reference value is calculated. This ratio is used as a texture scaling factor, and multiplicative scaling is applied to both dimensions of the spherical spatial texture coordinates to obtain spatial texture sampling coordinates corresponding to each pixel. Finally, the spatial texture sampling coordinates corresponding to each pixel are used to perform pixel-by-pixel sampling on a preset seamless dust base texture to obtain base texture sampling values. Furthermore, the base texture sample value is multiplied pixel by pixel with the pixel distance information and the preset depth reference value to complete spatial intensity modulation. This makes the texture intensity increase with the pixel depth distance, simulating the visual effect of the spatial medium thickening with distance, thus obtaining the spatial texture pixel value corresponding to the current pixel. Finally, the spatial texture pixel values ​​corresponding to all pixels are combined according to the screen layout to form a complete texture image, thus obtaining the final spatial texture information.

[0107] In one scenario, in the provided solution, after constructing spatial texture information with three-dimensional spatial distribution characteristics, in order to achieve visual fusion between the foreground semi-transparent medium and the model outline and scene elements in the target effect image, and to simulate the superposition and occlusion effect of the spatial medium on the screen elements, it is necessary to perform an update operation on the target game screen based on the above spatial texture information. The specific processing can be as follows: multiply the spatial texture information and the target game screen pixel by pixel to obtain the updated target effect image.

[0108] In one scenario, the spatial texture information is mapped one-to-one with the target game screen according to pixel position, and the color components are multiplied pixel by pixel to obtain the target game screen with the foreground spatial medium effect superimposed, which is the updated target game screen.

[0109] The technical solution of this disclosure updates the target game screen by introducing spatial texture information with spatial angle distribution and depth intensity attributes. It can overlay a natural foreground spatial medium effect on the screen without adding an independent rendering channel or changing the underlying rendering logic of the engine. This makes the visual fusion of model outlines, transparent objects and spatial medium more realistic in terms of volume and spatial layering, effectively solving the problems of flat effect and misalignment distortion when the viewpoint rotates in traditional overlay methods. At the same time, the entire calculation process is completed in the post-processing link based on existing pixel depth and line-of-sight data, without the need for additional cross-link resource collaboration. While improving the spatial visual performance of the screen, it also takes into account rendering efficiency and the ease of implementation of the solution.

[0110] Figure 5 This is a schematic diagram of the structure of an image processing apparatus provided in an embodiment of this disclosure. Figure 5 As shown, the image processing device includes a first module 410, a second module 420, and a third module 430. The first module 410 is used to acquire an object mask image corresponding to a game screen to be processed; wherein the game screen to be processed includes multiple game objects, and the object mask image is used to indicate at least two game objects with overlapping positions; the at least two game objects include a first game object with an opacity value within a preset range and a second game object with an outline effect; the second module 420 is used to perform edge detection on the object mask image to determine an object outline mask image corresponding to the second game object; wherein the object outline mask image is used to represent the edge outline of the second game object; the third module 430 is used to render a target game screen based on the object mask image, the game screen to be processed, and the object outline mask image.

[0111] The technical solution of this disclosure, by acquiring the object mask image corresponding to the game screen to be processed, can complete object classification and boundary recognition based on the mask data of the existing rendering pipeline. This eliminates the need for additional independent rendering channels and modifications to the engine's underlying rendering logic, fundamentally reducing the cost and risk of development, debugging, and later maintenance. Furthermore, by filtering game objects with overlapping positions based on transparency and interaction attributes, the range of objects requiring contour interaction can be accurately identified, reducing the processing volume of subsequent edge detection and effect compositing, and providing pre-processing support for reducing rendering computational overhead. Further, by performing edge detection on the object mask image to obtain the object contour mask image, the edge contours of each second game object can be accurately extracted from the classified mask data. This eliminates the need to rely on multi-channel overlay to generate interactive contours, solving the problems of single rendering effects and significant limitations in spatial hierarchy expression in traditional multi-channel solutions. This provides accurate boundary determination criteria for subsequently restoring the spatial interaction effects of transparent and interactive objects. Furthermore, based on the object mask image, the game screen to be processed, and the object outline mask image, the target game screen is rendered. It can calculate the spatial interaction effect between multiple objects by comprehensively considering object classification attributes, transparency levels, and outline boundaries within a single pipeline. This eliminates the need for collaborative adaptation across multiple stages, including scene, special effects, and post-production, significantly reducing the difficulty of cross-stage collaboration and improving the efficiency of solution implementation. At the same time, it can accurately restore the spatial occlusion level between transparent objects and interactive objects, ensuring the clarity of interactive outlines and balancing the spatial realism of the rendering effect with the visual recognizability of the image. The technical solution of this disclosure addresses the technical problems in related technologies, such as the need to add a rendering channel to combine semi-transparent models with model outlines, the high development and maintenance costs and risks due to reliance on engine-level modifications, the significant limitations of single rendering effects, and the high collaboration difficulty and low implementation efficiency caused by the need for multi-stage collaborative adaptation. It achieves the technical effect of single-pipeline multi-object contour interactive rendering based on mask data, realizing high-quality object space interaction effects without modifying the engine's underlying logic, simplifying the development and maintenance process and reducing cross-stage collaboration costs, improving the efficiency of solution implementation, ensuring the spatial accuracy and visual clarity of the interactive effects, and optimizing the visual performance of the game screen and the player's gaming experience.

[0112] In some embodiments of this disclosure, optionally, the first module 410 includes: a first unit, a second unit, and a third unit; wherein, the first unit is used to acquire a game screen to be processed; the second unit is used to determine at least two game objects in the game screen to be processed that have an overlapping relationship, and assign different object mask values ​​to the determined at least two game objects according to a preset allocation rule; the third unit is used to process the game screen to be processed according to the object mask values ​​corresponding to the at least two game objects respectively, to obtain an object mask map corresponding to the game screen to be processed.

[0113] In some embodiments of this disclosure, optionally, the second module 420 includes: a fourth unit, a fifth unit, and a sixth unit; wherein, the fourth unit is used to perform edge detection on the object mask image using an edge detection algorithm to obtain an object outline effect image corresponding to the second game object; the fifth unit is used to perform subtraction processing on the object mask image and the object outline effect image to obtain a contour mask image of the object to be processed; the sixth unit is used to perform normalization processing on the contour mask image of the object to be processed to obtain an object contour mask image corresponding to the second game object.

[0114] In some embodiments of this disclosure, optionally, the fourth unit is specifically used to perform calculations on the object mask image using the Laplace algorithm to obtain an object contour mask image corresponding to the second game object.

[0115] In some embodiments of this disclosure, optionally, the apparatus further includes: a fourth module and a fifth module; wherein the fourth module is used to obtain screen color information corresponding to the game screen to be processed; and the fifth module is used to multiply the screen color information and the object mask image pixel by pixel to update the object mask image.

[0116] In some embodiments of this disclosure, optionally, the third module 430 includes: a seventh unit, an eighth unit, and a ninth unit; wherein, the seventh unit is used to obtain the transparency information corresponding to the game screen to be processed, and multiply the object mask image and the transparency information pixel by pixel to obtain a target area mask image; the target area mask image is used to indicate at least a portion of the object area of ​​the second game object; the eighth unit is used to perform edge detection on the target area mask image to obtain a coverage area contour mask image; the coverage area contour mask image is used to indicate the area contour of at least a portion of the object area of ​​the second game object; the ninth unit is used to render the target game screen based on the object contour mask image, the coverage area contour mask image, and the game screen to be processed.

[0117] In some embodiments of this disclosure, optionally, the ninth unit is specifically used to divide the object contour mask into an occluded contour region and an unoccluded contour region based on the coverage area contour mask; process the occluded contour region using preset transparency information to obtain the processed object contour mask; and blend the processed object contour mask with the game screen to be processed pixel by pixel to render the target game screen.

[0118] In some embodiments of this disclosure, optionally, the apparatus further includes: a sixth module, configured to acquire spatial texture information corresponding to the game screen to be processed, and update the target game screen based on the spatial texture information.

[0119] In some embodiments of this disclosure, optionally, the sixth module includes: a tenth unit, an eleventh unit, a twelfth unit, and a thirteenth unit; wherein, the tenth unit is used to obtain the camera direction vector corresponding to the game screen to be processed, and to map the camera direction vector to two-dimensional texture coordinates through inverse trigonometric function operation to obtain spherical space texture coordinates; the eleventh unit is used to determine the distance information between each pixel in the game screen to be processed and the rendering camera corresponding to the game screen to be processed, and to scale the spherical space texture coordinates based on the ratio of the distance information to a preset depth reference value to obtain spatial texture sampling coordinates corresponding to the pixel; the twelfth unit is used to sample a preset base texture using the spatial texture sampling coordinates to obtain a base texture sampling value, and to perform spatial intensity modulation on the base texture sampling value based on the distance information and the preset depth reference value to obtain a spatial texture pixel value corresponding to the pixel; the thirteenth unit is used to obtain spatial texture information based on the spatial texture pixel values ​​corresponding to each pixel.

[0120] In some embodiments of this disclosure, optionally, the sixth module includes: a fourteenth unit, configured to multiply the spatial texture information with the target game screen pixel by pixel to obtain the updated target game screen.

[0121] The image processing apparatus provided in this disclosure can execute the image processing method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects for executing the method.

[0122] It is worth noting that the various units and modules included in the above-mentioned image processing device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this disclosure.

[0123] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0124] like Figure 6 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0125] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0126] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as image processing methods.

[0127] In some embodiments, the image processing method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via read-only memory (ROM) 12 and / or communication unit 19. When the computer program is loaded into random access memory (RAM) 13 and executed by processor 11, one or more steps of the image processing method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the image processing method by any other suitable means (e.g., by means of firmware).

[0128] Various implementations of the systems and techniques described above herein can be implemented in digital circuit systems, integrated circuits, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chips (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transferring data and instructions to the storage system, at least one input device, and at least one output device.

[0129] Computer programs for implementing the image processing methods of this disclosure can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs can be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0130] This disclosure provides a computer-readable storage medium storing computer instructions for causing a processor to execute an image processing method, comprising: acquiring an object mask image corresponding to a game screen to be processed; wherein the game screen to be processed includes multiple game objects, and the object mask image is used to indicate at least two game objects that have a positional overlap relationship; the at least two game objects include: a first game object whose transparency value is located within a preset value range and a second game object with an outline effect; performing edge detection on the object mask image to determine an object outline mask image corresponding to the second game object; wherein the object outline mask image is used to characterize the edge outline of the second game object; and rendering a target game screen based on the object mask image, the game screen to be processed, and the object outline mask image.

[0131] In the context of this disclosure, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM, also known as flash memory), optical fiber, compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0132] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device for displaying information to the user (e.g., a cathode-ray tube (CRT) or liquid crystal display (LCD) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0133] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0134] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system. It addresses the shortcomings of traditional physical hosts and Virtual Private Server (VPS) services, such as high management difficulty and weak business scalability.

[0135] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication unit 19, or installed from storage unit 18, or installed from ROM 12. When the computer program is executed by processor 11, it performs the functions defined in the methods of embodiments of this disclosure.

[0136] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements an image processing method according to any embodiment of this disclosure.

[0137] In implementing a computer program product, computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0138] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this disclosure can be achieved, and this is not limited herein.

[0139] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. An image processing method, characterized in that, include: Obtain the object mask image corresponding to the game screen to be processed; wherein, the game screen to be processed includes multiple game objects, and the object mask image is used to indicate at least two game objects that have a positional overlap relationship; the at least two game objects include: a first game object whose transparency value is within a preset value range and a second game object with an outline stroke effect; Edge detection is performed on the object mask image to determine the object contour mask image corresponding to the second game object; wherein, the object contour mask image is used to represent the edge contour of the second game object; The target game screen is rendered based on the object mask image, the game screen to be processed, and the object outline mask image.

2. The image processing method according to claim 1, characterized in that, The process of obtaining the object mask image corresponding to the game screen to be processed includes: Acquire the game screen to be processed; Identify at least two game objects in the game screen to be processed that have an overlapping relationship, and assign different object mask values ​​to the identified at least two game objects according to a preset allocation rule; The game screen to be processed is processed according to the object mask values ​​corresponding to the at least two game objects to obtain the object mask map corresponding to the game screen to be processed.

3. The image processing method according to claim 1, characterized in that, The step of performing edge detection on the object mask image to determine the object contour mask image corresponding to the second game object includes: An edge detection algorithm is used to perform edge detection on the object mask image to obtain the object outline effect image corresponding to the second game object; The object mask image and the object outline effect image are subtracted to obtain the outline mask image of the object to be processed; The outline mask of the object to be processed is normalized to obtain the outline mask of the object corresponding to the second game object.

4. The image processing method according to claim 1, characterized in that, Also includes: Obtain the color information of the game screen to be processed; The image color information and the object mask are multiplied pixel by pixel to update the object mask.

5. The image processing method according to claim 1, characterized in that, The step of rendering the target game screen based on the object mask image, the game screen to be processed, and the object outline mask image includes: The transparency information corresponding to the game screen to be processed is obtained, and the object mask image and the transparency information are multiplied pixel by pixel to obtain a target area mask image; the target area mask image is used to indicate at least a portion of the object area of ​​the second game object; Edge detection is performed on the target region mask to obtain a coverage region contour mask; the coverage region contour mask is used to indicate the region contour of at least a portion of the object region of the second game object; The target game screen is rendered based on the object contour mask, the coverage area contour mask, and the game screen to be processed.

6. The image processing method according to claim 5, characterized in that, The step of rendering the target game screen based on the object contour mask, the coverage area contour mask, and the game screen to be processed includes: Based on the coverage area contour mask, the object contour mask is divided into occluded contour areas and non-occluded contour areas. The occluded contour area is processed using preset transparency information to obtain the processed object contour mask image; The processed object outline mask image is blended pixel by pixel with the game screen to be processed to obtain the target game screen.

7. The image processing method according to claim 1, characterized in that, Also includes: Obtain the spatial texture information corresponding to the game screen to be processed, and update the target game screen based on the spatial texture information.

8. The image processing method according to claim 7, characterized in that, The step of obtaining the spatial texture information corresponding to the game screen to be processed includes: Obtain the camera orientation vector corresponding to the game screen to be processed, and map the camera orientation vector to two-dimensional texture coordinates through inverse trigonometric function operation to obtain spherical space texture coordinates; For each pixel in the game screen to be processed, the distance information between the pixel and the rendering camera corresponding to the game screen to be processed is determined. Based on the ratio of the distance information to a preset depth reference value, the spherical spatial texture coordinates are scaled to obtain the spatial texture sampling coordinates corresponding to the pixel. The preset base texture is sampled using the spatial texture sampling coordinates to obtain the base texture sampling value, and the spatial intensity modulation is performed on the base texture sampling value based on the distance information and the preset depth reference value to obtain the spatial texture pixel value corresponding to the pixel point; Spatial texture information is obtained based on the spatial texture pixel value corresponding to each pixel.

9. The image processing method according to claim 7, characterized in that, Updating the target game screen based on the spatial texture information includes: The spatial texture information is multiplied pixel by pixel with the target game screen to obtain the updated target game screen.

10. An image processing apparatus, characterized in that, include: The first module is used to obtain an object mask image corresponding to the game screen to be processed; wherein, the game screen to be processed includes multiple game objects, and the object mask image is used to indicate at least two game objects that have a positional overlap relationship; the at least two game objects include: a first game object whose transparency value is within a preset value range and a second game object with an outline stroke effect; The second module is used to perform edge detection on the object mask image to determine the object contour mask image corresponding to the second game object; wherein, the object contour mask image is used to represent the edge contour of the second game object; The third module is used to render the target game screen based on the object mask image, the game screen to be processed, and the object outline mask image.

11. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the image processing method as described in any one of claims 1-9.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the image processing method according to any one of claims 1-9.

13. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the image processing method according to any one of claims 1-9.