Image processing method, device, equipment, medium, and computer program

The image processing method simplifies the addition of virtual object effects by identifying coverage areas and edges in a two-dimensional image, reducing computational complexity and eliminating the need for 3D spatial reconstruction, thus enhancing processing efficiency and convenience.

JP2026506722APending Publication Date: 2026-02-25BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2025548302
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-02-24
Filing Date
2024-02-05
Publication Date
2026-02-25

AI Technical Summary

Technical Problem

Current image processing methods require expensive and complex laser radar systems to achieve realistic spatial effects, leading to high computational costs and time-consuming processes.

Method used

An image processing method that identifies a coverage area and edge of a virtual object based on a two-dimensional image, using time variables to add a coverage effect without reconstructing a three-dimensional space, reducing computational complexity.

Benefits of technology

The method simplifies image processing by eliminating the need for 3D spatial reconstruction, improving convenience and reducing computational demands while adding realistic virtual object effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026506722000001_ABST
    Figure 2026506722000001_ABST
Patent Text Reader

Abstract

This application discloses an image processing method, apparatus, device, and medium, which, after acquiring an image to be processed, identify a coverage area corresponding to a virtual object in the image to be processed, and identify the coverage edge of the virtual object based on the coverage area and a time variable. Because the coverage degree of the virtual object in the coverage area changes with time, and the corresponding coverage edge also changes, it is necessary to identify the coverage edge of the virtual object based on the coverage area and a time variable. Furthermore, the coverage effect of the virtual object is obtained based on the coverage area and coverage edge. That is, after the coverage area and coverage edge are identified, the virtual object is added to the corresponding coverage area. That is, when adding the coverage effect of the virtual object in the image to be processed using the technical solution disclosed herein, there is no need to construct a three-dimensional space of the scene in the image to be processed using a laser radar; the entire processing process is performed on a two-dimensional plane, reducing calculations and improving convenience.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This application claims priority to a Chinese patent application filed with the China Patent Office on February 24, 2023, bearing application number 202310179296.7 and entitled "Image Processing Method and Apparatus, Device and Medium," the entire contents of which are incorporated herein by reference.

[0002] The present disclosure relates to the field of computer technology, and more particularly to image processing methods and apparatus, devices, and media. [Background technology]

[0003] With the continuous development of image processing technology, various effects can be added to images to increase the diversity of image processing and meet the needs of different users. For example, special effect tools and AR scenes can add effects such as snow, catkins, and falling flowers to create a sense of spatial realism. However, currently, when processing images, in order to achieve a superior real-space effect, it is necessary to rely on devices such as laser radar to acquire the spatial three-dimensional information of the image, which requires high acquisition costs, complex calculations, and time-consuming processes. Summary of the Invention [Problem to be solved by the invention]

[0004] In view of this, the present disclosure provides an image processing method, device, equipment, and medium that adds a coverage effect of a virtual object to an image, improving the convenience of image processing, without requiring the reconstruction of three-dimensional space using equipment such as laser radar. [Means for solving the problem]

[0005] To achieve the above objectives, the technical solution according to the present disclosure is as follows:

[0006] According to a first aspect of the present disclosure, there is provided an image processing method, the method comprising: acquiring an image to be processed; Identifying a coverage area of ​​a virtual object based on the image to be processed; identifying a coverage edge of the virtual object based on the coverage area and a time variable; and obtaining a coverage effect of the virtual object based on the coverage area and the coverage edge.

[0007] According to a second aspect of the present disclosure, there is provided an image processing device, the device comprising: a first acquisition unit for acquiring an image to be processed; an identification unit for identifying a coverage area of ​​a virtual object based on the image to be processed, and for identifying a coverage edge of the virtual object based on the coverage area and a time variable; and a second obtaining unit for obtaining a coverage effect of the virtual object according to the coverage area and the coverage edge.

[0008] According to a third aspect of the present disclosure, there is provided an electronic device, the device including a processor and a memory; the memory is used to store instructions or computer programs; The processor is adapted to execute the instructions or computer program in the memory to cause the electronic device to perform the method of the first aspect.

[0009] According to a fourth aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon instructions that, when executed on an apparatus, cause the apparatus to perform the method of the first aspect.

[0010] According to a fifth aspect of the present disclosure, there is provided a computer program product, the computer program product including computer programs / instructions which, when executed by a processor, implement the method according to the first aspect. [Effects of the Invention]

