WO2023197868A1 - 图像处理方法、装置、系统和存储介质 - Google Patents

图像处理方法、装置、系统和存储介质 Download PDF

Info

Publication number
WO2023197868A1
WO2023197868A1 PCT/CN2023/084719 CN2023084719W WO2023197868A1 WO 2023197868 A1 WO2023197868 A1 WO 2023197868A1 CN 2023084719 W CN2023084719 W CN 2023084719W WO 2023197868 A1 WO2023197868 A1 WO 2023197868A1
Authority
WO
WIPO (PCT)
Prior art keywords
rendering
algorithm
node
image
image processing
Prior art date
Application number
PCT/CN2023/084719
Other languages
English (en)
French (fr)
Inventor
刘纯
李振鹏
Original Assignee
北京字跳网络技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京字跳网络技术有限公司 filed Critical 北京字跳网络技术有限公司
Publication of WO2023197868A1 publication Critical patent/WO2023197868A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/10Geometric effects
    • G06T15/20Perspective computation
    • G06T15/205Image-based rendering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/10Geometric effects
    • G06T15/20Perspective computation

Definitions

  • the present disclosure relates to the field of data processing technology, and in particular, to an image processing method, device, system and storage medium.
  • the algorithm system when short video shooting and special effects rendering are performed, the algorithm system first executes all algorithms, and then the rendering system performs one-time rendering based on the algorithm results.
  • an embodiment of the present disclosure provides an image processing method, which method includes:
  • the image to be processed is input into the algorithm rendering composite system to obtain the processed image.
  • the algorithm rendering composite system is obtained by adding a rendering node to the algorithm system.
  • the rendering node is used to process the input to the rendering node.
  • the processed image is sent to a rendering system, and the rendering system performs rendering based on the processed image.
  • an image processing device which includes:
  • Image acquisition module used to acquire images to be processed
  • An image processing module used to input the image to be processed into an algorithm rendering composite system to obtain a processed image, wherein the algorithm rendering composite system is obtained by adding rendering nodes to the algorithm system, and the rendering nodes are used to The image input to the rendering node is rendered;
  • An image rendering module configured to send the processed image to a rendering system, and use the rendering system to perform rendering based on the processed image.
  • an embodiment of the present disclosure provides an image processing device.
  • the electronic device includes:
  • a processor coupled to the memory, the processor configured to execute the image processing method according to any one of the above first aspects based on instructions stored in the memory.
  • embodiments of the present disclosure provide an image processing system, including:
  • Algorithmic rendering composite system including algorithm nodes and rendering nodes.
  • embodiments of the present disclosure provide a computer-readable storage medium on which a computer program is stored.
  • the program is executed by a processor, the image processing method as described in any one of the above first aspects is implemented.
  • inventions of the present disclosure provide a computer program product.
  • the computer program product includes a computer program or instructions.
  • the image processing as described in any one of the first aspects is implemented. method.
  • an embodiment of the present disclosure provides a computer program, including:
  • Figure 1 is a flow chart of an image processing method in an embodiment of the present disclosure
  • Figure 2 is a timing diagram of the algorithmic rendering composite system and the rendering system in the embodiment of the present disclosure
  • Figure 3 is a rendering node implementation class diagram in an embodiment of the present disclosure
  • Figure 4 is a flow chart of the algorithm life cycle in an embodiment of the present disclosure.
  • Figure 5 is a schematic structural diagram of an image processing device in an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of an electronic device in an embodiment of the present disclosure.
  • the term “include” and its variations are open-ended, ie, “including but not limited to.”
  • the term “based on” means “based at least in part on.”
  • the term “one embodiment” means “at least one embodiment”; the term “another embodiment” means “at least one additional embodiment”; and the term “some embodiments” means “at least some embodiments”. Relevant definitions of other terms will be given in the description below.
  • the algorithm and rendering need to be executed interspersed during the processing of each frame of the camera image, instead of the traditional algorithm system executing first.
  • the rendering system performs one-time rendering based on the algorithm results. The processing flow of each frame of camera picture is changed to first execute algorithm A, then execute rendering A, then execute algorithm B, and then execute rendering B.
  • GAN Geneative Adversarial Networks, Generative Adversarial Networks
  • the image is mapped, rendered and transformed to fuse the image generated based on the GAN algorithm with the original image; then, the face recognition algorithm is run again to add beauty and makeup effects.
  • GAN Graphics Processing Unit
  • Embodiments of the present disclosure provide an image processing method.
  • a rendering node is set up in an algorithm system, and the rendering node performs part of the rendering process.
  • the rendering process is interspersed between multiple algorithms to improve the performance of the device.
  • Figure 1 is a flow chart of an image processing method in an embodiment of the present disclosure. This embodiment can be applied to the situation of performing special effects rendering on video.
  • the method can be executed by an image processing device, and the image processing device can use software and/or Or implemented in hardware, the image processing device can be configured in an electronic device.
  • the image processing method provided by the embodiment of the present disclosure can be applied to shooting special effects scenes, and can also be applied to other algorithm scenes.
  • the electronic device may be a mobile terminal, a fixed terminal or a portable terminal, such as a mobile phone, a site, a unit, a device, a multimedia computer, a multimedia tablet, an Internet node, a communicator, a desktop computer, a laptop computer, a notebook computer, Netbook computers, tablet computers, personal communications system (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio/video players, digital cameras/camcorders, positioning devices, television receivers, radio broadcast receivers, e-books devices, gaming devices, or any combination thereof, including accessories and peripherals for such devices or any combination thereof.
  • PCS personal communications system
  • PDAs personal digital assistants
  • audio/video players digital cameras/camcorders
  • positioning devices television receivers, radio broadcast receivers, e-books devices, gaming devices, or any combination thereof, including accessories and peripherals for such devices or any combination thereof.
  • the electronic device may be a server, wherein the server may be a physical server or a cloud server, and the server may be a server or a server cluster.
  • the image processing method provided by the embodiment of the present disclosure mainly includes the following steps.
  • the image to be processed can be understood as an image that needs to run an algorithm and/or be rendered.
  • the image to be processed may be an image frame in an image stream collected by a camera of the terminal device, or may be a picture texture uploaded by a user received by the terminal device. In this embodiment, only the image to be processed is explained without limitation.
  • S102 Input the image to be processed into the algorithm rendering composite system to obtain the processed image.
  • the algorithm rendering composite system is obtained by adding rendering nodes to the algorithm system.
  • the rendering nodes are used to process the input to the rendering system.
  • the image of the node is rendered.
  • an independent rendering engine is embedded in the algorithm system, and the rendering steps of the algorithm-rendering-algorithm intermediate process are abstracted into an algorithm type node for rendering, that is, a rendering node.
  • the existing algorithm system is upgraded to an algorithm rendering composite system, which has both the original algorithm processing capabilities and the rendering capabilities.
  • the operation of the rendering node rendering the image input to the rendering node is performed by the image processor GPU.
  • the rendering operation of the rendering node is performed by the GPU, which reduces the dependence of the graphics card on the CPU. Improve device performance.
  • the algorithm rendering composite system includes algorithm nodes and rendering nodes connected according to a set relationship.
  • the set relationship is determined through graph configuration, including the sequential dependencies between the algorithm nodes and the rendering nodes. relation.
  • the rendering node can be used in series with the algorithm node or in parallel with the CPU algorithm.
  • the relationship between algorithm nodes and rendering nodes is not limited.
  • the algorithm running graph can be organized arbitrarily through graph configuration, that is, the dependency relationship between algorithm nodes and rendering nodes is determined through graph configuration.
  • the dependencies between various nodes in the algorithm rendering composite system can be modified through graph configuration, so that this image processing method can be easily applied to multiple special effects scenes.
  • the algorithm node is used to run a corresponding algorithm on the image input to the algorithm node, and the operation of the algorithm node running the corresponding algorithm on the image input to the algorithm node is executed by the central processing unit CPU.
  • the algorithm node in the algorithm rendering composite system runs the relevant algorithm, it is executed by the CPU, and the rendering node executes the rendering by the GPU, which can improve the performance of the device and avoid the overhead of device performance.
  • a rendering engine and several rendering sub-nodes are embedded in the algorithm system, and the algorithm running diagram can be organized arbitrarily through graph configuration.
  • the image to be processed passes through algorithm node A, rendering node A, and algorithm node B in sequence. , rendering node B and algorithm node C.
  • the algorithm system is upgraded to an algorithm rendering composite system.
  • the algorithm rendering composite system will also intersperse the execution of some GPU rendering nodes. The relationship between GPU rendering nodes and CPU algorithm nodes can be determined through graph configuration.
  • the rendering node is used to render the image input to the rendering node, convert the rendered image texture into an algorithm representation, and send it to the algorithm node or rendering node connected to the rendering node.
  • the output content of the rendering node is usually a picture texture.
  • the picture texture is encapsulated into the form of an algorithm result and sent to subsequent algorithm nodes or rendering nodes to perform corresponding operations and realize GPU image to CPU data. conversion to improve the adaptability of the equipment.
  • the algorithm node and the rendering node can be executed in series; and/or the algorithm node and the rendering node can be executed in parallel by multiple threads.
  • the algorithmic rendering composite system and the rendering system are independent of each other. Businesses can only use the algorithmic rendering composite system, or they can use it mixed with other rendering systems.
  • the algorithmic rendering composite system and rendering system can be executed serially or in parallel with multiple threads. Internally, the algorithmic rendering composite system is an independent scheduling sequence.
  • Embodiments of the present disclosure provide an image processing method including: acquiring an image to be processed; inputting the image to be processed into an algorithm rendering composite system to obtain a processed image, wherein the algorithm rendering composite system is composed of an algorithm system Obtained by adding a rendering node, the rendering node is used to render the image input to the rendering node; the processed image is sent to the rendering system, and the processed image is rendered by the rendering system.
  • rendering nodes are arranged in the algorithm system, and the rendering nodes perform part of the rendering processing, thereby achieving the effect of interleaved execution of algorithms and rendering, and improving the performance of the device.
  • the rendering node is a node with a predefined algorithm type for rendering, and the rendering node can instantiate multiple subclasses.
  • each node can implement different rendering operations through parameter configuration, including but not limited to rendering portrait segmentation, rendering GAN effects, rendering beauty makeup, etc.
  • rendering nodes mainly includes: nodes are used to define rendering nodes, all contents must be lowercase, and the config parameters of the nodes can be configured.
  • intParam is used to define int type parameters; floatParam is used to define float type parameters; stringParam is used to define string type parameters; links is used to define the connection dependencies of nodes.
  • the parameters of the GPU_RENDER node need to be defined to configure and parse the rendering scene (such as AmazingFeature). This part of the configuration depends on the specific rendering engine and algorithm implementation. It can be used according to the business scenario and implementation. Here, it is Examples of special effects usage scenarios.
  • the pathParam type parameter feature_path is added to the GPU_RENDER node configuration to point to the rendering effect (AmazingFeature) path in the prop package.
  • the GPU_RENDER algorithm implementation will parse the resource path and perform GPU rendering operations to draw to the output image texture. .
  • the GPU_RENDER algorithm node can configure arbitrary organizational connection relationships through the graph, thereby realizing a more complex algorithm-rendering process.
  • the rendering node serves as an independent algorithm and is dynamically registered in the algorithm system to form an algorithm rendering composite system.
  • the rendering node is an algorithm instance.
  • the specific implementation details depend on the rendering engine and script configuration.
  • the algorithm of this rendering node is used as a plug-in. Dynamically registered into the algorithm system to form an algorithm rendering composite system.
  • the rendering node is implemented by the business layer, and different renderings can be achieved according to different business usage methods.
  • the specific process of rendering processing performed by the GPU is determined by a pre-configured rendering engine and rendering scene.
  • the implementation details of the rendering node can be migrated and expanded, including but not limited to new rendering engines for special effects, and can also be migrated to other rendering engine implementations such as Unity, or even simple rendering instructions that directly use GPU instructions. In this way, the implementation algorithm The migration and expansion of the rendering composite system make the algorithmic rendering composite system more widely used.
  • CustomAlgorithmFactory a custom Factory inherited from BachAlgorithmFactory (base class) to implement the construction and registration of GPURenderAlgorithm; GPURenderAlgorithm: inherited from BachAlgorithmAbstract to implement rendering calculations
  • AlgorithmRenderSystem The rendering subsystem in the algorithm system. Its specific implementation depends on the business rendering engine. In this embodiment, Effect's new engine Amazer is used as an example.
  • the GPURenderAlgorithm algorithm is mainly used to complete the GPU rendering operation of rendering resources. In special effects scenes, its responsibility is to render an AmazingFeature resource package path. This part mainly calls the API (Application Programming Interface) related to the new rendering engine Amazer to implement the corresponding algorithm life cycle method.
  • the algorithm rendering composite system will schedule the algorithm as a whole during the execution process and implement input and output according to the agreed protocol. That’s it.
  • an algorithm life cycle mainly includes: constructor, dolnit, doExecute, doDestory and destructor.
  • the reference count is increased by 1.
  • Dolnit has two main functions: 1. Initializing the rendering environment; 2. Loading and parsing the new engine Scene according to the feature_path.
  • doExecute has three main functions: 1. Fill dependent algorithm results into Amazer; 2. Obtain input texture and apply for output texture; 3. Drive Amazer and Scene rendering.
  • doDestory has two main functions: 1. Unload the Scene; 2. Release the output texture.
  • the reference count is decremented by 1 and the rendering environment is released.
  • the technical solution provided by this embodiment only requires an algorithm rendering composite system and a rendering system to process the image to be processed.
  • An independent rendering engine is embedded in the algorithm system, and the rendering steps of the algorithm-rendering-algorithm intermediate process are abstracted into a type of algorithm node (referred to as a rendering node), and specific GPU rendering operations are completed in the implementation of the rendering node.
  • the algorithm system is upgraded to an algorithm rendering composite system, which has the original algorithm processing capabilities and rendering capabilities at the same time.
  • the embodiment of the present disclosure proposes an image processing method.
  • the acquired image to be processed can be input into the algorithm rendering composite system.
  • the algorithm rendering composite system meets the needs of interleaved execution of algorithm and rendering during the processing of each frame of camera image, and simultaneously solves the problem of current problems.
  • Some algorithm architectures have performance issues, flexibility and other issues. You only need to use an algorithm rendering composite system, and you can freely build algorithm-rendering-algorithm-rendering processes based on graph configuration. At the same time, you can use algorithm threads and rendering threads to gain the advantage of multi-threaded parallel acceleration, improving the performance and frame rate of the entire process.
  • FIG. 5 is a schematic structural diagram of an image processing device in an embodiment of the present disclosure. This embodiment can be applied to video shooting and special effects rendering.
  • the image processing device can be implemented in software and/or hardware.
  • the image processing The device can be configured in electronic equipment.
  • the image processing device provided by the embodiment of the present disclosure mainly includes an image acquisition module 51 , an image processing module 52 and an image rendering module 53 .
  • Image acquisition module 51 used to acquire images to be processed
  • the image processing module 52 is used to input the image to be processed into an algorithmic rendering composite system to obtain a processed image, wherein the algorithmic rendering composite system is obtained by adding rendering nodes to the algorithm system, and the rendering nodes are used for Render the image input to the rendering node; the image rendering module 53 is used to send the processed image to the rendering system, and use the rendering system to render the processed image.
  • Embodiments of the present disclosure provide an image processing device for performing the following processes: obtaining an image to be processed; inputting the image to be processed into an algorithm rendering composite system to obtain a processed image, wherein the algorithm rendering composite
  • the system is obtained by adding rendering nodes to the algorithm system.
  • the rendering nodes are used to render the images input to the rendering nodes; the processed images are sent to the rendering system, and the processed images are processed by the rendering system.
  • the image is rendered.
  • rendering nodes are arranged in the algorithm system, and the rendering nodes perform part of the rendering processing, thereby achieving the effect of interleaved execution of algorithms and rendering, and improving the performance of the device.
  • the present disclosure also provides an image processing system, including any one of the aforementioned image processing devices; and an algorithm rendering composite system, including an algorithm node and a rendering node.
  • the rendering operation of the rendering node to render the image input to the rendering node is performed by an image processor GPU.
  • the algorithm rendering composite system includes algorithm nodes and rendering nodes connected according to a set relationship.
  • the set relationship refers to the relationship between the algorithm node and the rendering node determined through graph configuration. dependencies.
  • the algorithm node is used to run a corresponding algorithm on the image input to the algorithm node, and the operation of the algorithm node running the corresponding algorithm on the image input to the algorithm node is executed by the central processing unit CPU.
  • the rendering node is used to render the image input to the rendering node, convert the rendered image texture into an algorithmic representation and send it to the algorithm node connected to the rendering node or Render node.
  • the rendering node is a node that defines an algorithm type for rendering, and the rendering node can instantiate multiple subclasses.
  • the rendering node serves as an independent algorithm and is dynamically registered in the algorithm system to form an algorithm rendering composite system.
  • the specific process of rendering processing performed by the GPU is determined by the configured rendering engine.
  • the image processing system further includes a rendering system.
  • the image processing device and system provided by the embodiments of the present disclosure can execute the diagram provided by the method embodiments of the present disclosure. Like the steps performed in the processing method, the execution steps and beneficial effects will not be described again here.
  • FIG. 6 is a schematic structural diagram of an electronic device in an embodiment of the present disclosure.
  • the electronic device 600 in the embodiment of the present disclosure may include, but is not limited to, mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablets), PMPs (portable multimedia players), vehicle-mounted terminals ( Mobile terminals such as car navigation terminals), wearable terminal devices, etc., and fixed terminals such as digital TVs, desktop computers, smart home devices, etc.
  • the terminal device shown in FIG. 6 is only an example and should not impose any restrictions on the functions and scope of use of the embodiments of the present disclosure.
  • the electronic device 600 may include a processing device (eg, central processing unit, graphics processor, etc.) 601, which may be loaded into a random access device according to a program stored in a read-only memory (ROM) 602 or from a storage device 608.
  • the program in the memory (RAM) 603 performs various appropriate actions and processes to implement the image rendering method according to the embodiments of the present disclosure.
  • various programs and data required for the operation of the terminal device 600 are also stored.
  • the processing device 601, ROM 602 and RAM 603 are connected to each other via a bus 604.
  • An input/output (I/O) interface 605 is also connected to bus 604.
  • the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speakers, vibration An output device 607 such as a computer; a storage device 608 including a magnetic tape, a hard disk, etc.; and a communication device 609.
  • the communication device 609 may allow the terminal device 600 to communicate wirelessly or wiredly with other devices to exchange data.
  • FIG. 6 shows the terminal device 600 having various means, it should be understood that implementation or possession of all illustrated means is not required. More or fewer means may alternatively be implemented or provided.
  • embodiments of the present disclosure include a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, the computer program including program code for executing the method shown in the flowchart, thereby achieving the above The described page jump method.
  • the computer program may be downloaded and installed from the network via communication device 609, or from storage device 608, or from ROM 602. When the computer program is executed by the processing device 601, the above functions defined in the method of the embodiment of the present disclosure are performed.
  • the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two.
  • a computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any A combination of the above. More specific examples of computer readable storage media may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard drive, random access memory (RAM), read only memory (ROM), removable Programmd read-only memory (EPROM or flash memory), fiber optics, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device.
  • 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 therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above.
  • a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device .
  • Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wire, optical cable, RF (radio frequency), etc., or any suitable combination of the above.
  • the client and server can communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and can communicate with digital data in any form or medium.
  • Communications e.g., communications network
  • communications networks include local area networks (“LAN”), wide area networks (“WAN”), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or developed in the future network of.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; it may also exist independently without being assembled into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs.
  • the terminal device obtains the image to be processed; inputs the image to be processed into the algorithm rendering composite system.
  • obtain the processed image wherein the algorithm rendering composite system is obtained by adding a rendering node to the algorithm system, and the rendering node is used to render the image input to the rendering node; the processed image is sent to In the rendering system, the rendering system is used to render the processed image.
  • the terminal device may also perform other steps described in the above embodiments.
  • Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and Includes conventional procedural programming languages—such as "C” or similar programs Design language.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
  • the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as an Internet service provider through Internet connection).
  • LAN local area network
  • WAN wide area network
  • Internet service provider such as an Internet service provider through Internet connection
  • each block in the flowchart or block diagram may represent a module, segment, or portion of code that contains one or more logic functions that implement the specified executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown one after another may actually execute substantially in parallel, or they may sometimes execute in the reverse order, depending on the functionality involved.
  • each block of the block diagram and/or flowchart illustration, and combinations of blocks in the block diagram and/or flowchart illustration can be implemented by special purpose hardware-based systems that perform the specified functions or operations. , or can be implemented using a combination of specialized hardware and computer instructions.
  • the units involved in the embodiments of the present disclosure can be implemented in software or hardware. Among them, the name of a unit does not constitute a limitation on the unit itself under certain circumstances.
  • FPGAs Field Programmable Gate Arrays
  • ASICs Application Specific Integrated Circuits
  • ASSPs Application Specific Standard Products
  • SOCs Systems on Chips
  • CPLD Complex Programmable Logical device
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with an instruction execution system, apparatus, or device.
  • the machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, laptop disks, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM portable compact disk read-only memory
  • magnetic storage device or any suitable combination of the above.
  • the present disclosure provides an image processing method, including: acquiring an image to be processed; inputting the image to be processed into an algorithm rendering composite system to obtain a processed image, wherein , the algorithm rendering composite system is obtained by adding a rendering node to the algorithm system, and the rendering node is used to render the image input to the rendering node; the processed image is sent to the rendering system, and the The rendering system renders the processed image.
  • the present disclosure provides an image processing method, wherein an operation of the rendering node rendering an image input to the rendering node is performed by an image processor GPU.
  • the present disclosure provides an image processing method, wherein the algorithm rendering composite system includes algorithm nodes and rendering nodes connected according to a set relationship, and the set relationship refers to The graph configuration determines the sequential dependency relationship between the algorithm node and the rendering node.
  • the present disclosure provides an image processing method, wherein the algorithm node is used to run a corresponding algorithm on an image input to the algorithm node, and the algorithm node pairs input to the algorithm
  • the operation of the node's image to run the corresponding algorithm is performed by the central processing unit CPU.
  • the present disclosure provides an image processing method, wherein the rendering node is used to render the image input to the rendering node, and then convert the rendered image texture into an algorithm representation and sent to the algorithm node or rendering node connected to the rendering node.
  • the present disclosure provides an image processing method, wherein the rendering node is a node that defines an algorithm type for rendering, and the rendering node can instantiate multiple subclasses.
  • the present disclosure provides an image processing method, in which the rendering node is dynamically registered into the algorithm system as an independent algorithm to form an algorithm rendering composite system.
  • the present disclosure provides an image processing method, in which the specific process of rendering processing performed by the GPU is determined by a configured rendering engine.
  • the present disclosure provides an image processing device, including: an image acquisition module for acquiring an image to be processed; an image processing module for inputting the image to be processed into an algorithm rendering In the composite system, the image to be processed is input into the algorithm rendering composite system to obtain the processed image, wherein the algorithm rendering composite system is obtained by adding rendering nodes to the algorithm system, and the rendering nodes are used to process the input to The image of the rendering node is rendered; the image rendering module is used to send the processed image to the rendering system, and use the rendering system to render the processed image.
  • an image processing device including:
  • a processor coupled to the memory, the processor being configured to execute any of the foregoing image processing methods based on instructions stored in the memory.
  • the present disclosure provides an image processing system, including:
  • Algorithmic rendering composite system including algorithm nodes and rendering nodes.
  • the present disclosure provides an image processing system, wherein the operation of the rendering node rendering an image input to the rendering node is performed by an image processor GPU.
  • the present disclosure provides an image processing system, wherein the algorithm rendering composite system includes algorithm nodes and rendering nodes connected according to a set relationship, and the set relationship refers to The graph configuration determines the sequential dependency relationship between the algorithm node and the rendering node.
  • the present disclosure provides an image processing system, wherein the algorithm node is used to run a corresponding algorithm on an image input to the algorithm node, and the algorithm node pairs input to the algorithm
  • the operation of the node's image to run the corresponding algorithm is performed by the central processing unit CPU.
  • the present disclosure provides an image processing system, wherein after the rendering node is used to render the image input to the rendering node, it further includes: converting the rendered image texture Converted into a representation of the algorithm and sent to the algorithm node or render node connected to this render node.
  • the present disclosure provides an image processing system, wherein the rendering node is a node of a predefined algorithm type, and the rendering node can instantiate multiple subclasses.
  • the present disclosure provides an image processing system, in which the rendering node serves as an independent algorithm and is dynamically registered in the algorithm system to form an algorithm rendering composite system.
  • the present disclosure provides an image processing system, in which the specific process of rendering processing performed by the GPU is determined by a preconfigured rendering engine.
  • the present disclosure provides an image processing system, further including a rendering system.
  • the present disclosure provides a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the image processing as described in any one provided by the present disclosure is implemented. method.
  • Embodiments of the present disclosure also provide a computer program product.
  • the computer program product includes a computer program or instructions. When the computer program or instructions are executed by a processor, the image processing method as described above is implemented.
  • An embodiment of the present disclosure also provides a computer program, including:

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Geometry (AREA)
  • Computer Graphics (AREA)
  • Image Generation (AREA)

