Image processing method and device, storage medium and electronic device

By generating related images by preset programmable noise processing methods and performing mixed processing, the problems of low image processing efficiency and high computing resource consumption in the prior art are solved, and the rapid production and efficient resource utilization of dynamic vegetation images are realized.

CN119559278APending Publication Date: 2025-03-04NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411611383.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

In the prior art, the image processing method has problems such as low processing efficiency and huge computing resource consumption, which is difficult to effectively solve the complexity and resource consumption problems of dynamic image production.

Method used

By presetting the programmatic noise processing method, a first noise map, a first color map, a second color map, and a target symbol distance field map are generated, and the initial vegetation image is generated using these images, and a target vegetation image is generated through mask image mixing processing.

Benefits of technology

It significantly improves the speed and resource utilization rate of dynamic vegetation images, while maintaining the realistic and detailed richness of the visual effects of vegetation images, solving the problems of inefficient processing efficiency and high computing resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119559278A_ABST
    Figure CN119559278A_ABST
Patent Text Reader

Abstract

The invention discloses an image processing method and device, a storage medium and an electronic device. The method comprises the steps of generating a first noise map, a first color map, a second color map and a target symbol distance field map through a preset programmed noise processing mode; generating an initial vegetation image by using the first noise map, the first color map and the target symbol distance field map; generating a first mask image based on the initial vegetation image; and performing hybrid processing on the first color map and the second color map according to the first mask map to generate a target vegetation image. According to the invention, the technical problems of low processing efficiency and huge computing resource consumption of an image processing mode provided in related technologies are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an image processing method, device, storage medium and electronic device. Background Art

[0002] With the development of computer graphics technology, the two-dimensional map effects generated by computer graphics are getting closer and closer to the real world, which significantly improves the visualization effect and user experience of the map. In the related technology, two-dimensional images can be used as scene elements such as maps, backgrounds or textures in virtual scenes. Two-dimensional images can be produced by hand-drawing or image generation applications. The two-dimensional images produced in the related technology are usually static images. In order to achieve dynamic effects, it is necessary to build scenes in three-dimensional applications, use time animation and rendering technology to generate a series of image frames, and then combine the image frames into dynamic images. This processing process is relatively complex, time-consuming, and requires a lot of computing resources.

[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0004] At least some embodiments of the present application provide an image processing method, apparatus, storage medium and electronic device to at least solve the technical problems of low processing efficiency and huge consumption of computing resources in the image processing methods provided in the related arts.

[0005] According to one embodiment of the present application, an image processing method is provided, including: generating a first noise map, a first color map, a second color map and a target symbol distance field map through a preset programmed noise processing method, wherein the first noise map is used to simulate the swinging direction of virtual vegetation under the action of external force, the first color map is used to determine the surface color of the virtual vegetation, the second color map is used to determine the surface color not covered by the virtual vegetation, and the target symbol distance field map is used to determine the target branch and leaf shape of the virtual vegetation; using the first noise map, the first color map and the target symbol distance field map to generate an initial vegetation image; generating a first mask map based on the initial vegetation image, wherein the first mask map is used to distinguish between a two-dimensional display area covered by the virtual vegetation and a two-dimensional display area not covered by the virtual vegetation; mixing the first color map and the second color map according to the first mask map to generate a target vegetation image.

[0006] According to one embodiment of the present application, an image processing device is also provided, including: a first generating module, used to generate a first noise map, a first color map, a second color map and a target symbol distance field map through a preset programmed noise processing method, wherein the first noise map is used to simulate the swinging direction of the virtual vegetation under the action of an external force, the first color map is used to determine the surface color of the virtual vegetation, the second color map is used to determine the surface color not covered by the virtual vegetation, and the target symbol distance field map is used to determine the target branch and leaf shape of the virtual vegetation; a second generating module, used to generate an initial vegetation image using the first noise map, the first color map and the target symbol distance field map; a third generating module, used to generate a first mask map based on the initial vegetation image, wherein the first mask map is used to distinguish between a two-dimensional display area covered by the virtual vegetation and a two-dimensional display area not covered by the virtual vegetation; a processing module, used to mix the first color map and the second color map according to the first mask map to generate a target vegetation image.

[0007] According to one embodiment of the present application, a computer-readable storage medium is further provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned image processing method in each embodiment of the present application when running.

[0008] According to one embodiment of the present application, an electronic device is also provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the above-mentioned image processing method in each embodiment of the present application.

[0009] According to another aspect of the embodiments of the present application, a computer program product is also provided, including a computer program, and when the computer program is executed by a processor, the image processing method described above in each embodiment of the present application is implemented.

[0010] According to another aspect of an embodiment of the present application, a computer program product is also provided, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned image processing method in each embodiment of the present application is implemented.

[0011] According to another aspect of the embodiments of the present application, a computer program is also provided. When the computer program is executed by a processor, the above-mentioned image processing method in each embodiment of the present application is implemented.

[0012] In at least some embodiments of the present application, a first noise map, a first color map, a second color map and a target symbol distance field map are generated by a preset programmed noise processing method, and then an initial vegetation image is generated using the first noise map, the first color map and the target symbol distance field map. Subsequently, a first mask map is generated based on the initial vegetation image to distinguish between the two-dimensional display area covered by virtual vegetation and the two-dimensional display area not covered by virtual vegetation. Finally, the first color map and the second color map are mixed according to the first mask map to generate a target vegetation image, thereby significantly improving the speed and resource utilization of dynamic vegetation image production, while maintaining the realism and detail richness of the visual effects of the vegetation image, thereby achieving the technical effect of improving image processing efficiency and saving computing resources, and thus solving the technical problems of low processing efficiency and huge consumption of computing resources in the image processing method provided in the related art. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0014] Figure 1 is a hardware structure block diagram of a mobile terminal according to an image processing method of one embodiment of the present application;