[0011] As can be seen from this, the present disclosure has the following beneficial effects.

[0012] In the present disclosure, after acquiring an image to be processed, a coverage area corresponding to a virtual object is identified in the image to be processed, and the coverage edge of the virtual object is identified based on the coverage area and a time variable. As time changes, the coverage degree of the virtual object in the coverage area changes, and the corresponding coverage edge also changes. Therefore, it is necessary to identify the coverage edge of the virtual object based on the coverage area and a time variable. Furthermore, the coverage effect of the virtual object is obtained based on the coverage area and coverage edge. That is, after the coverage area and coverage edge are identified, the virtual object is added to the corresponding coverage area. That is, when the technical solution of the present disclosure adds the coverage effect of the virtual object to the image to be processed, there is no need to construct a three-dimensional space of the scene in the image to be processed using a laser radar. The entire processing process is performed on a two-dimensional plane, which reduces calculations and improves convenience. [Brief explanation of the drawings]

[0013] In order to more clearly explain the embodiments of the present disclosure or the technical solutions in the prior art, the drawings necessary for explaining the embodiments or the prior art will be briefly described below. The drawings in the following description are only some of the embodiments described in this application, and it is obvious to those skilled in the art that other drawings can be obtained from these drawings without any creative work.

[0014] [Figure 1]1 is a flowchart of an image processing method according to an embodiment of the present disclosure. [Figure 2a] 1 is an image to be processed according to an embodiment of the present disclosure. [Figure 2b] 1 is a scene normal map according to an embodiment of the present disclosure. [Figure 2c] FIG. 1 is a schematic diagram of a snow coverage edge according to an embodiment of the present disclosure. [Figure 3a] 1 is a scene depth map according to an embodiment of the present disclosure. [Figure 3b] FIG. 10 is a scene normal offset diagram according to an embodiment of the present disclosure. [Figure 4] 1 is a structural diagram of a snow rendering device according to an embodiment of the present disclosure; [Figure 5] 1 is a schematic diagram of a structure of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE INVENTION

[0015] In order to help those skilled in the art better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely explained below with reference to the drawings in the embodiments of the present application, and it is obvious that the explained embodiments are only a part of the embodiments of the present application, and do not represent all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments in the present application without any creative work fall within the scope of protection of the present application.

[0016] Currently, special effects processing for images, such as adding snowflakes, catkins, and falling flowers in AR scenes, require devices such as laser radar to capture spatial 3D information for the image. For example, rendering a snowy scene in an image primarily relies on a mobile device's laser radar to reconstruct a 3D spatial grid and add a snow texture to the grid. While this implementation can effectively reconstruct the 3D spatial environment, it requires hardware support from the laser radar and has low coverage. Furthermore, when rendering a snowy scene in a real-time interactive scene, if the scene is highly complex, such as containing many objects, it can take a long time to construct the 3D spatial grid.

[0017] In view of this, the present application provides an image processing method, which, after acquiring an image to be processed, identifies a coverage area corresponding to a virtual object in the image to be processed and identifies a coverage edge corresponding to the virtual object based on the coverage area and a time variable. Because the coverage degree of the virtual object varies with time, it is necessary to identify the coverage edge of the virtual object based on the coverage area and a time variable. After identifying the coverage area and coverage edge, a coverage effect of the virtual object is added to the image to be processed based on the coverage area and coverage edge. That is, when adding the coverage effect of the virtual object to the image to be processed, there is no need to construct a 3D spatial grid for the scene in the image to be processed; the coverage effect can be added using only a two-dimensional screen, reducing processing complexity and improving convenience.

[0018] It is understood that before using the technical solutions of each embodiment in this disclosure, the user should be notified of the type, scope of use, usage scenarios, etc. of the personal information involved in the solution in an appropriate manner in accordance with relevant laws and regulations, and the user's approval should be obtained.

[0019] For example, in response to a proactive request from a user, prompt information is sent to the user to explicitly indicate that the requested operation requires the acquisition and use of the user's personal information, allowing the user to autonomously choose whether or not to provide personal information to software or hardware, such as an electronic device, application, server, or storage medium, that executes the operation of the technical solution of the present disclosure, in accordance with the prompt information.