Abstract

本公开涉及一种图像处理方法、装置、设备、存储介质和程序产品,所述方法包括:获取待处理图像;将所述待处理图像输入至算法渲染复合系统中,获得处理后的图像,其中,所述算法渲染复合系统由算法系统中添加渲染节点得到,所述渲染节点用于对输入至该渲染节点的图像进行渲染;将所述处理后的图像发送至渲染系统中,利用所述渲染系统基于所述处理后的图像进行渲染。

Description

图像处理方法、装置、系统和存储介质
相关申请的交叉引用
本申请是以中国申请号为202210373968.3,申请日为2022年4月11日的申请为基础,并主张其优先权,该中国申请的公开内容在此作为整体引入本申请中。
技术领域
本公开涉及数据处理技术领域,尤其涉及一种图像处理方法、装置、系统和存储介质。
背景技术
在相关技术中,在进行短视频拍摄和特效渲染时,先由算法系统先执行完所有的算法,再由渲染系统基于算法结果做一次性渲染。
发明内容
第一方面,本公开实施例提供一种图像处理方法,所述方法包括:
获取待处理图像;
将所述待处理图像输入至算法渲染复合系统中,获得处理后的图像,其中,所述算法渲染复合系统由算法系统中添加渲染节点得到,所述渲染节点用于对输入至该渲染节点的图像进行渲染;
将所述处理后的图像发送至渲染系统中,利用所述渲染系统基于所述处理后的图像进行渲染。
第二方面,本公开实施例提供一种图像处理装置,所述装置包括:
图像获取模块,用于获取待处理图像;
图像处理模块,用于将所述待处理图像输入至算法渲染复合系统中,获得处理后的图像,其中,所述算法渲染复合系统由算法系统中添加渲染节点得到,所述渲染节点用于对输入至该渲染节点的图像进行渲染;
图像渲染模块,用于将所述处理后的图像发送至渲染系统中,利用所述渲染系统基于所述处理后的图像进行渲染。
第三方面,本公开实施例提供一种图像处理装置,所述电子设备包括:
存储器;以及
耦接至所述存储器的处理器,所述处理器被配置为基于存储在所述存储器中的指令,执行如上述第一方面中任一项所述的图像处理方法。
第四方面,本公开实施例提供一种图像处理系统,包括:
前述任意一种图像处理装置;以及
算法渲染复合系统,包括算法节点和渲染节点。
第五方面,本公开实施例提供一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如上述第一方面中任一项所述的图像处理方法。
第六方面,本公开实施例提供一种计算机程序产品,该计算机程序产品包括计算机程序或指令,该计算机程序或指令被处理器执行时实现如上述第一方面中任一项所述的图像处理方法。
第七方面,本公开实施例提供一种计算机程序,包括:
指令,所述指令当由处理器执行时使所述处理器执行前述任一种图像处理方法。
附图说明
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。
图1为本公开实施例中的一种图像处理方法的流程图;
图2是本公开实施例中的算法渲染复合系统和渲染系统的时序图;
图3是本公开实施例中的渲染节点实现类图;
图4是本公开实施例中的算法生命周期的流程图;
图5为本公开实施例中的一种图像处理装置的结构示意图;
图6为本公开实施例中的一种电子设备的结构示意图。
具体实施方式
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保 护范围。
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
在短视频拍摄和特效渲染中,随着特效玩法的不断丰富和升级,在一些使用场景,需要在每一帧相机画面处理过程中算法和渲染穿插执行,而不再是传统的算法系统先执行完所有的算法,再由渲染系统基于算法结果做一次性渲染的方式。每一帧相机画面的处理流程变更为先执行算法A,然后执行渲染A,再执行算法B,然后执行渲染B。
例如:为实现GAN(Generative Adversarial Networks,生成式对抗网络)风格化效果,需要先运行人脸识别算法和GAN算法,然后通过图形处理器(Graphics Processing Unit,简称:GPU),对通过算法处理后的图像进行贴图、渲染和变换,以对基于GAN算法生成的图和原始图像实现融合;然后,再次运行人脸识别算法,添加美颜美妆等效果。再如:在人像分割Matting算法中,使用GPU渲染并抠出人像后,再运行GAN算法,再通过GPU进行贴图和渲染。再如:对于绿幕视频类玩法,在将视频帧渲染并显示在屏幕后,基于用户选择的视频运行算法、并进行渲染。
本公开实施例提供了一种图像处理方法,将渲染节点设置在算法系统中,由渲染节点来执行部分渲染处理,其中渲染处理穿插在多个算法之间,来提升设备的性能。 下面将结合附图,对本申请实施例提出的图像处理方法进行详细介绍。
图1为本公开实施例中的一种图像处理方法的流程图,本实施例可适用于对视频进行特效渲染的情况,该方法可以由图像处理装置执行,该图像处理装置可以采用软件和/或硬件的方式实现,该图像处理装置可配置于电子设备中。本公开实施例提供的图像处理方法可以应用到拍摄特效场景,也可以应用到其他算法场景。
例如:所述电子设备可以是移动终端、固定终端或便携式终端,例如移动手机、站点、单元、设备、多媒体计算机、多媒体平板、互联网节点、通信器、台式计算机、膝上型计算机、笔记本计算机、上网本计算机、平板计算机、个人通信系统(PCS)设备、个人导航设备、个人数字助理(PDA)、音频/视频播放器、数码相机/摄像机、定位设备、电视接收器、无线电广播接收器、电子书设备、游戏设备或者其任意组合,包括这些设备的配件和外设或者其任意组合。
再如:所述电子设备可以是服务器,其中,所述服务器可以是实体服务器,也可以是云服务器,服务器可以是一个服务器,或者服务器集群。
如图1所述,本公开实施例提供的图像处理方法主要包括如下步骤。
S101、获取待处理图像。
所述待处理图像可以理解为需要运行算法和/或进行渲染的图像。所述待处理图像可以是终端设备的相机采集的图像流中的图像帧,也可以是终端设备接收的用户上传的图片纹理。本实施例中,仅对待处理图像进行说明,而非限定。
S102、将所述待处理图像输入至算法渲染复合系统中,获得处理后的图像,其中,所述算法渲染复合系统由算法系统中添加渲染节点得到,所述渲染节点用于对输入至该渲染节点的图像进行渲染。
在本实施例中,在算法系统中内嵌一个独立的渲染引擎,把算法-渲染-算法中间过程的渲染步骤,抽象成一种用于渲染的算法类型的节点,即渲染节点。这样现有的算法系统就升级为了一个算法渲染复合系统,同时具备原先算法处理能力,还具备渲染能力。
基于上述技术方案,可以实现更加复杂多元化的特效渲染道具,支持更多的算法玩法上线。例如:花样民族风特效等。
具体的,所述渲染节点对输入至该渲染节点的图像进行渲染的操作由图像处理器GPU执行。
本实施例中,渲染节点进行渲染的操作由GPU来执行,减少显卡对CPU的依赖, 提高设备性能。
具体的,所述算法渲染复合系统包括按照设定关系连接的算法节点和渲染节点,所述设定关系是指通过图配置确定的,包括所述算法节点和所述渲染节点之间的先后依赖关系。
具体的,在本实施例中,渲染节点可以跟算法节点进行串联使用,也可以跟CPU算法并联使用。本实施例中,并不限定算法节点和渲染节点之间的关系。
在本实施例中,通过图配置的方式可以任意组织算法运行图,即通过图配置的方式确定算法节点和渲染节点之间的依赖关系。这样,可以通过图配置的方式修改算法渲染复合系统中各个节点之间的依赖关系,使得该图像处理方式可以方便的应用于多个特效场景中。
进一步的,所述算法节点用于对输入至该算法节点的图像运行相应算法,所述算法节点对输入至该算法节点的图像运行相应算法的操作由中央处理器CPU执行。
在本实施例中,算法渲染复合系统中的算法节点运行相关算法时,由CPU来执行,渲染节点执行渲染由GPU来执行,可以提高设备的性能,避免设备性能的开销。
S103、将所述处理后的图像发送至渲染系统中,利用所述渲染系统对所述处理后的图像进行渲染。
具体的,在算法系统中内嵌一个渲染引擎和若干渲染子节点,可以通过图配置任意组织算法运行图,如图2所示,待处理图像依次经过算法节点A、渲染节点A、算法节点B、渲染节点B和算法节点C。通过在算法系统中添加渲染节点,将算法系统升级为算法渲染复合系统,算法渲染复合系统除了执行常规的CPU算法节点,还会穿插执行部分GPU渲染节点。GPU渲染节点和CPU算法节点的关系,可以通过图配置来决定先后依赖关系。
进一步的,所述渲染节点用于对输入至该渲染节点的图像进行渲染之后,将渲染得到的图片纹理转换成算法的表示形式、并发送至与该渲染节点连接的算法节点或渲染节点。
具体的,渲染节点的输出内容通常是图片纹理,在一些实施例中,将图片纹理封装成算法结果的形式,发送给后续算法节点或者渲染节点,以执行相应的操作,实现GPU图像到CPU数据的转换,提高设备的适应性。
在一个可能的实施方式中,所述算法节点与所述渲染节点可串行执行;和/或,所述算法节点与所述渲染节点可多线程并行执行。
具体的,算法渲染复合系统和渲染系统是互相独立的,业务可以只使用算法渲染复合系统,也可以使用跟其他渲染系统混合使用。算法渲染复合系统跟渲染系统可以串行顺序执行,也可以多线程并行执行。算法渲染复合系统内部是独立的调度序列。
本公开实施例提供了一种图像处理方法包括:获取待处理图像;将所述待处理图像输入至算法渲染复合系统中,获得处理后的图像,其中,所述算法渲染复合系统由算法系统中添加渲染节点得到,所述渲染节点用于对输入至该渲染节点的图像进行渲染;将所述处理后的图像发送至渲染系统中,利用所述渲染系统对所述处理后的图像进行渲染。本公开实施例通过将渲染节点设置在算法系统中,由渲染节点来执行部分渲染处理,实现算法和渲染交织执行的效果,提升设备的性能。
在一个可能的实施方式中,所述渲染节点是预先定义了用于渲染的算法类型的节点,所述渲染节点可实例化多个子类。
在算法渲染复合系统中,所有算法实例都会继承自BachAlgorithmAbstract基类,实现自己的子类,来完成自身算法逻辑功能,对应有doInit/doExecte/doDestory等生命周期方法。对应的渲染节点,定义一种新的算法类型和子类实现。例如,定义渲染节点的算法类型为GPU_RENDER,GPU_RENDER节点可以实例化多个子类。一种可能的实施方式中,可以通过参数配置的方式,使每个节点可以实现不同的渲染操作,包括但不限于渲染人像分割,渲染GAN效果,渲染美颜美妆等。
进一步的,渲染节点的定义主要有:nodes用于定义渲染节点,其中所有内容都要小写,可以配置节点的config参数。intParam用于定义int类型参数;floatParam用于定义float类型参数;stringParam用于定义string类型参数;links用于定义节点的连接依赖关系。
算法渲染复合系统中,需要对GPU_RENDER节点进行参数定义,用于配置和解析渲染场景(如AmazingFeature),这部分配置取决于具体的渲染引擎和算法实现,可以根据业务方使用场景和实现,这里以特效使用场景举例。
GPU_RENDER节点配置示例:

其中,在GPU_RENDER节点配置中新增了pathParam类型参数feature_path,来指向道具包内的渲染效果(AmazingFeature)路径,GPU_RENDER算法实现会解析该资源路径,进行GPU渲染操作,以绘制到输出的图片纹理上。
GPU_RENDER算法节点,跟其他算法一样,可以通过图配置任意组织连接关系,从而实现更加复杂的算法-渲染流程。
在一个可能的实施方式中,所述渲染节点作为一个独立的算法,动态注册到所述算法系统中,构成算法渲染复合系统。
在本实施例中,所述渲染节点是一个算法实例,具体的实现细节依赖渲染引擎和脚本配置,为了跟算法系统中的算法节点进行解耦和隔离,把这个渲染节点这个算法作为一个插件,动态注册到算法系统中,构成算法渲染复合系统。也就是说渲染节点,是业务层实现的,根据不同的业务使用方法,可以实现不同的渲染。
在一个可能的实施方式中,GPU执行渲染处理的具体过程由预先配置的渲染引擎和渲染场景确定。
进一步的,渲染节点的实现细节是可迁移扩展的,包括但不限于特效的新渲染引擎,也可以迁移到Unity等其他渲染引擎实现,甚至是直接使用GPU指令的简单渲染指令,这样,实现算法渲染复合系统的可迁移和扩展,使得算法渲染复合系统使用范围更广。
在一个具体实例中,基于特效Effect的新引擎进行描述,实际使用可以结合业务特点替换不同的渲染引擎,重新实现算法的细节,动态注入到算法渲染复合系统即可,该框架会自动完成算法的统一调度,级联和结果分发。
本实施例中提供一种渲染节点实现类图,如图3所示,CustomAlgorithmFactory:继承自BachAlgorithmFactory(基类)的自定义Factory,实现GPURenderAlgorithm的构造和注册;GPURenderAlgorithm:继承自BachAlgorithmAbstract,实现渲染算 法的细节,会依赖渲染引擎,这里封装成AlgorithmRenderSystem。AlgorithmRenderSystem:算法系统里的渲染子系统,它的具体实现依赖于业务的渲染引擎,本实施例中已Effect的新引擎Amazer为例。
GPURenderAlgorithm这个算法主要是完成对渲染资源的GPU渲染操作,在特效场景中,它的职责就是渲染一个AmazingFeature资源包路径。这部分主要是调用新渲染引擎Amazer相关API(应用程序编程接口,Application Programming Interface)实现对应的算法生命周期方法,算法渲染复合系统在执行过程中会整体调度该算法,按照约定的协议实现输入输出即可。
进一步的,如图4所示,一个算法生命周期主要包括:构造函数、dolnit、doExecute、doDestory和析构函数。在构建函数时,引用计数加1,dolnit主要有两个作用:1、初始化渲染环境;2、根据teature_path加载解析新引擎Scene。doExecute主要有三个作用:1、填充依赖算法结果到Amazer;2、获取输入纹理、申请输出纹理;3、驱动Amazer和Scene渲染。doDestory主要有两个作用:1、卸载Scene;2、释放输出纹理。在析构函数时,引用计数减1,并释放渲染环境。
本实施例提供的技术方案,只需要一个算法渲染复合系统和一个渲染系统,就可以对待处理图像进行处理。在现有算法系统中基于图配置组织算法节点。在算法系统中内嵌一个独立的渲染引擎,把算法-渲染-算法中间过程的渲染步骤,抽象成一种类型的算法节点(简称渲染节点),在渲染节点的实现中完成具体的GPU渲染操作。这样算法系统就升级为了一个算法渲染复合系统,同时具备原先的算法处理能力和渲染能力。
本公开实施例提出了一种图像处理方法,获取到的待处理图像可以输入算法渲染复合系统中,算法渲染复合系统满足每一帧相机画面处理过程中算法和渲染穿插执行的需求,同时解决现有的算法架构的性能问题,灵活性等问题。只需要使用一个算法渲染复合系统,基于图配置可以自由搭建算法-渲染-算法-渲染流程,同时利用算法线程和渲染线程可以获得多线程并行加速的优势,提升整个流程的性能和帧率。
图5为本公开实施例中的一种图像处理装置的结构示意图,本实施例可适用于视频拍摄和特效渲染的情况,该图像处理装置可以采用软件和/或硬件的方式实现,该图像处理装置可配置于电子设备中。如图5所述,本公开实施例提供的图像处理装置主要包括图像获取模块51、图像处理模块52和图像渲染模块53。
图像获取模块51,用于获取待处理图像;
图像处理模块52,用于将所述待处理图像输入至算法渲染复合系统中,获得处理后的图像,其中,所述算法渲染复合系统由算法系统中添加渲染节点得到,所述渲染节点用于对输入至该渲染节点的图像进行渲染;图像渲染模块53,用于将所述处理后的图像发送至渲染系统中,利用所述渲染系统对所述处理后的图像进行渲染。
本公开实施例提供了一种图像处理装置,用于执行如下流程:获取待处理图像;将所述待处理图像输入至算法渲染复合系统中,获得处理后的图像,其中,所述算法渲染复合系统由算法系统中添加渲染节点得到,所述渲染节点用于对输入至该渲染节点的图像进行渲染;将所述处理后的图像发送至渲染系统中,利用所述渲染系统对所述处理后的图像进行渲染。本公开实施例通过将渲染节点设置在算法系统中,由渲染节点来执行部分渲染处理,实现算法和渲染交织执行的效果,提升设备的性能。
本公开还提供了一种图像处理系统,包括前述任意一种图像处理装置;以及,算法渲染复合系统,包括算法节点和渲染节点。
在一个可能的实施方式中,所述渲染节点对输入至该渲染节点的图像进行渲染的操作由图像处理器GPU执行。
在一个可能的实施方式中,所述算法渲染复合系统包括按照设定关系连接的算法节点和渲染节点,所述设定关系是指通过图配置确定的所述算法节点和所述渲染节点之间的先后依赖关系。
在一个可能的实施方式中,所述算法节点用于对输入至该算法节点的图像运行相应算法,所述算法节点对输入至该算法节点的图像运行相应算法的操作由中央处理器CPU执行。
在一个可能的实施方式中,所述渲染节点用于对输入至该渲染节点的图像进行渲染之后,将渲染得到的图片纹理转换成算法的表示形式并发送至与该渲染节点连接的算法节点或渲染节点。
在一个可能的实施方式中,所述渲染节点是定义了用于渲染的的算法类型的节点,所述渲染节点可实例化多个子类。
在一个可能的实施方式中,所述渲染节点作为一个独立的算法,动态注册到所述算法系统中,构成算法渲染复合系统。
在一个可能的实施方式中,GPU执行渲染处理的具体过程由配置的渲染引擎确定。
在一个可能的实施方式中,图像处理系统还包括渲染系统。
本公开实施例提供的图像处理装置和系统,可执行本公开方法实施例所提供的图 像处理方法中所执行的步骤,具备执行步骤和有益效果此处不再赘述。
图6为本公开实施例中的一种电子设备的结构示意图。下面具体参考图6,其示出了适于用来实现本公开实施例中的电子设备600的结构示意图。本公开实施例中的电子设备600可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)、可穿戴终端设备等等的移动终端以及诸如数字TV、台式计算机、智能家居设备等等的固定终端。图6示出的终端设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图6所示,电子设备600可以包括处理装置(例如中央处理器、图形处理器等)601,其可以根据存储在只读存储器(ROM)602中的程序或者从存储装置608加载到随机访问存储器(RAM)603中的程序而执行各种适当的动作和处理以实现如本公开所述的实施例的图片渲染方法。在RAM 603中,还存储有终端设备600操作所需的各种程序和数据。处理装置601、ROM 602以及RAM 603通过总线604彼此相连。输入/输出(I/O)接口605也连接至总线604。
通常,以下装置可以连接至I/O接口605:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置606;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置607;包括例如磁带、硬盘等的存储装置608;以及通信装置609。通信装置609可以允许终端设备600与其他设备进行无线或有线通信以交换数据。虽然图6示出了具有各种装置的终端设备600,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码,从而实现如上所述的页面跳转方法。在这样的实施例中,该计算机程序可以通过通信装置609从网络上被下载和安装,或者从存储装置608被安装,或者从ROM 602被安装。在该计算机程序被处理装置601执行时,执行本公开实施例的方法中限定的上述功能。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意 以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该终端设备执行时,使得该终端设备:获取待处理图像;将所述待处理图像输入至算法渲染复合系统中,获得处理后的图像,其中,所述算法渲染复合系统由算法系统中添加渲染节点得到,所述渲染节点用于对输入至该渲染节点的图像进行渲染;将所述处理后的图像发送至渲染系统中,利用所述渲染系统对所述处理后的图像进行渲染。
可选的,当上述一个或者多个程序被该终端设备执行时,该终端设备还可以执行上述实施例所述的其他步骤。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序 设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
根据本公开的一个或多个实施例,本公开提供了一种图像处理方法,包括:获取待处理图像;将所述待处理图像输入至算法渲染复合系统中,获得处理后的图像,其 中,所述算法渲染复合系统由算法系统中添加渲染节点得到,所述渲染节点用于对输入至该渲染节点的图像进行渲染;将所述处理后的图像发送至渲染系统中,利用所述渲染系统对所述处理后的图像进行渲染。
根据本公开的一个或多个实施例,本公开提供了一种图像处理方法,其中,所述渲染节点对输入至该渲染节点的图像进行渲染的操作由图像处理器GPU执行。
根据本公开的一个或多个实施例,本公开提供了一种图像处理方法,其中,所述算法渲染复合系统包括按照设定关系连接的算法节点和渲染节点,所述设定关系是指通过图配置确定的所述算法节点和所述渲染节点之间的先后依赖关系。
根据本公开的一个或多个实施例,本公开提供了一种图像处理方法,其中,所述算法节点用于对输入至该算法节点的图像运行相应算法,所述算法节点对输入至该算法节点的图像运行相应算法的操作由中央处理器CPU执行。
根据本公开的一个或多个实施例,本公开提供了一种图像处理方法,其中,所述渲染节点用于对输入至该渲染节点的图像进行渲染之后,将渲染得到的图片纹理转换成算法的表示形式、并发送至与该渲染节点连接的算法节点或渲染节点。
根据本公开的一个或多个实施例,本公开提供了一种图像处理方法,其中,所述渲染节点是定义了用于渲染的算法类型的节点,所述渲染节点可实例化多个子类。
根据本公开的一个或多个实施例,本公开提供了一种图像处理方法,其中,所述渲染节点作为一个独立的算法,动态注册到所述算法系统中,构成算法渲染复合系统。
根据本公开的一个或多个实施例,本公开提供了一种图像处理方法,其中,GPU执行渲染处理的具体过程由配置的渲染引擎确定。
根据本公开的一个或多个实施例,本公开提供了一种图像处理装置,包括:图像获取模块,用于获取待处理图像;图像处理模块,用于将所述待处理图像输入至算法渲染复合系统中,将所述待处理图像输入至算法渲染复合系统中,获得处理后的图像,其中,所述算法渲染复合系统由算法系统中添加渲染节点得到,所述渲染节点用于对输入至该渲染节点的图像进行渲染;图像渲染模块,用于将所述处理后的图像发送至渲染系统中,利用所述渲染系统对所述处理后的图像进行渲染。
根据本公开的一个或多个实施例,本公开提供了一种图像处理装置,包括:
存储器;以及
耦接至所述存储器的处理器,所述处理器被配置为基于存储在所述存储器中的指令,执行前述任意一种图像处理方法。
根据本公开的一个或多个实施例,本公开提供了一种图像处理系统,包括:
前述任意一种图像处理装置;以及
算法渲染复合系统,包括算法节点和渲染节点。
根据本公开的一个或多个实施例,本公开提供了一种图像处理系统,其中,所所述渲染节点对输入至该渲染节点的图像进行渲染的操作由图像处理器GPU执行。
根据本公开的一个或多个实施例,本公开提供了一种图像处理系统,其中,所述算法渲染复合系统包括按照设定关系连接的算法节点和渲染节点,所述设定关系是指通过图配置确定的所述算法节点和所述渲染节点之间的先后依赖关系。
根据本公开的一个或多个实施例,本公开提供了一种图像处理系统,其中,所述算法节点用于对输入至该算法节点的图像运行相应算法,所述算法节点对输入至该算法节点的图像运行相应算法的操作由中央处理器CPU执行。
根据本公开的一个或多个实施例,本公开提供了一种图像处理系统,其中,所述渲染节点用于对输入至该渲染节点的图像进行渲染之后,还包括:将渲染得到的图片纹理转换成算法的表示形式并发送至与该渲染节点连接的算法节点或渲染节点。
根据本公开的一个或多个实施例,本公开提供了一种图像处理系统,其中,所述渲染节点是预先定义的算法类型的节点,所述渲染节点可实例化多个子类。
根据本公开的一个或多个实施例,本公开提供了一种图像处理系统,其中,所述渲染节点作为一个独立的算法,动态注册到所述算法系统中,构成算法渲染复合系统。
根据本公开的一个或多个实施例,本公开提供了一种图像处理系统,其中,GPU执行渲染处理的具体过程由预先配置的渲染引擎确定。
根据本公开的一个或多个实施例,本公开提供了一种图像处理系统,还包括渲染系统。
根据本公开的一个或多个实施例,本公开提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本公开提供的任一所述的图像处理方法。
本公开实施例还提供了一种计算机程序产品,该计算机程序产品包括计算机程序或指令,该计算机程序或指令被处理器执行时实现如上所述的图像处理方法。
本公开实施例还提供了一种计算机程序,包括:
指令,所述指令当由处理器执行时使所述处理器执行前述任意一种图像处理方法。
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人 员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。