[0015] Figure 2 is a flow chart of an image processing method according to one embodiment of the present application;

[0016] Figure 3 is a schematic diagram of a first noise graph according to one embodiment of the present application;

[0017] Figure 4 is a schematic diagram of a first color map according to one embodiment of the present application;

[0018] Figure 5 is a schematic diagram of a first mask image according to one embodiment of the present application;

[0019] Figure 6 is a schematic diagram of a target vegetation image according to one embodiment of the present application;

[0020] Figure 7 is a schematic diagram of a target symbol distance field diagram according to one embodiment of the present application;

[0021] Figure 8 is a schematic diagram of a second noise graph according to one embodiment of the present application;

[0022] Fig. 9is a schematic diagram of a fourth mask image according to one embodiment of the present application;

[0023] Fig.10 is a schematic diagram of multiple vertices according to one embodiment of the present application;

[0024] Fig.11 is a schematic diagram of a target vertex according to one embodiment of the present application;

[0025] Fig.12 is a schematic diagram of an initial vegetation image according to one embodiment of the present application;

[0026] Fig.13 is a structural block diagram of an image processing device according to one embodiment of the present application;

[0027] Fig.14 is a schematic diagram of an electronic device according to one embodiment of the present application. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] The above method embodiments involved in this application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, the mobile terminal can be a smart phone, a tablet computer, a PDA, a mobile Internet device, a PAD, a game console and other terminal devices. Figure 1 is a hardware structure block diagram of a mobile terminal of an image processing method according to an embodiment of the present application. Figure 1As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microprocessor (MCU), a field-programmable logic device (FPGA), a neural network processor (NPU), a tensor processing unit (TPU), an artificial intelligence (AI) type processor, etc.) and a memory 104 for storing data. In one embodiment of the present application, it may also include: an input and output device 108 and a display device 110.

[0031] In some optional embodiments mainly based on game scenarios, the above-mentioned device can also provide a human-computer interaction interface with a touch-sensitive surface, which can sense finger contact and / or gestures to perform human-computer interaction with a graphical user interface (GUI). The human-computer interaction function may include the following interactions: creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, sending and receiving emails, call interface, playing digital videos, playing digital music and / or web browsing, etc. The executable instructions for executing the above-mentioned human-computer interaction functions are configured / stored in a computer program product or readable storage medium executable by one or more processors.

[0032] Those skilled in the art will understand that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0033] According to one embodiment of the present application, an embodiment of an image processing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0034] Figure 2 is a flowchart of an image processing method according to one embodiment of the present application. Figure 2 As shown, the method comprises the following steps:

[0035] Step S21, generating a first noise map, a first color map, a second color map, and a target signed distance field map by a preset programmed noise processing method, wherein the first noise map is used to simulate the swing direction of the virtual vegetation under the action of an external force, the first color map is used to determine the surface color of the virtual vegetation, the second color map is used to determine the surface color not covered by the virtual vegetation, and the target signed distance field map is used to determine the target branch and leaf shape of the virtual vegetation;

[0036] Step S22, generating an initial vegetation image using the first noise map, the first color map, and the target signed distance field map;

[0037] Step S23, generating a first mask image based on the initial vegetation image, wherein the first mask image is used to distinguish between a two-dimensional display area covered by virtual vegetation and a two-dimensional display area not covered by virtual vegetation;

[0038] Step S24, mixing the first color map and the second color map according to the first mask map to generate a target vegetation image.

[0039] The image processing method in the embodiment of the present application can be applied to scenes that require rapid generation of two-dimensional maps or background images with dynamic effects, including but not limited to scenes such as game development, animation production, and virtual environment simulation. In game scenes, especially in games with a bird's-eye view or an isometric view, making dynamic maps and background images is an important part of enhancing the immersion and realism of the game, which can effectively reduce the reliance on three-dimensional modeling and rendering during game development, saving development time and resources. In animation production scenes, the production of background dynamic effects often requires a lot of time cost. The image processing method in the embodiment of the present application is used to quickly generate dynamic vegetation animations, provide more delicate and realistic dynamic elements for the animation background, and improve the visual quality and viewing experience of the animation. In technologies such as virtual reality and augmented reality, dynamic natural environment simulation is crucial to improving user experience. The image processing method in the embodiment of the present application can quickly generate dynamic vegetation in a virtual environment, increase the realism of the environment, and improve the user's immersion.

[0040] The above-mentioned preset procedural noise processing method is to use a predefined algorithm or function in computer graphics and image processing to generate a series of natural or random patterns, which can be used to simulate various textures and dynamic effects in nature. The preset procedural noise processing method can be implemented by using the procedural noise of a computer graphics application (Houdini). Houdini has a built-in noise generation tool and node system, which can generate preset procedural noise by adjusting various parameters. Procedural noise can be used to simulate natural textures, dynamic effects and complex patterns, such as the impact of wind on grass, the undulation of terrain, the flow of clouds, etc. Through the preset procedural noise processing method, users can create visual effects that are both random and in line with physical rules in two-dimensional space, thereby effectively simplifying the complexity of manual design and adjustment and improving the efficiency and quality of dynamic image production.

[0041] The virtual vegetation can be plants simulated in a virtual environment, including but not limited to grass, bushes, woods, etc. In computer graphics, virtual vegetation can be used to increase the realism and details of a scene, especially in games and animations, where dynamic virtual vegetation can significantly enhance immersion and visual effects.

[0042] The first noise image is used to simulate the swing direction of the virtual vegetation under the action of external force. Figure 3 is a schematic diagram of a first noise graph according to one embodiment of the present application, such as Figure 3 As shown, through Houdini's procedural noise, a colorful noise map can be adjusted, that is, a first noise map is generated. The information of the color channel of the first noise map represents the swing direction of the virtual vegetation under the action of external force.

