Special effect adding method and apparatus, electronic device and storage medium
By automatically determining and applying special effects addition solutions, the problem of cumbersome special effects addition operations in the existing technology is solved, and the user experience and special effects addition efficiency are improved.
Patent Information
- Application Number
- PCT/CN2024/121435
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-26
- Filing Date
- 2024-09-26
- Publication Date
- 2025-04-03
AI Technical Summary
The existing special effects addition method requires the user to manually set the display parameters of the special effects. The operation steps are cumbersome and affect the user experience. It is especially not suitable for the special effects addition of video image frames.
By obtaining the image frame sequence and special effects set of the target video, the special effects addition scheme is determined based on the feature information of the image frame and special effects, and the corresponding special effects are automatically added to the image frame.
It reduces user operation steps, simplifies the special effects addition process, improves the user experience, and is especially suitable for the special effects addition of video image frames.
Smart Images

Figure CN2024121435_03042025_PF_FP_ABST
Abstract
Description
Special effects adding method, device, electronic device and storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed on September 26, 2023, with application number 202311254783.1 and invention name “Special effects adding method, device, electronic device and storage medium”. The entire contents of that application are incorporated by reference into this application. Technical Field
[0003] The present disclosure relates to the field of image processing technology, and in particular to a special effect adding method, device, electronic device, and storage medium. Background Art
[0004] In a platform for interaction through video, when users create videos for uploading to the video interaction platform, they can enhance the interest, richness and readability of the videos by adding special effects to the videos.
[0005] With existing methods for adding special effects, after selecting the desired effect, users must manually configure the effect's display parameters (such as the effect's display position, the color of the text within the effect, and the size of the effect). This method requires multiple steps, making the process cumbersome and impactful for the user experience. Due to this cumbersome process, it is particularly unsuitable for adding special effects to video frames.
[0006] Summary of the Invention
[0007] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a special effect adding method, device, electronic device and storage medium.
[0008] In a first aspect, the present disclosure provides a method for adding special effects, comprising:
[0009] Obtain the target image frame sequence and target special effects set of the target video;
[0010] determining a special effect adding scheme based on feature information of image frames in the target image frame sequence and feature information of target special effects in the target special effect set;
[0011] Based on the special effect adding scheme, a corresponding target special effect is added to each image frame in the target image frame sequence.
[0012] In a second aspect, the present disclosure further provides a special effect adding device, comprising:
[0013] An acquisition module, used to acquire a target image frame sequence and a target special effect set of a target video;
[0014] A scheme determining module, configured to determine a special effect adding scheme based on feature information of image frames in the target image frame sequence and feature information of target special effects in the target special effect set;
[0015] An adding module is used to add a corresponding target special effect to each image frame in the target image frame sequence based on the special effect adding scheme.
[0016] In a third aspect, the present disclosure further provides an electronic device, comprising:
[0017] one or more processors;
[0018] a storage device for storing one or more programs;
[0019] When the one or more programs are executed by the one or more processors, the one or more processors implement the special effect adding method as described above.
[0020] In a fourth aspect, the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, which implements the special effects adding method described above when executed by a processor.
[0021] The technical solution provided by the embodiments of the present disclosure has the following advantages over the prior art:
[0022] The technical solution provided by the embodiments of the present disclosure determines a special effects adding scheme by setting feature information based on image frames in a target image frame sequence and feature information of target special effects in a target special effects set; based on the special effects adding scheme, corresponding target special effects are added to each image frame in the target image frame sequence. The essence of the technical solution is that the executing subject of the method determines the specific display parameters of the target special effects in the image frame by itself, rather than the user performing specific operations on a device that can add special effects to convey the specific display parameters of the target special effects in the image frame to the device that can add special effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0024] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0025] FIG1 is a flow chart of a method for adding special effects provided by an embodiment of the present disclosure;
[0026] FIG2 is a schematic diagram of adding special effects to an image frame according to an embodiment of the present disclosure;
[0027] FIG3 is a schematic structural diagram of a special effect adding device according to an embodiment of the present disclosure;
[0028] FIG4 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features therein can be combined with each other in the absence of conflict.
[0030] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0031] FIG1 is a flowchart of a method for adding special effects provided by an embodiment of the present disclosure. This embodiment is applicable to situations where special effects are added to image frames in a video on a client. The method can be executed by a special effects adding device, which can be implemented in software and / or hardware. The device can be configured in an electronic device, such as a terminal, specifically including but not limited to smartphones, PDAs, tablet computers, wearable devices with displays, desktop computers, laptop computers, all-in-one computers, smart home devices, etc. Alternatively, this embodiment is applicable to situations where special effects are added to image frames in a video on a server. The method can be executed by a special effects adding device, which can be implemented in software and / or hardware. The device can be configured in an electronic device, such as a server.
[0032] As shown in FIG1 , the method may specifically include:
[0033] S110 , obtaining a target image frame sequence and a target special effects set of a target video.
[0034] The target video can be, for example, a video to which special effects need to be added. In practice, the target video can be optionally specified by the user. The target video can be a video previously recorded.
[0035] The target image frame sequence can be, for example, a set of image frames to which special effects are to be added. If the set consisting of all image frames of the target video is referred to as the first set, the target image frame sequence is a subset of the first set. That is, the target image frame sequence can be completely identical to the first set, or it can be a proper subset of the first set.
[0036] There are various specific methods for executing "obtaining a target image frame sequence of a target video," which are not limited in this application. For example, if the target image frame sequence is a proper subset of the first set, "obtaining a target image frame sequence of a target video" includes: obtaining a target video; in response to a video capture instruction, capturing a target video segment from the target video; and determining the image frame sequence corresponding to the target video segment as the target image frame sequence.
[0037] Optionally, the video capture instruction includes segmentation point information; the segmentation point information may be, for example, information describing characteristics of the segmentation point. Exemplarily, the segmentation point information includes at least one of a start time point, an end time point, and a duration of the target video segment on the target video playback timeline.
[0038] The target video segment may be, for example, a capture result obtained by capturing the target video according to a video capture instruction.
[0039] Optionally, in response to the video capture instruction, before capturing the target video segment from the target video, the method further includes: generating the video capture instruction based on time information of the target video segment and / or the rhythm of the background music of the target video.
[0040] Exemplarily, the time information of the target video segment may include at least one of the start time point, end time point, and duration of the target video segment to be intercepted on the target video playback timeline. In some embodiments, the time information of the target video segment may be obtained based on input information input by a user.
[0041] Generating a video capture instruction based on the rhythm of the background music of a target video may, for example, include: identifying the rhythm of the background music of the target video using a preset audio rhythm recognition model; determining the time information of the target video segment based on the identified rhythm; and generating a video capture instruction based on the time information of the target video segment. The rhythm may include, for example, beats and / or drum beats.
[0042] The target special effect set may be, for example, a set consisting of target special effects. In some embodiments, the target special effect may be, for example, a special effect specified by the user that the user wishes to add. In practice, the target special effect set may include only one target special effect or multiple target special effects. This application does not impose any restrictions on this.
[0043] The target special effect can be, for example, at least one of the following: adding a sticker or label to an image frame; beautifying an object in an image frame; stylizing an object in an image frame; blurring an image frame; sharpening an image frame; adding noise to an image frame; changing the hue of an image frame; adding a halo to an image frame; changing the perspective of an image frame; or creating a 3D effect. Special effects for stickers or labels include, but are not limited to, text effects, outline effects, and graffiti effects.
[0044] S120 : Determine a special effect adding scheme based on feature information of image frames in the target image frame sequence and feature information of target special effects in the target special effect set.
[0045] The characteristic information of the image frame may include, for example, the category, shape and color of the objects in the image frame in the initial state (i.e., the state without adding special effects), the relative position relationship and occlusion relationship between different objects in the image frame, the size, pixels, brightness, color, etc. of the image frame.
[0046] There are various methods for determining the characteristic information of an image frame, which are not limited in this application. Exemplarily, determining the characteristic information of an image frame includes: identifying the outline of an object in the image frame to obtain a recognition result; and determining the characteristic information of the image frame based on the recognition result. The essence of this arrangement is to first enable the subject executing this method to understand the content displayed by the image frame; then, based on this understanding, the characteristic information of the image frame is obtained.
[0047] Optionally, recognizing the outline of the object in the image frame may include segmenting the image frame using an image segmentation model; and determining the outline of the object in the image frame based on the segmentation result.
[0048] The characteristic information of the target special effect may vary according to the type of special effect. For example, if the target special effect is a special effect of adding stickers or labels to the image frame, the characteristic information of the target special effect may include, for example, the placement requirements of the stickers or labels, the adjustable range of the sticker or label size, the adjustable range of transparency, etc. If the target special effect is a special effect for beautifying the object in the image frame, the characteristic information of the target special effect may include, for example, the maximum degree of deformation, the maximum movable range of the object to be beautified in the graphic (here considering whether the object to be beautified can be tracked), the type of object that can be beautified, etc. If the target special effect is a special effect of adding a halo, the characteristic information of the target special effect may include, for example, the selectable range of the halo center, the adjustable range of the halo radius, the adjustable range of the halo intensity, etc. If the target special effect is a special effect for making the image frame present a 3D effect, the characteristic information of the target special effect may include, for example, the selectable viewing angle range, the selectable lighting direction, etc.
[0049] For example, a special effects addition scheme can be specifically generated for a target image frame sequence and a target special effects set, serving as a basis for adding target special effects from the target special effects set to the image frames. Exemplarily, the special effects addition scheme includes at least one of the following: the arrangement of target special effects from the target special effects set within the image frames, and the display attributes of each target special effect; the display attributes of each target special effect include at least one of the target special effect's display position, size, scale, color, contrast, brightness, and clarity.
[0050] If the target special effect set includes a plurality of sticker (or label) type special effects, the arrangement of the sticker (or label) type special effects in the image frame includes randomly and non-overlappingly spreading the plurality of sticker (or label) type special effects over the entire image frame; or, spreading the plurality of sticker (or label) type special effects over the entire image frame in a certain pattern without overlapping; or, spreading the plurality of sticker (or label) type special effects over the background area of the entire image frame in a certain pattern without overlapping. The background area of the image frame refers to the area in the image frame excluding the area occupied by the target object. The present application does not limit what the target object refers to. In some embodiments, the target object may be a person or an animal.
[0051] There are various methods for implementing this step, which are not limited in this application. Exemplarily, the method for implementing this step includes: determining a special effect adding scheme based on feature information of image frames in the target image frame sequence, feature information of target special effects in the target special effect set, and a preset special effect adding scheme determination rule.
[0052] The special effects addition scheme determination rules can, for example, be the basis for generating a special effects addition scheme for a target image frame sequence and a target special effects set. By properly setting the special effects addition scheme determination rules, the generated special effects addition scheme can be more reasonable, resulting in an aesthetically pleasing image frame after the corresponding target special effects are subsequently added to the image frame according to the special effects addition scheme.
[0053] This application does not limit the specific content of the rules for determining the special effect addition scheme. In practice, the rules for determining the special effect addition scheme can be set from one or more perspectives, such as maintaining the overall harmony of the picture, making the image appear more vivid, clear, and lively, maintaining the natural feel of the image, and composition. For example, if the target special effect is a text-based special effect, the rules for determining the special effect addition scheme include three: 1. The number of characters per unit area is less than 20; 2. The display location of the target special effect is a blank area or an area not occupied by the target object; 3. The minimum distance between the text sticker and the image sticker is less than a set distance threshold. If the target special effect is a contour-based special effect, the rules for determining the special effect addition scheme may include: the distance of the contour line from the target object, the specific method for determining the direction of the contour line based on the contour of the target object, the correspondence between the contour line color and the main color of the target object, and the correspondence between the contour line color and the background color. If the target special effect is a graffiti-based special effect, the rules for determining the special effect addition scheme include the correspondence between the graffiti-based special effect color and the background color in the image frame, the display location of the graffiti-based special effect is a blank area or an area not occupied by the target object, etc.
[0054] Furthermore, a preset special effect adding scheme determination rule may be set to include specified style information.
[0055] The style information may be, for example, information describing the artistic style of the image frame after the target special effect is added. For example, the style information may be comic style, British style, magazine style, or the like.
[0056] In some scenarios, the style information may be specified by the user, or a default style may be used as the specified style information.
[0057] S130 : Based on the special effect adding solution, add a corresponding target special effect to each image frame in the target image frame sequence.
[0058] It should be noted that, in practice, if the target special effects set includes multiple target special effects, the determined special effects addition scheme may use some or all of the target special effects in the target special effects set. This application does not impose any restrictions on this. In this step, the target special effects used in the special effects addition scheme are added to the image frame.
[0059] In addition, the target special effects used in the special effect adding solutions corresponding to different image frames may be completely the same or may be different.
[0060] For example, referring to Figure 2, four special effects are added to the first image frame: text effects, outline effects, graffiti effects 1, and graffiti effects 2. The special effects added to the second image frame are the same as those added to the first image frame. The special effects added to the third image frame are different from those added to the second image frame. In the third image frame, only text effects, outline effects, and graffiti effects 1 are added; graffiti effects 2 are not added.
[0061] The above technical solution determines the special effects adding scheme by setting feature information based on the image frames in the target image frame sequence and the feature information of the target special effects in the target special effects set; based on the special effects adding scheme, the corresponding target special effects are added to each image frame in the target image frame sequence. Its essence is that the execution subject of the method determines the specific display parameters of the target special effects in the image frame by itself, rather than the user performing specific operations on the device that can add special effects to convey the specific display parameters of the target special effects in the image frame to the device that can add special effects. Therefore, it can fully reduce the number of operating steps that the user needs to perform during the special effects adding process and reduce the difficulty of adding special effects. It is particularly suitable for scenarios where special effects are added to a large number of image frames in a video.
[0062] Based on the above technical solution, if the target image frame sequence includes multiple image frames, S120 may optionally include: determining a special effects adding scheme corresponding to each image frame based on feature information of each image frame and feature information of a target special effect in the target special effects set; and S130 may include: adding the corresponding target special effect to each image frame according to the special effects adding scheme corresponding to the image frame. This ensures that each image frame appears more natural, reasonable, and aesthetically pleasing after the special effects are added.
[0063] In another embodiment, optionally, the target image frame sequence includes a target image frame and a candidate image frame; S120 includes: determining a special effects adding scheme applicable to the target image frame based on feature information of the target image frame and feature information of the target special effects in the target special effects set; S130 includes: adding a corresponding target special effect to the target image frame based on the special effects adding scheme; adjusting the special effects adding scheme according to the difference between the target image frame and the candidate image frame; and adding a corresponding target special effect to the candidate image frame based on the adjusted special effects adding scheme.
[0064] The target image frame is a specific image frame determined from the target image frame sequence. In practice, the target image frame can be any image frame in the target image frame sequence. This application does not limit the specific method for determining the target image frame. For example, the target image frame is specified by the user, or the first image frame in the target image frame sequence is determined as the target image frame. All image frames in the target image frame sequence other than the target image frame are candidate image frames.
[0065] Since the differences between different image frames in the same target image frame sequence are small, the differences between special effect adding schemes for different image frames suitable for the same target image frame sequence will also be small. By setting the special effect adding scheme according to the differences between the target image frame and the candidate image frame; adding the corresponding target special effects to the candidate image frame based on the adjusted special effect adding scheme, it can ensure that after the target special effect set is added, each image frame is natural, reasonable, and aesthetically pleasing; on the other hand, it can reduce the number of executions of "determining the special effect adding scheme based on the feature information of the image frame and the feature information of the target special effect in the target special effect set", thereby fully reducing the amount of calculation to obtain the special effect adding scheme and reducing the requirements for the computing power of the special effect adding device.
[0066] Among them, the special effect adding scheme is adjusted, for example, the display properties of the target special effect can be included.
[0067] Optionally, assume that the target image frame sequence includes a total of P image frames. S120 can also be replaced by: based on the feature information of the first image frame and the feature information of the target special effect in the target special effect set, determine the special effect adding scheme applicable to the first image frame; let Q=2, and repeat the loop step until the special effect adding schemes applicable to P image frames are determined. The loop step includes: adjusting the special effect adding scheme applicable to the Q-1 image frame according to the difference between the Q-th image frame and the Q-1-th image frame to obtain a special effect adding scheme applicable to the Q-th image frame; updating the value of Q so that the difference between the value of Q after the update and the value of Q before the update is 1. The reason for this setting is that, under normal circumstances, the difference between two adjacent image frames is the smallest, and the difference in the special effect adding scheme should also be the smallest. This setting can ensure that the special effect adding schemes obtained are appropriate, reasonable, coherent, and logical. In addition, this setting is conducive to shortening the overall time spent on determining the special effect adding scheme.
[0068] Assuming the target video is a recording of a person dancing, referring again to Figure 2, the first, second, and third frames show different arm movements. If the first frame is used as the target frame, a special effects addition scheme applicable to the first frame is determined based on the feature information of the first frame and the feature information of the target special effects in the target special effects set. The special effects addition scheme applicable to the first frame includes the placement of graffiti special effect 2 and the outline direction of the outline special effects.
[0069] Because the position of the character's arm in the second frame has changed compared to the first, the special effects solution applied to the first frame was adjusted to create a special effects solution for the second frame. Compared to the special effects solution applied to the first frame, the outline direction of the outline-type special effects in the special effects solution applied to the second frame was adjusted.
[0070] Because the position of the character's arm in the third frame has changed further compared to the second, and this change overlaps with Graffiti Effect 2, the effects scheme applied to the second frame is adjusted to produce a scheme for the third frame. Compared to the scheme applied to the second frame, the scheme applied to the third frame further adjusts the outline direction of the outline effects and determines that Graffiti Effect 2 will not be displayed.
[0071] 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.
[0072] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0073] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0074] It is understandable that the above notification and user authorization process are merely illustrative and do not limit 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.
[0075] It should be noted that for the aforementioned method embodiments, for simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should be aware that the present invention is not limited by the order of the actions described, because according to the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0076] FIG3 is a schematic diagram of the structure of a special effect adding device in an embodiment of the present disclosure. The special effect adding device provided in the embodiment of the present disclosure can be configured in the client or in the server. Referring to FIG3, the special effect adding device specifically includes:
[0077] An acquisition module 210 is configured to acquire a target image frame sequence and a target special effects set of a target video;
[0078] A scheme determining module 220 is configured to determine a special effect adding scheme based on feature information of image frames in the target image frame sequence and feature information of target special effects in the target special effect set;
[0079] The adding module 230 is configured to add a corresponding target special effect to each image frame in the target image frame sequence based on the special effect adding solution.
[0080] Furthermore, the solution determination module 220 is configured to:
[0081] A special effect adding scheme is determined based on feature information of image frames in the target image frame sequence, feature information of target special effects in the target special effect set, and preset special effect adding scheme determination rules, wherein the special effect adding scheme determination rules include specified style information.
[0082] Furthermore, the device further includes a feature determination module for identifying the contours of objects in the image frames to obtain a recognition result before determining a special effect adding scheme based on feature information of the image frames in the target image frame sequence and feature information of target special effects in the target special effect set;
[0083] Based on the recognition result, feature information of the image frame is determined.
[0084] Furthermore, the special effect adding scheme includes at least one of the following:
[0085] The arrangement of the target special effects in the target special effects set in the image frame, and the display attributes of each target special effect;
[0086] The display attributes of the target special effect include at least one of the display position, size, scaling, color, contrast, brightness and clarity of the target special effect.
[0087] Furthermore, the target image frame sequence includes a target image frame and a candidate image frame;
[0088] a scheme determining module, configured to determine a special effect adding scheme applicable to the target image frame based on feature information of the target image frame and feature information of a target special effect in the target special effect set;
[0089] An adding module is used to add a corresponding target special effect in the target image frame based on the special effect adding scheme; adjust the special effect adding scheme according to the difference between the target image frame and the candidate image frame; and add a corresponding target special effect in the candidate image frame based on the adjusted special effect adding scheme.
[0090] Furthermore, a module is obtained for:
[0091] Get the target video;
[0092] In response to the video interception instruction, intercepting a target video segment from the target video;
[0093] The image frame sequence corresponding to the target video clip is determined as the target image frame sequence.
[0094] Furthermore, the acquisition module is configured to generate the video interception instruction based on time information of the target video segment and / or the rhythm of the background music of the target video before intercepting the target video segment from the target video in response to the video interception instruction.
[0095] The special effects adding device provided in the embodiment of the present disclosure can execute the steps executed by the client or server in the special effects adding method provided in the embodiment of the method of the present disclosure, and has the execution steps and beneficial effects, which will not be repeated here.
[0096] FIG4 is a schematic diagram of the structure of an electronic device in an embodiment of the present disclosure. Specific reference will be made below to FIG4 , which shows a schematic diagram of the structure of an electronic device 1000 suitable for implementing an embodiment of the present disclosure. The electronic device 1000 in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), wearable electronic devices, and the like, as well as fixed terminals such as digital TVs, desktop computers, smart home devices, and the like. The electronic device shown in FIG4 is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.
[0097] As shown in Figure 4, the electronic device 1000 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1001, which can perform various appropriate actions and processes to implement the special effect adding method of the embodiment described in the present disclosure according to the program stored in the read-only memory (ROM) 1002 or the program loaded from the storage device 1008 into the random access memory (RAM) 1003. In the RAM 1003, various programs and information required for the operation of the electronic device 1000 are also stored. The processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0098] Typically, the following devices may be connected to the I / O interface 1005: an input device 1006 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1007 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1008 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the electronic device 1000 to communicate with other devices wirelessly or by wire to exchange information. Although FIG4 shows the electronic device 1000 with various devices, it should be understood that not all of the devices shown are required to be implemented or present. More or fewer devices may be implemented or present instead.
[0099] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart, thereby implementing the special effects adding method as described above. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 1009, or installed from the storage device 1008, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0100] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include an information signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated information signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0101] In some embodiments, the client and server can communicate using any known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital information communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any known or future developed network.
[0102] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0103] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:
[0104] Obtain the target image frame sequence and target special effects set of the target video;
[0105] determining a special effect adding scheme based on feature information of image frames in the target image frame sequence and feature information of target special effects in the target special effect set;
[0106] Based on the special effect adding scheme, a corresponding target special effect is added to each image frame in the target image frame sequence.
[0107] Optionally, when the above one or more programs are executed by the electronic device, the electronic device may also execute other steps described in the above embodiments.
[0108] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0109] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession 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 flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0110] The units involved in the embodiments described in this disclosure may be implemented in software or hardware, wherein the name of a unit does not necessarily limit the unit itself.
[0111] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0112] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0113] According to one or more embodiments of the present disclosure, the present disclosure provides an electronic device, including:
[0114] one or more processors;
[0115] a memory for storing one or more programs;
[0116] When the one or more programs are executed by the one or more processors, the one or more processors implement any special effect adding method provided in the present disclosure.
[0117] According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the special effect adding methods provided in the present disclosure.
[0118] An embodiment of the present disclosure further provides a computer program product, which includes a computer program or instructions, and when the computer program or instructions are executed by a processor, the special effect adding method described above is implemented.
[0119] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0120] The foregoing description is intended only to provide specific embodiments of the present disclosure, intended to enable those skilled in the art to understand and implement the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the embodiments described herein, but rather to be construed in the broadest manner consistent with the principles and novel features disclosed herein.
Claims
1. A method for adding special effects, comprising: Obtain a target image frame sequence and a target special effect set of a target video; Determining a special effect adding scheme based on feature information of image frames in the target image frame sequence and feature information of target special effects in the target special effect set; Based on the special effect adding scheme, a corresponding target special effect is added to each image frame in the target image frame sequence.
2. The method according to claim 1, wherein: The determining of a special effect adding scheme based on the feature information of the image frames in the target image frame sequence and the feature information of the target special effect in the target special effect set includes: A special effect adding scheme is determined based on feature information of image frames in the target image frame sequence, feature information of target special effects in the target special effect set, and a preset special effect adding scheme determination rule, wherein the preset special effect adding scheme determination rule includes specified style information.
3. The method according to claim 1, wherein: Before determining the special effect adding scheme based on the feature information of the image frames in the target image frame sequence and the feature information of the target special effect in the target special effect set, the method further includes: Recognize the contour of the object in the image frame to obtain a recognition result; Based on the recognition result, feature information of the image frame is determined.
4. The method according to claim 1, wherein: The special effect adding scheme includes at least one of the following: The arrangement of the target special effects in the target special effects set in the image frame, and the display properties of each of the target special effects; The display attributes of the target special effect include at least one of the display position, size, scaling, color, contrast, brightness and clarity of the target special effect.
5. The method according to claim 1, wherein: The target image frame sequence includes a target image frame and a candidate image frame; The determining of the special effect adding scheme based on the characteristic information of the image frame in the target image frame sequence and the characteristic information of the target special effect in the target special effect set includes: determining the special effect adding scheme applicable to the target image frame based on the characteristic information of the target image frame and the characteristic information of the target special effect in the target special effect set; The method of adding corresponding target special effects to each image frame in the target image frame sequence based on the special effects adding scheme includes: adding corresponding target special effects to the target image frame based on the special effects adding scheme; adjusting the special effects adding scheme according to the difference between the target image frame and the candidate image frame; and adding corresponding target special effects to the candidate image frame based on the adjusted special effects adding scheme.
6. The method according to claim 1, wherein: The step of obtaining a target image frame sequence of a target video includes: Get the target video; In response to the video capture instruction, capture a target video segment from the target video; The image frame sequence corresponding to the target video clip is determined as the target image frame sequence.
7. The method according to claim 6, wherein: Before intercepting the target video segment from the target video in response to the video interception instruction, the method further includes: The video capture instruction is generated based on the time information of the target video segment and / or the rhythm of the background music of the target video.
8. A special effect adding device, comprising: An acquisition module, used to acquire a target image frame sequence and a target special effect set of a target video; A scheme determination module, configured to determine a special effect adding scheme based on feature information of image frames in the target image frame sequence and feature information of target special effects in the target special effect set; An adding module is used to add corresponding target special effects to each image frame in the target image frame sequence based on the special effects adding scheme.
9. An electronic device, wherein: The electronic device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Video processing method and device, video playing method and device, storage medium and equipment
CN112040263A
Special effect video production method and device, electronic equipment and readable storage medium
CN115801978A
Video processing method and device, electronic equipment and computer readable storage medium
CN116137648A
Special effect adding method and device, electronic equipment and storage medium
CN117376631A
Method, device and apparatus for adding video special effects and storage medium
US20220086521A1