Claims (22)

  1. 一种图像处理方法,包括:
    获取待处理图像;
    将所述待处理图像输入至算法渲染复合系统中,获得处理后的图像,其中,所述算法渲染复合系统由算法系统中添加渲染节点得到,所述渲染节点用于对输入至该渲染节点的图像进行渲染;和
    将所述处理后的图像发送至渲染系统中,利用所述渲染系统对所述处理后的图像进行渲染。
  2. 根据权利要求1所述的图像处理方法,其中,所述渲染节点对输入至该渲染节点的图像进行渲染的操作由图像处理器GPU执行。
  3. 根据权利要求1或2所述的图像处理方法,其中,所述算法渲染复合系统包括按照设定关系连接的算法节点和渲染节点,所述设定关系是指通过图配置确定的所述算法节点和所述渲染节点之间的先后依赖关系。
  4. 根据权利要求3所述的图像处理方法,其中,所述算法节点用于对输入至该算法节点的图像运行相应算法,所述算法节点对输入至该算法节点的图像运行相应算法的操作由中央处理器CPU执行。
  5. 根据权利要求1~4中任一项所述的图像处理方法,其中,所述渲染节点用于对输入至该渲染节点的图像进行渲染之后,将渲染得到的图片纹理转换成算法的表示形式、并发送至与该渲染节点连接的算法节点或渲染节点。
  6. 根据权利要求1~5中任一项所述的图像处理方法,其中,所述渲染节点是定义了用于渲染的算法类型的节点,所述渲染节点可实例化多个子类。
  7. 根据权利要求1~6中任一项所述的图像处理方法,其中,所述渲染节点作为一个独立的算法,动态注册到所述算法系统中,构成算法渲染复合系统。
  8. 根据权利要求2~7中任一项所述的图像处理方法,其中,GPU执行渲染处理的具体过程由配置的渲染引擎确定。
  9. 一种图像处理装置,包括:
    图像获取模块,用于获取待处理图像;
    图像处理模块,用于将所述待处理图像输入至算法渲染复合系统中,获得处理后的图像,其中,所述算法渲染复合系统由算法系统中添加渲染节点得到,所述渲染节 点用于对输入至该渲染节点的图像进行渲染;
    图像渲染模块,用于将所述处理后的图像发送至渲染系统中,利用所述渲染系统对所述处理后的图像进行渲染。
  10. 一种图像处理装置,包括:
    存储器;以及
    耦接至所述存储器的处理器,所述处理器被配置为基于存储在所述存储器中的指令,执行如权利要求1-8中任一项所述的图像处理方法。
  11. 一种图像处理系统,包括:
    权利要求9或10所述的图像处理装置;以及
    算法渲染复合系统,包括算法节点和渲染节点。
  12. 根据权利要求11所述的图像处理系统,其中,所述渲染节点对输入至该渲染节点的图像进行渲染的操作由图像处理器GPU执行。
  13. 根据权利要求11或12所述的图像处理系统,其中,所述算法渲染复合系统包括按照设定关系连接的算法节点和渲染节点,所述设定关系是指通过图配置确定的所述算法节点和所述渲染节点之间的先后依赖关系。
  14. 根据权利要求13所述的图像处理系统,其中,所述算法节点用于对输入至该算法节点的图像运行相应算法,所述算法节点对输入至该算法节点的图像运行相应算法的操作由中央处理器CPU执行。
  15. 根据权利要求11~14中任一项所述的图像处理系统,其中,所述渲染节点用于对输入至该渲染节点的图像进行渲染之后,将渲染得到的图片纹理转换成算法的表示形式、并发送至与该渲染节点连接的算法节点或渲染节点。
  16. 根据权利要求11~15中任一项所述的图像处理系统,其中,所述渲染节点是定义了用于渲染的算法类型的节点,所述渲染节点可实例化多个子类。
  17. 根据权利要求11~16中任一项所述的图像处理系统,其中,所述渲染节点作为一个独立的算法,动态注册到所述算法系统中,构成算法渲染复合系统。
  18. 根据权利要求12~17中任一项所述的图像处理系统,其中,GPU执行渲染处理的具体过程由配置的渲染引擎确定。
  19. 根据权利要求11~18中任一项所述的图像处理系统,还包括:
    渲染系统。
  20. 一种计算机可读存储介质,其上存储有计算机程序,其中,该程序被处理器执 行时实现如权利要求1-8中任一项所述的图像处理方法。
  21. 一种计算机程序产品,该计算机程序产品包括计算机程序或指令,该计算机程序或指令被处理器执行时实现如权利要求1-8中任一项所述的图像处理方法。
  22. 一种计算机程序,包括:
    指令,所述指令当由处理器执行时使所述处理器执行根据权利要求1-8中任一项所述的图像处理方法。