[0043] The first color map is used to determine the surface color of the virtual vegetation. Figure 4 is a schematic diagram of a first color map according to one embodiment of the present application, such as Figure 4 As shown, through Houdini's procedural noise, a color map, namely the first color map, can be adjusted. The first color map can represent the color of grass, such as green.

[0044] The second color map is used to determine the color of the ground surface that is not covered by virtual vegetation. The second color map will be used as a reference for ground material to ensure that the correct ground color is displayed in places that are not covered by virtual vegetation.

[0045] The target Signed Distance Field (SDF) is used to determine the target branch and leaf shape of the virtual vegetation. By using the SDF graph, a complex and precise shape can be created, thereby simulating the branches and leaves of the virtual vegetation, making the virtual vegetation more realistic.

[0046] Furthermore, an initial vegetation image is generated using the first noise map, the first color map, and the target signed distance field map, and a first mask map is generated based on the initial vegetation image, so as to distinguish between a two-dimensional display area covered by virtual vegetation and a two-dimensional display area not covered by virtual vegetation. Specifically, Figure 5 is a schematic diagram of a first mask image according to one embodiment of the present application, such as Figure 5 As shown, the initial vegetation image is decolorized to obtain a first mask image. The color contrast in the first mask image is adjustable. The darker the area, the more the color of the ground is visible, and the whiter the area, the more the color of the virtual vegetation is retained.

[0047] Figure 6 is a schematic diagram of a target vegetation image according to one embodiment of the present application, such as Figure 6 As shown, the first color map and the second color map are mixed according to the first mask map to generate a target vegetation image.

[0048] Based on the above steps S21 to S24, a first noise map, a first color map, a second color map and a target symbol distance field map are generated through a preset programmed noise processing method, and then the first noise map, the first color map and the target symbol distance field map are used to generate an initial vegetation image, and then a first mask map is generated based on the initial vegetation image to distinguish between the two-dimensional display area covered by virtual vegetation and the two-dimensional display area not covered by virtual vegetation. Finally, the first color map and the second color map are mixed according to the first mask map to generate a target vegetation image, thereby significantly improving the speed and resource utilization of dynamic vegetation image production, while maintaining the realism and detail richness of the visual effects of the vegetation image, thereby achieving the technical effect of improving image processing efficiency and saving computing resources, and thus solving the technical problems of low processing efficiency and huge computing resource consumption in the image processing method provided in the related art.

[0049] The image processing method in the embodiment of the present application is further introduced below.

[0050] Optionally, in step S21, generating a first noise map by a preset programmed noise processing method includes:

[0051] Through a preset programmed noise processing method, the color value of the first color channel and the color value of the second color channel in the first original image are adjusted to determine the vector value of the target two-dimensional vector; and a first noise map is generated according to the vector value of the target two-dimensional vector.

[0052] The first color channel can be a red channel (Red), and the second color channel can be a green channel (Green). The color value R of the first color channel and the color value G of the second color channel are used as the vector value of the target two-dimensional vector (vector) in the plane coordinate system. The color value of the first color channel and the color value of the second color channel in the first original image are freely adjusted to determine the vector value of the target two-dimensional vector. The attribute of the vector value can be described as the swing direction (direction) of the virtual vegetation under the action of the external force. Further, the first noise map is generated according to the vector value of the target two-dimensional vector.

[0053] By adjusting the channel values ​​of the first color channel and the second color channel, the swing direction of the virtual vegetation at each pixel can be precisely controlled, so that the virtual vegetation in different areas can be processed differently. For example, the vegetation swings more in places with strong winds, while the vegetation is relatively stable in places with weak winds, thus achieving more precise dynamic scene control.

[0054] Based on the above optional embodiments, the color values ​​of the first color channel and the second color channel in the first original image are adjusted through a preset programmed noise processing method, the vector value of the target two-dimensional vector is determined, and then the first noise map is generated according to the vector value of the target two-dimensional vector, thereby significantly enhancing the realism and attractiveness of the dynamic scene, reducing resource consumption, and making the production of dynamic images more convenient and efficient.

[0055] Optionally, the image processing method in the embodiment of the present application also includes: controlling the value change of the target two-dimensional vector by setting key frames in the time dimension to obtain an updated first noise map to adjust the swing direction of the virtual vegetation under the action of external force.

[0056] Specifically, keyframes are set in the time dimension to control the change of the generated value of Houdini's procedural noise over time, that is, to control the change of the target two-dimensional vector value, so as to obtain the updated first noise map, thereby adjusting the swing direction of the virtual vegetation under the action of external forces, creating dynamic textures and effects, thereby increasing the visual richness and dynamics.

[0057] Optionally, in step S21, generating a target signed distance field map by a preset programmed noise processing method includes:

[0058] A second mask map is generated by a signed distance field calculation method, wherein the second mask map is used to determine the original branch and leaf shape of the virtual vegetation; the second mask map is mask-locked to generate a third mask map, wherein the third mask map is used to determine the intermediate branch and leaf shape obtained by adjusting the original branch and leaf shape; in a preset programmed noise processing method, the third mask map is noise-distorted based on the first noise map to generate a target signed distance field map.

[0059] Specifically, in computer graphics, SDF is a method of representing geometric shapes. It can provide a value for each point, which represents the distance from the point to the nearest surface and has a sign. A positive sign indicates that the point is outside the shape, and a negative sign indicates that the point is inside the shape. This can define the outline of a shape.