[0020] In an optional, non-limiting embodiment, the form in which the prompt information is sent to the user in response to an active request from the user may be, for example, a pop-up window, or the prompt information may be displayed in text form in the pop-up window. The pop-up window may also include a selection control for the user to select "agree" or "disagree" to providing personal information to the electronic device.

[0021] It will be appreciated that the above-described notification and user consent acquisition procedures are merely exemplary and are not intended to limit the implementation of the present disclosure, and that other procedures that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0022] To facilitate understanding of the technical solutions provided by the present disclosure, the following description will be made with reference to the drawings.

[0023] 1, which is a flowchart of an image processing method according to the present disclosure. As shown in FIG. 1, the method may be performed by an image processing client, which may be deployed in an electronic device. Here, the electronic device may include a device with a communication function, such as a mobile phone, a tablet PC, a laptop, a desktop PC, an in-vehicle terminal, a wearable electronic device, an all-in-one computer, or a smart home device, or may be a device simulated by a virtual machine or a simulator. As shown in FIG. 1, the method may include the following steps:

[0024] S101: An image to be processed is obtained.

[0025] In this embodiment, an image to be processed is first obtained, which refers to an image to which a virtual object coverage effect needs to be added, and the image to be processed may be an image captured in advance or an image captured in real time by a user using an image processing client.

[0026] S102: Identify a coverage area of ​​a virtual object based on the image to be processed.

[0027] After acquiring the image to be processed, because different images to be processed contain different scenes and different areas to add corresponding virtual objects in different scenes, a coverage area corresponding to the virtual object is identified based on the image to be processed. Here, the virtual object refers to an object to be added to the image to be processed, and may be, for example, snowflakes, leaves, catkins, etc. Here, a user can select the virtual object to be added via the image processing client.

[0028] In some embodiments, the coverage area of ​​the virtual object may be determined by obtaining a scene normal map based on the image to be processed and a motion direction vector of the virtual object, and then determining the coverage area of ​​the virtual object based on the scene normal map and the motion direction vector. Specifically, the image to be processed is transformed to obtain a scene normal map corresponding to the image to be processed. For example, the image to be processed is shown in Figure 2a, and Figure 2b is the scene normal map corresponding to the image to be processed.

[0029] Here, after acquiring the scene normal map and the motion direction of the virtual object, the overlay area of ​​the virtual object may be identified by sampling the scene normal map based on the pixel coordinates of the image to be processed to obtain a pixel normal vector, obtaining a coverage value based on the pixel normal vector and the motion direction vector of the virtual object, and identifying the coverage area of ​​the virtual object based on the coverage value. That is, the pixel normal vector is first acquired from the scene normal map, and then a coverage value is obtained by performing a calculation on the pixel normal vector and the motion direction vector, and the coverage area of ​​the virtual object is identified based on the magnitude of the coverage value.

[0030] Here, the direction of movement of the virtual object may be configured in advance, or the direction of gravity acquired by the image processing client using a gravity sensor of the electronic device to which the image processing client belongs may be used as the direction of movement of the virtual object.

[0031] In some implementations, a dot multiplication may be performed between the pixel normal vector and the motion direction vector, and the dot multiplication result, i.e., a coverage value, may be obtained. If the dot multiplication result is greater than a predetermined threshold, it is determined that the pixel point corresponding to the pixel normal vector needs to be covered. If the dot multiplication result is equal to or less than the predetermined threshold, it is determined that the pixel point corresponding to the pixel normal vector does not need to be covered. Here, the predetermined threshold may be set according to actual application circumstances, for example, the predetermined threshold is 0.

[0032] S103: Identify a coverage edge of the virtual object based on the coverage area and the time variable.

[0033] After the coverage area is determined, the coverage degree of the virtual object in the coverage area changes with time, and the corresponding coverage edge also changes, so it is necessary to determine the coverage edge of the virtual object based on the coverage area and time variables. For example, if a snowfall effect is added to the image to be processed, as time passes, the snow changes from nothing to falling, from a small amount of snow to a large amount of snow, and as the thickness of the snow changes, the snow coverage edge also changes.

[0034] In some embodiments, the coverage edge of the virtual object may be identified by obtaining an edge texture vector based on an edge of the coverage area, determining edge information based on the edge texture vector and a time variable, and determining the coverage edge of the virtual object based on the edge information. That is, an edge texture vector corresponding to the coverage area is obtained, and new edge information is determined based on the edge texture vector and the time variable, thereby determining the coverage edge of the virtual object based on the edge information.