PCT/CN2023/084719 2022-04-11 2023-03-29 图像处理方法、装置、系统和存储介质 WO2023197868A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210373968.3A CN116934943A (zh) 2022-04-11 2022-04-11 图像处理方法、装置、设备、存储介质和程序产品
CN202210373968.3 2022-04-11

Publications (1)

Publication Number Publication Date
WO2023197868A1 true WO2023197868A1 (zh) 2023-10-19

Family

ID=88328875

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/084719 WO2023197868A1 (zh) 2022-04-11 2023-03-29 图像处理方法、装置、系统和存储介质

Country Status (2)

Country Link
CN (1) CN116934943A (zh)
WO (1) WO2023197868A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019086765A1 (en) * 2017-11-06 2019-05-09 Basemark Oy Combined rendering and compute resource allocation management system
US20190139180A1 (en) * 2017-11-06 2019-05-09 Basemark Oy Graphics engine resource management and allocation system
CN110969685A (zh) * 2018-09-28 2020-04-07 苹果公司 使用渲染图的可定制渲染管线
CN114170364A (zh) * 2021-12-10 2022-03-11 北京字跳网络技术有限公司 一种渲染流程确定方法、装置及电子设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019086765A1 (en) * 2017-11-06 2019-05-09 Basemark Oy Combined rendering and compute resource allocation management system
US20190139180A1 (en) * 2017-11-06 2019-05-09 Basemark Oy Graphics engine resource management and allocation system
CN110969685A (zh) * 2018-09-28 2020-04-07 苹果公司 使用渲染图的可定制渲染管线
CN114170364A (zh) * 2021-12-10 2022-03-11 北京字跳网络技术有限公司 一种渲染流程确定方法、装置及电子设备