[0060] Taking the virtual vegetation as grass as an example, the SDF distance field is used to calculate the second mask map on the two-dimensional plane. The second mask map can be a pointed black and white mask, which is used to determine the outline of the grass blade, and its vertices and edges can define the basic shape of the grass blade. The second mask map is mask-locked, so as to adjust it to ensure that it meets the specific characteristics of the grass blade, including but not limited to adjusting the smoothness of the edge, adding more details or ensuring the consistency of the shape, so as to generate a third mask map, which is used to determine the intermediate branch shape obtained by adjusting the original branch shape. Figure 7 is a schematic diagram of a target symbol distance field diagram according to one embodiment of the present application, such as Figure 7 As shown, in order to make the grass blades look more natural and random, in the preset procedural noise processing method, the third mask map is noise-distorted based on the first noise map to generate a target signed distance field map. The noise can be used to slightly distort the shape of the mask so that each blade of grass has a unique appearance.

[0061] Based on the above optional embodiment, a second mask image is generated by adopting a signed distance field calculation method, and then the second mask image is mask-locked to generate a third mask image. Finally, in a preset programmed noise processing method, the third mask image is noise-distorted based on the first noise image to generate a target signed distance field image, thereby achieving precise control and adjustment of the shape of virtual vegetation and further improving image processing efficiency.

[0062] Optionally, the image processing method in the embodiment of the present application further includes: generating a second noise map by a preset programmed noise processing method, wherein the second noise map is used to determine the distribution density of the virtual vegetation.

[0063] Specifically, Figure 8 is a schematic diagram of a second noise graph according to one embodiment of the present application, such as Figure 8As shown, through Houdini's procedural noise, a black and white noise can be adjusted. The black and white noise information represents the density of the grass.

[0064] Based on the above optional embodiment, a second noise map is generated by a preset programmed noise processing method to determine the distribution density of the virtual vegetation, thereby being able to automatically and randomly adjust the distribution density of the virtual vegetation on the two-dimensional map, thereby creating a more natural, irregular and varied vegetation coverage effect, thereby enhancing the realism and visual appeal of the scene.

[0065] Optionally, the image processing method in the embodiment of the present application further includes:

[0066] A plurality of vertices are created on the second original image based on the second noise map; and a target vertex is obtained by screening the plurality of vertices according to a fourth mask map, wherein the fourth mask map is used to determine a growth area covered by virtual vegetation.

[0067] Specifically, scattered points are created on the second original image based on the second noise map, the larger the density value on the second noise map is, the denser the vertices are, and further, the target vertex is obtained by screening from multiple vertices according to the fourth mask map.

[0068] Fig. 9 is a schematic diagram of a fourth mask diagram according to one embodiment of the present application, such as Fig. 9 As shown, the road without grass can be defined by manually drawing a black and white mask by the user, or it can be generated programmatically. Fig. 9 The white circle area in the middle is the road area, and the other areas except the road area are the growth areas covered by virtual vegetation. Fig.10 is a schematic diagram of multiple vertices according to one embodiment of the present application, such as Fig.10 As shown, the larger the density value on the second noise map is, the denser the vertices are, and the black and white information of the road mask is transferred to multiple vertices. Fig.11 is a schematic diagram of a target vertex according to one embodiment of the present application, such as Fig.11 As shown, by setting a threshold, Fig.10 The target vertex is obtained by filtering the multiple vertices shown in the figure and removing the white points.

[0069] Based on the above optional embodiment, by creating multiple vertices on the second original image based on the second noise map, and then screening the target vertex from the multiple vertices according to the fourth mask map, the precise control and irregular distribution of the virtual vegetation coverage area are achieved, ensuring that the vegetation density and distribution in the growth area are more natural, while excluding the generation of vegetation in the non-growth area, thereby improving the authenticity and detail expression of the overall scene.

[0070] Optionally, in step S22, using the first noise map, the first color map and the target signed distance field map to generate an initial vegetation image includes: using the first noise map, the first color map, the target signed distance field map and preset scaling configuration information to assign attributes to target vertices to generate an initial vegetation image.

[0071] The preset scaling information is a scale value (scale) randomly generated on the target vertex. The preset scaling information is used to control the size of the virtual vegetation model during rendering, so that the appearance of the virtual vegetation can be more natural and diverse. Taking grass as an example, since the size of each blade of grass is slightly different, the use of randomly generated preset scaling information can simulate the natural growth state of grass in the real world, thereby improving the realism of the grass. Using the first noise map, the first color map, the target signed distance field map and the preset scaling configuration information, the target vertex is assigned attributes to generate an initial vegetation image.

[0072] Based on the above optional embodiment, by using the first noise map, the first color map, the target signed distance field map and the preset scaling configuration information, the target vertices are assigned attributes, so as to quickly generate an initial vegetation image, thereby further improving the image processing efficiency.

[0073] Optionally, using the first noise map, the first color map, the target signed distance field map, and preset scaling configuration information, assigning attributes to target vertices to generate an initial vegetation image includes:

[0074] The target vertices are assigned direction attributes using the first noise map, the target vertices are assigned color attributes using the first color map, the target vertices are assigned shape attributes using the target signed distance field map, and the target vertices are assigned size attributes using preset scaling configuration information to generate an initial vegetation image.

[0075] Fig.12 is a schematic diagram of an initial vegetation image according to one embodiment of the present application, such as Fig.12 As shown, by using the first noise map to assign directional attributes to the target vertices, using the first color map to assign color attributes to the target vertices, using the target signed distance field map to assign shape attributes to the target vertices, and using preset scaling configuration information to assign size attributes to the target vertices, an initial vegetation image with complex dynamic characteristics and a natural appearance can be efficiently and accurately generated, further enhancing the realism and visual appeal of the image, while reducing the time cost required for manual adjustment and design, and effectively reducing resource consumption.

