[go: up one dir, main page]

WO2025161697A1 - Method and apparatus for special-effects generation, and device and storage medium - Google Patents

Method and apparatus for special-effects generation, and device and storage medium

Info

Publication number
WO2025161697A1
WO2025161697A1 PCT/CN2024/137861 CN2024137861W WO2025161697A1 WO 2025161697 A1 WO2025161697 A1 WO 2025161697A1 CN 2024137861 W CN2024137861 W CN 2024137861W WO 2025161697 A1 WO2025161697 A1 WO 2025161697A1
Authority
WO
WIPO (PCT)
Prior art keywords
special effect
effect image
image sequence
special
effects
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
PCT/CN2024/137861
Other languages
French (fr)
Chinese (zh)
Inventor
陈启超
郑叶欣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network Technology Co Ltd
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 Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Publication of WO2025161697A1 publication Critical patent/WO2025161697A1/en
Pending legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence

Definitions

  • Example embodiments of the present disclosure generally relate to the field of computers, and more particularly, to methods, devices, apparatuses, and computer-readable storage media for generating special effects.
  • a method for generating special effects comprises: obtaining a special effects image sequence, the special effects image sequence comprising one or more special effects images for applying a special effects style; performing redundancy detection on the special effects image sequence to detect at least one special effects image and/or at least one image region that is redundant in a feature image sequence; encoding image information of the special effects image sequence based on the redundancy of the at least one special effects image and/or at least one image region to obtain an encoding result corresponding to the special effects image sequence; and generating a special effects package corresponding to the special effects style based at least on the encoding result.
  • a device for generating special effects includes: an acquisition module configured to acquire a special effect image sequence, the special effect image sequence including one or more special effect images for applying a special effect style; a detection module configured to perform redundancy detection on the special effect image sequence to detect at least one redundant special effect image and/or at least one image region in a feature image sequence; an encoding module configured to encode image information of the special effect image sequence based on the redundancy of the at least one special effect image and/or at least one image region to obtain an encoding result corresponding to the special effect image sequence; and a generation module configured to generate a special effect package corresponding to the special effect style based at least on the encoding result.
  • an electronic device in a third aspect of the present disclosure, includes at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit. When executed by the at least one processing unit, the instructions cause the device to perform the method of the first aspect.
  • a computer-readable storage medium wherein a computer program is stored on the computer-readable storage medium, and the computer program can be executed by a processor to implement the method of the first aspect.
  • a computer program product is provided, which is tangibly stored in a computer storage medium and includes computer-executable instructions, which, when executed by a device, cause the device to perform the method of the first aspect.
  • FIG1 shows a schematic diagram of an example environment in which embodiments of the present disclosure can be implemented
  • FIG2 is a schematic diagram showing an example architecture for special effect generation according to some embodiments of the present disclosure
  • 3A to 3C are schematic diagrams illustrating redundant special effect images in a special effect image sequence according to some embodiments of the present disclosure
  • 4A to 4C are schematic diagrams showing redundant special effect images in a special effect image sequence according to other embodiments of the present disclosure.
  • 5A to 5D are schematic diagrams showing redundant image regions in a special effect image sequence according to some embodiments of the present disclosure.
  • FIG6 shows a flowchart of a process of special effect interaction according to some embodiments of the present disclosure
  • FIG7 shows a block diagram of an apparatus for generating special effects according to some embodiments of the present disclosure.
  • FIG8 illustrates a block diagram of an electronic device in which one or more embodiments of the present disclosure may be implemented.
  • the term “including” and similar terms should be understood as open inclusion, i.e., “including but not limited to.”
  • the term “based on” should be understood as “based at least in part on.”
  • the term “one embodiment” or “the embodiment” should be understood as “at least one embodiment.”
  • the term “some embodiments” should be understood as “at least some embodiments.”
  • Other explicit and implicit definitions may be included below.
  • executing a step “in response to A” does not mean executing the step immediately after “A” but may include one or more intermediate steps.
  • model can learn the association between corresponding inputs and outputs from training data, so that after training is completed, corresponding outputs can be generated for given inputs.
  • the generation of the model can be based on machine learning technology. Deep learning is a machine learning algorithm that processes inputs and provides corresponding outputs by using multiple layers of processing units.
  • model may also be referred to as “machine learning model”, “machine learning network” or “network”, and these terms are used interchangeably in this article.
  • a model can also include different types of processing units or networks.
  • a prompt message is sent to the user to clearly remind the user that the operation requested to be performed will require obtaining and using the user's personal information, so that the user can independently choose whether to provide personal information to the electronic device, application, server or storage medium and other software or hardware that performs the operation of the technical solution of the present disclosure based on the prompt message.
  • a prompt message in response to receiving a user's active request, may be sent to the user, for example, in the form of a pop-up window, in which the prompt message may be presented in text form.
  • the pop-up window may also include a selection control for the user to select "agree” or “disagree” to provide personal information to the electronic device.
  • FIG1 shows a schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented.
  • an application 120 is installed in a terminal device 110.
  • a user 140 can interact with the application 120 via the terminal device 110 and/or a device attached to the terminal device 110.
  • the terminal device 110 communicates with a server device 130 to provide services for the application 120.
  • a terminal device 105 communicates with a server device 130 , and an application 125 is installed in the terminal device 105 .
  • a user 135 can interact with the application 125 via the terminal device 105 and/or an attached device of the terminal device 105 .
  • application 125 may be a special effects editing application that can provide various services related to special effects content editing to user 135.
  • application 125 includes an editor.
  • Server device 130 can use application 125 to provide services for application 120 installed on terminal device 110.
  • server device 130 can use application 125 to generate a special effects package corresponding to a special effects style and provide services to application 120 installed on terminal device 110.
  • the user 135 may be referred to as a special effects design user or designer.
  • the application 125 may be deployed locally on the terminal device of the user 135 and/or may be supported by the server device 130.
  • the terminal device of the user 135 may be running a client of the application 125, which may support the interaction between the user and the application 125 provided by the server device 130.
  • the server device 130 may implement service provision for the client running in the terminal device based on the communication connection with the terminal device.
  • the application 125 may present a corresponding page 145 to the user 135 based on the operation of the user 135 to output and/or receive information related to special effects editing to the user 135 and/or from the user 135.
  • application 120 may be a content sharing application (e.g., a video application primarily focused on video sharing) that can provide various services related to media content items to user 140, including browsing, commenting, forwarding, creation (e.g., filming and/or editing), and publishing of content.
  • application 120 may also be any other appropriate application that can display media content items.
  • Page 150 may include various pages provided by application 120, such as a content presentation page, a content creation page, a content publishing page, a message page, a personal homepage, and so on.
  • Application 120 may provide a content viewing function to view various types of content published in application 120.
  • user 140 may also use a generated special effects package to create various types of content.
  • User 140 may be referred to as a special effects user or special effects user.
  • the terminal device 105 or 110 can be any type of mobile terminal, fixed terminal or portable terminal, including a mobile phone, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a media computer, a multimedia tablet, a personal communication system (PCS) device, a personal navigation device, a personal digital assistant (PDA), an audio/video player, a digital camera/camcorder, a positioning device, a television receiver, a radio broadcast receiver, an e-book device, a gaming device or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof.
  • a mobile phone a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a media computer, a multimedia tablet, a personal communication system (PCS) device, a personal navigation device, a personal digital assistant (PDA), an audio/video player, a digital camera/camcorder, a positioning device, a television receiver, a radio broadcast receiver, an
  • the terminal device 105 or 110 can also support any type of interface for the user (such as a "wearable" circuit, etc.).
  • the server device 130 can be various types of computing systems/servers that can provide computing capabilities, including but not limited to mainframes, edge computing nodes, computing devices in cloud environments, and the like.
  • Decoding refers to restoring compressed image files such as png and jpg into ordinary pixel textures that can be directly read by the graphics processing unit (GPU) hardware according to the decompression algorithm and saving them in the system memory/video memory.
  • Post-processing is to sample the pixel texture in the GPU and calculate the final pixel value according to the special effect design to display it on the screen. For example, each frame decompresses an image and displays it at a specified position on the screen. Several consecutive frames in this area can form an animation effect.
  • texture compression technology Adaptive scalable texture compression, ASTC for short
  • ASTC Adaptive scalable texture compression
  • an improved special effects generation scheme is proposed.
  • a special effects image sequence including one or more special effects images for applying a special effects style is obtained. Redundancy detection is performed on the special effects image sequence to detect at least one special effects image and/or at least one image area that is redundant in the feature image sequence. Based on the redundancy of at least one special effects image and/or at least one image area, the image information of the special effects image sequence is encoded to obtain an encoding result corresponding to the special effects image sequence. Then, a special effects package corresponding to the special effects style is generated at least based on the encoding result. In this way, memory consumption and computational complexity can be reduced, thereby improving the efficiency of generating special effects packages corresponding to special effects styles and reducing costs.
  • FIG2 shows a schematic diagram of an example architecture 200 for special effect generation according to some embodiments of the present disclosure. For ease of discussion, these embodiments will be described with reference to the environment 100 of FIG1 .
  • a user 135 e.g., a special effects designer
  • designs a special effects image sequence based on an editor 212 in a terminal device 105, and encodes the special effects image sequence to obtain a special effects package 213.
  • the special effects package 213 can be provided to a server device 130 or a terminal device 110.
  • the server device 130 or the terminal device 110 decodes and renders the special effects image sequence from the special effects package 213 based on a rendering engine and algorithm engine layer 215.
  • the hardware 216 is used to support the editing and encoding of special effects image sequences, and the decoding and rendering of special effects image sequences.
  • the editor 212 and part of the hardware layer 216 can be included on the special effects design side, such as in the application 125 of the terminal device 105.
  • the rendering engine and algorithm engine layer 215 and part of the hardware layer 216 can be included on the special effects application side, such as in the terminal device 110.
  • the material optimization module 214 is configured to perform the optimization operation for special effect generation proposed in the embodiments of the present disclosure.
  • the material optimization module 214 can be implemented in various appropriate devices.
  • the material optimization module 214 can be implemented in the application 125.
  • the material optimization module 214 can be implemented together with the editor 212 at the terminal device 105, so that the designed special effects can be optimized and packaged during the special effects design process.
  • the material optimization module 214 can be integrated into the editor 212 as part of the editor 212.
  • the material optimization module 214 can be integrated into the server device 130. In this way, the special effects being designed can be optimized and packaged during the special effects design process of the terminal device 105, and the special effects packages that have been generated can also be optimized and repackaged.
  • the material optimization module 214 may be implemented in the terminal device 105. In this way, before the special effect package is applied, the special effect package may be optimized and repackaged, and then the repackaged special effect package may be used to perform special effect rendering.
  • the following first describes the overall process of the material optimization module 214 being configured to perform the optimization operation for special effect generation proposed in the embodiment of the present disclosure with reference to FIG1 and FIG2 .
  • the material optimization module 214 first performs redundancy detection. If the server device 130 finds that there is at least one redundant special effect image and/or at least one image area (for example, redundant image material) in the special effect image sequence based on the material optimization module 214, redundancy optimization processing is performed in the redundancy optimization module 218.
  • the redundancy optimization module 218 includes redundant area cropping 218-1, redundant area replacement 218-2, etc. After the server device 130 performs redundancy optimization on the special effect image sequence based on the material optimization module 214, the corresponding size and organizational form of the special effect image sequence will change.
  • the server device 130 performs corresponding reconfiguration of the rendering parameters based on the rendering parameter reconfiguration module 219.
  • the server device 130 packages the reconfigured rendering parameters based on the repackaging module 220, and outputs the modified special effects package.
  • the server device 130 When performing material optimization, the server device 130 obtains a special effect image sequence, which includes one or more special effect images for applying a special effect style. Each special effect image is also called a special effect frame. In some examples, the server device 130 obtains a special effect image sequence including one or more special effect images for applying a special effect style from the terminal device 110.
  • the server device 130 performs redundancy detection on the special effect image sequence to detect at least one redundant special effect image and at least one redundant image region in the feature image sequence. In some examples, the server device 130 performs redundancy detection on the special effect image sequence via the material optimization module 214. It will be appreciated that the material optimization module 214 can be applied to both static special effects (including a single special effect image) and dynamic special effects (e.g., special effect animations).
  • the server device 130 can perform redundancy detection on the special effect image sequence through the material optimization module 214 to detect at least one redundant special effect image and at least one image region in the feature image sequence.
  • the embodiments of the present disclosure are described below with reference to Figures 3A to 3C, Figures 4A to 4C, and Figures 5A to 5D, illustrating schematic diagrams corresponding to the detection of redundant special effect images and image regions in the present disclosure. However, this is merely exemplary and is not a limitation of the present disclosure.
  • Figures 3A to 3C illustrate schematic diagrams of redundant special effect images in a special effect image sequence according to some embodiments of the present disclosure.
  • the server device 130 through the material optimization module 214, performs redundancy detection on the special effect image sequence to detect at least one redundant special effect image in the special effect image sequence.
  • schematic diagram 301 shown in Figure 3A, schematic diagram 302 shown in Figure 3B, and schematic diagram 303 shown in Figure 3C illustrate redundant special effect images in the special effect image sequence, such as black images in the special effect image sequence.
  • Figures 4A to 4C illustrate schematic diagrams of redundant special effect images in a special effect image sequence according to other embodiments of the present disclosure.
  • the server device 130 through the material optimization module 214, performs redundancy detection on the special effect image sequence to detect at least one redundant special effect image in the special effect image sequence.
  • schematic diagram 401 shown in Figure 4A, schematic diagram 402 shown in Figure 4B, and schematic diagram 403 shown in Figure 4C illustrate redundant special effect images in the special effect image sequence, such as duplicate images in the special effect image sequence.
  • Figures 5A to 5D are schematic diagrams showing redundant image areas in a special effects image sequence according to some embodiments of the present disclosure.
  • the server-side device 130 performs redundancy detection on the special effects image sequence through the material optimization module 214 to detect at least one redundant image area in the special effects image sequence.
  • schematic diagram 501 shown in Figure 5A, schematic diagram 502 shown in Figure 5B, schematic diagram 503 shown in Figure 5C, and schematic diagram 504 shown in Figure 5D are redundant image areas in the special effects image sequence.
  • the effective picture in the special effects image sequence is only in the lower half.
  • the effective picture is in interface 510.
  • the effective picture is in interface 520.
  • the effective picture is in interface 530.
  • the effective picture is in interface 540.
  • the server device 130 encodes the image information of the special effect image sequence based on the redundancy of at least one special effect image and/or at least one image region. Furthermore, the server device 130 determines an encoding result corresponding to the special effect image sequence. Based on the encoding result, the server device 130 generates a special effect package corresponding to the special effect style.
  • the server device 130 configures rendering parameters for each special effect image in the special effect image sequence based at least on the encoding result of the special effect image sequence.
  • the server device 130 generates a special effect package corresponding to the special effect style based on the encoding result and the rendering parameters.
  • the server device 130 performs redundant optimization on the special effects image sequence based on the material optimization module 214, the size and organization of the special effects image sequence will change. Therefore, in the special effects package corresponding to the special effects style, the parameters must be reconfigured when referencing them. For example, the algorithm in the prop package references the pixel at the upper left corner of frame 1. After optimization, the pixel at this position disappears. In this case, the rendering parameters are modified so that the rendering starts sampling from the middle position, and the parameters at the upper half are required to be assigned a default value (0, 0, 0). The rendering parameters (reference position) are included in the configuration file of the special effects package.
  • the material optimization module 214 can be integrated into the special effects editor 212.
  • the generated special effects package also called a prop package
  • the material optimization module 214 can be configured between the editor 212 and the rendering/algorithm engine layer 215.
  • the special effects are packaged based on the existing scheme to obtain the corresponding special effects package.
  • the material optimization module 214 performs optimization on the basis of the existing special effects package, and provides the optimized special effects package for rendering and output by the rendering/algorithm engine layer 215. If it is a special effects package that has been generated, the material optimization module 214 can also perform batch detection and automatic optimization according to the above-mentioned optimization steps.
  • the server device 130 performs monochrome detection on each special effect image in the special effect image sequence to detect whether there are image regions with the same color in each special effect image. In some examples, the server device 130 performs monochrome detection on each special effect image in the special effect image sequence based on the monochrome detection module 217-1 in the redundancy detection module 217 in the material optimization module 214.
  • the server device 130 may perform monochrome detection on each special effect image in the special effect image sequence in the following manner: the server device 130 slides a first sliding window of a predetermined area shape across each special effect image in the special effect image sequence, and then determines whether the image blocks defined by the first window have the same color.
  • server device 130 detects the special effect image sequence using a first sliding window of a block-like region.
  • the first sliding window of the block-like region is 64*64, and determines whether there are images of the same color within the image blocks defined by the window. By sliding the first sliding window sequentially across the special effect image, image blocks of the same color detected in successive sliding windows are identified as first image regions with monochromatic redundancy.
  • the server device 130 encodes the first image region based on the single pixel value corresponding to the color of the first image region.
  • the encoding result refers to the range of the first image region in the first special effect image, and also refers to the encoding result of the single pixel value applied to the first image region.
  • all pixels in the region can be represented by a single pixel value c(r, g, b, a). If the entire special effect image is a single color value, the special effect image can be represented by only a single pixel value.
  • the server device 130 encodes a single pixel value in the first image area and records the range (L, T, R, B) of the single pixel value in the original special effect image. For example, if the first image area has the same color, the server device 130 encodes the single pixel value. Then, the server device 130 directly references the encoded single pixel value for other pixel values contained in the image of the same color.
  • the server device 130 performs inter-frame duplication detection on each special effect image in the special effect image sequence based on the inter-frame duplication detection module 217 - 2 in the redundancy detection module 217 in the material optimization module 214 .
  • the server device 130 may perform inter-frame duplication detection on each special effect image in the special effect image sequence in the following manner. In some embodiments, the server device 130 determines whether corresponding pixel positions of at least two consecutive special effect images in the special effect image sequence have the same pixel value. The server device 130 then determines that redundancy exists between the at least two consecutive special effect images based on the determination that the corresponding pixel positions of the at least two consecutive special effect images have the same pixel value.
  • the server device 130 slides a second sliding window through the special effect image sequence to determine whether at least two consecutive special effect images defined in the second sliding window are identical. For example, for scenes such as sequential frame animation, the server device 130 uses the second sliding window to compare pixel values of preceding and following frames to determine whether at least two consecutive special effect images defined in the second sliding window are identical. By sliding the second sliding window sequentially, identical special effect images detected in consecutive sliding windows are determined to be a group of special effect images with inter-frame redundancy.
  • encoding is performed on a single special effect image from the at least two consecutive special effect images.
  • the encoding result may indicate the positions of the at least two consecutive special effect images in the special effect image sequence, and may also indicate that the encoding result of the single special effect image is applied to decode the at least two consecutive special effect images.
  • the server device 130 determines that at least two consecutive special effect images are redundant, only a single special effect image from the at least two consecutive special effect images is retained and the frame information of the image is recorded. For example, for other special effect images that have the same color as the image corresponding to the single pixel value being encoded in the at least two consecutive special effect images defined by the second sliding window, the server device 130 directly references the encoded single pixel value.
  • the embodiments of the present disclosure can reduce memory consumption and computational complexity, thereby improving the efficiency of generating special effects packages corresponding to special effects styles and reducing costs.
  • FIG6 shows a flow chart of a process 600 of special effect interaction according to some embodiments of the present disclosure.
  • the process 600 may be implemented at the server device 130.
  • the process 600 is described below with reference to FIG1.
  • the server device 130 obtains a special effect image sequence, where the special effect image sequence includes one or more special effect images for applying a special effect style.
  • the server device 130 performs redundancy detection on the special effect image sequence to detect at least one special effect image and/or at least one image region that is redundant in the feature image sequence.
  • the server device 130 encodes the image information of the special effect image sequence based on the redundancy of at least one special effect image and/or at least one image region to obtain an encoding result corresponding to the special effect image sequence.
  • the server device 130 generates a special effect package corresponding to the special effect style based at least on the encoding result.
  • performing redundancy detection on the special effect image sequence includes performing monochrome detection on each special effect image in the special effect image sequence to detect whether there is an image region with the same color in each special effect image.
  • performing monochrome detection on each special effect image in the special effect image sequence includes: sliding a first sliding window with a predetermined area shape in each special effect image in the special effect image sequence, and determining whether an image block defined by the first sliding window has the same color.
  • encoding image information of the special effect image sequence includes: if a first image region having the same color is detected from a first special effect image in the special effect image sequence, encoding the first image region based on a single pixel value corresponding to the color of the first image region, wherein the encoding result indicates a range of the first image region in the first special effect image and further indicates that the encoding result of the single pixel value is applied to the first image region.
  • performing redundancy detection on the special effect image sequence includes: determining whether corresponding pixel positions of at least two consecutive special effect images in the special effect image sequence have the same pixel value; and determining that redundancy exists between the at least two consecutive special effect images based on determining that the corresponding pixel positions of the at least two consecutive special effect images have the same pixel value.
  • determining whether at least two consecutive special effect images in the special effect image sequence are identical includes sliding a second sliding window in the special effect image sequence to determine whether at least two consecutive special effect images defined in the second sliding window are identical.
  • encoding image information of a special effect image sequence includes: if it is determined that redundancy exists between at least two consecutive special effect images, encoding a single special effect image from the at least two consecutive special effect images, wherein the encoding result indicates positions of the at least two consecutive special effect images in the special effect image sequence and further indicates that the encoding result of the single special effect image is applied to decoding the at least two consecutive special effect images.
  • generating a special effects package corresponding to a special effects style based at least on the encoding results includes: configuring rendering parameters for each special effects image in a special effects image sequence based at least on the encoding results; and generating a special effects package including at least the encoding results and the rendering parameters.
  • Apparatus 700 may be implemented as or included in server device 130.
  • Each module/component in apparatus 700 may be implemented by hardware, software, firmware, or any combination thereof.
  • the apparatus 700 includes an acquisition module 710 configured to acquire a special effect image sequence, where the special effect image sequence includes one or more special effect images for applying a special effect style.
  • the apparatus 700 further includes a detection module 720 configured to perform redundancy detection on the special effect image sequence to detect at least one special effect image and/or at least one image region that is redundant in the feature image sequence.
  • a detection module 720 configured to perform redundancy detection on the special effect image sequence to detect at least one special effect image and/or at least one image region that is redundant in the feature image sequence.
  • the apparatus 700 further includes an encoding module 730 configured to encode image information of a special effect image sequence based on redundancy of at least one special effect image and/or at least one image region to obtain an encoding result corresponding to the special effect image sequence.
  • an encoding module 730 configured to encode image information of a special effect image sequence based on redundancy of at least one special effect image and/or at least one image region to obtain an encoding result corresponding to the special effect image sequence.
  • the apparatus 700 further includes a generating module 740 configured to generate a special effect package corresponding to the special effect style based at least on the encoding result.
  • the detection module 720 is further configured to perform monochrome detection on each special effect image in the special effect image sequence to detect whether there is an image region with the same color in each special effect image.
  • the detection module 720 is further configured to slide a first sliding window of a predetermined area shape in each special effect image in the special effect image sequence to determine whether the image blocks defined by the first sliding window have the same color.
  • the encoding module 730 is further configured to, if a first image area having the same color is detected from a first special effect image in the special effect image sequence, perform encoding on the first image area based on a single pixel value corresponding to the color of the first image area, wherein the encoding result indicates a range of the first image area in the first special effect image, and further indicates that the encoding result of the single pixel value is applied to the first image area.
  • the detection module 720 is further configured to determine whether corresponding pixel positions of at least two consecutive special effect images in the special effect image sequence have the same pixel value; and determine that redundancy exists in the at least two consecutive special effect images based on determining that the corresponding pixel positions of the at least two consecutive special effect images have the same pixel value.
  • the detection module 720 further includes a determination module configured to slide the special effect image sequence according to the second sliding window to determine whether at least two consecutive special effect images defined in the second sliding window are identical.
  • the encoding module 730 is further configured to, if it is determined that redundancy exists between the at least two consecutive special effect images, perform encoding on a single special effect image among the at least two consecutive special effect images, wherein the encoding result indicates positions of the at least two consecutive special effect images in the special effect image sequence, and further indicates that the encoding result of the single special effect image is applied to decoding the at least two consecutive special effect images.
  • the generation module 740 is further configured to configure rendering parameters for each special effect image in the special effect image sequence based at least on the encoding result; and generate a special effect package including at least the encoding result and the rendering parameters.
  • FIG8 illustrates a block diagram of an electronic device 800 in which one or more embodiments of the present disclosure may be implemented. It should be understood that the electronic device 800 shown in FIG8 is merely exemplary and should not be construed as limiting the functionality and scope of the embodiments described herein. The electronic device 800 shown in FIG8 may be used to implement the server device 130 of FIG1 or the apparatus 700 of FIG7 .
  • electronic device 800 is a general-purpose electronic device.
  • Components of electronic device 800 may include, but are not limited to, one or more processors or processing units 810, memory 820, storage device 830, one or more communication units 840, one or more input devices 850, and one or more output devices 860.
  • Processing unit 810 may be a real or virtual processor and is capable of performing various processes according to programs stored in memory 820. In a multi-processor system, multiple processing units execute computer-executable instructions in parallel to enhance the parallel processing capabilities of electronic device 800.
  • the electronic device 800 typically includes a plurality of computer storage media. Such media can be any accessible media that can be obtained by the electronic device 800, including but not limited to volatile and non-volatile media, removable and non-removable media.
  • the memory 820 can be a volatile memory (e.g., a register, a cache, a random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof.
  • the storage device 830 can be a removable or non-removable medium and can include a machine-readable medium, such as a flash drive, a disk, or any other medium that can be used to store information and/or data (e.g., training data for training) and can be accessed within the electronic device 800.
  • a machine-readable medium such as a flash drive, a disk, or any other medium that can be used to store information and/or data (e.g., training data for training) and can be accessed within the electronic device 800.
  • the electronic device 800 may further include additional removable/non-removable, volatile/non-volatile storage media.
  • a disk drive for reading from or writing to a removable, non-volatile disk (e.g., a “floppy disk”) and an optical drive for reading from or writing to a removable, non-volatile optical disk may be provided.
  • each drive may be connected to a bus (not shown) by one or more data media interfaces.
  • the memory 820 may include a computer program product 825 having one or more program modules configured to perform various methods or actions of various embodiments of the present disclosure.
  • the communication unit 840 enables communication with other electronic devices via a communication medium. Additionally, the functions of the components of the electronic device 800 can be implemented in a single computing cluster or multiple computing machines that can communicate via a communication connection. Thus, the electronic device 800 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.
  • PC network personal computer
  • the input device 850 may be one or more input devices, such as a mouse, keyboard, or trackball.
  • the output device 860 may be one or more output devices, such as a display, a speaker, or a printer.
  • the electronic device 800 may also communicate with one or more external devices (not shown) via the communication unit 840 as needed, such as a storage device, a display device, or the like, with one or more devices that allow a user to interact with the electronic device 800, or with any device that allows the electronic device 800 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input/output (I/O) interface (not shown).
  • I/O input/output
  • a computer-readable storage medium on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above.
  • a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.
  • These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, such that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device is generated that implements the functions/actions specified in one or more blocks in the flowchart and/or block diagram.
  • These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and/or other device to operate in a specific manner.
  • the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions/actions specified in one or more blocks in the flowchart and/or block diagram.
  • Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions/actions specified in one or more boxes in the flowchart and/or block diagram.
  • each box in the flow chart or block diagram can represent a part for a module, program segment or instruction, and a part for a module, program segment or instruction comprises one or more executable instructions for realizing the logical function of the specification.
  • the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved.
  • each box in the block diagram and/or flow chart, and the combination of the boxes in the block diagram and/or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Multimedia (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

According to the embodiments of the present disclosure, provided are a method and apparatus for special-effects generation, and a device and a storage medium. The method comprises: acquiring a special-effects image sequence, wherein the special-effects image sequence comprises one or more special-effects images for applying a special-effects style; executing redundancy detection on the special-effects image sequence, in order to detect at least one special-effects image and/or at least one image region having redundancy in a feature image sequence; on the basis of the redundancy in the at least one special-effects image and/or the at least one image region, executing encoding on image information of the special-effects image sequence to obtain an encoding result corresponding to the special-effects image sequence; and at least on the basis of the encoding result, generating a special-effects package corresponding to the special-effects style. Thus, the memory consumption and the computational load can be reduced, thereby improving the efficiency of generating a special-effects package corresponding to a special-effects style, and reducing the cost.

Description

用于特效生成的方法、装置、设备和存储介质Method, device, equipment and storage medium for special effect generation

本申请要求2024年02月02日递交的、标题为“用于特效生成的方法、装置、设备和存储介质”、申请号为202410153962.4的中国发明专利申请的优先权,该申请的全部内容通过引用结合在本申请中。This application claims priority to the Chinese invention patent application entitled “Method, device, apparatus and storage medium for special effects generation” filed on February 2, 2024, with application number 202410153962.4, the entire contents of which are incorporated by reference into this application.

技术领域Technical Field

本公开的示例实施例总体涉及计算机领域,特别地涉及用于特效生成的方法、装置、设备和计算机可读存储介质。Example embodiments of the present disclosure generally relate to the field of computers, and more particularly, to methods, devices, apparatuses, and computer-readable storage media for generating special effects.

背景技术Background Art

当前越来越多应用被设计来向用户提供各种服务。例如,用户可以在应用中发布、浏览、查看各类内容,包括诸如视频、图像、图像集、声音等多媒体内容。用户还可以在应用中对图像使用特效风格。在一些应用中,有些特效风格对应的特效包的生成会在服务端设备处执行,服务端设备受到功耗和算力的限制会影响用户体验。因此,期望能够提升用户体验感。Currently, more and more applications are designed to provide various services to users. For example, users can publish, browse, and view various types of content within applications, including multimedia content such as videos, images, image collections, and sounds. Users can also apply special effects styles to images within applications. In some applications, the generation of special effects packages corresponding to certain special effects styles is performed on the server device. However, server-side devices are limited by power consumption and computing power, which can affect the user experience. Therefore, it is desirable to improve the user experience.

发明内容Summary of the Invention

在本公开的第一方面,提供了一种特效生成的方法。该方法包括:获取特效图像序列,特效图像序列包括用于施加特效风格的一个或多个特效图像;对特效图像序列执行冗余检测,以检测特征图像序列中存在冗余的至少一个特效图像和/或至少一个图像区域;基于至少一个特效图像和/或至少一个图像区域的冗余,对特效图像序列的图像信息执行编码,得到特效图像序列对应的编码结果;以及至少基于编码结果来生成特效风格对应的特效包。In a first aspect of the present disclosure, a method for generating special effects is provided. The method comprises: obtaining a special effects image sequence, the special effects image sequence comprising one or more special effects images for applying a special effects style; performing redundancy detection on the special effects image sequence to detect at least one special effects image and/or at least one image region that is redundant in a feature image sequence; encoding image information of the special effects image sequence based on the redundancy of the at least one special effects image and/or at least one image region to obtain an encoding result corresponding to the special effects image sequence; and generating a special effects package corresponding to the special effects style based at least on the encoding result.

在本公开的第二方面,提供了一种用于特效生成的装置。该装置包括:获取模块,被配置为获取特效图像序列,特效图像序列包括用于施加特效风格的一个或多个特效图像;检测模块,被配置为对特效图像序列执行冗余检测,以检测特征图像序列中存在冗余的至少一个特效图像和/或至少一个图像区域;编码模块,被配置为基于至少一个特效图像和/或至少一个图像区域的冗余,对特效图像序列的图像信息执行编码,得到特效图像序列对应的编码结果;以及生成模块,被配置为至少基于编码结果来生成特效风格对应的特效包。In a second aspect of the present disclosure, a device for generating special effects is provided. The device includes: an acquisition module configured to acquire a special effect image sequence, the special effect image sequence including one or more special effect images for applying a special effect style; a detection module configured to perform redundancy detection on the special effect image sequence to detect at least one redundant special effect image and/or at least one image region in a feature image sequence; an encoding module configured to encode image information of the special effect image sequence based on the redundancy of the at least one special effect image and/or at least one image region to obtain an encoding result corresponding to the special effect image sequence; and a generation module configured to generate a special effect package corresponding to the special effect style based at least on the encoding result.

在本公开的第三方面,提供了一种电子设备。该设备包括至少一个处理单元;以及至少一个存储器,至少一个存储器被耦合到至少一个处理单元并且存储用于由至少一个处理单元执行的指令。指令在由至少一个处理单元执行时使设备执行第一方面的方法。In a third aspect of the present disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit. When executed by the at least one processing unit, the instructions cause the device to perform the method of the first aspect.

在本公开的第四方面,提供了一种计算机可读存储介质。该计算机可读存储介质上存储有计算机程序,计算机程序可由处理器执行以实现第一方面的方法。In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the computer-readable storage medium, and the computer program can be executed by a processor to implement the method of the first aspect.

在本公开的第五方面,提供了一种计算机程序产品。计算机程序产品被有形地存储在计算机存储介质中并且包括计算机可执行指令,计算机可执行指令在由设备执行时使设备执行第一方面的方法。In a fifth aspect of the present disclosure, a computer program product is provided, which is tangibly stored in a computer storage medium and includes computer-executable instructions, which, when executed by a device, cause the device to perform the method of the first aspect.

应当理解,本内容部分中所描述的内容并非旨在限定本公开的实施例的关键特征或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的描述而变得容易理解。It should be understood that the content described in this summary section is not intended to limit the key features or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

结合附图并参考以下详细说明,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。在附图中,相同或相似的附图标记表示相同或相似的元素,其中:The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:

图1示出了本公开的实施例能够在其中实现的示例环境的示意图;FIG1 shows a schematic diagram of an example environment in which embodiments of the present disclosure can be implemented;

图2示出了根据本公开的一些实施例的特效生成的示例架构的示意图;FIG2 is a schematic diagram showing an example architecture for special effect generation according to some embodiments of the present disclosure;

图3A至图3C示出了根据本公开的一些实施例的特效图像序列中存在冗余特效图像的示意图;3A to 3C are schematic diagrams illustrating redundant special effect images in a special effect image sequence according to some embodiments of the present disclosure;

图4A至图4C示出了根据本公开的另一些实施例的特效图像序列中存在冗余特效图像的示意图;4A to 4C are schematic diagrams showing redundant special effect images in a special effect image sequence according to other embodiments of the present disclosure;

图5A至图5D示出了根据本公开的一些实施例的特效图像序列中存在冗余的图像区域的示意图;5A to 5D are schematic diagrams showing redundant image regions in a special effect image sequence according to some embodiments of the present disclosure;

图6示出了根据本公开的一些实施例的特效交互的过程的流程图;FIG6 shows a flowchart of a process of special effect interaction according to some embodiments of the present disclosure;

图7示出了根据本公开的一些实施例的用于特效生成的装置的框图;以及FIG7 shows a block diagram of an apparatus for generating special effects according to some embodiments of the present disclosure; and

图8示出了其中可以实施本公开的一个或多个实施例的电子设备的框图。FIG8 illustrates a block diagram of an electronic device in which one or more embodiments of the present disclosure may be implemented.

具体实施方式DETAILED DESCRIPTION

下面将参照附图更详细地描述本公开的实施例。虽然附图中示出了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反,提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

在本公开的实施例的描述中,术语“包括”及其类似用语应当理解为开放性包含,即“包括但不限于”。术语“基于”应当理解为“至少部分地基于”。术语“一个实施例”或“该实施例”应当理解为“至少一个实施例”。术语“一些实施例”应当理解为“至少一些实施例”。下文还可能包括其他明确的和隐含的定义。In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, i.e., "including but not limited to." The term "based on" should be understood as "based at least in part on." The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment." The term "some embodiments" should be understood as "at least some embodiments." Other explicit and implicit definitions may be included below.

在本文中,除非明确说明,“响应于A”执行一个步骤并不意味着在“A”之后立即执行该步骤,而是可以包括一个或多个中间步骤。Herein, unless explicitly stated otherwise, executing a step “in response to A” does not mean executing the step immediately after “A” but may include one or more intermediate steps.

可以理解的是,本技术方案所涉及的数据(包括但不限于数据本身、数据的获得或使用)应当遵循相应法律法规及相关规定的要求。It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.

如本文中所使用的,术语“模型”可以从训练数据中学习到相应的输入与输出之间的关联,从而在训练完成后可以针对给定的输入,生成对应的输出。模型的生成可以基于机器学习技术。深度学习是一种机器学习算法,通过使用多层处理单元来处理输入和提供相应输出。在本文中,“模型”也可以被称为“机器学习模型”、“机器学习网络”或“网络”,这些术语在本文中可互换地使用。一个模型又可以包括不同类型的处理单元或网络。As used herein, the term "model" can learn the association between corresponding inputs and outputs from training data, so that after training is completed, corresponding outputs can be generated for given inputs. The generation of the model can be based on machine learning technology. Deep learning is a machine learning algorithm that processes inputs and provides corresponding outputs by using multiple layers of processing units. In this article, "model" may also be referred to as "machine learning model", "machine learning network" or "network", and these terms are used interchangeably in this article. A model can also include different types of processing units or networks.

可以理解的是,在使用本公开各实施例公开的技术方案之前,均应当根据相关法律法规通过适当的方式对本公开所涉及个人信息的类型、使用范围、使用场景等告知用户并获得用户的授权。It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

例如,在响应于接收到用户的主动请求时,向用户发送提示信息,以明确地提示用户,其请求执行的操作将需要获得和使用到用户的个人信息,从而使得用户可以根据提示信息来自主地选择是否向执行本公开技术方案的操作的电子设备、应用程序、服务器或存储介质等软件或硬件提供个人信息。For example, in response to receiving a user's active request, a prompt message is sent to the user to clearly remind the user that the operation requested to be performed will require obtaining and using the user's personal information, so that the user can independently choose whether to provide personal information to the electronic device, application, server or storage medium and other software or hardware that performs the operation of the technical solution of the present disclosure based on the prompt message.

作为一种可选的但非限制性的实现方式,响应于接收到用户的主动请求,向用户发送提示信息的方式,例如可以是弹窗的方式,弹窗中可以以文字的方式呈现提示信息。此外,弹窗中还可以承载供用户选择“同意”或“不同意”向电子设备提供个人信息的选择控件。As an optional but non-limiting implementation, in response to receiving a user's active request, a prompt message may be sent to the user, for example, in the form of a pop-up window, in which the prompt message may be presented in text form. Furthermore, the pop-up window may also include a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.

可以理解的是,上述通知和获得用户授权过程仅是示意性的,不对本公开的实现方式构成限定,其他满足相关法律法规的方式也可应用于本公开的实现方式中。It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.

图1示出了本公开的实施例能够在其中实现的示例环境100的示意图。FIG1 shows a schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented.

在该示例环境100中,终端设备110中安装有应用120。用户140可以经由终端设备110和/或终端设备110的附接设备来与应用120进行交互。在一些实施例中,终端设备110与服务端设备130通信,以实现对应用120的服务的供应。In the example environment 100, an application 120 is installed in a terminal device 110. A user 140 can interact with the application 120 via the terminal device 110 and/or a device attached to the terminal device 110. In some embodiments, the terminal device 110 communicates with a server device 130 to provide services for the application 120.

在环境100中,终端设备105与服务端设备130通信,终端设备105中安装有应用125。用户135可以经由终端设备105和/或终端设备105的附接设备来与应用125进行交互。In the environment 100 , a terminal device 105 communicates with a server device 130 , and an application 125 is installed in the terminal device 105 . A user 135 can interact with the application 125 via the terminal device 105 and/or an attached device of the terminal device 105 .

在一些示例中,应用125可以是特效编辑应用,能够向用户135提供特效内容编辑相关的各类服务。在一些示例中,应用125包括编辑器。服务端设备130可以利用应用125,为终端设备110中安装的应用120提供服务。例如,服务端设备130可以利用应用125生成特效风格对应的特效包,为终端设备110中安装的应用120提供服务。In some examples, application 125 may be a special effects editing application that can provide various services related to special effects content editing to user 135. In some examples, application 125 includes an editor. Server device 130 can use application 125 to provide services for application 120 installed on terminal device 110. For example, server device 130 can use application 125 to generate a special effects package corresponding to a special effects style and provide services to application 120 installed on terminal device 110.

在示例环境100中,用户135可以被称为特效设计用户、设计者。在一些实施例中,应用125可以被部署在用户135的终端设备本地,和/或可以由服务端设备130来支持。例如,用户135的终端设备可以运行有应用125的客户端,该客户端可以支持用户与服务端设备130所提供的应用125的交互。在应用125运行在服务端设备130的情况下,服务端设备130可以基于与终端设备之间的通信连接,实现对终端设备中运行的客户端的服务供应。应用125可以基于用户135的操作而向用户135呈现相应的页面145,以向用户135输出和/或从用户135接收与特效编辑相关的信息。In the example environment 100, the user 135 may be referred to as a special effects design user or designer. In some embodiments, the application 125 may be deployed locally on the terminal device of the user 135 and/or may be supported by the server device 130. For example, the terminal device of the user 135 may be running a client of the application 125, which may support the interaction between the user and the application 125 provided by the server device 130. In the case where the application 125 is running on the server device 130, the server device 130 may implement service provision for the client running in the terminal device based on the communication connection with the terminal device. The application 125 may present a corresponding page 145 to the user 135 based on the operation of the user 135 to output and/or receive information related to special effects editing to the user 135 and/or from the user 135.

在一些实施例中,应用120可以是内容分享应用(例如,以视频分享为主的视频应用),能够向用户140提供与媒体内容项相关的各类服务,包括内容的浏览、评论、转发、创作(例如,拍摄和/或编辑)、发布等等。在一些实施例中,应用120也可以是其他任意适当的应用,其中能够展示媒体内容项。In some embodiments, application 120 may be a content sharing application (e.g., a video application primarily focused on video sharing) that can provide various services related to media content items to user 140, including browsing, commenting, forwarding, creation (e.g., filming and/or editing), and publishing of content. In some embodiments, application 120 may also be any other appropriate application that can display media content items.

在图1的环境100中,如果应用120处于活动状态,终端设备110可以呈现应用120的页面150。页面150可以包括应用120所能提供的各类页面,诸如内容呈现页面、内容创作页面、内容发布页面、消息页面、个人主页,等等。应用120可以提供内容查看功能,以查看在应用120中发布的各类内容。经由应用120,用户140还可以使用已生成的特效包来创作各类内容。用户140可以被称为特效使用者或特效用户。In the environment 100 of Figure 1 , if application 120 is active, terminal device 110 may present a page 150 of application 120. Page 150 may include various pages provided by application 120, such as a content presentation page, a content creation page, a content publishing page, a message page, a personal homepage, and so on. Application 120 may provide a content viewing function to view various types of content published in application 120. Through application 120, user 140 may also use a generated special effects package to create various types of content. User 140 may be referred to as a special effects user or special effects user.

在一些实施例中,终端设备105或110可以是任意类型的移动终端、固定终端或便携式终端,包括移动手机、台式计算机、膝上型计算机、笔记本计算机、上网本计算机、平板计算机、媒体计算机、多媒体平板、个人通信系统(PCS)设备、个人导航设备、个人数字助理(PDA)、音频/视频播放器、数码相机/摄像机、定位设备、电视接收器、无线电广播接收器、电子书设备、游戏设备或者前述各项的任意组合,包括这些设备的配件和外设或者其任意组合。在一些实施例中,终端设备105或110也能够支持任意类型的针对用户的接口(诸如“可佩戴”电路等)。服务端设备130可以是能够提供计算能力的各种类型的计算系统/服务器,包括但不限于大型机、边缘计算节点、云环境中的计算设备,等等。In some embodiments, the terminal device 105 or 110 can be any type of mobile terminal, fixed terminal or portable terminal, including a mobile phone, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a media computer, a multimedia tablet, a personal communication system (PCS) device, a personal navigation device, a personal digital assistant (PDA), an audio/video player, a digital camera/camcorder, a positioning device, a television receiver, a radio broadcast receiver, an e-book device, a gaming device or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof. In some embodiments, the terminal device 105 or 110 can also support any type of interface for the user (such as a "wearable" circuit, etc.). The server device 130 can be various types of computing systems/servers that can provide computing capabilities, including but not limited to mainframes, edge computing nodes, computing devices in cloud environments, and the like.

应当理解,仅出于示例性的目的描述环境100中各个元素的结构和功能,而不暗示对于本公开的范围的任何限制。It should be understood that the structure and function of the various elements in the environment 100 are described for illustrative purposes only and do not imply any limitation on the scope of the present disclosure.

如上文简要提及的,在特效包生产过程中,经常会使用到一些影像素材以实现动画、交互等视觉效果。具体处理过程可以分为解码、后处理两个步骤,解码是指将如png、jpg等图像压缩文件根据解压算法恢复成图形处理器(Graphic Processing Unit,简称GPU)硬件可以直接读取的普通像素纹理并保存在系统内存/显存上。后处理是在GPU中对像素纹理进行采样并根据特效设计算最终的像素值显示到屏幕上。例如,每帧解压一张图片显示到屏幕指定位置,连续几帧在该区域就可以形成一个动画效果。As briefly mentioned above, in the production process of special effects packages, some image materials are often used to achieve visual effects such as animation and interaction. The specific processing process can be divided into two steps: decoding and post-processing. Decoding refers to restoring compressed image files such as png and jpg into ordinary pixel textures that can be directly read by the graphics processing unit (GPU) hardware according to the decompression algorithm and saving them in the system memory/video memory. Post-processing is to sample the pixel texture in the GPU and calculate the final pixel value according to the special effect design to display it on the screen. For example, each frame decompresses an image and displays it at a specified position on the screen. Several consecutive frames in this area can form an animation effect.

当前特效包大部分应用在移动设备上,而移动设备会受到功耗与算力的限制。例如,功耗过大、计算密集将引起发热、设备降频、掉帧等后果,因此,会严重影响用户体验。与之相应的,在特效影像素材处理中,其解码、后处理包含着密集计算,将造成内存的读取传输对发热影响明显,且占用内存过大时稳定性降低在一些低端机器上易发死机(crash)等问题。Currently, special effects packages are mostly used on mobile devices, which are constrained by power consumption and computing power. For example, excessive power consumption and intensive computation can lead to overheating, device frequency throttling, and frame drops, severely impacting the user experience. Correspondingly, the decoding and post-processing of special effects image material involve intensive computations, which significantly impacts heat generation due to memory read and transfer. Excessive memory usage also reduces stability, making it prone to crashes on some low-end machines.

通过降低影影像素材的尺寸/内存大小,可以减少内存消耗、计算量。常规的,通过减少尺寸大小可以使用低分辨率素材或者减少图像的边缘留白区域。例如,可以使用纹理压缩技术(Adaptive scalable texture compression,简称ASTC),减少内存大小。然而,这些技术属于单点技术,需要人工大量参与判断。虽然,纹理压缩技术可以减少一定内存单本质,进而对所有数据进行处理。但是,当前业务中大量的存量及未来增量特效道具影像素材缺少统一的自动化处理流程。By reducing the size/memory size of image materials, memory consumption and computational complexity can be reduced. Conventionally, by reducing the size, low-resolution materials can be used or the white area at the edges of the image can be reduced. For example, texture compression technology (Adaptive scalable texture compression, ASTC for short) can be used to reduce memory size. However, these technologies are single-point technologies and require a lot of manual participation in judgment. Although texture compression technology can reduce a certain amount of memory usage, it can process all data. However, a large amount of existing and future incremental special effects props image materials in the current business lack a unified automated processing process.

根据本公开的实施例,提出了一种改进的特效生成方案。根据本公开实施例的方案,获取包括用于施加特效风格的一个或多个特效图像的特效图像序列。对特效图像序列执行冗余检测,以检测特征图像序列中存在冗余的至少一个特效图像和/或至少一个图像区域。基于至少一个特效图像和/或至少一个图像区域的冗余,对特效图像序列的图像信息执行编码,得到特效图像序列对应的编码结果。然后,至少基于编码结果来生成特效风格对应的特效包。由此,能够减少内存消耗和计算量,进而,提高生成特效风格对应的特效包的效率,降低成本。According to an embodiment of the present disclosure, an improved special effects generation scheme is proposed. According to the scheme of the embodiment of the present disclosure, a special effects image sequence including one or more special effects images for applying a special effects style is obtained. Redundancy detection is performed on the special effects image sequence to detect at least one special effects image and/or at least one image area that is redundant in the feature image sequence. Based on the redundancy of at least one special effects image and/or at least one image area, the image information of the special effects image sequence is encoded to obtain an encoding result corresponding to the special effects image sequence. Then, a special effects package corresponding to the special effects style is generated at least based on the encoding result. In this way, memory consumption and computational complexity can be reduced, thereby improving the efficiency of generating special effects packages corresponding to special effects styles and reducing costs.

以下将继续参考附图描述本公开的一些示例实施例。Some example embodiments of the present disclosure will be described below with continued reference to the accompanying drawings.

图2示出了根据本公开的一些实施例的特效生成的示例架构200的示意图。为便于讨论,将参考图1的环境100来描述这些实施例。FIG2 shows a schematic diagram of an example architecture 200 for special effect generation according to some embodiments of the present disclosure. For ease of discussion, these embodiments will be described with reference to the environment 100 of FIG1 .

如图2所示,用户135(例如,特效设计者)基于终端设备105中的编辑器212设计特效图像序列,并将特效图像序列编码得到特效包213。特效包213可以被提供给服务端设备130或终端设备110。服务端设备130或终端设备110基于渲染引擎和算法引擎层215,从特效包213解码和渲染特效图像序列。硬件216用于支持特效图像序列的编辑和编码、特效图像序列的解码和渲染。在一些示例中,编辑器212和部分硬件层216可以被包括在特效设计侧,例如在终端设备105的应用125中。渲染引擎和算法引擎层215和部分硬件层216可以被包括在特效应用侧,例如在终端设备110中。As shown in Figure 2, a user 135 (e.g., a special effects designer) designs a special effects image sequence based on an editor 212 in a terminal device 105, and encodes the special effects image sequence to obtain a special effects package 213. The special effects package 213 can be provided to a server device 130 or a terminal device 110. The server device 130 or the terminal device 110 decodes and renders the special effects image sequence from the special effects package 213 based on a rendering engine and algorithm engine layer 215. The hardware 216 is used to support the editing and encoding of special effects image sequences, and the decoding and rendering of special effects image sequences. In some examples, the editor 212 and part of the hardware layer 216 can be included on the special effects design side, such as in the application 125 of the terminal device 105. The rendering engine and algorithm engine layer 215 and part of the hardware layer 216 can be included on the special effects application side, such as in the terminal device 110.

素材优化模块214被配置为执行本公开的实施例所提出的针对特效生成的优化操作。在一些实施例中,素材优化模块214可以被实现在各种适当的设备中。The material optimization module 214 is configured to perform the optimization operation for special effect generation proposed in the embodiments of the present disclosure. In some embodiments, the material optimization module 214 can be implemented in various appropriate devices.

在一些实施例中,素材优化模块214可以被实现在应用125中例如,素材优化模块214可以和编辑器212一起被实现在终端设备105处,这样可以在特效设计过程中实现对所设计的特效进行优化和打包。虽然在图2中被示出为单独的两个模块,但在一些实施例中,素材优化模块214可以被集成在编辑器212中,作为编辑器212的一部分。In some embodiments, the material optimization module 214 can be implemented in the application 125. For example, the material optimization module 214 can be implemented together with the editor 212 at the terminal device 105, so that the designed special effects can be optimized and packaged during the special effects design process. Although shown as two separate modules in Figure 2, in some embodiments, the material optimization module 214 can be integrated into the editor 212 as part of the editor 212.

在一些实施例中,素材优化模块214可以被集成在服务端设备130。这样,可以在终端设备105的特效设计过程中对正在设计的特效进行优化和打包,并且还可以已生成的特效包进行优化和重打包。In some embodiments, the material optimization module 214 can be integrated into the server device 130. In this way, the special effects being designed can be optimized and packaged during the special effects design process of the terminal device 105, and the special effects packages that have been generated can also be optimized and repackaged.

在一些实施例中,素材优化模块214可以被实现在终端设备105中。这样,在特效包的应用之前,可以对特效包进行优化和重打包,然后再利用重打包后的特效包执行特效渲染。In some embodiments, the material optimization module 214 may be implemented in the terminal device 105. In this way, before the special effect package is applied, the special effect package may be optimized and repackaged, and then the repackaged special effect package may be used to perform special effect rendering.

在下文中,为了描述方便,以素材优化模块被集成在服务端设备130的情况为例进行说明,因此站在服务端设备130的角度来描述素材优化过程。In the following, for the convenience of description, the case where the material optimization module is integrated into the server device 130 is taken as an example for explanation, and thus the material optimization process is described from the perspective of the server device 130.

以下为便于理解,首先参考图1、图2对素材优化模块214被配置为执行本公开的实施例所提出的针对特效生成的优化操作的整体过程进行描述。For ease of understanding, the following first describes the overall process of the material optimization module 214 being configured to perform the optimization operation for special effect generation proposed in the embodiment of the present disclosure with reference to FIG1 and FIG2 .

如果素材优化模块214被触发或者自动优化时,素材优化模块214首先进行冗余检测。如果服务端设备130基于素材优化模块214发现特效图像序列中存在冗余的至少一个特效图像和/或至少一个图像区域(例如,冗余的影像素材),则在冗余优化模块218进行冗余优化处理。例如,冗余优化模块218包括冗余区域裁剪218-1、冗余区域替换218-2等。服务端设备130基于素材优化模块214对特效图像序列执行冗余优化后,特效图像序列对应的尺寸和组织形式会发生变化。因此,为了不改变用户设计的道具效果,服务端设备130基于渲染参数重配模块219对渲染参数进行对应重配。服务端设备130基于重打包模块220,对重配后的渲染参数进行打包,并输出修改后的特效包。If the material optimization module 214 is triggered or automatically optimized, the material optimization module 214 first performs redundancy detection. If the server device 130 finds that there is at least one redundant special effect image and/or at least one image area (for example, redundant image material) in the special effect image sequence based on the material optimization module 214, redundancy optimization processing is performed in the redundancy optimization module 218. For example, the redundancy optimization module 218 includes redundant area cropping 218-1, redundant area replacement 218-2, etc. After the server device 130 performs redundancy optimization on the special effect image sequence based on the material optimization module 214, the corresponding size and organizational form of the special effect image sequence will change. Therefore, in order not to change the prop effect designed by the user, the server device 130 performs corresponding reconfiguration of the rendering parameters based on the rendering parameter reconfiguration module 219. The server device 130 packages the reconfigured rendering parameters based on the repackaging module 220, and outputs the modified special effects package.

下文继续参考图1、图2对本公开实施例用于特效生成的方案进行详细说明。The following continues to describe in detail the solution for generating special effects according to an embodiment of the present disclosure with reference to FIG1 and FIG2 .

在执行素材优化时,服务端设备130获取特效图像序列,特效图像序列包括用于施加特效风格的一个或多个特效图像。每个特效图像也被称为特效帧。在一些示例中,服务端设备130从终端设备110处获取包括用于施加特效风格的一个或多个特效图像的特效图像序列。When performing material optimization, the server device 130 obtains a special effect image sequence, which includes one or more special effect images for applying a special effect style. Each special effect image is also called a special effect frame. In some examples, the server device 130 obtains a special effect image sequence including one or more special effect images for applying a special effect style from the terminal device 110.

在一些实施例中,服务端设备130对特效图像序列执行冗余检测,以检测特征图像序列中存在冗余的至少一个特效图像和至少一个图像区域。在一些示例中,服务端设备130通过素材优化模块214对特效图像序列执行冗余检测。可以理解的是,素材优化模块214可以适用于静态特效(包括单个特效图像)和动态特效(例如,特效动画)。In some embodiments, the server device 130 performs redundancy detection on the special effect image sequence to detect at least one redundant special effect image and at least one redundant image region in the feature image sequence. In some examples, the server device 130 performs redundancy detection on the special effect image sequence via the material optimization module 214. It will be appreciated that the material optimization module 214 can be applied to both static special effects (including a single special effect image) and dynamic special effects (e.g., special effect animations).

在一些示例中,服务端设备130可以通过素材优化模块214对特效图像序列执行冗余检测,以检测特征图像序列中存在冗余的至少一个特效图像和至少一个图像区域。本公开实施例以下参考图3A至图3C,图4A至图4C,以及图5A至图5D对本公开检测出冗余的特效图像和图像区域对应的示意图进行说明,但这仅仅是示例性的,本公开对此不做限定。In some examples, the server device 130 can perform redundancy detection on the special effect image sequence through the material optimization module 214 to detect at least one redundant special effect image and at least one image region in the feature image sequence. The embodiments of the present disclosure are described below with reference to Figures 3A to 3C, Figures 4A to 4C, and Figures 5A to 5D, illustrating schematic diagrams corresponding to the detection of redundant special effect images and image regions in the present disclosure. However, this is merely exemplary and is not a limitation of the present disclosure.

图3A至图3C示出了根据本公开的一些实施例的特效图像序列中存在冗余特效图像的示意图。服务端设备130通过素材优化模块214对特效图像序列执行冗余检测,以检测特效图像序列中存在冗余的至少一个特效图像。例如,图3A所示示意图301、图3B所示示意图302、以及图3C所示示意图303是特效图像序列中存在的冗余特效图像,例如,特效图像序列中存在的黑色图像。Figures 3A to 3C illustrate schematic diagrams of redundant special effect images in a special effect image sequence according to some embodiments of the present disclosure. The server device 130, through the material optimization module 214, performs redundancy detection on the special effect image sequence to detect at least one redundant special effect image in the special effect image sequence. For example, schematic diagram 301 shown in Figure 3A, schematic diagram 302 shown in Figure 3B, and schematic diagram 303 shown in Figure 3C illustrate redundant special effect images in the special effect image sequence, such as black images in the special effect image sequence.

图4A至图4C示出了根据本公开的另一些实施例的特效图像序列中存在冗余特效图像的示意图。服务端设备130通过素材优化模块214对特效图像序列执行冗余检测,以检测特效图像序列中存在冗余的至少一个特效图像。例如,图4A所示示意图401、图4B所示示意图402、以及图4C所示示意图403是特效图像序列中存在的冗余特效图像,例如,特效图像序列中存在的重复图像。Figures 4A to 4C illustrate schematic diagrams of redundant special effect images in a special effect image sequence according to other embodiments of the present disclosure. The server device 130, through the material optimization module 214, performs redundancy detection on the special effect image sequence to detect at least one redundant special effect image in the special effect image sequence. For example, schematic diagram 401 shown in Figure 4A, schematic diagram 402 shown in Figure 4B, and schematic diagram 403 shown in Figure 4C illustrate redundant special effect images in the special effect image sequence, such as duplicate images in the special effect image sequence.

图5A至图5D示出了根据本公开的一些实施例的特效图像序列中存在冗余的图像区域的示意图。如图5A至图5D所示,服务端设备130通过素材优化模块214对特效图像序列执行冗余检测,以检测特效图像序列中存在冗余的至少一个图像区域。例如,图5A所示示意图501、图5B所示示意图502、图5C所示示意图503、以及图5D所示示意图504是特效图像序列中存在的冗余的图像区域。例如,特效图像序列中存在有效画面只在下半部分。如图501中有效画面在界面510中。图502中,有效画面在界面520中。图503中,有效画面在界面530中。图504中,有效画面在界面540中。Figures 5A to 5D are schematic diagrams showing redundant image areas in a special effects image sequence according to some embodiments of the present disclosure. As shown in Figures 5A to 5D, the server-side device 130 performs redundancy detection on the special effects image sequence through the material optimization module 214 to detect at least one redundant image area in the special effects image sequence. For example, schematic diagram 501 shown in Figure 5A, schematic diagram 502 shown in Figure 5B, schematic diagram 503 shown in Figure 5C, and schematic diagram 504 shown in Figure 5D are redundant image areas in the special effects image sequence. For example, the effective picture in the special effects image sequence is only in the lower half. As shown in Figure 501, the effective picture is in interface 510. In Figure 502, the effective picture is in interface 520. In Figure 503, the effective picture is in interface 530. In Figure 504, the effective picture is in interface 540.

在一些实施例中,服务端设备130根据至少一个特效图像和/或至少一个图像区域的冗余,对特效图像序列的图像信息执行编码。进而,确定特效图像序列对应的编码结果。服务端设备130根据编码结果生成特效风格对应的特效包。In some embodiments, the server device 130 encodes the image information of the special effect image sequence based on the redundancy of at least one special effect image and/or at least one image region. Furthermore, the server device 130 determines an encoding result corresponding to the special effect image sequence. Based on the encoding result, the server device 130 generates a special effect package corresponding to the special effect style.

在一些实施例中,服务端设备130至少根据特效图像序列的编码结果,配置针对特效图像序列中的各个特效图像的渲染参数。服务端设备130根据编码结果和渲染参数,生成特效风格对应的特效包。In some embodiments, the server device 130 configures rendering parameters for each special effect image in the special effect image sequence based at least on the encoding result of the special effect image sequence. The server device 130 generates a special effect package corresponding to the special effect style based on the encoding result and the rendering parameters.

在一些示例中,由于服务端设备130基于素材优化模块214对特效图像序列执行冗余优化后,特效图像序列对应的尺寸和组织形式会发生变化。因此,在特效风格对应的特效包中,参数引用时要重新配置参数。例如,道具包中算法引用帧1的左上角位置的像素,优化后该位置的像素没有了,则修改渲染参数,让渲染从中间位置开始采样,并且对上半部分位置的参数要求赋值默认值(0,0,0)。渲染参数(引用位置)被包括在特效包的配置文件中。In some examples, because the server device 130 performs redundant optimization on the special effects image sequence based on the material optimization module 214, the size and organization of the special effects image sequence will change. Therefore, in the special effects package corresponding to the special effects style, the parameters must be reconfigured when referencing them. For example, the algorithm in the prop package references the pixel at the upper left corner of frame 1. After optimization, the pixel at this position disappears. In this case, the rendering parameters are modified so that the rendering starts sampling from the middle position, and the parameters at the upper half are required to be assigned a default value (0, 0, 0). The rendering parameters (reference position) are included in the configuration file of the special effects package.

例如,素材优化模块214可以被集成在特效的编辑器212中。这样,可以在用户135(特效设计人员)设计特效的过程中实时地优化所生成的特效包(也称为道具包)。在另一些示例中,素材优化模块214可以被配置在编辑器212与渲染/算法引擎层215之间。在用户135(特效设计人员)设计特效后,基于已有方案对特效进行打包,得到对应的特效包。然后,素材优化模块214在已有特效包基础上执行优化,并提供优化后的特效包用于渲染/算法引擎层215进行渲染和输出。如果是已经生成的特效包,素材优化模块214也可以根据上述优化步骤进行批量的检测及自动优化。For example, the material optimization module 214 can be integrated into the special effects editor 212. In this way, the generated special effects package (also called a prop package) can be optimized in real time during the process of the user 135 (special effects designer) designing the special effects. In other examples, the material optimization module 214 can be configured between the editor 212 and the rendering/algorithm engine layer 215. After the user 135 (special effects designer) designs the special effects, the special effects are packaged based on the existing scheme to obtain the corresponding special effects package. Then, the material optimization module 214 performs optimization on the basis of the existing special effects package, and provides the optimized special effects package for rendering and output by the rendering/algorithm engine layer 215. If it is a special effects package that has been generated, the material optimization module 214 can also perform batch detection and automatic optimization according to the above-mentioned optimization steps.

以下参考图2描述服务端设备130对特效图像序列执行冗余检测。在一些实施例中,服务端设备130通过对特效图像序列中的各个特效图像执行单色检测,检测各个特效图像中是否存在具有相同颜色的图像区域。在一些示例中,服务端设备130基于素材优化模块214中的冗余检测模块217中的单色检测模块217-1,对特效图像序列中的各个特效图像执行单色检测。The following describes redundancy detection performed by the server device 130 on a special effect image sequence with reference to FIG2 . In some embodiments, the server device 130 performs monochrome detection on each special effect image in the special effect image sequence to detect whether there are image regions with the same color in each special effect image. In some examples, the server device 130 performs monochrome detection on each special effect image in the special effect image sequence based on the monochrome detection module 217-1 in the redundancy detection module 217 in the material optimization module 214.

在一些实施例中,服务端设备130可以采用以下方式对特效图像序列中的各个特效图像执行单色检测。服务端设备130按预定区域形状的第一滑动窗口在特效图像序列中的各个特效图像中滑动,进而,确定由第一窗口所限定的图像块内是否具有相同颜色。In some embodiments, the server device 130 may perform monochrome detection on each special effect image in the special effect image sequence in the following manner: the server device 130 slides a first sliding window of a predetermined area shape across each special effect image in the special effect image sequence, and then determines whether the image blocks defined by the first window have the same color.

在一示例中,服务端设备130以块状区域的第一滑动窗口的形式对特效图像序列进行检测。例如,块状区域的第一滑动窗口为64*64,确定该窗口所限定的图像块内是否有相同颜色的图像。通过在特效图像中依次滑动第一滑动窗口,将连续滑动窗口中检测到的相同颜色的图像块确定为存在单色冗余的第一图像区域。In one example, server device 130 detects the special effect image sequence using a first sliding window of a block-like region. For example, the first sliding window of the block-like region is 64*64, and determines whether there are images of the same color within the image blocks defined by the window. By sliding the first sliding window sequentially across the special effect image, image blocks of the same color detected in successive sliding windows are identified as first image regions with monochromatic redundancy.

在一些实施例中,如果从特效图像序列中的第一特效图像中检测出具有相同颜色的第一图像区域,则服务端设备130根据第一图像区域的颜色对应的单个像素值对第一图像区域执行编码。在一些实施例中,编码结果是指第一图像区域在第一特效图像中的范围,并且还指单个像素值的编码结果被应用于第一图像区域。In some embodiments, if a first image region having the same color as the first special effect image in the special effect image sequence is detected, the server device 130 encodes the first image region based on the single pixel value corresponding to the color of the first image region. In some embodiments, the encoding result refers to the range of the first image region in the first special effect image, and also refers to the encoding result of the single pixel value applied to the first image region.

在一些示例中,如果某个图像区域内为相同颜色,则该区域所有像素可以用一个像素值c(r,g,b,a)表示。如果整个特效图像均为单色值,则该特效图像只需一个像素值即可表示。In some examples, if a region of an image has the same color, all pixels in the region can be represented by a single pixel value c(r, g, b, a). If the entire special effect image is a single color value, the special effect image can be represented by only a single pixel value.

在一些示例中,如果第一图像区域存在相同颜色的图像,则服务端设备130就对第一图像区域中的单个像素值进行编码,并记录该单个像素值在原特效图像中的范围(L,T,R,B)。例如,如果第一图像区域内具有相同颜色,则服务端设备130对单个像素值进行编码。然后,服务端设备130对具有相同颜色的图像包含的其他像素值,直接引用已编码的该单个像素值。In some examples, if an image of the same color exists in the first image area, the server device 130 encodes a single pixel value in the first image area and records the range (L, T, R, B) of the single pixel value in the original special effect image. For example, if the first image area has the same color, the server device 130 encodes the single pixel value. Then, the server device 130 directly references the encoded single pixel value for other pixel values contained in the image of the same color.

在一些示例中,服务端设备130基于素材优化模块214中的冗余检测模块217中的帧间重复检测模块217-2,对特效图像序列中的各个特效图像执行帧间重复检测。In some examples, the server device 130 performs inter-frame duplication detection on each special effect image in the special effect image sequence based on the inter-frame duplication detection module 217 - 2 in the redundancy detection module 217 in the material optimization module 214 .

在一些示例中,服务端设备130可以采用以下方式对特效图像序列中的各个特效图像执行帧间重复检测。在一些实施例中,服务端设备130确定特效图像序列中的至少两个连续特效图像的相应像素位置是否具有相同像素值。然后,服务端设备130根据其确定的至少两个连续特效图像的相应像素位置具有相同像素值,确定至少两个连续特效图像存在冗余。In some examples, the server device 130 may perform inter-frame duplication detection on each special effect image in the special effect image sequence in the following manner. In some embodiments, the server device 130 determines whether corresponding pixel positions of at least two consecutive special effect images in the special effect image sequence have the same pixel value. The server device 130 then determines that redundancy exists between the at least two consecutive special effect images based on the determination that the corresponding pixel positions of the at least two consecutive special effect images have the same pixel value.

在一些实施例中,服务端设备130按照第二滑动窗口在特效图像序列中滑动,进而,确定第二滑动窗口中所限定的至少两个连续特效图像是否相同。例如,对于序列帧动画等场景,服务端设备130使用第二滑动窗口的方式,对前后帧进行像素值比较,以此判断第二滑动窗口中所限定的至少两个连续特效图像是否相同。通过依次滑动第二滑动窗口,将连续滑动窗口中检测到的相同的特效图像确定为存在帧间冗余的一组特效图像。In some embodiments, the server device 130 slides a second sliding window through the special effect image sequence to determine whether at least two consecutive special effect images defined in the second sliding window are identical. For example, for scenes such as sequential frame animation, the server device 130 uses the second sliding window to compare pixel values of preceding and following frames to determine whether at least two consecutive special effect images defined in the second sliding window are identical. By sliding the second sliding window sequentially, identical special effect images detected in consecutive sliding windows are determined to be a group of special effect images with inter-frame redundancy.

在一些实施例中,如果服务端设备130确定特效图像序列中的至少两个连续特效图像存在冗余,则对至少两个连续特效图像中的单个特效图像执行编码。编码结果可以指示至少两个连续特效图像在特效图像序列中的位置,并且还可以指示单个特效图像的编码结果被应用于解码至少两个连续特效图像。In some embodiments, if the server device 130 determines that at least two consecutive special effect images in the special effect image sequence are redundant, encoding is performed on a single special effect image from the at least two consecutive special effect images. The encoding result may indicate the positions of the at least two consecutive special effect images in the special effect image sequence, and may also indicate that the encoding result of the single special effect image is applied to decode the at least two consecutive special effect images.

在一些示例中,如果服务端设备130确定至少两个连续特效图像存在冗余,则只保留至少两个连续特效图像中的单个特效图像,并记录该图像的帧信息。例如,服务端设备130针对第二滑动窗口所限定的至少两个连续特效图像与进行编码的单个像素值对应的图像具有相同颜色的其他特效图像,直接引用已编码的单个像素值。In some examples, if the server device 130 determines that at least two consecutive special effect images are redundant, only a single special effect image from the at least two consecutive special effect images is retained and the frame information of the image is recorded. For example, for other special effect images that have the same color as the image corresponding to the single pixel value being encoded in the at least two consecutive special effect images defined by the second sliding window, the server device 130 directly references the encoded single pixel value.

例如,如果特效图像序列中存在至少两个连续特效图像存在冗余,则只保留至少两个连续特效图像中的单个特效图像,并在解码时,只解码该单个特效图像对应的帧信息。For example, if there are at least two consecutive special effect images in the special effect image sequence that are redundant, only a single special effect image from the at least two consecutive special effect images is retained, and during decoding, only the frame information corresponding to the single special effect image is decoded.

通过本公开实施例能够减少内存消耗和计算量,进而,提高生成特效风格对应的特效包的效率,降低成本。The embodiments of the present disclosure can reduce memory consumption and computational complexity, thereby improving the efficiency of generating special effects packages corresponding to special effects styles and reducing costs.

示例过程Example Process

图6示出了根据本公开的一些实施例的特效交互的过程600的流程图。过程600可以被实现在服务端设备130处。下面参考图1来描述过程600。FIG6 shows a flow chart of a process 600 of special effect interaction according to some embodiments of the present disclosure. The process 600 may be implemented at the server device 130. The process 600 is described below with reference to FIG1.

如图6所示,在框610,服务端设备130获取特效图像序列,特效图像序列包括用于施加特效风格的一个或多个特效图像。As shown in FIG6 , in block 610 , the server device 130 obtains a special effect image sequence, where the special effect image sequence includes one or more special effect images for applying a special effect style.

在框620,服务端设备130对特效图像序列执行冗余检测,以检测特征图像序列中存在冗余的至少一个特效图像和/或至少一个图像区域。In block 620 , the server device 130 performs redundancy detection on the special effect image sequence to detect at least one special effect image and/or at least one image region that is redundant in the feature image sequence.

在框630,服务端设备130基于至少一个特效图像和/或至少一个图像区域的冗余,对特效图像序列的图像信息执行编码,得到特效图像序列对应的编码结果。In block 630 , the server device 130 encodes the image information of the special effect image sequence based on the redundancy of at least one special effect image and/or at least one image region to obtain an encoding result corresponding to the special effect image sequence.

在框640,服务端设备130至少基于编码结果来生成特效风格对应的特效包。In block 640 , the server device 130 generates a special effect package corresponding to the special effect style based at least on the encoding result.

在一些实施例中,对特效图像序列执行冗余检测包括:对特效图像序列中的各个特效图像执行单色检测,以检测各个特效图像中是否存在具有相同颜色的图像区域。In some embodiments, performing redundancy detection on the special effect image sequence includes performing monochrome detection on each special effect image in the special effect image sequence to detect whether there is an image region with the same color in each special effect image.

在一些实施例中,对特效图像序列中的各个特效图像执行单色检测包括:按预定区域形状的第一滑动窗口在特效图像序列中的各个特效图像中滑动,确定由第一滑动窗口所限定的图像块内是否具有相同颜色。In some embodiments, performing monochrome detection on each special effect image in the special effect image sequence includes: sliding a first sliding window with a predetermined area shape in each special effect image in the special effect image sequence, and determining whether an image block defined by the first sliding window has the same color.

在一些实施例中,对特效图像序列的图像信息执行编码包括:如果从特效图像序列中的第一特效图像中检测出具有相同颜色的第一图像区域,基于第一图像区域的颜色对应的单个像素值对第一图像区域执行编码,其中编码结果指示第一图像区域在第一特效图像中的范围,并且还指示单个像素值的编码结果被应用于第一图像区域。In some embodiments, encoding image information of the special effect image sequence includes: if a first image region having the same color is detected from a first special effect image in the special effect image sequence, encoding the first image region based on a single pixel value corresponding to the color of the first image region, wherein the encoding result indicates a range of the first image region in the first special effect image and further indicates that the encoding result of the single pixel value is applied to the first image region.

在一些实施例中,对特效图像序列执行冗余检测包括:确定特效图像序列中的至少两个连续特效图像的相应像素位置是否具有相同像素值;以及基于确定至少两个连续特效图像的相应像素位置具有相同像素值,确定至少两个连续特效图像存在冗余。In some embodiments, performing redundancy detection on the special effect image sequence includes: determining whether corresponding pixel positions of at least two consecutive special effect images in the special effect image sequence have the same pixel value; and determining that redundancy exists between the at least two consecutive special effect images based on determining that the corresponding pixel positions of the at least two consecutive special effect images have the same pixel value.

在一些实施例中,确定特效图像序列中的至少两个连续特效图像是否相同包括:按第二滑动窗口在特效图像序列中滑动,以确定第二滑动窗口中所限定的至少两个连续特效图像是否相同。In some embodiments, determining whether at least two consecutive special effect images in the special effect image sequence are identical includes sliding a second sliding window in the special effect image sequence to determine whether at least two consecutive special effect images defined in the second sliding window are identical.

在一些实施例中,对特效图像序列的图像信息执行编码包括:如果确定至少两个连续特效图像存在冗余,对至少两个连续特效图像中的单个特效图像执行编码,其中编码结果指示至少两个连续特效图像在特效图像序列中的位置,并且还指示单个特效图像的编码结果被应用于解码至少两个连续特效图像。In some embodiments, encoding image information of a special effect image sequence includes: if it is determined that redundancy exists between at least two consecutive special effect images, encoding a single special effect image from the at least two consecutive special effect images, wherein the encoding result indicates positions of the at least two consecutive special effect images in the special effect image sequence and further indicates that the encoding result of the single special effect image is applied to decoding the at least two consecutive special effect images.

在一些实施例中,至少基于编码结果来生成特效风格对应的特效包包括:至少基于编码结果,配置针对特效图像序列中的各个特效图像的渲染参数;以及生成至少包括编码结果和渲染参数的特效包。In some embodiments, generating a special effects package corresponding to a special effects style based at least on the encoding results includes: configuring rendering parameters for each special effects image in a special effects image sequence based at least on the encoding results; and generating a special effects package including at least the encoding results and the rendering parameters.

示例装置和设备Example devices and equipment

图7示出了根据本公开的某些实施例的用于特效生成的装置700的示意性结构框图。装置700可以被实现为或者被包括在服务端设备130中。装置700中的各个模块/组件可以由硬件、软件、固件或者它们的任意组合来实现。7 shows a schematic structural block diagram of an apparatus 700 for generating special effects according to certain embodiments of the present disclosure. Apparatus 700 may be implemented as or included in server device 130. Each module/component in apparatus 700 may be implemented by hardware, software, firmware, or any combination thereof.

如图所示,装置700包括获取模块710,被配置为获取特效图像序列,特效图像序列包括用于施加特效风格的一个或多个特效图像。As shown in the figure, the apparatus 700 includes an acquisition module 710 configured to acquire a special effect image sequence, where the special effect image sequence includes one or more special effect images for applying a special effect style.

装置700还包括检测模块720,被配置为对特效图像序列执行冗余检测,以检测特征图像序列中存在冗余的至少一个特效图像和/或至少一个图像区域。The apparatus 700 further includes a detection module 720 configured to perform redundancy detection on the special effect image sequence to detect at least one special effect image and/or at least one image region that is redundant in the feature image sequence.

装置700还包括编码模块730,被配置为基于至少一个特效图像和/或至少一个图像区域的冗余,对特效图像序列的图像信息执行编码,得到特效图像序列对应的编码结果。The apparatus 700 further includes an encoding module 730 configured to encode image information of a special effect image sequence based on redundancy of at least one special effect image and/or at least one image region to obtain an encoding result corresponding to the special effect image sequence.

装置700还包括生成模块740,被配置为至少基于编码结果来生成特效风格对应的特效包。The apparatus 700 further includes a generating module 740 configured to generate a special effect package corresponding to the special effect style based at least on the encoding result.

在一些实施例中,检测模块720,还被配置为对特效图像序列中的各个特效图像执行单色检测,以检测各个特效图像中是否存在具有相同颜色的图像区域。In some embodiments, the detection module 720 is further configured to perform monochrome detection on each special effect image in the special effect image sequence to detect whether there is an image region with the same color in each special effect image.

在一些实施例中,检测模块720,还被配置为按预定区域形状的第一滑动窗口在特效图像序列中的各个特效图像中滑动,确定由第一滑动窗口所限定的图像块内是否具有相同颜色。In some embodiments, the detection module 720 is further configured to slide a first sliding window of a predetermined area shape in each special effect image in the special effect image sequence to determine whether the image blocks defined by the first sliding window have the same color.

在一些实施例中,编码模块730,还被配置为如果从特效图像序列中的第一特效图像中检测出具有相同颜色的第一图像区域,基于第一图像区域的颜色对应的单个像素值对第一图像区域执行编码,其中编码结果指示第一图像区域在第一特效图像中的范围,并且还指示单个像素值的编码结果被应用于第一图像区域。In some embodiments, the encoding module 730 is further configured to, if a first image area having the same color is detected from a first special effect image in the special effect image sequence, perform encoding on the first image area based on a single pixel value corresponding to the color of the first image area, wherein the encoding result indicates a range of the first image area in the first special effect image, and further indicates that the encoding result of the single pixel value is applied to the first image area.

在一些实施例中,检测模块720,还被配置为确定特效图像序列中的至少两个连续特效图像的相应像素位置是否具有相同像素值;以及基于确定至少两个连续特效图像的相应像素位置具有相同像素值,确定至少两个连续特效图像存在冗余。In some embodiments, the detection module 720 is further configured to determine whether corresponding pixel positions of at least two consecutive special effect images in the special effect image sequence have the same pixel value; and determine that redundancy exists in the at least two consecutive special effect images based on determining that the corresponding pixel positions of the at least two consecutive special effect images have the same pixel value.

在一些实施例中,检测模块720还包括确定模块,确定模块被配置为按第二滑动窗口在特效图像序列中滑动,以确定第二滑动窗口中所限定的至少两个连续特效图像是否相同。In some embodiments, the detection module 720 further includes a determination module configured to slide the special effect image sequence according to the second sliding window to determine whether at least two consecutive special effect images defined in the second sliding window are identical.

在一些实施例中,编码模块730,还被配置为如果确定至少两个连续特效图像存在冗余,对至少两个连续特效图像中的单个特效图像执行编码,其中编码结果指示至少两个连续特效图像在特效图像序列中的位置,并且还指示单个特效图像的编码结果被应用于解码至少两个连续特效图像。In some embodiments, the encoding module 730 is further configured to, if it is determined that redundancy exists between the at least two consecutive special effect images, perform encoding on a single special effect image among the at least two consecutive special effect images, wherein the encoding result indicates positions of the at least two consecutive special effect images in the special effect image sequence, and further indicates that the encoding result of the single special effect image is applied to decoding the at least two consecutive special effect images.

在一些实施例中,生成模块740,还被配置为至少基于编码结果,配置针对特效图像序列中的各个特效图像的渲染参数;以及生成至少包括编码结果和渲染参数的特效包。In some embodiments, the generation module 740 is further configured to configure rendering parameters for each special effect image in the special effect image sequence based at least on the encoding result; and generate a special effect package including at least the encoding result and the rendering parameters.

图8示出了其中可以实施本公开的一个或多个实施例的电子设备800的框图。应当理解,图8所示出的电子设备800仅仅是示例性的,而不应当构成对本文所描述的实施例的功能和范围的任何限制。图8所示出的电子设备800可以用于实现图1的服务端设备130或图7的装置700。FIG8 illustrates a block diagram of an electronic device 800 in which one or more embodiments of the present disclosure may be implemented. It should be understood that the electronic device 800 shown in FIG8 is merely exemplary and should not be construed as limiting the functionality and scope of the embodiments described herein. The electronic device 800 shown in FIG8 may be used to implement the server device 130 of FIG1 or the apparatus 700 of FIG7 .

如图8所示,电子设备800是通用电子设备的形式。电子设备800的组件可以包括但不限于一个或多个处理器或处理单元810、存储器820、存储设备830、一个或多个通信单元840、一个或多个输入设备850以及一个或多个输出设备860。处理单元810可以是实际或虚拟处理器并且能够根据存储器820中存储的程序来执行各种处理。在多处理器系统中,多个处理单元并行执行计算机可执行指令,以提高电子设备800的并行处理能力。As shown in FIG8 , electronic device 800 is a general-purpose electronic device. Components of electronic device 800 may include, but are not limited to, one or more processors or processing units 810, memory 820, storage device 830, one or more communication units 840, one or more input devices 850, and one or more output devices 860. Processing unit 810 may be a real or virtual processor and is capable of performing various processes according to programs stored in memory 820. In a multi-processor system, multiple processing units execute computer-executable instructions in parallel to enhance the parallel processing capabilities of electronic device 800.

电子设备800通常包括多个计算机存储介质。这样的介质可以是电子设备800可访问的任何可以获取的介质,包括但不限于易失性和非易失性介质、可拆卸和不可拆卸介质。存储器820可以是易失性存储器(例如寄存器、高速缓存、随机访问存储器(RAM))、非易失性存储器(例如,只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、闪存)或它们的某种组合。存储设备830可以是可拆卸或不可拆卸的介质,并且可以包括机器可读介质,诸如闪存驱动、磁盘或者任何其他介质,其可以能够用于存储信息和/或数据(例如用于训练的训练数据)并且可以在电子设备800内被访问。The electronic device 800 typically includes a plurality of computer storage media. Such media can be any accessible media that can be obtained by the electronic device 800, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 820 can be a volatile memory (e.g., a register, a cache, a random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 830 can be a removable or non-removable medium and can include a machine-readable medium, such as a flash drive, a disk, or any other medium that can be used to store information and/or data (e.g., training data for training) and can be accessed within the electronic device 800.

电子设备800可以进一步包括另外的可拆卸/不可拆卸、易失性/非易失性存储介质。尽管未在图8中示出,可以提供用于从可拆卸、非易失性磁盘(例如“软盘”)进行读取或写入的磁盘驱动和用于从可拆卸、非易失性光盘进行读取或写入的光盘驱动。在这些情况中,每个驱动可以由一个或多个数据介质接口被连接至总线(未示出)。存储器820可以包括计算机程序产品825,其具有一个或多个程序模块,这些程序模块被配置为执行本公开的各种实施例的各种方法或动作。The electronic device 800 may further include additional removable/non-removable, volatile/non-volatile storage media. Although not shown in FIG8 , a disk drive for reading from or writing to a removable, non-volatile disk (e.g., a “floppy disk”) and an optical drive for reading from or writing to a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to a bus (not shown) by one or more data media interfaces. The memory 820 may include a computer program product 825 having one or more program modules configured to perform various methods or actions of various embodiments of the present disclosure.

通信单元840实现通过通信介质与其他电子设备进行通信。附加地,电子设备800的组件的功能可以以单个计算集群或多个计算机器来实现,这些计算机器能够通过通信连接进行通信。因此,电子设备800可以使用与一个或多个其他服务器、网络个人计算机(PC)或者另一个网络节点的逻辑连接来在联网环境中进行操作。The communication unit 840 enables communication with other electronic devices via a communication medium. Additionally, the functions of the components of the electronic device 800 can be implemented in a single computing cluster or multiple computing machines that can communicate via a communication connection. Thus, the electronic device 800 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.

输入设备850可以是一个或多个输入设备,例如鼠标、键盘、追踪球等。输出设备860可以是一个或多个输出设备,例如显示器、扬声器、打印机等。电子设备800还可以根据需要通过通信单元840与一个或多个外部设备(未示出)进行通信,外部设备诸如存储设备、显示设备等,与一个或多个使得用户与电子设备800交互的设备进行通信,或者与使得电子设备800与一个或多个其他电子设备通信的任何设备(例如,网卡、调制解调器等)进行通信。这样的通信可以经由输入/输出(I/O)接口(未示出)来执行。The input device 850 may be one or more input devices, such as a mouse, keyboard, or trackball. The output device 860 may be one or more output devices, such as a display, a speaker, or a printer. The electronic device 800 may also communicate with one or more external devices (not shown) via the communication unit 840 as needed, such as a storage device, a display device, or the like, with one or more devices that allow a user to interact with the electronic device 800, or with any device that allows the electronic device 800 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input/output (I/O) interface (not shown).

根据本公开的示例性实现方式,提供了一种计算机可读存储介质,其上存储有计算机可执行指令,其中计算机可执行指令被处理器执行以实现上文描述的方法。根据本公开的示例性实现方式,还提供了一种计算机程序产品,计算机程序产品被有形地存储在非瞬态计算机可读介质上并且包括计算机可执行指令,而计算机可执行指令被处理器执行以实现上文描述的方法。According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.

这里参照根据本公开实现的方法、装置、设备和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。Various aspects of the present disclosure are described herein with reference to flowcharts and/or block diagrams of methods, apparatuses, devices, and computer program products implemented according to the present disclosure. It should be understood that each block of the flowcharts and/or block diagrams, and combinations of blocks in the flowcharts and/or block diagrams, can be implemented by computer-readable program instructions.

这些计算机可读程序指令可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理单元,从而生产出一种机器,使得这些指令在通过计算机或其他可编程数据处理装置的处理单元执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, such that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device is generated that implements the functions/actions specified in one or more blocks in the flowchart and/or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and/or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions/actions specified in one or more blocks in the flowchart and/or block diagram.

可以把计算机可读程序指令加载到计算机、其他可编程数据处理装置、或其他设备上,使得在计算机、其他可编程数据处理装置或其他设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其他可编程数据处理装置、或其他设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions/actions specified in one or more boxes in the flowchart and/or block diagram.

附图中的流程图和框图显示了根据本公开的多个实现的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple implementations of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a part for a module, program segment or instruction, and a part for a module, program segment or instruction comprises one or more executable instructions for realizing the logical function of the specification. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and/or flow chart, and the combination of the boxes in the block diagram and/or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.

以上已经描述了本公开的各实现,上述说明是示例性的,并非穷尽性的,并且也不限于所公开的各实现。在不偏离所说明的各实现的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实现的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其他普通技术人员能理解本文公开的各个实现方式。While various implementations of the present disclosure have been described above, the foregoing description is intended to be illustrative, not exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is selected to best explain the principles of the implementations, their practical applications, or improvements to existing technologies, or to enable others skilled in the art to understand the various implementations disclosed herein.

Claims (12)

一种用于特效生成的方法,包括:A method for generating special effects, comprising: 获取特效图像序列,所述特效图像序列包括用于施加特效风格的一个或多个特效图像;Acquire a special effect image sequence, where the special effect image sequence includes one or more special effect images for applying a special effect style; 对所述特效图像序列执行冗余检测,以检测所述特征图像序列中存在冗余的至少一个特效图像和/或至少一个图像区域;performing redundancy detection on the special effect image sequence to detect at least one special effect image and/or at least one image region that is redundant in the feature image sequence; 基于所述至少一个特效图像和/或所述至少一个图像区域的冗余,对所述特效图像序列的图像信息执行编码,得到所述特效图像序列对应的编码结果;以及Based on the redundancy of the at least one special effect image and/or the at least one image region, encoding the image information of the special effect image sequence to obtain an encoding result corresponding to the special effect image sequence; and 至少基于所述编码结果来生成所述特效风格对应的特效包。A special effects package corresponding to the special effects style is generated based at least on the encoding result. 根据权利要求1所述的方法,其中对所述特效图像序列执行冗余检测包括:The method according to claim 1, wherein performing redundancy detection on the special effect image sequence comprises: 对所述特效图像序列中的各个特效图像执行单色检测,以检测各个特效图像中是否存在具有相同颜色的图像区域。A monochrome detection is performed on each special effect image in the special effect image sequence to detect whether there is an image region with the same color in each special effect image. 根据权利要求1或2所述的方法,其中对所述特效图像序列中的各个特效图像执行单色检测包括:The method according to claim 1 or 2, wherein performing monochrome detection on each special effect image in the special effect image sequence comprises: 按预定区域形状的第一滑动窗口在所述特效图像序列中的各个特效图像中滑动,确定由所述第一滑动窗口所限定的图像块内是否具有相同颜色。A first sliding window with a predetermined area shape slides in each special effect image in the special effect image sequence to determine whether image blocks defined by the first sliding window have the same color. 根据权利要求1或2所述的方法,其中对所述特效图像序列的图像信息执行编码包括:The method according to claim 1 or 2, wherein encoding the image information of the special effect image sequence comprises: 如果从所述特效图像序列中的第一特效图像中检测出具有相同颜色的第一图像区域,基于所述第一图像区域的颜色对应的单个像素值对所述第一图像区域执行编码,If a first image region having the same color is detected from a first special effect image in the special effect image sequence, encoding is performed on the first image region based on a single pixel value corresponding to the color of the first image region, 其中所述编码结果指示所述第一图像区域在所述第一特效图像中的范围,并且还指示所述单个像素值的编码结果被应用于第一图像区域。The encoding result indicates a range of the first image area in the first special effect image, and further indicates that the encoding result of the single pixel value is applied to the first image area. 根据权利要求1至4中任一项所述的方法,其中对所述特效图像序列执行冗余检测包括:The method according to any one of claims 1 to 4, wherein performing redundancy detection on the special effect image sequence comprises: 确定所述特效图像序列中的至少两个连续特效图像的相应像素位置是否具有相同像素值;以及determining whether corresponding pixel positions of at least two consecutive special effect images in the special effect image sequence have the same pixel value; and 基于确定至少两个连续特效图像的相应像素位置具有相同像素值,确定所述至少两个连续特效图像存在冗余。Based on determining that corresponding pixel positions of at least two consecutive special effect images have the same pixel value, it is determined that redundancy exists between the at least two consecutive special effect images. 根据权利要求5所述的方法,其中确定所述特效图像序列中的至少两个连续特效图像是否相同包括:The method according to claim 5, wherein determining whether at least two consecutive special effect images in the special effect image sequence are the same comprises: 按第二滑动窗口在所述特效图像序列中滑动,以确定所述第二滑动窗口中所限定的至少两个连续特效图像是否相同。A second sliding window is slid in the special effect image sequence to determine whether at least two consecutive special effect images defined in the second sliding window are the same. 根据权利要求5所述的方法,其中对所述特效图像序列的图像信息执行编码包括:The method according to claim 5, wherein encoding the image information of the special effect image sequence comprises: 如果确定所述至少两个连续特效图像存在冗余,对所述至少两个连续特效图像中的单个特效图像执行编码,If it is determined that the at least two consecutive special effect images have redundancy, encoding is performed on a single special effect image in the at least two consecutive special effect images. 其中所述编码结果指示所述至少两个连续特效图像在所述特效图像序列中的位置,并且还指示所述单个特效图像的编码结果被应用于解码所述至少两个连续特效图像。The encoding result indicates positions of the at least two consecutive special effect images in the special effect image sequence, and further indicates that the encoding result of the single special effect image is applied to decoding the at least two consecutive special effect images. 根据权利要求1至7中任一项所述的方法,其中至少基于所述编码结果来生成所述特效风格对应的特效包包括:The method according to any one of claims 1 to 7, wherein generating a special effects package corresponding to the special effects style based at least on the encoding result comprises: 至少基于所述编码结果,配置针对所述特效图像序列中的各个特效图像的渲染参数;以及configuring rendering parameters for each special effect image in the special effect image sequence based at least on the encoding result; and 生成至少包括所述编码结果和所述渲染参数的特效包。Generate a special effects package that at least includes the encoding result and the rendering parameters. 一种用于特效生成的装置,包括:A device for generating special effects, comprising: 获取模块,被配置为获取特效图像序列,所述特效图像序列包括用于施加特效风格的一个或多个特效图像;an acquisition module configured to acquire a special effect image sequence, wherein the special effect image sequence includes one or more special effect images for applying a special effect style; 检测模块,被配置为对所述特效图像序列执行冗余检测,以检测所述特征图像序列中存在冗余的至少一个特效图像和/或至少一个图像区域;a detection module configured to perform redundancy detection on the special effect image sequence to detect at least one special effect image and/or at least one image region that is redundant in the feature image sequence; 编码模块,被配置为基于所述至少一个特效图像和/或所述至少一个图像区域的冗余,对所述特效图像序列的图像信息执行编码,得到所述特效图像序列对应的编码结果;以及an encoding module configured to encode image information of the special effect image sequence based on redundancy of the at least one special effect image and/or the at least one image region to obtain an encoding result corresponding to the special effect image sequence; and 生成模块,被配置为至少基于所述编码结果来生成所述特效风格对应的特效包。A generating module is configured to generate a special effect package corresponding to the special effect style based at least on the encoding result. 一种电子设备,包括:An electronic device, comprising: 至少一个处理单元;以及at least one processing unit; and 至少一个存储器,所述至少一个存储器被耦合到所述至少一个处理单元并且存储用于由所述至少一个处理单元执行的指令,所述指令在由所述至少一个处理单元执行时使所述电子设备执行根据权利要求1至8中任一项所述的方法。At least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 8 when executed by the at least one processing unit. 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序可由处理器执行以实现根据权利要求1至8中任一项所述的方法。A computer-readable storage medium having a computer program stored thereon, wherein the computer program can be executed by a processor to implement the method according to any one of claims 1 to 8. 一种计算机程序产品,所述计算机程序产品被有形地存储在计算机存储介质中并且包括计算机可执行指令,计算机可执行指令在由设备执行时使设备执行根据权利要求1至8中任一项所述的方法。A computer program product tangibly stored in a computer storage medium and comprising computer-executable instructions which, when executed by a device, cause the device to perform the method according to any one of claims 1 to 8.
PCT/CN2024/137861 2024-02-02 2024-12-09 Method and apparatus for special-effects generation, and device and storage medium Pending WO2025161697A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202410153962.4 2024-02-02
CN202410153962.4A CN117830445A (en) 2024-02-02 2024-02-02 Method, apparatus, device and storage medium for special effect generation

Publications (1)

Publication Number Publication Date
WO2025161697A1 true WO2025161697A1 (en) 2025-08-07

Family

ID=90515603

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2024/137861 Pending WO2025161697A1 (en) 2024-02-02 2024-12-09 Method and apparatus for special-effects generation, and device and storage medium

Country Status (2)

Country Link
CN (1) CN117830445A (en)
WO (1) WO2025161697A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117830445A (en) * 2024-02-02 2024-04-05 北京字跳网络技术有限公司 Method, apparatus, device and storage medium for special effect generation

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102348115A (en) * 2010-08-02 2012-02-08 南京壹进制信息技术有限公司 Method and device for removing redundant images from video
CN109754383A (en) * 2017-11-08 2019-05-14 中移(杭州)信息技术有限公司 Method and device for generating special effects video
CN115619960A (en) * 2021-07-15 2023-01-17 北京小米移动软件有限公司 Image processing method, device and electronic equipment
CN115761063A (en) * 2022-11-01 2023-03-07 网易(杭州)网络有限公司 Special effect generation method and device for variable speed animation, electronic equipment and storage medium
CN117372933A (en) * 2023-12-06 2024-01-09 南京智绘星图信息科技有限公司 Image redundancy removing method and device and electronic equipment
CN117830445A (en) * 2024-02-02 2024-04-05 北京字跳网络技术有限公司 Method, apparatus, device and storage medium for special effect generation

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102348115A (en) * 2010-08-02 2012-02-08 南京壹进制信息技术有限公司 Method and device for removing redundant images from video
CN109754383A (en) * 2017-11-08 2019-05-14 中移(杭州)信息技术有限公司 Method and device for generating special effects video
CN115619960A (en) * 2021-07-15 2023-01-17 北京小米移动软件有限公司 Image processing method, device and electronic equipment
CN115761063A (en) * 2022-11-01 2023-03-07 网易(杭州)网络有限公司 Special effect generation method and device for variable speed animation, electronic equipment and storage medium
CN117372933A (en) * 2023-12-06 2024-01-09 南京智绘星图信息科技有限公司 Image redundancy removing method and device and electronic equipment
CN117830445A (en) * 2024-02-02 2024-04-05 北京字跳网络技术有限公司 Method, apparatus, device and storage medium for special effect generation

Also Published As

Publication number Publication date
CN117830445A (en) 2024-04-05

Similar Documents

Publication Publication Date Title
US11600301B2 (en) Method and device of editing a video
US7698628B2 (en) Method and system to persist state
Neumann et al. An efficient perception-based adaptive color to gray transformation
TWI686768B (en) Method and device for animating images on mobile equipment
CN112804459A (en) Image display method and device based on virtual camera, storage medium and electronic equipment
WO2022088783A1 (en) Video production method and apparatus
WO2017173781A1 (en) Video frame capturing method and device
CN112070863A (en) Animation file processing method, apparatus, computer-readable storage medium and computer device
CN111209422A (en) Image display method, device, electronic device, and storage medium
WO2022166595A1 (en) Video generation method and apparatus based on picture
WO2025161697A1 (en) Method and apparatus for special-effects generation, and device and storage medium
WO2025162414A1 (en) Media editing method and apparatus, device, and storage medium
WO2025162171A1 (en) Interaction method and apparatus, device, and storage medium
CN118172236A (en) Method, apparatus, device and storage medium for image processing
WO2025175881A1 (en) Media content processing method and apparatus, device and storage medium
US20240331242A1 (en) Systems and methods for converting composite image data
US9483237B2 (en) Method and system for providing an image effects interface
CN111460770A (en) Method, device, equipment and storage medium for synchronizing element attributes in document
US20150128029A1 (en) Method and apparatus for rendering data of web application and recording medium thereof
US20250271981A1 (en) Method, apparatus, device, and storage medium for media item input
WO2025261521A1 (en) Method and apparatus for generating media content, device, and storage medium
WO2025237253A1 (en) Special-effect editing method and apparatus, special-effect interaction method and apparatus, and device and storage medium
WO2024087971A1 (en) Method and apparatus for image processing, and storage medium
CN116206014A (en) Image preview method, device, equipment and storage medium
CN121217921A (en) Method, device, equipment and storage medium for selecting and updating long-term reference frame based on rendering scene state driving

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: 24921719

Country of ref document: EP

Kind code of ref document: A1