Also Published As

Publication number Publication date
CN116934943A (zh) 2023-10-24

Similar Documents

Publication Publication Date Title
WO2021103479A1 (zh) 用于训练深度学习模型的方法和装置
CN112286529B (zh) 前端页面的开发方法、装置、设备及存储介质
CN110070496B (zh) 图像特效的生成方法、装置和硬件装置
US20220241689A1 (en) Game Character Rendering Method And Apparatus, Electronic Device, And Computer-Readable Medium
WO2021197024A1 (zh) 视频特效配置文件生成方法、视频渲染方法及装置
US11818491B2 (en) Image special effect configuration method, image recognition method, apparatus and electronic device
CN114035879A (zh) 页面主题色更换方法、装置、电子设备和计算机可读介质
JP7471510B2 (ja) ピクチャのビデオへの変換の方法、装置、機器および記憶媒体
CN112418389A (zh) 数据处理方法、装置、电子设备及计算机可读存储介质
WO2024061064A1 (zh) 展示效果处理方法、装置、电子设备及存储介质
WO2023197868A1 (zh) 图像处理方法、装置、系统和存储介质
CN110704050B (zh) 模块初始化方法、装置、电子设备及计算机可读存储介质
WO2023221941A1 (zh) 图像处理方法、装置、设备及存储介质
US11962929B2 (en) Method, apparatus, and device for configuring video special effect, and storage medium
WO2023056841A1 (zh) 一种数据服务方法、装置及相关产品
CN116360971A (zh) 基于异构计算框架的处理方法、装置、设备及介质
CN111399902B (zh) 客户端源文件处理方法、装置、可读介质与电子设备
CN114647472B (zh) 图片处理方法、装置、设备、存储介质和程序产品
CN114651237A (zh) 数据处理方法、装置、电子设备及计算机可读存储介质
WO2023098609A1 (zh) 图像特效包的生成方法、装置、设备及存储介质
WO2023125163A1 (zh) 一种图像特效处理方法、装置、设备及介质
CN116319322B (zh) 电力设备节点通信连接方法、装置、设备和计算机介质
WO2021018176A1 (zh) 文字特效处理方法及装置
WO2023191710A1 (zh) 端云协同的媒体数据处理方法、装置、设备及存储介质
CN118276987A (zh) 虚拟人集成中的驱动方法、装置及可读存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23787514

Country of ref document: EP

Kind code of ref document: A1