[0076] Optionally, in step S23, generating the first mask image based on the initial vegetation image includes: performing decolorization processing on the initial vegetation image to obtain a grayscale image; and performing color contrast adjustment on the grayscale image to generate the first mask image.

[0077] Specifically, the generated initial vegetation image is decolorized to obtain a grayscale image, and the grayscale image is further color-contrast adjusted. The darker the position, the more the color of the ground is visible, and the whiter the position, the more the color of the virtual vegetation is retained, thereby generating a first mask image.

[0078] By adjusting the color contrast, the degree of integration of the virtual vegetation and the ground background in the image can be accurately controlled, thereby creating a first mask image with rich layers and natural transitions, effectively enhancing the visual depth and detail of the final image, making the dynamic effect of "the slightest movement of the grass" more realistic and beautiful.

[0079] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0080] In this embodiment, an image processing device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0081] Fig.13 is a structural block diagram of an image processing device according to one embodiment of the present application, such as Fig.13 As shown, the device comprises:

[0082] The first generating module 1301 is used to generate a first noise map, a first color map, a second color map and a target symbol distance field map by a preset programmed noise processing method, wherein the first noise map is used to simulate the swing direction of the virtual vegetation under the action of an external force, the first color map is used to determine the surface color of the virtual vegetation, the second color map is used to determine the surface color not covered by the virtual vegetation, and the target symbol distance field map is used to determine the target branch and leaf shape of the virtual vegetation;

[0083] The second generating module 1302 is used to generate an initial vegetation image using the first noise map, the first color map and the target signed distance field map;

[0084] The third generating module 1303 is used to generate a first mask image based on the initial vegetation image, wherein the first mask image is used to distinguish between a two-dimensional display area covered by the virtual vegetation and a two-dimensional display area not covered by the virtual vegetation;

[0085] The processing module 1304 is used to mix the first color map and the second color map according to the first mask map to generate a target vegetation image.

[0086] Optionally, the first generating module 1301 is also used to: adjust the color value of the first color channel and the color value of the second color channel in the first original image through a preset programmed noise processing method to determine the vector value of the target two-dimensional vector; and generate a first noise map based on the vector value of the target two-dimensional vector.

[0087] Optionally, the processing module 1304 is further configured to control the value change of the target two-dimensional vector by setting key frames in the time dimension to obtain an updated first noise map to adjust the swing direction of the virtual vegetation under the action of external force.

[0088] Optionally, the first generation module 1301 is also used to: generate a second mask image using a signed distance field calculation method, wherein the second mask image is used to determine the original branch and leaf shape of the virtual vegetation; mask-lock the second mask image to generate a third mask image, wherein the third mask image is used to determine the intermediate branch and leaf shape obtained by adjusting the original branch and leaf shape; and in a preset programmed noise processing method, perform noise distortion on the third mask image based on the first noise image to generate a target signed distance field image.

[0089] Optionally, the first generating module 1301 is further configured to generate a second noise map by a preset programmed noise processing method, wherein the second noise map is used to determine the distribution density of the virtual vegetation.

[0090] Optionally, the image processing device also includes: a creation module 1305, used to create multiple vertices on the second original image based on the second noise map; a screening module 1306, used to filter the target vertex from the multiple vertices according to a fourth mask map, wherein the fourth mask map is used to determine the growth area covered by the virtual vegetation.

[0091] Optionally, the second generating module 1302 is further configured to use the first noise map, the first color map, the target signed distance field map and preset scaling configuration information to assign attributes to the target vertices to generate an initial vegetation image.

[0092] Optionally, the second generation module 1302 is also used to: assign directional attributes to the target vertices using the first noise map, assign color attributes to the target vertices using the first color map, assign shape attributes to the target vertices using the target signed distance field map, and assign size attributes to the target vertices using preset scaling configuration information to generate an initial vegetation image.

[0093] Optionally, the third generating module 1303 is further used to: perform decolorization processing on the initial vegetation image to obtain a grayscale image; and perform color contrast adjustment on the grayscale image to generate a first mask image.

[0094] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0095] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0096] Optionally, in this embodiment, the above-mentioned computer-readable storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

[0097] Optionally, in this embodiment, the computer-readable storage medium may be located in any one of the computer terminals in a computer terminal group in a computer network, or in any one of the mobile terminals in a mobile terminal group.

[0098] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:

[0099] S1, generating a first noise map, a first color map, a second color map, and a target symbol distance field map by a preset programmed noise processing method, wherein the first noise map is used to simulate the swing direction of the virtual vegetation under the action of an external force, the first color map is used to determine the surface color of the virtual vegetation, the second color map is used to determine the surface color not covered by the virtual vegetation, and the target symbol distance field map is used to determine the target branch and leaf shape of the virtual vegetation;

[0100] S2, generating an initial vegetation image using the first noise map, the first color map, and the target signed distance field map;

[0101] S3, generating a first mask image based on the initial vegetation image, wherein the first mask image is used to distinguish between a two-dimensional display area covered by virtual vegetation and a two-dimensional display area not covered by virtual vegetation;

[0102] S4, performing a mixing process on the first color map and the second color map according to the first mask map to generate a target vegetation image.

[0103] Optionally, the computer-readable storage medium is also configured to store program codes for executing the following steps: adjusting the color values ​​of the first color channel and the second color channel in the first original image through a preset programmed noise processing method to determine the vector value of the target two-dimensional vector; and generating a first noise map based on the vector value of the target two-dimensional vector.

[0104] Optionally, the computer-readable storage medium is also configured to store program codes for executing the following steps: by setting key frames in the time dimension, controlling the value change of the target two-dimensional vector, and obtaining an updated first noise map to adjust the swing direction of the virtual vegetation under the action of external force.