[0035] Here, the edge information may be determined based on the edge texture vector and the time variable by determining the coverage thickness of the virtual object based on the time variable and the movement speed of the virtual object, and determining the edge information based on the edge texture vector and the coverage thickness. For example, in the application scene shown in Figure 2a, the coverage area of ​​the determined virtual object includes the surface area of ​​the table, and the edge of the coverage area is the edge of the table surface. When snow accumulates, the snow-covered edge also changes, as shown in Figure 2c, and the snow coverage edge is smoother than the edge of the table surface.

[0036] S104: Obtain a coverage effect of the virtual object based on the coverage area and the coverage edge.

[0037] After obtaining the coverage area and coverage edge corresponding to the virtual object, add the coverage effect of the virtual object in the coverage area, and the edge corresponding to the virtual object in the image to be processed is identified by the coverage edge identified in S103.

[0038] When rendering a virtual object in an image to be processed, coloring data of the virtual object may be obtained by sampling the texture mapping of the virtual object, and the coloring data may then be rendered in the image to be processed. Here, the texture mapping of the virtual object may include base color mapping, normal mapping, and hybrid mapping of metallic, roughness, and ambient occlusion (MRAO). The obtained coloring data includes the base color, normal vector, metallic, roughness, and ambient occlusion.

[0039] In some embodiments, the coverage area may be updated based on the coverage edge to obtain an updated coverage area, and the virtual object may be rendered in the updated coverage area to add a coverage effect of the virtual object in the image to be processed. That is, as the coverage thickness of the virtual object changes over time, the coverage area corresponding to the virtual object in the image to be processed also changes, so the coverage area needs to be redefined, and the coverage effect of the virtual object is added in the new coverage area. For example, in the application scene shown in FIG. 2a, a snow coverage effect is added. As snow accumulates, the accumulated snow may take on a tapered shape, and in the process of forming the tapered shape, the snow coverage area gradually becomes smaller.

[0040] In some embodiments, the image to be processed may be further processed to add more effects and increase realism. Specifically, a scene depth map is obtained based on the image to be processed, and the image to be processed is processed based on the scene depth map to obtain an overlay effect. Here, the overlay effect may be determined based on a virtual object, such as a fog effect or a steam effect. Specifically, a transformation process is performed on the image to be processed to obtain a scene depth map, and an interpolation process is performed on the image to be processed using the depth values ​​in the scene depth map to obtain the overlay effect. For example, the image to be processed shown in FIG. 2a is transformed to obtain the scene depth map shown in FIG. 3a.

[0041] Generally, after the conversion process is performed on the image to be processed, the depth in the scene depth map is nonlinear, that is, the closer to the camera, the higher the depth accuracy, and the farther away, the lower the depth accuracy. To avoid the difference in depth accuracy affecting the overlay effect, first, a first distance and a second distance are obtained based on the scene depth map, and the first distance and the second distance are used to correct the depth values ​​in the scene depth map to obtain a corrected scene depth map. The corrected scene depth map is then used to process the image to be processed to obtain the overlay effect. Here, the first distance refers to the distance between the camera and the near plane corresponding to the camera, and the second distance refers to the distance between the camera and the far plane corresponding to the camera. Here, the camera is used to acquire the image to be processed.

[0042] In some embodiments, to emphasize the coverage thickness of a virtual object, a normal offset method may be used to increase the shadow of the edge and enhance the thickness of the edge. Specifically, the pixel normal vector of the coverage edge is offset according to the movement direction of the virtual object to increase the shadow of the coverage edge. For example, as shown in FIG. 3b, if the movement vector of the virtual object is downward, the pixel normal of the coverage edge is offset downward.

[0043] As can be seen, after acquiring an image to be processed, a coverage area corresponding to a virtual object is identified in the image to be processed, and the coverage edge of the virtual object is identified based on the coverage area and a time variable. As time changes, the coverage degree of the virtual object in the coverage area changes, and the corresponding coverage edge also changes, so it is necessary to identify the coverage edge of the virtual object based on the coverage area and a time variable. Furthermore, the coverage effect of the virtual object is obtained based on the coverage area and coverage edge. That is, after the coverage area and coverage edge are identified, the virtual object is added to the corresponding coverage area. That is, when the technical solution disclosed herein adds the coverage effect of the virtual object to the image to be processed, there is no need to construct a three-dimensional space of the scene in the image to be processed using a laser radar; the entire processing process is performed on a two-dimensional plane, which reduces calculations and improves convenience.