[0105] Optionally, the computer-readable storage medium is also configured to store program codes for executing the following steps: generating a second mask image by using a signed distance field calculation method, wherein the second mask image is used to determine the original branch and leaf shape of the virtual vegetation; performing mask locking on the second mask image to generate a third mask image, wherein the third mask image is used to determine the intermediate branch and leaf shape obtained by adjusting the original branch and leaf shape; and performing noise distortion on the third mask image based on the first noise image in a preset programmed noise processing method to generate a target signed distance field image.

[0106] Optionally, the computer-readable storage medium is further configured to store program codes for executing the following steps: generating a second noise map by a preset programmed noise processing method, wherein the second noise map is used to determine the distribution density of the virtual vegetation.

[0107] Optionally, the computer-readable storage medium is also configured to store program code for executing the following steps: creating multiple vertices on the second original image based on the second noise map; and obtaining target vertices from the multiple vertices according to a fourth mask map, wherein the fourth mask map is used to determine the growth area covered by the virtual vegetation.

[0108] Optionally, the computer-readable storage medium is further configured to store program code for executing the following steps: using the first noise map, the first color map, the target signed distance field map and preset scaling configuration information, assigning attributes to target vertices to generate an initial vegetation image.

[0109] Optionally, the computer-readable storage medium is also configured to store program codes for executing the following steps: assigning directional attributes to target vertices using a first noise map, assigning color attributes to target vertices using a first color map, assigning shape attributes to target vertices using a target signed distance field map, and assigning size attributes to target vertices using preset scaling configuration information to generate an initial vegetation image.

[0110] Optionally, the computer-readable storage medium is further configured to store program codes for executing the following steps: decolorizing the initial vegetation image to obtain a grayscale image; and adjusting the color contrast of the grayscale image to generate a first mask image.

[0111] In the computer-readable storage medium of this embodiment, a first noise map, a first color map, a second color map and a target symbol distance field map are generated by a preset programmed noise processing method, and then an initial vegetation image is generated using the first noise map, the first color map and the target symbol distance field map. Subsequently, a first mask map is generated based on the initial vegetation image to distinguish between the two-dimensional display area covered by virtual vegetation and the two-dimensional display area not covered by virtual vegetation. Finally, the first color map and the second color map are mixed according to the first mask map to generate a target vegetation image, thereby significantly improving the speed and resource utilization of dynamic vegetation image production, while maintaining the realism and detail richness of the visual effects of the vegetation image, thereby achieving the technical effect of improving image processing efficiency and saving computing resources, and thus solving the technical problems of low processing efficiency and huge consumption of computing resources in the image processing method provided in the related art.

[0112] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation methods of the present application.

[0113] In an exemplary embodiment of the present application, a program product capable of implementing the above method of the present embodiment is stored on a computer-readable storage medium. In some possible implementations, various aspects of the embodiments of the present application can also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary implementations of the present application described in the above "Exemplary Method" section of the present embodiment.

[0114] According to the program product for implementing the above method in the embodiment of the present application, it can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the embodiment of the present application is not limited thereto. In the embodiment of the present application, the computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0115] The program product may be in any combination of one or more computer-readable media. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (non-exhaustive) of computer-readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0116] It should be noted that the program code contained in the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.

[0117] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0118] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0119] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0120] S1, generating a first noise map, a first color map, a second color map, and a target symbol distance field map by a preset programmed noise processing method, wherein the first noise map is used to simulate the swing direction of the virtual vegetation under the action of an external force, the first color map is used to determine the surface color of the virtual vegetation, the second color map is used to determine the surface color not covered by the virtual vegetation, and the target symbol distance field map is used to determine the target branch and leaf shape of the virtual vegetation;

[0121] S2, generating an initial vegetation image using the first noise map, the first color map, and the target signed distance field map;

[0122] S3, generating a first mask image based on the initial vegetation image, wherein the first mask image is used to distinguish between a two-dimensional display area covered by virtual vegetation and a two-dimensional display area not covered by virtual vegetation;

[0123] S4, performing a mixing process on the first color map and the second color map according to the first mask map to generate a target vegetation image.

[0124] Optionally, the processor can also be configured to perform the following steps through a computer program: adjusting the color value of the first color channel and the color value of the second color channel in the first original image through a preset programmed noise processing method to determine the vector value of the target two-dimensional vector; generating a first noise map based on the vector value of the target two-dimensional vector.

[0125] Optionally, the processor can also be configured to perform the following steps through a computer program: by setting key frames in the time dimension, controlling the value change of the target two-dimensional vector, and obtaining an updated first noise map to adjust the swing direction of the virtual vegetation under the action of external force.

[0126] Optionally, the processor can also be configured to perform the following steps through a computer program: generate a second mask image using a signed distance field calculation method, wherein the second mask image is used to determine the original branch and leaf shape of the virtual vegetation; mask lock the second mask image to generate a third mask image, wherein the third mask image is used to determine the intermediate branch and leaf shape obtained by adjusting the original branch and leaf shape; and in a preset programmed noise processing method, perform noise distortion on the third mask image based on the first noise image to generate a target signed distance field image.

[0127] Optionally, the processor may also be configured to perform the following steps through a computer program: generating a second noise map through a preset programmed noise processing method, wherein the second noise map is used to determine the distribution density of the virtual vegetation.

[0128] Optionally, the processor can also be configured to perform the following steps through a computer program: creating multiple vertices on the second original image based on the second noise map; and obtaining target vertices from the multiple vertices based on a fourth mask map, wherein the fourth mask map is used to determine the growth area covered by the virtual vegetation.

[0129] Optionally, the processor may also be configured to perform the following steps through a computer program: using the first noise map, the first color map, the target signed distance field map and preset scaling configuration information, assigning attributes to target vertices to generate an initial vegetation image.

[0130] Optionally, the processor can also be configured to perform the following steps through a computer program: assigning directional attributes to target vertices using a first noise map, assigning color attributes to target vertices using a first color map, assigning shape attributes to target vertices using a target signed distance field map, and assigning size attributes to target vertices using preset scaling configuration information to generate an initial vegetation image.

[0131] Optionally, the processor may also be configured to execute the following steps through a computer program: decolorizing the initial vegetation image to obtain a grayscale image; and adjusting the color contrast of the grayscale image to generate a first mask image.

[0132] In the electronic device of this embodiment, a first noise map, a first color map, a second color map and a target symbol distance field map are generated through a preset programmed noise processing method, and then an initial vegetation image is generated using the first noise map, the first color map and the target symbol distance field map. Subsequently, a first mask map is generated based on the initial vegetation image to distinguish between a two-dimensional display area covered by virtual vegetation and a two-dimensional display area not covered by virtual vegetation. Finally, the first color map and the second color map are mixed according to the first mask map to generate a target vegetation image, thereby significantly improving the speed and resource utilization of dynamic vegetation image production, while maintaining the realism and detail richness of the visual effects of the vegetation image, thereby achieving the technical effect of improving image processing efficiency and saving computing resources, and thus solving the technical problems of low processing efficiency and huge consumption of computing resources in the image processing method provided in the related art.

[0133] Fig.14 is a schematic diagram of an electronic device according to an embodiment of the present application. Fig.14 As shown, the electronic device 1400 is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0134] like Fig.14 As shown, the electronic device 1400 is in the form of a general computing device. The components of the electronic device 1400 may include but are not limited to: the at least one processor 1410, the at least one memory 1420, a bus 1430 connecting different system components (including the memory 1420 and the processor 1410), and a display 1440.

[0135] The memory 1420 stores program codes, which can be executed by the processor 1410, so that the processor 1410 executes the steps described in the method part of the embodiment of the present application according to various exemplary embodiments of the present application.

[0136] The memory 1420 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 14201 and / or a cache memory unit 14202, and may further include a read-only memory unit (ROM) 14203, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.

[0137] In some examples, the memory 1420 may also include a program / utility 14204 having a set (at least one) of program modules 14205, such program modules 14205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof may include the implementation of a network environment. The memory 1420 may further include a memory remotely disposed relative to the processor 1410, and these remote memories may be connected to the electronic device 1400 via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0138] The bus 1430 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a local bus of the processor 1410, or a bus using any of a variety of bus architectures.

[0139] The display 1440 may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the electronic device 1400 .

[0140] Optionally, the electronic device 1400 may also communicate with one or more external devices 1500 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device 1400, and / or any device that enables the electronic device 1400 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1450. Furthermore, the electronic device 1400 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 1460. Fig.14 As shown, the network adapter 1460 communicates with other modules of the electronic device 1400 via the bus 1430. It should be understood that although Fig.14 Not shown, other hardware and / or software modules may be used in conjunction with electronic device 1400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0141] The electronic device 1400 may further include: a keyboard, a cursor control device (such as a mouse), an input / output interface (I / O interface), a network interface, a power supply and / or a camera.

[0142] It can be understood by those skilled in the art that Fig.14 The structure shown is only for illustration and does not limit the structure of the above electronic device. Fig.14 More or fewer components as shown, or with Figure 1 The memory 1420 may be used to store computer programs and corresponding data, such as the computer programs and corresponding data corresponding to the image processing method in the embodiment of the present application. The processor 1410 executes various functional applications and data processing by running the computer programs stored in the memory 1420, that is, implementing the above-mentioned image processing method.

[0143] The embodiment of the present application further provides a computer program product. Optionally, in this embodiment, the computer program product may include a computer program, and the computer program implements the method provided in the embodiment when executed by a processor.

[0144] Optionally, the computer program included in the above-mentioned computer program product is executed by a processor to perform the following steps:

[0145] S1, generating a first noise map, a first color map, a second color map, and a target symbol distance field map by a preset programmed noise processing method, wherein the first noise map is used to simulate the swing direction of the virtual vegetation under the action of an external force, the first color map is used to determine the surface color of the virtual vegetation, the second color map is used to determine the surface color not covered by the virtual vegetation, and the target symbol distance field map is used to determine the target branch and leaf shape of the virtual vegetation;

[0146] S2, generating an initial vegetation image using the first noise map, the first color map, and the target signed distance field map;

[0147] S3, generating a first mask image based on the initial vegetation image, wherein the first mask image is used to distinguish between a two-dimensional display area covered by virtual vegetation and a two-dimensional display area not covered by virtual vegetation;

[0148] S4, performing a mixing process on the first color map and the second color map according to the first mask map to generate a target vegetation image.

[0149] The embodiments of the present application also provide a computer program product. Optionally, the computer program product may include a non-volatile computer-readable storage medium, which may be used to store a computer program, and when the computer program is executed by a processor, the method provided in the embodiments is implemented.

[0150] Optionally, the computer program stored in the non-volatile computer-readable storage medium is used by the processor to execute the following steps:

[0151] S1, generating a first noise map, a first color map, a second color map, and a target symbol distance field map by a preset programmed noise processing method, wherein the first noise map is used to simulate the swing direction of the virtual vegetation under the action of an external force, the first color map is used to determine the surface color of the virtual vegetation, the second color map is used to determine the surface color not covered by the virtual vegetation, and the target symbol distance field map is used to determine the target branch and leaf shape of the virtual vegetation;

[0152] S2, generating an initial vegetation image using the first noise map, the first color map, and the target signed distance field map;

[0153] S3, generating a first mask image based on the initial vegetation image, wherein the first mask image is used to distinguish between a two-dimensional display area covered by virtual vegetation and a two-dimensional display area not covered by virtual vegetation;