[0044] Based on the above method embodiment, the embodiment of the present application provides a snow rendering device and electronic equipment, which will be described below in conjunction with the drawings.

[0045] Referring to Figure 4, this figure is a structural diagram of an image processing device according to an embodiment of the present application, and as shown in Figure 4, the device may include a first acquisition unit 401, a specific unit 402, and a second acquisition unit 403.

[0046] Wherein the first acquisition unit 401 is used to acquire an image to be processed; The identification unit 402 is used to identify a coverage area of ​​a virtual object based on the image to be processed; The identifying unit 402 is further used for identifying a coverage edge of the virtual object based on the coverage area and a time variable; The second obtaining unit 403 is used to obtain the coverage effect of the virtual object according to the coverage area and the coverage edge.

[0047] In some embodiments, the identification unit 402 is specifically used to obtain a scene normal map based on the image to be processed and a motion direction vector of the virtual object, and identify a coverage area of ​​the virtual object based on the scene normal map and the motion direction vector.

[0048] In some embodiments, the identification unit 402 is specifically used to sample the scene normal map based on pixel coordinates of the image to be processed to obtain a pixel normal vector, obtain a coverage value based on the pixel normal vector and the motion direction vector of the virtual object, and identify the coverage area of ​​the virtual object based on the coverage value.

[0049] In some embodiments, the identification unit 402 is specifically used to obtain an edge texture vector based on an edge of the coverage area, identify edge information based on the edge texture vector and a time variable, and identify a coverage edge of the virtual object based on the edge information.

[0050] In some embodiments, the identification unit 402 is specifically used to identify a coverage thickness of the virtual object based on a time variable and a movement speed of the virtual object, and to identify edge information based on the edge texture vector and the coverage thickness.

[0051] In some embodiments, the second acquisition unit 403 is specifically used to update the coverage area based on the coverage edge to obtain an updated coverage area, and render the virtual object in the updated coverage area.

[0052] In some embodiments, the second acquisition unit 403 is further used to obtain a scene depth map based on the image to be processed, and process the image to be processed based on the scene depth map to obtain an overlay effect.

[0053] In some embodiments, the second acquisition unit 403 is specifically used to acquire a first distance and a second distance based on the scene depth map, use the first distance and the second distance to correct depth values ​​in the scene depth map to obtain a corrected scene depth map, and use the corrected scene depth map to process the image to be processed to obtain an overlay effect.

[0054] In some embodiments, the second acquisition unit 403 is further used to offset the pixel normal direction vector of the coverage edge using the motion direction vector of the virtual object to increase the shadow effect of the coverage edge.

[0055] For specific implementations of each unit in this embodiment, please refer to the relevant descriptions in the above method embodiments. In the embodiments of the present disclosure, the division of units is for illustrative purposes only and is merely a logical functional division. In actual implementation, other division methods may be used. In the embodiments of the present disclosure, each functional unit may be integrated into a single processing unit, each unit may exist physically independently, or two or more units may be integrated into a single unit. For example, in the above embodiment, the processing unit and the transmission unit may be the same unit or different units. The integrated unit may be implemented in the form of hardware or a software functional unit.