[0154] S4, performing a mixing process on the first color map and the second color map according to the first mask map to generate a target vegetation image.

[0155] The embodiment of the present application further provides a computer program. Optionally, in this embodiment, when the computer program is executed by a processor, the method provided in the above embodiment is implemented.

[0156] Optionally, the computer program is executed by a processor to perform the following steps:

[0157] S1, generating a first noise map, a first color map, a second color map, and a target symbol distance field map by a preset programmed noise processing method, wherein the first noise map is used to simulate the swing direction of the virtual vegetation under the action of an external force, the first color map is used to determine the surface color of the virtual vegetation, the second color map is used to determine the surface color not covered by the virtual vegetation, and the target symbol distance field map is used to determine the target branch and leaf shape of the virtual vegetation;

[0158] S2, generating an initial vegetation image using the first noise map, the first color map, and the target signed distance field map;

[0159] S3, generating a first mask image based on the initial vegetation image, wherein the first mask image is used to distinguish between a two-dimensional display area covered by virtual vegetation and a two-dimensional display area not covered by virtual vegetation;

[0160] S4, performing a mixing process on the first color map and the second color map according to the first mask map to generate a target vegetation image.

[0161] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0162] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0163] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0164] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0165] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0166] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0167] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. An image processing method, characterized in that: include: Generate a first noise map, a first color map, a second color map, and a target signed distance field map by a preset programmed noise processing method, wherein the first noise map is used to simulate the swing direction of the virtual vegetation under the action of an external force, the first color map is used to determine the surface color of the virtual vegetation, the second color map is used to determine the surface color not covered by the virtual vegetation, and the target signed distance field map is used to determine the target branch and leaf shape of the virtual vegetation; Generate an initial vegetation image using the first noise map, the first color map, and the target signed distance field map; generating a first mask image based on the initial vegetation image, wherein the first mask image is used to distinguish between a two-dimensional display area covered by the virtual vegetation and a two-dimensional display area not covered by the virtual vegetation; The first color map and the second color map are mixed according to the first mask map to generate a target vegetation image.

2. The image processing method according to claim 1, characterized in that: Generating the first noise map by the preset programmed noise processing method includes: By using the preset programmed noise processing method, the color value of the first color channel and the color value of the second color channel in the first original image are adjusted to determine the vector value of the target two-dimensional vector; The first noise map is generated according to the vector value of the target two-dimensional vector.

3. The image processing method according to claim 2, characterized in that: The image processing method further comprises: By setting key frames in the time dimension and controlling the value change of the target two-dimensional vector, an updated first noise map is obtained to adjust the swing direction of the virtual vegetation under the action of an external force.

4. The image processing method according to claim 1, characterized in that: Generating the target symbol distance field map by the preset programmed noise processing method includes: Generate a second mask image by using a signed distance field calculation method, wherein the second mask image is used to determine the original branch and leaf shape of the virtual vegetation; Performing mask locking on the second mask image to generate a third mask image, wherein the third mask image is used to determine an intermediate branch and leaf shape obtained by adjusting the original branch and leaf shape; In the preset programmed noise processing method, the third mask image is subjected to noise distortion based on the first noise image to generate the target signed distance field image.

5. The image processing method according to claim 1, characterized in that: The image processing method further comprises: A second noise map is generated by the preset programmed noise processing method, wherein the second noise map is used to determine the distribution density of the virtual vegetation.

6. The image processing method according to claim 5, characterized in that: The image processing method further comprises: creating a plurality of vertices on a second original image based on the second noise map; A target vertex is obtained by screening from the multiple vertices according to a fourth mask graph, wherein the fourth mask graph is used to determine a growth area covered by the virtual vegetation.

7. The image processing method according to claim 6, characterized in that: Generating the initial vegetation image using the first noise map, the first color map, and the target signed distance field map includes: Utilizing the first noise map, the first color map, the target signed distance field map, and preset scaling configuration information, attribute values ​​are assigned to the target vertices to generate the initial vegetation image.

8. The image processing method according to claim 7, characterized in that: Using the first noise map, the first color map, the target signed distance field map, and the preset scaling configuration information, assigning attributes to the target vertices to generate the initial vegetation image includes: The initial vegetation image is generated by assigning direction attributes to the target vertices using the first noise map, assigning color attributes to the target vertices using the first color map, assigning shape attributes to the target vertices using the target signed distance field map, and assigning size attributes to the target vertices using the preset scaling configuration information.

9. The image processing method according to claim 1, characterized in that: Generating the first mask image based on the initial vegetation image comprises: Decolorizing the initial vegetation image to obtain a grayscale image; The color contrast of the grayscale image is adjusted to generate the first mask image.

10. An image processing device, characterized in that: include: A first generating module is used to generate a first noise map, a first color map, a second color map and a target signed distance field map by a preset programmed noise processing method, wherein the first noise map is used to simulate the swing direction of the virtual vegetation under the action of an external force, the first color map is used to determine the surface color of the virtual vegetation, the second color map is used to determine the surface color not covered by the virtual vegetation, and the target signed distance field map is used to determine the target branch and leaf shape of the virtual vegetation; A second generating module, configured to generate an initial vegetation image using the first noise map, the first color map, and the target signed distance field map; a third generating module, configured to generate a first mask image based on the initial vegetation image, wherein the first mask image is used to distinguish between a two-dimensional display area covered by the virtual vegetation and a two-dimensional display area not covered by the virtual vegetation; A processing module is used to mix the first color map and the second color map according to the first mask map to generate a target vegetation image.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the image processing method described in any one of claims 1 to 9 when executed by a processor.

12. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the image processing method described in any one of claims 1 to 9.

13. A computer program product, characterized in that The invention comprises a computer program, which implements the image processing method described in any one of claims 1 to 9 when being executed by a processor.