[0056] Referring to Figure 5, a schematic diagram of the configuration of an electronic device 500 suitable for implementing an embodiment of the present disclosure is shown. Terminal devices in the embodiment of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet personal computers), PMPs (portable multimedia players), and in-vehicle terminals (e.g., car navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. The electronic device shown in Figure 5 is merely an example and should not limit the functionality or scope of use of the embodiment of the present disclosure.

[0057] 5, electronic device 500 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 501 that can perform various appropriate operations and processes in accordance with programs stored in read-only memory (ROM) 502 or programs loaded from storage device 508 into random access memory (RAM) 503. RAM 503 also stores various programs and data necessary for the operation of electronic device 500. Processing unit 501, ROM 502, and RAM 503 are connected to one another via bus 504. Input / output (I / O) interface 505 is also connected to bus 504.

[0058] Typically, input devices 506 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc., output devices 507 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc., storage devices 508 including, for example, a magnetic tape, hard disk, etc., and communication devices 509 may be connected to the I / O interface 505. The communication devices 509 may allow the electronic device 500 to communicate wirelessly or via wires with other devices to exchange data. While FIG. 5 illustrates the electronic device 500 having various devices, it should be understood that it is not necessary for the electronic device 500 to implement or include all of the devices shown. More or fewer devices may alternatively be implemented or included.

[0059] According to embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product including a computer program embodied on a non-transitory computer-readable medium, the computer program including program code for performing the methods illustrated in the flowcharts. In such embodiments, the computer program may be downloaded and installed from a network via the communication device 509, installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the functions defined above in the methods of the embodiments of the present disclosure are performed.

[0060] The electronic device provided by the embodiments of the present disclosure belongs to the same inventive concept as the method provided by the above embodiments, and for technical details not described in detail in this embodiment, reference may be made to the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.

[0061] An embodiment of the present disclosure provides a computer storage medium having stored thereon a computer program that, when executed by a processor, implements the method provided by the above embodiment.

[0062] It should be noted that the computer-readable medium described above in this disclosure may be a computer-readable signal medium, a computer-readable storage medium, or any combination of the above. The computer-readable storage medium may be, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to, an electrical connection having one or more wires, a portable computer disk, a hard disk, RAM, ROM, an Erasable Programmable Read Only Memory (EPROM) or flash memory, an optical fiber, a portable Compact Disc Read Only Memory (CD-ROM), an optical memory device, a magnetic memory device, or any suitable combination of the above. In this disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in combination with an instruction execution system, apparatus, or device. Meanwhile, in this disclosure, a computer-readable signal medium may include a data signal, propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such a propagated data signal may take various forms, including, but not limited to, an electromagnetic signal, an optical signal, or any suitable combination of the above. Furthermore, a computer-readable signal medium may be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device.The program code contained in the computer readable medium may be transmitted over any suitable medium, including, but not limited to, wire, optical cable, radio frequency (RF), or the like, or any suitable combination of the above.

[0063] In some embodiments, clients and servers may communicate using any network protocol now known or later developed, such as HyperText Transfer Protocol (HTTP), and may be connected to each other via any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include local area networks ("LANs"), wide area networks ("WANs"), the World Wide Web (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any networks now known or later developed.

[0064] The computer-readable medium may be included in the electronic device described above, or may exist separately from the electronic device.

[0065] The computer-readable medium carries one or more programs that, when executed by the electronic device, enable the electronic device to perform the method.

[0066] Computer program code for carrying out the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages ​​such as Java, Smalltalk, C++, etc., as well as conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may run entirely on the user computer, partially on the user computer, as a separate software package, partially on the user computer and partially on a remote computer, or entirely on a remote computer or server. When remote computers are involved, the remote computers may be connected to the user computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., connected via the Internet using an Internet Service Provider).

[0067] The flowcharts and block diagrams in the figures illustrate the architecture, functions, and operations that can be implemented in accordance with systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or portion of code, including one or more executable instructions for implementing a given logical function. It should also be noted that in some implementations, the functions noted in the blocks may occur in a different order than that shown in the figures. For example, two blocks shown in succession may actually be executed substantially in parallel or may be executed in the reverse order depending on the functionality involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented in a dedicated hardware-based system that performs a given function or operation, or in a combination of dedicated hardware and computer instructions.

[0068] The units mentioned in the description of the embodiments of the present disclosure may be implemented in a software manner or a hardware manner, and the names of the units / modules in some cases do not limit the units themselves.

[0069] The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific general purpose products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), etc.

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

[0071] In addition, each embodiment in this specification is described sequentially, and the main points described in each embodiment are the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the systems or devices disclosed in the embodiments, the description is simplified to correspond to the methods disclosed in the embodiments, and for related parts, please refer to the description of the method part.

[0072] It should be understood that in this disclosure, "at least one" means one or more, and "plurality" means two or more. "And / or" is used to describe a relationship between related objects and indicates that three relationships are possible. For example, "A and / or B" may represent three cases: A only exists, B only exists, or both A and B exist simultaneously, where A and B may be singular or plural. The character " / " generally indicates that the related objects before and after it are in an "or" relationship. "At least one of" or similar expressions refers to any combination of these items, including any combination of single or multiple items. For example, "at least one of a, b, or c" can represent a, b, c, "a and b," "a and c," "b and c," or "a, b, and c," where a, b, and c may be singular or plural.

[0073] It should be noted that, in this specification, relational terms such as "first" and "second," etc., are merely used to distinguish one entity or operation from another and do not require or imply the existence of any actual relationship or ordering between those entities or operations. Furthermore, the terms "comprise," "include," "includes," or any other variation thereof are intended to cover the non-exclusive "comprise," whereby a process, method, article, or apparatus comprising a set of elements not only includes those elements, but also includes other elements not expressly listed or inherent in such process, method, article, or apparatus. Unless further limited, an element defined by the phrase "comprising one of" does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising that element.

[0074] The steps of a method or algorithm described with reference to the embodiments disclosed herein may be embodied directly in hardware, by software modules executed by a processor, or by a combination of the two. The software modules may be located in Random Access Memory (RAM), memory, Read Only Memory (ROM), Electrically Programmable ROM, Electrically Erasable Programmable ROM, registers, hard disk, removable magnetic disk, CD-ROM, or any other form of storage medium well known in the art.

[0075] The above description of the disclosed embodiments will enable those skilled in the art to make or use the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Thus, the present disclosure is not limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. acquiring an image to be processed; Identifying a coverage area of ​​a virtual object based on the image to be processed; identifying a coverage edge of the virtual object based on the coverage area and a time variable; obtaining a coverage effect of the virtual object based on the coverage area and the coverage edge.

2. Identifying a coverage area of ​​a virtual object based on the image to be processed includes: Obtaining a scene normal map based on the image to be processed and obtaining a motion direction vector of the virtual object; and determining a coverage area of ​​the virtual object based on the scene normal map and the motion direction vector.

3. Determining a coverage area of ​​the virtual object based on the scene normal map and the motion direction vector includes: sampling the scene normal map based on pixel coordinates of the image to be processed to obtain pixel normal vectors; obtaining a coverage value based on the pixel normal vector and a motion direction vector of the virtual object; and determining a coverage area of ​​the virtual object based on the coverage value.

4. Identifying a coverage edge of the virtual object based on the coverage area and a time variable includes: obtaining an edge texture vector based on an edge of the coverage area; determining edge information based on the edge texture vector and a time variable; and identifying a coverage edge of the virtual object based on the edge information.

5. Determining edge information based on the edge texture vector and a time variable includes: determining a coverage thickness of the virtual object based on a time variable and a speed of movement of the virtual object; and determining edge information based on the edge texture vector and the coverage thickness.

6. Obtaining a coverage effect of the virtual object based on the coverage area and the coverage edge includes: updating the coverage area based on the coverage edge to obtain an updated coverage area; and rendering the virtual object in the updated coverage area.

7. obtaining a scene depth map based on the image to be processed; The method of claim 1 , further comprising: processing the image to be processed based on the scene depth map to obtain an overlay effect.

8. Processing the image to be processed based on the scene depth map to obtain an overlay effect includes: obtaining a first distance and a second distance based on the scene depth map; correcting depth values ​​in the scene depth map using the first distance and the second distance to obtain a corrected scene depth map; and processing the image to be processed utilizing the corrected scene depth map to obtain an overlay effect.

9. The method of claim 1 , further comprising: using a motion direction vector of the virtual object to offset a pixel normal direction vector of the coverage edge to increase a shadow effect of the coverage edge.

10. a first acquisition unit for acquiring an image to be processed; an identification unit for identifying a coverage area of ​​a virtual object based on the image to be processed, and for identifying a coverage edge of the virtual object based on the coverage area and a time variable; a second obtaining unit for obtaining a coverage effect of the virtual object according to the coverage area and the coverage edge.

11. An electronic device comprising a processor and a memory, the memory is used to store instructions or computer programs; The processor is adapted to execute the instructions or computer programs in the memory to cause the electronic device to perform the method of any one of claims 1 to 9.

12. 10. A computer readable storage medium having instructions stored thereon that, when executed on an apparatus, cause the apparatus to perform the method of any one of claims 1 to 9.

Citation Information

Patent Citations

  • Game image processing method and device, storage medium and electronic equipment

    CN112827169A

  • Natural user input to drive interactive stories

    JP2013538593A

  • Image processing method, device, electronic device, and computer-readable storage medium

    JP7214926B1

  • Natural user input for driving interactive stories

    US20110314381A1